Changeset 1134 for trunk/src/series.m
- Timestamp:
- Apr 19, 2024, 8:21:23 PM (2 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series.m
r1133 r1134 654 654 i1=str2num(get(handles.num_first_i,'String')); 655 655 j1=str2num(get(handles.num_first_j,'String')); 656 InputFile=fullfile_uvmat('','',InputTable{iview,3},InputTable{iview,5},InputTable{iview,4},i1,[],j1,[]) 656 InputFile=fullfile_uvmat('','',InputTable{iview,3},InputTable{iview,5},InputTable{iview,4},i1,[],j1,[]); 657 657 [RootPath,~,RootFile,i1_series,i2_series,j1_series,j2_series,tild,FileInfo,MovieObject]=... 658 658 find_file_series(fullfile(InputTable{iview,1},InputTable{iview,2}),InputFile); … … 725 725 [FilePath,FileName,FileExt]=fileparts(fileinput); 726 726 %%%%%%%%%%%%%%%%%% 727 %TODO: case of input by uvmat: do not check agai the input se ies %%%%%%%727 %TODO: case of input by uvmat: do not check agai the input series %%%%%%% 728 728 %%%%%%%%%%%%%%%%%%% 729 729 % detect the file type, get the movie object if relevant, and look for the corresponding file series: … … 2046 2046 end 2047 2047 2048 %create the executable file2048 %create the executable and log file names 2049 2049 file_exe_global=fullfile_uvmat('','',Param.InputTable{1,3},ExeExt,OutputNomType,... 2050 2050 first_i,last_i,first_j,last_j); … … 2055 2055 2056 2056 for iprocess=1:NbProcess 2057 %create the executable file 2058 batch_file_list{iprocess}=fullfile(OutputDir,'0_EXE',regexprep(extxml{iprocess},'.xml$',ExeExt)); 2059 2060 % set the log file name 2061 filelog{iprocess}=fullfile(OutputDir,'0_LOG',regexprep(extxml{iprocess},'.xml$','.log')); 2057 batch_file_list{iprocess}=fullfile(OutputDir,'0_EXE',regexprep(extxml{iprocess},'.xml$',ExeExt)); % executable file names 2058 filelog{iprocess}=fullfile(OutputDir,'0_LOG',regexprep(extxml{iprocess},'.xml$','.log'));% corresponding log file names 2062 2059 end 2063 2060 end … … 2077 2074 switch computer 2078 2075 case {'GLNX86','GLNXA64','MACI64'} 2079 matlab_ver = ver('MATLAB'); 2080 matlab_version = matlab_ver.Version; 2081 cmd=[... 2082 '#!/bin/bash\n'... 2083 'source /etc/profile\n'... 2084 'module purge\n'... 2085 'module load matlab/' matlab_version '\n'...% CHOICE OF MATLAB VERSION 2086 'time_start=$(date +%%s)\n'... 2087 'matlab -nodisplay -nosplash -nojvm -logfile ''' filelog_global ''' <<END_MATLAB\n'... 2088 'addpath(''' path_series ''');\n'... 2089 'addpath(''' Param.Action.ActionPath ''');\n']; 2090 for iprocess=1:NbProcess 2091 cmd=[cmd '' Param.Action.ActionName '(''' filexml{iprocess} ''');\n']; 2092 end 2093 cmd=[cmd 'exit\n' 'END_MATLAB\n'... 2094 'time_end=$(date +%%s)\n'... 2095 'echo "global time = " $(($time_end - $time_start)) >> ''' filelog_global '''\n']; 2076 cmd=command_launch_matlab(filelog_global,path_series,Param.Action.ActionPath,Param.Action.ActionName,filexml,'background'); 2096 2077 fprintf(fid,cmd); % fill the executable file with the char string cmd 2097 2078 fclose(fid); % close the executable filefilelog_global … … 2150 2131 ActionFullName ' ' RunTime ' ' filexml{iprocess}]; % allow writting access to created files for user group 2151 2132 else 2152 matlab_ver = ver('MATLAB'); 2153 matlab_version = matlab_ver.Version; 2154 cmd=[... 2155 '#!/bin/bash\n'... 2156 'source /etc/profile\n'... 2157 'module purge\n'... 2158 'module load matlab/' matlab_version '\n'...% CHOICE OF CURRENT MATLAB VERSION 2159 'matlab -nodisplay -nosplash -nojvm -singleCompThread -logfile ''' filelog{iprocess} ''' <<END_MATLAB\n'...% open a new Matlab session without display 2160 'addpath(''' path_series ''');\n'... 2161 'addpath(''' Param.Action.ActionPath ''');\n'... 2162 '' Param.Action.ActionName '(''' filexml{iprocess} ''');\n'...% launch the Matlab function selected by the GUI 'series' 2163 'exit\n'... 2164 'END_MATLAB\n']; 2133 cmd=command_launch_matlab(filelog_global,path_series,Param.Action.ActionPath,Param.Action.ActionName,filexml{iprocess},'cluster'); 2134 % matlab_ver = ver('MATLAB'); 2135 % matlab_version = matlab_ver.Version; 2136 % cmd=[... 2137 % '#!/bin/bash\n'... 2138 % 'source /etc/profile\n'... 2139 % 'module purge\n'... 2140 % 'module load matlab/' matlab_version '\n'...% CHOICE OF CURRENT MATLAB VERSION 2141 % 'matlab -nodisplay -nosplash -nojvm -singleCompThread -logfile ''' filelog{iprocess} ''' <<END_MATLAB\n'...% open a new Matlab session without display 2142 % 'addpath(''' path_series ''');\n'... 2143 % 'addpath(''' Param.Action.ActionPath ''');\n'... 2144 % '' Param.Action.ActionName '(''' filexml{iprocess} ''');\n'...% launch the Matlab function selected by the GUI 'series' 2145 % 'exit\n'... 2146 % 'END_MATLAB\n']; 2165 2147 end 2166 2148 fprintf(fid,cmd); % fill the executable file with the char string cmd … … 3006 2988 [i1,i2,j1,j2] = get_file_index(ref_i,ref_j,PairString); 3007 2989 FileName=fullfile_uvmat(InputTable{1},InputTable{2},InputTable{3},InputTable{5},InputTable{4},i1,i2,j1,j2); 3008 Data=nc2struct(FileName,[]);2990 %Data=nc2struct(FileName,[]); 3009 2991 TimeValue=[]; 3010 2992 DtValue=[]; 3011 if isequal(FileInfo.FileType,'civdata') 2993 switch FileInfo.FileType 2994 case 'civdata' 2995 Data=nc2struct(FileName,[]); 3012 2996 if ismember(TimeName,{'civ1','filter1'}) 3013 2997 if isfield(Data,'Civ1_Time') … … 3025 3009 end 3026 3010 end 3027 else 3011 case 'pivdata_fluidimage' 3012 TimeValue=ref_i;%default 3013 DtValue=1;%default 3014 case 'netcdf' 3015 Data=nc2struct(FileName,[]); 3028 3016 if ~isempty(TimeName)&& isfield(Data,TimeName) 3029 3017 TimeValue=Data.(TimeName);
Note: See TracChangeset
for help on using the changeset viewer.