Index: /trunk/src/series.m
===================================================================
--- /trunk/src/series.m	(revision 1004)
+++ /trunk/src/series.m	(revision 1005)
@@ -1922,5 +1922,6 @@
                             'source /etc/profile \n'...
                             'module load matlab/''' matlab_version ''' \n'...% CHOICE OF MATLAB VERSION
-                            'matlab -nodisplay -nosplash -nojvm -logfile ''' filelog_global ''' <<END_MATLAB \n'...
+                            'time_start=$(date +%%s)\n'...
+                            'matlab -nodisplay -nosplash -nojvm -logfile ''' filelog_global ''' <<END_MATLAB\n'...
                             'addpath(''' path_series '''); \n'...
                             'addpath(''' Param.Action.ActionPath '''); \n'];
@@ -1928,7 +1929,9 @@
                             cmd=[cmd '' Param.Action.ActionName  '( ''' filexml{iprocess} '''); \n'];
                         end
-                        cmd=[cmd  'exit \n' 'END_MATLAB \n'];
+                        cmd=[cmd  'exit \n' 'END_MATLAB\n'...
+                            'time_end=$(date +%%s)\n'...
+                            'echo "global time = " $(($time_end - $time_start)) >> ''' filelog_global '''\n'];
                         fprintf(fid,cmd); % fill the executable file with the  char string cmd
-                        fclose(fid); % close the executable file
+                        fclose(fid); % close the executable filefilelog_global
                         system(['chmod +x ' file_exe_global]); % set the file to executable
                     case {'PCWIN','PCWIN64'}
@@ -1991,10 +1994,10 @@
                     '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'...
+                    'matlab -nodisplay -nosplash -nojvm -singleCompThread -logfile ''' filelog{iprocess} ''' <<END_MATLAB\n'...
                     'addpath(''' path_series '''); \n'...
                     'addpath(''' Param.Action.ActionPath '''); \n'...
                     '' Param.Action.ActionName  '( ''' filexml{iprocess} '''); \n'...
-                    'exit \n'...
-                    'END_MATLAB \n'];
+                    'exit' '\n'...
+                    'END_MATLAB\n'];
             end
             fprintf(fid,cmd); % fill the executable file with the  char string cmd
