Changeset 984
- Timestamp:
- Jan 18, 2017, 3:37:05 PM (8 years ago)
- Location:
- trunk/src
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series.m
r983 r984 155 155 set(handles.CPUTime_txt,'Visible','on'); % make visible button for access to Monika 156 156 end 157 [s,w]=system('qstat - -version');% look for cluster system 'sge'157 [s,w]=system('qstat -help');% look for cluster system 'sge' 158 158 if isequal(s,0) 159 159 if regexp(w,'^pbs') 160 160 RunModeList=[RunModeList;{'cluster_pbs'}]; 161 elseif regexp(w,'^SGE') 162 RunModeList=[RunModeList;{'cluster_sge'}]; 161 163 else 162 RunModeList=[RunModeList;{'cluster_ sge'}];163 end 164 end 165 set(handles.RunMode,'String',RunModeList) 164 RunModeList=[RunModeList;{'cluster_qstat_unknown'}]; 165 end 166 end 167 set(handles.RunMode,'String',RunModeList)% display the menu of available run modes, local, background or cluster manager 166 168 167 169 %% list of builtin transform functions in the menu TransformName … … 1502 1504 if exist(xmlfile,'file') 1503 1505 s=xml2struct(xmlfile); 1504 if strcmp(RunMode,'cluster_oar') && isfield(s,'BatchParam')1506 if (strcmp(RunMode,'cluster_oar') || strcmp(RunMode, 'cluster_pbs') || strcmp(RunMode, 'cluster_sge')) && isfield(s,'BatchParam') 1505 1507 if isfield(s.BatchParam,'NbCore') 1506 1508 NbCore=s.BatchParam.NbCore; … … 1591 1593 extra_oar=answer{2}; 1592 1594 % end 1593 case 'cluster_pbs'1595 case {'cluster_pbs', 'cluster_sge', 'cluster_qstat_unknown'} 1594 1596 if strcmp(ActionExt,'.m')% case of Matlab function (uncompiled) 1595 1597 NbCore=1;% one core used only (limitation of Matlab licences) … … 1601 1603 extra_oar=''; 1602 1604 else 1603 answer=inputdlg({'Number of cores (max 36)','extra oar options'},'oarsub parameter',1,{'12',''});1605 answer=inputdlg({'Number of jobs (max 1000)','Queue'},'qsub parameters',1,{'100','piv_debian'}); 1604 1606 NbCore=str2double(answer{1}); 1607 qstat_Queue=answer{2}; 1605 1608 %extra_oar=answer{2};%TODO : fix this for LMFA cluster. Maybe 1606 1609 %extrs_oar and extra_pbs are not the best names … … 1729 1732 NbProcess=1; 1730 1733 switch RunMode 1731 case {'cluster_oar','cluster_pbs' }1734 case {'cluster_oar','cluster_pbs','cluster_sge','cluster_qstat_unknown'} 1732 1735 if isempty(Param.IndexRange.NbSlice)% if NbSlice is not defined 1733 1736 BlockLength= ceil(20/(CPUTime*nbfield_j));% short iterations are grouped such that the minimum time of a process is 20 min. … … 2059 2062 fclose(fid); 2060 2063 system(['chmod +x ' filename_joblist]);% set the file to executable 2061 pbs_command=['qs tat-n CIVX '...2064 pbs_command=['qsub -n CIVX '... 2062 2065 '-t idempotent --checkpoint ' num2str(walltime_onejob+60) ' '... 2063 2066 '-l /core=' num2str(NbCore) ','... … … 2065 2068 '-E ' regexprep(filename_joblist,'\.txt\>','.stderr') ' '... 2066 2069 '-O ' regexprep(filename_joblist,'\.txt\>','.log') ' '... 2067 extra_ oar' '...2070 extra_qstat ' '... 2068 2071 '"oar-parexec -s -f ' filename_joblist ' '... 2069 2072 '-l ' filename_joblist '.log"']; … … 2075 2078 %system(pbs_command); 2076 2079 msgbox_uvmat('CONFIRMATION',[ActionFullName ' command ready to be launched in cluster']) 2080 2081 case 'cluster_sge' % for PSMN 2082 % Au PSMN, on ne crée pas 1 job avec plusieurs cÅurs, mais N jobs de 1 cÅurs 2083 % où N < 1000. 2084 %create subdirectory for pbs command and log files 2085 2086 DirSGE=fullfile(OutputDir,'0_SGE'); 2087 if exist(DirSGE,'dir')% delete the content of the dir 0_LOG to allow new input 2088 curdir=pwd; 2089 cd(DirSGE) 2090 delete('*') 2091 cd(curdir) 2092 else 2093 [tild,msg1]=mkdir(DirSGE); 2094 if ~strcmp(msg1,'') 2095 errormsg=['cannot create ' DirSGE ': ' msg1];%error message for directory creation 2096 return 2097 end 2098 end 2099 maxImgsPerJob = ceil(length(batch_file_list)/NbCore); 2100 disp(['Max number of jobs: ' num2str(NbCore)]) 2101 disp(['Images per job: ' num2str(maxImgsPerJob)]) 2102 2103 iprocess = 1; 2104 imgsInJob = []; 2105 currJobIndex = 1; 2106 done = 0; 2107 while(~done) 2108 if(iprocess <= length(batch_file_list)) 2109 imgsInJob = [imgsInJob, iprocess]; 2110 end 2111 if((numel(imgsInJob) >= maxImgsPerJob) || (iprocess == length(batch_file_list))) 2112 cmd=['#!/bin/sh \n'... 2113 '#$ -cwd \n'... 2114 'hostname && date\n'] 2115 for ii=1:numel(imgsInJob) 2116 cmd=[cmd ActionFullName ' /softs/matlab ' filexml{imgsInJob(ii)} '\n']; 2117 end 2118 [fid, message] = fopen([DirSGE '/job' num2str(currJobIndex) '.sh'], 'w'); 2119 fprintf(fid, cmd); 2120 fclose(fid); 2121 system(['chmod +x ' DirSGE '/job' num2str(currJobIndex) '.sh']) 2122 sge_command=['qsub -N civ_' num2str(currJobIndex) ' '... 2123 '-q ' qstat_Queue ' '... 2124 '-e ' fullfile([DirSGE '/job' num2str(currJobIndex) '.out']) ' '... 2125 '-o ' fullfile([DirSGE '/job' num2str(currJobIndex) '.out']) ' '... 2126 fullfile([DirSGE '/job' num2str(currJobIndex) '.sh'])]; 2127 fprintf(sge_command);% display in command line 2128 [status, result] = system(sge_command); 2129 fprintf(result); 2130 currJobIndex = currJobIndex + 1; 2131 imgsInJob = []; 2132 end 2133 if(iprocess == length(batch_file_list)) 2134 done = 1; 2135 end 2136 iprocess = iprocess + 1; 2137 end 2138 msgbox_uvmat('CONFIRMATION',[num2str(currJobIndex-1) ' jobs launched on queue ' qstat_Queue '.']) 2077 2139 case 'python' 2078 2140 command = [ … … 2356 2418 end 2357 2419 end 2420 else 2421 set(handles.FieldName,'Visible','off') 2358 2422 end 2359 2423 … … 2382 2446 end 2383 2447 if warn_coord 2384 msgbox_uvmat('WARNING','coordi ante names do not exist in the second netcdf input file')2448 msgbox_uvmat('WARNING','coordinate names do not exist in the second netcdf input file') 2385 2449 end 2386 2450 -
trunk/src/series/aver_stat.m
r977 r984 167 167 168 168 %% determine the file type on each line from the first input file 169 ImageTypeOptions={'image','multimage','mmreader','video' };169 ImageTypeOptions={'image','multimage','mmreader','video','cine_phantom'}; 170 170 NcTypeOptions={'netcdf','civx','civdata'}; 171 171 for iview=1:NbView -
trunk/src/series/beam_forming.m
r977 r984 93 93 94 94 %% determine the file type on each line from the first input file 95 ImageTypeOptions={'image','multimage','mmreader','video' };95 ImageTypeOptions={'image','multimage','mmreader','video','cine_phantom'}; 96 96 NcTypeOptions={'netcdf','civx','civdata'}; 97 97 for iview=1:NbView -
trunk/src/series/check_data_files.m
r977 r984 108 108 109 109 %determine the file type on each line from the first input file 110 ImageTypeOptions={'image','multimage','mmreader','video' };110 ImageTypeOptions={'image','multimage','mmreader','video','cine_phantom'}; 111 111 NcTypeOptions={'netcdf','civx','civdata'}; 112 112 for iview=1:nbview -
trunk/src/series/check_peaklock.m
r977 r984 125 125 126 126 %determine the file type on each line from the first input file 127 ImageTypeOptions={'image','multimage','mmreader','video' };127 ImageTypeOptions={'image','multimage','mmreader','video','cine_phantom'}; 128 128 NcTypeOptions={'netcdf','civx','civdata'}; 129 129 for iview=1:nbview … … 528 528 Integ(izero)=min(Integ(inonzero)); 529 529 aa=log(Integ);%initial guess for a coeff 530 spli=spline4(aa,mini,nbb); %appel àla fonction spline4530 spli=spline4(aa,mini,nbb); %appel ï¿œ la fonction spline4 531 531 histsmooth=exp(spli); 532 532 … … 581 581 582 582 %data 583 % n=10;% r ésolution de la pdf: nbre de points par unite de u583 % n=10;% rï¿œsolution de la pdf: nbre de points par unite de u 584 584 % mini=-10.0;%general mini=uint16(min(values)-1 CHOOSE maxi-mini+1 EVEN 585 585 % maxi=9.0; % general maxi=uint16(max(values))+1 … … 588 588 nint=siz(2); 589 589 maxi=mini+nint-1; 590 npdf=nint*n;% nbre total d'intervals àintroduire dans la pdf: hist(u,npdf)590 npdf=nint*n;% nbre total d'intervals ï¿œ introduire dans la pdf: hist(u,npdf) 591 591 %simulation de pdf 592 592 xfin=[mini-0.5+1/(2*n):(1/n):maxi+0.5-(1/(2*n))];% valeurs d'interpolation: we take n values in each integer interval -
trunk/src/series/civ2vel_3C.m
r981 r984 335 335 for iview=1:2 336 336 %% reading PIV input file(s) 337 [Data{iview},tild,errormsg]=read_civdata(filecell{iview,field_index},{'vec(U,V)'}, '*');337 [Data{iview},tild,errormsg]=read_civdata(filecell{iview,field_index},{'vec(U,V)'},Param.InputFields.VelType); 338 338 if ~isempty(errormsg) 339 339 disp_uvmat('ERROR',['ERROR in civ2vel_3C/read_field/' errormsg],checkrun) -
trunk/src/series/float_tracking.m
r977 r984 20 20 % global hfig1 hfig2 scalar 21 21 % global Abackg nbpart lum diam 22 %%%%%%%%%%%%%% ù22 %%%%%%%%%%%%%%ï¿œ 23 23 % 24 24 %%%%%%%%%%% GENERAL TO ALL SERIES ACTION FCTS %%%%%%%%%%%%%%%%%%%%%%%%%%% … … 147 147 [FileInfo,VideoObject]=get_file_info(filecell{1,1}); 148 148 FileType=FileInfo.FileType; 149 ImageTypeOptions={'image','multimage','mmreader','video' };149 ImageTypeOptions={'image','multimage','mmreader','video','cine_phantom'}; 150 150 if isempty(find(strcmp(FileType,ImageTypeOptions))) 151 151 disp('input file not images') -
trunk/src/series/ima_threshold.m
r977 r984 154 154 [FileInfo,VideoObject]=get_file_info(filecell{1,1}); 155 155 FileType=FileInfo.FileType; 156 ImageTypeOptions={'image','multimage','mmreader','video' };156 ImageTypeOptions={'image','multimage','mmreader','video','cine_phantom'}; 157 157 if isempty(find(strcmp(FileType,ImageTypeOptions))) 158 158 disp('input file not images') -
trunk/src/series/merge_proj.m
r977 r984 134 134 135 135 %% determine the file type on each line from the first input file 136 ImageTypeOptions={'image','multimage','mmreader','video' };136 ImageTypeOptions={'image','multimage','mmreader','video','cine_phantom'}; 137 137 NcTypeOptions={'netcdf','civx','civdata'}; 138 138 for iview=1:NbView -
trunk/src/series/merge_proj_polar.m
r977 r984 162 162 163 163 %% determine the file type on each line from the first input file 164 ImageTypeOptions={'image','multimage','mmreader','video' };164 ImageTypeOptions={'image','multimage','mmreader','video','cine_phantom'}; 165 165 NcTypeOptions={'netcdf','civx','civdata'}; 166 166 for iview=1:NbView -
trunk/src/series/merge_proj_polar_multifile.m
r977 r984 165 165 166 166 %% determine the file type on each line from the first input file 167 ImageTypeOptions={'image','multimage','mmreader','video' };167 ImageTypeOptions={'image','multimage','mmreader','video','cine_phantom'}; 168 168 NcTypeOptions={'netcdf','civx','civdata'}; 169 169 for iview=1:NbView -
trunk/src/series/merge_proj_polar_singlefile.m
r977 r984 212 212 213 213 %% determine the file type on each line from the first input file 214 ImageTypeOptions={'image','multimage','mmreader','video' };214 ImageTypeOptions={'image','multimage','mmreader','video','cine_phantom'}; 215 215 NcTypeOptions={'netcdf','civx','civdata'}; 216 216 for iview=1:NbView -
trunk/src/series/particle_tracking.m
r977 r984 20 20 % global hfig1 hfig2 scalar 21 21 % global Abackg nbpart lum diam 22 %%%%%%%%%%%%%% ù22 %%%%%%%%%%%%%%ï¿œ 23 23 % 24 24 %%%%%%%%%%% GENERAL TO ALL SERIES ACTION FCTS %%%%%%%%%%%%%%%%%%%%%%%%%%% … … 147 147 [FileInfo,VideoObject]=get_file_info(filecell{1,1}); 148 148 FileType=FileInfo.FileType; 149 ImageTypeOptions={'image','multimage','mmreader','video' };149 ImageTypeOptions={'image','multimage','mmreader','video','cine_phantom'}; 150 150 if isempty(find(strcmp(FileType,ImageTypeOptions))) 151 151 disp('input file not images') -
trunk/src/series/stereo_civ.m
r977 r984 244 244 245 245 %% get timing from input video 246 if isempty(time) && ~isempty(find(strcmp(FileType_A,{'mmreader','video' })))% case of video input246 if isempty(time) && ~isempty(find(strcmp(FileType_A,{'mmreader','video','cine_phantom'})))% case of video input 247 247 time=zeros(FileInfo_A.NumberOfFrames+1,2); 248 248 time(:,2)=(0:1/FileInfo_A.FrameRate:(FileInfo_A.NumberOfFrames)/FileInfo_A.FrameRate)'; -
trunk/src/series/stereo_input.m
r977 r984 111 111 iview_image=1;%line # for the input images 112 112 switch FileType 113 case {'image','multimage','video','mmreader',' netcdf'}113 case {'image','multimage','video','mmreader','cine_phantom','netcdf'} 114 114 % NomTypeImaA=NomTypeInput; 115 115 % iview_image=1;%line # for the input images -
trunk/src/series/sub_background.m
r977 r984 107 107 108 108 %% check the validity of input file types 109 ImageTypeOptions={'image','multimage','mmreader','video' };%allowed input file types(images)109 ImageTypeOptions={'image','multimage','mmreader','video','cine_phantom'};%allowed input file types(images) 110 110 FileInfo=get_file_info(FirstFileName); 111 111 FileType=FileInfo.FileType; -
trunk/src/series/time_series.m
r977 r984 170 170 171 171 %% determine the file type on each line from the first input file 172 ImageTypeOptions={'image','multimage','mmreader','video' };172 ImageTypeOptions={'image','multimage','mmreader','video','cine_phantom'}; 173 173 NcTypeOptions={'netcdf','civx','civdata'}; 174 174 FileType=cell(1,NbView); -
trunk/src/series/turb_correlation.m
r977 r984 114 114 115 115 %% determine the file type on each line from the first input file 116 ImageTypeOptions={'image','multimage','mmreader','video' };116 ImageTypeOptions={'image','multimage','mmreader','video','cine_phantom'}; 117 117 NcTypeOptions={'netcdf','civx','civdata'}; 118 118 for iview=1:NbView -
trunk/src/series/turb_stat.m
r977 r984 114 114 115 115 %% determine the file type on each line from the first input file 116 ImageTypeOptions={'image','multimage','mmreader','video' };116 ImageTypeOptions={'image','multimage','mmreader','video','cine_phantom'}; 117 117 NcTypeOptions={'netcdf','civx','civdata'}; 118 118 for iview=1:NbView -
trunk/src/series/usr_fct/merge_proj_images.m
r977 r984 60 60 61 61 %% set the input elements needed on the GUI series when the function is selected in the menu ActionName or InputTable refreshed 62 ImageTypeOptions={'image','multimage','mmreader','video' };62 ImageTypeOptions={'image','multimage','mmreader','video','cine_phantom'}; 63 63 if isstruct(Param) && isequal(Param.Action.RUN,0) 64 64 ParamOut.AllowInputSort='off';% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default) … … 141 141 142 142 %% determine the file type on each line from the first input file 143 ImageTypeOptions={'image','multimage','mmreader','video' };143 ImageTypeOptions={'image','multimage','mmreader','video','cine_phantom'}; 144 144 NcTypeOptions={'netcdf','civx','civdata'}; 145 145 for iview=1:NbView -
trunk/src/uvmat.m
r982 r984 3520 3520 end 3521 3521 %put W as background image by default if NbDim=2: 3522 if UvData.NewSeries && isequal(get(handles.SubField,'Value'),0) && isfield(Field{1},'W') && ~isempty(Field{1}.W) && ~isequal(Field{1}.NbDim,3);3523 set(handles.SubField,'Value',1);3524 set(handles.RootPath_1,'String','"')3525 set(handles.RootFile_1,'String','"')3526 set(handles.SubDir_1,'String','"');3527 indices=fullfile_uvmat('','','','',NomType,num_i1,num_i2,num_j1,num_j2);3528 set(handles.FileIndex_1,'String',indices)3529 set(handles.FileExt_1,'String','"');3530 set(handles.FieldName_1,'Visible','on');3531 set(handles.FieldName_1,'Visible','on');3532 set(handles.RootPath_1,'Visible','on')3533 set(handles.RootFile_1,'Visible','on')3534 set(handles.SubDir_1,'Visible','on');3535 set(handles.FileIndex_1,'Visible','on');3536 set(handles.FileExt_1,'Visible','on');3537 set(handles.FieldName_1,'Visible','on');3538 Field{1}.AName='w';3539 end3522 % if UvData.NewSeries && isequal(get(handles.SubField,'Value'),0) && isfield(Field{1},'W') && ~isempty(Field{1}.W) && ~isequal(Field{1}.NbDim,3); 3523 % set(handles.SubField,'Value',1); 3524 % set(handles.RootPath_1,'String','"') 3525 % set(handles.RootFile_1,'String','"') 3526 % set(handles.SubDir_1,'String','"'); 3527 % indices=fullfile_uvmat('','','','',NomType,num_i1,num_i2,num_j1,num_j2); 3528 % set(handles.FileIndex_1,'String',indices) 3529 % set(handles.FileExt_1,'String','"'); 3530 % set(handles.FieldName_1,'Visible','on'); 3531 % set(handles.FieldName_1,'Visible','on'); 3532 % set(handles.RootPath_1,'Visible','on') 3533 % set(handles.RootFile_1,'Visible','on') 3534 % set(handles.SubDir_1,'Visible','on'); 3535 % set(handles.FileIndex_1,'Visible','on'); 3536 % set(handles.FileExt_1,'Visible','on'); 3537 % set(handles.FieldName_1,'Visible','on'); 3538 % Field{1}.AName='w'; 3539 % end 3540 3540 3541 3541 %% display time value of the current file
Note: See TracChangeset
for help on using the changeset viewer.