Changeset 1097 for trunk/src/series.m
- Timestamp:
- Apr 11, 2021, 10:03:02 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series.m
r1096 r1097 168 168 RunModeList={'local';'background'}; % default choice of extensions (Matlab fct .m or compiled version .sh) 169 169 [s,w]=system(SeriesData.SeriesParam.ClusterParam.ExistenceTest); % look for cluster system presence 170 % [s,w]=system('oarstat'); % look for cluster system 'oar'171 170 if isequal(s,0) 172 171 RunModeList=[RunModeList;{'cluster'}]; 173 172 set(handles.MonitorCluster,'Visible','on'); % make visible button for access to Monika 174 173 set(handles.num_CPUTime,'Visible','on'); % make visible button for CPU time estimate for one ref index 175 set(handles.num_CPUTime,'String',' 1')% defqult CPU time estimate 1 minute174 set(handles.num_CPUTime,'String','')% default CPU time undefined 176 175 set(handles.CPUTime_txt,'Visible','on'); % make visible button for CPU time title 177 176 end 178 % [s,w]=system('qstat -help'); % look for cluster system 'sge'179 % if isequal(s,0)180 % if regexp(w,'^pbs')181 % RunModeList=[RunModeList;{'cluster_pbs'}];182 % elseif regexp(w,'^SGE')183 % RunModeList=[RunModeList;{'cluster_sge'}];184 % else185 % RunModeList=[RunModeList;{'cluster_qstat_unknown'}];186 % end187 % end188 177 set(handles.RunMode,'String',RunModeList)% display the menu of available run modes, local, background or cluster manager 189 178 … … 208 197 end 209 198 end 210 %get the list of previous campaigns in the upper bar menu Open campaign211 % if isfield(h,'MenuCampaign')212 % for ifile=1:min(length(h.MenuCampaign),5)213 % set(handles.(['MenuCampaign_' num2str(ifile)]),'Label',h.MenuCampaign{ifile});214 % end215 % end216 199 %get the menu of actions 217 200 if isfield(h,'ActionListUser') && iscell(h.ActionListUser) && isfield(h,'ActionPathListUser') && iscell(h.ActionPathListUser) … … 287 270 if isfield(Param,'InputFile') 288 271 289 %% fill the list of file series272 %% fill the list of input file series 290 273 InputTable=[{Param.InputFile.RootPath},{Param.InputFile.SubDir},{Param.InputFile.RootFile},{Param.InputFile.NomType},{Param.InputFile.FileExt}]; 291 if isempty(find(cellfun('isempty',InputTable)==0)) ;% if there is no input file, do not introduce input info274 if isempty(find(cellfun('isempty',InputTable)==0)) % if there is no input file, do not introduce input info 292 275 set(handles.REFRESH,'BackgroundColor',[1 0 1])% set REFRESH button to magenta color to indicate that input refresh is needed 293 276 return … … 299 282 end 300 283 set(handles.InputTable,'Data',InputTable) 284 285 %% define the default path for the output files 286 [InputPath,Device,DeviceExt]=fileparts(InputTable{1,1}); 287 [InputPath,Experiment,ExperimentExt]=fileparts(InputPath); 288 set(handles.Device,'String',[Device DeviceExt]) 289 set(handles.Experiment,'String',[Experiment ExperimentExt]) 290 if ~isempty(regexp(InputTable{1,1},'(^http://)|(^https://)')) 291 set(handles.OutputPathBrowse,'Value',1)% an output folder needs to be specified for OpenDAP data 292 end 293 294 %update the output path if needed 295 if ~(isfield(SeriesData,'InputPath') && strcmp(SeriesData.InputPath,InputPath)) 296 if get(handles.OutputPathBrowse,'Value')==1 % fix the output path in manual mode 297 OutputPathOld=get(handles.OutputPath,'String'); 298 OutputPath=uigetdir(OutputPathOld,'pick a root folder for output data'); 299 set(handles.OutputPath,'String',OutputPath) 300 else %reproduce the input path for output 301 set(handles.OutputPath,'String',InputPath) 302 end 303 end 304 301 305 %% determine the selected reference field indices for pair display 302 306 … … 857 861 [InputPath,Device,DeviceExt]=fileparts(InputTable{1,1}); 858 862 [InputPath,Experiment,ExperimentExt]=fileparts(InputPath); 859 [~,InputPath,InputPathExt]=fileparts(InputPath);860 863 set(handles.Device,'String',[Device DeviceExt]) 861 864 set(handles.Experiment,'String',[Experiment ExperimentExt]) … … 1843 1846 end 1844 1847 end 1845 CPUTime=1; % job time estimated at 1 min per iteration (on index i and j) by default1846 if isfield(Param.Action, 'CPUTime') && ~isempty(Param.Action.CPUTime)1847 CPUTime=Param.Action.CPUTime; % Note: CpUTime for one iteration ref_i has to be multiplied by the number of j indices nbfield_j1848 end1848 % CPUTime=1; % job time estimated at 1 min per iteration (on index i and j) by default 1849 % if isfield(Param.Action, 'CPUTime') && ~isempty(Param.Action.CPUTime) 1850 % CPUTime=Param.Action.CPUTime; % Note: CpUTime for one iteration ref_i has to be multiplied by the number of j indices nbfield_j 1851 % end 1849 1852 nbfield_j=numel(ref_j); % number of j indices 1850 1853 BlockLength=numel(ref_i); % by default, job involves the full set of i field indices … … 1852 1855 switch RunMode 1853 1856 case 'cluster' 1857 if (isfield(Param.Action, 'CPUTime') && ~isempty(Param.Action.CPUTime)) 1858 CPUTime=Param.Action.CPUTime; % Note: CpUTime for one iteration ref_i has to be multiplied by the number of j indices nbfield_j 1859 else 1860 answer=msgbox_uvmat('INPUT_TXT','estimate the CPU time(in minutes) for each value of index i:' ,''); 1861 CPUTime=str2num(answer); 1862 set(handles.num_CPUTime,'String',answer) 1863 end 1854 1864 JobNumberMax=SeriesData.SeriesParam.ClusterParam.JobNumberMax; 1855 1865 JobCPUTimeAdvised=SeriesData.SeriesParam.ClusterParam.JobCPUTimeAdvised; … … 2424 2434 set(handles.ActionName,'BackgroundColor',[1 1 1]) 2425 2435 set(handles.ActionInput,'BackgroundColor',[1 0 1])% set ActionInput button to magenta color to indicate that input refr 2426 2436 set(handles.num_CPUTime,'String','') 2427 2437 2428 2438 % --- Executes on button press in ActionInput. … … 2637 2647 end 2638 2648 if last_i < first_i || last_j < first_j , msgbox_uvmat('ERROR','last field number must be larger than the first one'),... 2639 set(handles.RUN, 'Enable','On'), set(handles.RUN,'BackgroundColor',[1 0 0]),return,end ;2649 set(handles.RUN, 'Enable','On'), set(handles.RUN,'BackgroundColor',[1 0 0]),return,end 2640 2650 end 2641 2651
Note: See TracChangeset
for help on using the changeset viewer.