From bdb94dd0b3ae0e962dddd9ce0a98c91b5178d1e1 Mon Sep 17 00:00:00 2001 From: Nicola Vigano <nicola.vigano@esrf.fr> Date: Wed, 6 Feb 2013 15:58:39 +0100 Subject: [PATCH] Python/launch: fixed matlab launching Signed-off-by: Nicola Vigano <nicola.vigano@esrf.fr> --- dct_launch.py | 2 +- initialise_gt.m | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dct_launch.py b/dct_launch.py index 530b4f5b..485bbbfa 100755 --- a/dct_launch.py +++ b/dct_launch.py @@ -79,7 +79,7 @@ class DCTLauncher(object): env_var = os.environ["LD_LIBRARY_PATH"] os.environ["LD_LIBRARY_PATH"] = ":".join([env_var, lib]) - cmd = [self.conf.getMatlabCommand()] + cmd = [os.path.join(self.conf.getMatlabPath(), "bin", "matlab")] for arg in self.args: cmd.append(arg) cmd.append("-r") diff --git a/initialise_gt.m b/initialise_gt.m index 406b994b..39deeb5f 100755 --- a/initialise_gt.m +++ b/initialise_gt.m @@ -189,15 +189,15 @@ function initialise_gt(ignore_id19) end % Check which version of matlab compiled the oar executables - if isfield(xmlConf, 'matlab_command') - matlabCommand = xmlConf.('matlab_command'); + if isfield(xmlConf, 'matlab') && isfield(xmlConf.matlab, 'version') + matlabVersion = xmlConf.matlab.version; currentMatlabRelease = version('-release'); - if (~strcmpi(['matlab' currentMatlabRelease], matlabCommand)) + if (~strcmpi(currentMatlabRelease, matlabVersion)) 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); + currentMatlabRelease, matlabVersion); end else warning('XML:no_matlab_executable_version', ... -- GitLab