Index: /trunk/src/civ.m
===================================================================
--- /trunk/src/civ.m	(revision 972)
+++ /trunk/src/civ.m	(revision 973)
@@ -1381,5 +1381,5 @@
             fprintf(fid,['#!/bin/bash \n' ...
                 '/etc/sysprofile \n'...
-                'matlab -nodisplay -nosplash -nojvm <<END_MATLAB \n'...
+                'matlab -nodisplay -nosplash -nojvm -singleCompThread <<END_MATLAB \n'...
                 'addpath(''' path_civ ''');\n']);
 %             for p=1:length(batch_file_list)
Index: /trunk/src/series.m
===================================================================
--- /trunk/src/series.m	(revision 972)
+++ /trunk/src/series.m	(revision 973)
@@ -1894,5 +1894,5 @@
                         cmd=[...
                             '#!/bin/bash \n'...
-                            '. /etc/sysprofile \n'...
+                            'source /etc/profile \n'...
                             'matlab -nodisplay -nosplash -nojvm -logfile ''' filelog_global ''' <<END_MATLAB \n'...
                             'addpath(''' path_series '''); \n'...
@@ -1958,9 +1958,11 @@
                     ActionFullName ' ' RunTime ' ' filexml{iprocess}];%allow writting access to created files for user group
             else
+                matlab_ver = ver('MATLAB');
+                matlab_version = matlab_ver.Version;
                 cmd=[...
                     '#!/bin/bash \n'...
-                    '. /etc/sysprofile \n'...
-                    'module load matlab/8.6 \n'...% CHOICE OF MATLAB VERSION
-                    'matlab -nodisplay -nosplash -nojvm -logfile ''' filelog{iprocess} ''' <<END_MATLAB \n'...
+                    'source /etc/profile \n'...
+                    'module load matlab/''' matlab_version ''' \n'...% CHOICE OF MATLAB VERSION
+                    'matlab -nodisplay -nosplash -nojvm -singleCompThread -logfile ''' filelog{iprocess} ''' <<END_MATLAB \n'...
                     'addpath(''' path_series '''); \n'...
                     'addpath(''' Param.Action.ActionPath '''); \n'...
