- Timestamp:
- Mar 18, 2022, 12:31:32 PM (3 years ago)
- Location:
- trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/cluster_command.m
r1019 r1114 29 29 WallTimeOneProcess=min(4*CPUTimeProcess+10,WallTimeTotal*60/2); % estimated max time of an individual process, used for checkpoint: 30 30 %if less than this time remains before walltime, the job is stopped and a new one can be launched ( by the option 'idempotent') 31 cmd=['oarsub -n UVmat_' ActionFullName ' '... 31 32 if NbCore==1 33 corestring='cpu=1/core=4'; %increases the allowed memory in case of single core job 34 else 35 corestring=['/core=' num2str(NbCore)]; 36 end 37 cmd=['oarsub -n UVmat_' ActionFullName ' '... 32 38 '-t idempotent --checkpoint ' num2str(WallTimeOneProcess*60) ' '... 33 '-l "/core=' num2str(NbCore)... 34 bigiojob_string... % char(39) is quote - bigiojob limit UVmat parallel launch on cluster 39 '-l "' corestring bigiojob_string... % char(39) is quote - bigiojob limit UVmat parallel launch on cluster 35 40 ',walltime=' datestr(WallTimeTotal/24,13) '" '... 36 41 '-E ' filename_errors ' '... -
trunk/src/proj_field.m
r1110 r1114 237 237 ProjData.(VarName)(ipoint,1)=mean(Var); 238 238 if isequal(ObjectData.ProjMode,'interp_lin') 239 ProjData.(VarName)(ipoint,1)=griddata _uvmat(coord_x(indsel),coord_y(indsel),Var,Xpoint(1),Xpoint(2));239 ProjData.(VarName)(ipoint,1)=griddata(coord_x(indsel),coord_y(indsel),Var,Xpoint(1),Xpoint(2)); 240 240 end 241 241 end -
trunk/src/series.m
r1113 r1114 1583 1583 % NbCore is the number of computer processors used 1584 1584 % NbProcess is the number of independent processes in which the required calculation is split. 1585 switch RunMode1586 case {'local','background'}1587 NbCore=1; % no need to split the calculation1588 case 'cluster'1589 %proposed number of cores to reserve in the cluster1590 NbCoreAdvised=SeriesData.SeriesParam.ClusterParam.NbCoreAdvised;1591 NbCoreMax=SeriesData.SeriesParam.ClusterParam.NbCoreMax;1592 if NbCoreMax~=11593 if strcmp(ActionExt,'.m')% case of Matlab function (uncompiled)1594 warning_string=', preferably use .sh option to save Matlab licences';1595 else1596 warning_string=')';1597 end1598 answer=msgbox_uvmat('INPUT_TXT',['Number of cores (max ' num2str(NbCoreMax) ', ' warning_string],num2str(NbCoreAdvised));1599 if isempty(answer)1600 errormsg='Action launch interrupted by user';1601 return1602 end1603 NbCore=str2double(answer);1604 if NbCore > NbCoreMax1605 NbCore=NbCoreMax;1606 end1607 else1608 NbCore=1;1609 end1610 end1585 % switch RunMode 1586 % case {'local','background'} 1587 % NbCore=1; % no need to split the calculation 1588 % case 'cluster' 1589 % %proposed number of cores to reserve in the cluster 1590 % NbCoreAdvised=SeriesData.SeriesParam.ClusterParam.NbCoreAdvised; 1591 % NbCoreMax=min(NbProcess,SeriesData.SeriesParam.ClusterParam.NbCoreMax); 1592 % if NbCoreMax~=1 1593 % if strcmp(ActionExt,'.m')% case of Matlab function (uncompiled) 1594 % warning_string=', preferably use .sh option to save Matlab licences'; 1595 % else 1596 % warning_string=')'; 1597 % end 1598 % answer=msgbox_uvmat('INPUT_TXT',['Number of cores (max ' num2str(NbCoreMax) ', ' warning_string],num2str(NbCoreAdvised)); 1599 % if isempty(answer) 1600 % errormsg='Action launch interrupted by user'; 1601 % return 1602 % end 1603 % NbCore=str2double(answer); 1604 % if NbCore > NbCoreMax 1605 % NbCore=NbCoreMax; 1606 % end 1607 % else 1608 % NbCore=1; 1609 % end 1610 % end 1611 1611 if ~isfield(Param.IndexRange,'NbSlice') 1612 1612 Param.IndexRange.NbSlice=[]; … … 1866 1866 end 1867 1867 nbfield_j=numel(ref_j); % number of j indices 1868 BlockLength=numel(ref_i); % by default, job involves the full set of i field indices 1868 BlockLength=numel(ref_i); % by default, job involves the full set of i field indicesNbProcess 1869 1869 NbProcess=1; 1870 NbCore=1; 1870 1871 switch RunMode 1871 1872 case 'cluster' 1872 if (isfield(Param.Action, 'CPUTime') && ~isempty(Param.Action.CPUTime) )1873 if (isfield(Param.Action, 'CPUTime') && ~isempty(Param.Action.CPUTime) && isnumeric(Param.Action.CPUTime)) 1873 1874 CPUTime=Param.Action.CPUTime; % Note: CpUTime for one iteration ref_i has to be multiplied by the number of j indices nbfield_j 1874 1875 else … … 1887 1888 NbProcess=Param.IndexRange.NbSlice; % the parameter NbSlice sets the nbre of run processes 1888 1889 end 1889 NbCore=min(NbCore,NbProcess); % reduces the number of cores if it exceeds the number of processes 1890 1891 % %proposed number of cores to reserve in the cluster 1892 NbCoreAdvised=SeriesData.SeriesParam.ClusterParam.NbCoreAdvised; 1893 NbCoreMax=min(NbProcess,SeriesData.SeriesParam.ClusterParam.NbCoreMax);% reduces the number of cores if it exceeds the number of processes 1894 if NbCoreMax~=1 1895 if strcmp(ActionExt,'.m')% case of Matlab function (uncompiled) 1896 warning_string=', preferably use .sh option to save Matlab licences'; 1897 else 1898 warning_string=')'; 1899 end 1900 answer=msgbox_uvmat('INPUT_TXT',['Number of cores (max ' num2str(NbCoreMax) ', ' warning_string],num2str(NbCoreAdvised)); 1901 if isempty(answer) 1902 errormsg='Action launch interrupted by user'; 1903 return 1904 end 1905 NbCore=str2double(answer); 1906 if NbCore > NbCoreMax 1907 NbCore=NbCoreMax; 1908 end 1909 end 1890 1910 otherwise 1891 1911 if ~isempty(Param.IndexRange.NbSlice) … … 1893 1913 end 1894 1914 end 1895 1915 1896 1916 %% record nbre of output files and starting time for computation for status 1897 1917 StatusData=get(handles.status,'UserData'); … … 1908 1928 StatusData.TimeStart=now; 1909 1929 set(handles.status,'UserData',StatusData) 1910 1930 1911 1931 %% case of a function in Python 1912 1932 if strcmp(ActionExt, '.py (in dev.)') … … 2468 2488 current_dir=pwd; % current working dir 2469 2489 cd(ActionPath) 2470 h_fun=str2func(ActionName); 2490 h_fun=str2func(ActionName);% create the function handle for the function ActionName 2471 2491 cd(current_dir) 2472 2492 … … 3358 3378 TransformPathList=get(handles.TransformName,'UserData'); 3359 3379 nb_builtin_transform=4; 3360 if isequal(TransformName,'more...'); 3380 3381 %% browse transform functions with the input menu option more... 3382 if isequal(TransformName,'more...')% browse transform functions 3361 3383 FileName=uigetfile_uvmat('Pick a transform function',get(handles.TransformPath,'String'),'.m'); 3362 3384 if isempty(FileName) … … 3393 3415 end 3394 3416 3395 % display the current function path3417 %% display the current function path 3396 3418 set(handles.TransformPath,'String',TransformPathList{TransformIndex}); % show the path to the senlected function 3397 3419 set(handles.TransformName,'UserData',TransformPathList); … … 3413 3435 ParamIn.TransformInput=SeriesData.TransformInput; 3414 3436 end 3415 DataOut=feval(transform_handle,Field,ParamIn);% execute the transform fct to get the required conditions 3416 Field.Action.RUN=0; % indicate that the transform fct is called only to get input param 3417 %DataOut=feval(transform_handle,Field,[]); % execute the transform fct to get the required conditions 3437 DataOut=feval(transform_handle,Field,ParamIn);% execute the transform fct to get its input parameters 3418 3438 if isfield(DataOut,'TransformInput')% used to add transform parameters at selection of the transform fct 3419 3439 SeriesData.TransformInput=DataOut.TransformInput; -
trunk/src/series/merge_proj.m
r1107 r1114 113 113 RootFile=Param.InputTable(:,3); 114 114 SubDir=Param.InputTable(:,2); 115 NomType=Param.InputTable(:,4);115 % NomType=Param.InputTable(:,4); 116 116 FileExt=Param.InputTable(:,5); 117 117 -
trunk/src/series/sliding_average.m
r1107 r1114 16 16 % Param contains the elements:(use the menu bar command 'export/GUI config' in series to 17 17 % see the current structure Param) 18 % .InputTable: cell of input file names, (several lines for multiple input)18 % .InputTable: cell of input file names, (several5.804 lines for multiple input) 19 19 % each line decomposed as {RootPath,SubDir,Rootfile,NomType,Extension} 20 20 % .OutputSubDir: name of the subdirectory for data outputs … … 179 179 if isfield(Param,'InputFields') 180 180 InputFields{1}=Param.InputFields; 181 end 181 end5.804 182 182 183 183 nbfiles=0; 184 184 nbmissing=0; 185 185 186 %% initialisation 186 %% initialisation manip Coriolis 187 187 char_index=regexp(SubDir{1},'waves_L1_'); 188 188 switch(SubDir{1}(char_index+9)) … … 242 242 break 243 243 end 244 [Field,tild, errormsg] = read_field(filecell{1,index},FileType{iview},InputFields{iview},frame_index{iview}(index));244 [Field,tild,~] = read_field(filecell{1,index},FileType{iview},InputFields{iview},frame_index{iview}(index)); 245 245 246 246 %%%%%%%%%%% MAIN RUNNING OPERATIONS %%%%%%%%%%%% -
trunk/src/series/time_series.m
r1110 r1114 214 214 215 215 %% coordinate transform or other user defined transform 216 transform_fct= [];%default216 transform_fct='';%default fct handle 217 217 if isfield(Param,'FieldTransform')&&~isempty(Param.FieldTransform.TransformName) 218 %addpath(Param.FieldTransform.TransformPath) 218 currentdir=pwd; 219 cd(Param.FieldTransform.TransformPath) 219 220 transform_fct=str2func(Param.FieldTransform.TransformName); 220 %rmpath(Param.FieldTransform.TransformPath)221 cd (currentdir) 221 222 if isfield(Param,'TransformInput') 222 XmlData{1}.TransformInput=Param.TransformInput; 223 end 223 for iview=1:NbView 224 XmlData{iview}.TransformInput=Param.TransformInput; 225 end 226 end 224 227 end 225 228
Note: See TracChangeset
for help on using the changeset viewer.