Skip to content
Snippets Groups Projects
Commit 95a1ab68 authored by Nicola Vigano's avatar Nicola Vigano
Browse files

Matlab-invocation: added flag to skip matlab function compilation check

parent a7347898
No related branches found
No related tags found
No related merge requests found
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');
......
...@@ -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("")
......
...@@ -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))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment