Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DCT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
graintracking
DCT
Commits
95a1ab68
Commit
95a1ab68
authored
8 years ago
by
Nicola Vigano
Browse files
Options
Downloads
Patches
Plain Diff
Matlab-invocation: added flag to skip matlab function compilation check
Signed-off-by:
Nicola Vigano
<
nicola.vigano@esrf.fr
>
parent
a7347898
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
initialise_gt.m
+5
-7
5 additions, 7 deletions
initialise_gt.m
zUtil_Python/dct_compile_matlab_functions.py
+1
-1
1 addition, 1 deletion
zUtil_Python/dct_compile_matlab_functions.py
zUtil_Python/dct_matlab_invocation.py
+7
-3
7 additions, 3 deletions
zUtil_Python/dct_matlab_invocation.py
with
13 additions
and
11 deletions
initialise_gt.m
+
5
−
7
View file @
95a1ab68
function
initialise_gt
(
ignore_id19
)
function
initialise_gt
(
ignore_id19
,
skip_functions_check
)
% INITIALISE.M for Matlab installations on Windows, Macs, and Linux
% INITIALISE.M for Matlab installations on Windows, Macs, and Linux
%
%
% ADD DESIRED PATH ENTRIES TO THIS LIST FOLLOWING THE EXISTING FORMAT!!
% ADD DESIRED PATH ENTRIES TO THIS LIST FOLLOWING THE EXISTING FORMAT!!
...
@@ -13,10 +13,6 @@ function initialise_gt(ignore_id19)
...
@@ -13,10 +13,6 @@ function initialise_gt(ignore_id19)
% 2012, Modified and improved by Yoann Guilhem, guilhem@esrf.fr
% 2012, Modified and improved by Yoann Guilhem, guilhem@esrf.fr
% 2005, Create by Greg & Wolfgang
% 2005, Create by Greg & Wolfgang
if
(
~
exist
(
'ignore_id19'
,
'var'
))
ignore_id19
=
true
;
end
pathstruct
=
{
...
% Tools from ID19's legacy code
pathstruct
=
{
...
% Tools from ID19's legacy code
{
'/'
},
...
{
'/'
},
...
{
'/art'
},
...
% Algebraic reconstruction attempts
{
'/art'
},
...
% Algebraic reconstruction attempts
...
@@ -39,7 +35,7 @@ function initialise_gt(ignore_id19)
...
@@ -39,7 +35,7 @@ function initialise_gt(ignore_id19)
% No multi platform support, at the moment.
% No multi platform support, at the moment.
disp
([
'Machine is: '
,
computer
]);
disp
([
'Machine is: '
,
computer
]);
if
(
~
ignore_id19
)
if
(
exist
(
'ignore_id19'
,
'var'
)
&&
~
ignore_id19
)
deprecated_id19_paths
=
fullfile
(
'/data'
,
'id19'
,
'archive'
,
'matlab'
);
deprecated_id19_paths
=
fullfile
(
'/data'
,
'id19'
,
'archive'
,
'matlab'
);
% Linux machines
% Linux machines
...
@@ -250,7 +246,9 @@ function initialise_gt(ignore_id19)
...
@@ -250,7 +246,9 @@ function initialise_gt(ignore_id19)
setupMatGeom
();
setupMatGeom
();
disp
(
' '
)
disp
(
' '
)
if
(
verLessThan
(
'MATLAB'
,
'8.6.0'
))
if
(
exist
(
'skip_functions_check'
,
'var'
)
&&
skip_functions_check
)
check_compiled_funcs
=
false
;
elseif
(
verLessThan
(
'MATLAB'
,
'8.6.0'
))
check_compiled_funcs
=
true
;
check_compiled_funcs
=
true
;
else
else
check
=
inputwdefault
(
'Do you want to check compiled functions? (might be very slow) [y/n]'
,
'n'
);
check
=
inputwdefault
(
'Do you want to check compiled functions? (might be very slow) [y/n]'
,
'n'
);
...
...
This diff is collapsed.
Click to expand it.
zUtil_Python/dct_compile_matlab_functions.py
+
1
−
1
View file @
95a1ab68
...
@@ -179,7 +179,7 @@ class FunctionsBuilder(object):
...
@@ -179,7 +179,7 @@ class FunctionsBuilder(object):
extra_args
=
extra_args
,
\
extra_args
=
extra_args
,
\
extra_cmds
=
cmd
,
\
extra_cmds
=
cmd
,
\
ctrl_c_kill
=
True
)
ctrl_c_kill
=
True
)
invoker
.
invoke
()
invoker
.
invoke
(
skip_functions_check
=
True
)
print
(
""
)
print
(
""
)
...
...
This diff is collapsed.
Click to expand it.
zUtil_Python/dct_matlab_invocation.py
+
7
−
3
View file @
95a1ab68
...
@@ -27,7 +27,7 @@ class DCTMatlabInvocation(object):
...
@@ -27,7 +27,7 @@ class DCTMatlabInvocation(object):
self
.
utils
=
dct_utils_platform
.
UtilsFactory
.
getMachineDep
()
self
.
utils
=
dct_utils_platform
.
UtilsFactory
.
getMachineDep
()
def
invoke
(
self
):
def
invoke
(
self
,
skip_functions_check
=
False
):
self
.
conf
=
dct_io_xml
.
DCTConf
(
self
.
confPath
)
self
.
conf
=
dct_io_xml
.
DCTConf
(
self
.
confPath
)
# Adding runtime libraries
# Adding runtime libraries
...
@@ -60,8 +60,12 @@ class DCTMatlabInvocation(object):
...
@@ -60,8 +60,12 @@ class DCTMatlabInvocation(object):
cmd
.
append
(
"
-r
"
)
cmd
.
append
(
"
-r
"
)
ignore_id19
=
self
.
conf
.
getIgnoreID19
()
ignore_id19
=
self
.
conf
.
getIgnoreID19
()
cmd
.
append
(
"
cd(
'
%s
'
);initialise_gt(%s);cd(
'
%s
'
);%s
"
\
if
skip_functions_check
is
True
:
%
(
self
.
dct_dir
,
ignore_id19
,
self
.
work_dir
,
\
skip_functions
=
'
true
'
;
else
:
skip_functions
=
'
false
'
cmd
.
append
(
"
cd(
'
%s
'
);initialise_gt(%s,%s);cd(
'
%s
'
);%s
"
\
%
(
self
.
dct_dir
,
ignore_id19
,
skip_functions
,
self
.
work_dir
,
\
""
.
join
(
self
.
extra_cmds
))
)
""
.
join
(
self
.
extra_cmds
))
)
print
(
"
Calling: %s
"
%
"
"
.
join
(
cmd
))
print
(
"
Calling: %s
"
%
"
"
.
join
(
cmd
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment