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

Compiling: added option in the conf.xml file to specify matlab version


Signed-off-by: default avatarNicola Vigano <nicola.vigano@esrf.fr>

git-svn-id: https://svn.code.sf.net/p/dct/code/trunk@606 4c865b51-4357-4376-afb4-474e03ccb993
parent 9f1daf0c
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,8 @@
<password>gtadmin</password>
</database>
<matlab_command>matlab2012a</matlab_command>
<mex_files>
<exclude_list>
<path>zUtil_Imaging/pmedf/pmedf_readC.cpp</path>
......
......@@ -176,6 +176,22 @@ function initialise_gt()
addpath('/scisoft/users/batenbur/gpu/matlab/algorithms');
end
% Check which version of matlab compiled the oar executables
if isfield(xmlConf, 'matlab_command')
matlabCommand = xmlConf.('matlab_command');
currentMatlabRelease = version('-release');
if (~strcmpi(['matlab' currentMatlabRelease], matlabCommand))
warning('MATLAB_COMPILED:version_mismatch', ...
['You are now running matlab "%s", but the matlab ' ...
'command specified in conf.xml is "%s".\nThere is no ' ...
'guarantee that OAR jobs will work'], ...
currentMatlabRelease, matlabCommand);
end
else
warning('XML:no_matlab_executable_version', ...
'Couldn''t find matlab executable version in conf.xml');
end
disp('Finished adding')
end
......@@ -7,6 +7,8 @@ import sys
import subprocess
import string
from xml_dct_io import DCTConf
class FunctionsBuilder(object):
submitMethods = [ 'OAR_make',
......@@ -182,7 +184,7 @@ if __name__=="__main__":
will_compile = True
will_generate = True
force_compile = False
matlab_executable = 'matlab2011b'
matlab_executable = DCTConf().getMatlabCommand()
mfiles_to_consider = [ ]
for index in range(len(sys.argv)):
if skip_next is False:
......
......@@ -34,6 +34,9 @@ class DCTConf(DCTXMLBase):
def getVersion(self):
return self.tree.findtext("version", "0")
def getMatlabCommand(self):
return self.tree.findtext("matlab_command", "matlab")
def getRootDir(self):
return self.tree.findtext("root_dir")
......@@ -76,4 +79,3 @@ class MexConf(object):
else:
return None
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