- Timestamp:
- Nov 18, 2011, 1:55:58 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r276 r279 2071 2071 fprintf(fid,cmd); 2072 2072 fclose(fid); 2073 2074 if isunix 2075 system(['chmod +x ' filename_bat]); 2076 end 2073 2077 2074 2078 batch_file_list{length(batch_file_list)+1}=filename_bat; … … 2193 2197 display(cmd);eval(cmd); 2194 2198 end 2195 case 'sge' 2196 [s,w]=unix('qstat -q civ.q|grep job_| wc -l'); %check the waiting list (command unix) 2197 w(end)=[]; 2198 str_displ={[w ' jobs in the waiting list'];... 2199 '***********************';... 2200 'JOBS PRIORITY POLICY';... 2201 '- urgent = less than 100 images pairs';... 2202 '- normal = during the experiments';... 2203 '- low = post processing';... 2204 '***********************';... 2205 'Select a priority:'}; 2206 str={'urgent';'normal';'low'}; 2207 [ind_answer,v] = listdlg('PromptString',str_displ,... 2208 'SelectionMode','single',... 2209 'ListString',str,'ListSize',[200 100],'Name','job priority','InitialValue',3); 2210 pvalue=num2str((1-ind_answer)*500); % 2211 if isequal(v,0) % to handle Cancel button and figure close 2212 errormsg='job submission cancelled'; 2213 return 2214 end 2215 case 'oar' 2216 for p=0:floor(length(batch_file_list)/6); 2217 filename_batch_group=fullfile(Rootbat,['job_list_' num2str(p) '.bat']); 2218 fid=fopen(filename_batch_group,'w'); 2219 if fid==-1 2220 msgbox_uvmat('ERROR',['cannot create the command file ' filename_superbat]) 2221 return 2199 case 'oar_old' 2200 for p=1:length(batch_file_list) 2201 oar_command=['!oarsub -n CIVX -q nicejob '... 2202 '-E ' regexprep(batch_file_list{p},'.bat','.errors') ' -O ' regexprep(batch_file_list{p},'.bat','.log ')... 2203 '-l "/core=1+{type = ''smalljob''}/licence=1,walltime=00:60:00" ' batch_file_list{p}]; 2204 display(oar_command);eval(oar_command); 2222 2205 end 2223 if p==floor(length(batch_file_list)/6) 2224 kmax=mod(length(batch_file_list),6); 2225 else 2226 kmax=6; 2206 2207 2208 case 'oar_perl' 2209 filename_joblist=fullfile(Rootbat,'job_list.txt'); 2210 fid=fopen(filename_joblist,'w'); 2211 2212 for p=1:length(batch_file_list) 2213 oar_command=['oarsub -n CIVX '... 2214 '-l "/core=1,walltime=00:10:00" ' batch_file_list{p}]; 2215 fprintf(fid,[oar_command '\n']); 2227 2216 end 2228 for k=1:kmax 2229 fprintf(fid,['sh ' batch_file_list{p*6+k} '\n']); 2217 fclose(fid) 2218 oar_command=['oarsub -t container -n civx-container -l /core=24,walltime=00:35:00 "/fsnet/data/legi/calcul9/home/gostiaux/Documents/MATLAB/uvmat_dev/oar-dispatch -f '... 2219 filename_joblist '"']; 2220 filename_oarcommand=fullfile(Rootbat,'oar_command'); 2221 fid=fopen(filename_oarcommand,'w'); 2222 fprintf(fid,[oar_command '\n']); 2223 fclose(fid); 2224 % display(oar_command); 2225 eval(['! . ' filename_oarcommand]); 2226 2227 case 'oar'%'oar_mpi' 2228 filename_joblist=fullfile(Rootbat,'job_list.txt'); 2229 fid=fopen(filename_joblist,'w'); 2230 2231 for p=1:length(batch_file_list) 2232 fprintf(fid,[batch_file_list{p} '\n']); 2230 2233 end 2231 fclose(fid); 2232 system(['chmod +x ' filename_batch_group]); 2233 eval( ['!oarsub -n CIVX -q nicejob -l "/core=1+{type = ''smalljob''}/licence=1,walltime=00:60:00" ' filename_batch_group]); 2234 end 2234 fclose(fid) 2235 2236 2237 % oarsub -S ./oar.sub 2238 2239 2240 2241 2242 2243 % for p=0:floor(length(batch_file_list)/6); 2244 % filename_batch_group=fullfile(Rootbat,['job_list_' num2str(p) '.bat']); 2245 % fid=fopen(filename_batch_group,'w'); 2246 % if fid==-1 2247 % msgbox_uvmat('ERROR',['cannot create the command file ' filename_superbat]) 2248 % return 2249 % end 2250 % if p==floor(length(batch_file_list)/6) 2251 % kmax=mod(length(batch_file_list),6); 2252 % else 2253 % kmax=6; 2254 % end 2255 % for k=1:kmax 2256 % fprintf(fid,['sh ' batch_file_list{p*6+k} '\n']); 2257 % end 2258 % fclose(fid); 2259 % system(['chmod +x ' filename_batch_group]); 2260 % eval( ['!oarsub -n CIVX -q nicejob '... 2261 % '-E ' flname '.errors -O ' flname '.log '... 2262 % '-l "/core=1+{type = ''smalljob''}/licence=1,walltime=00:60:00" ' filename_batch_group]); 2263 % end 2235 2264 case 'oar_new' % to be develloped with Patrick Begou 2236 2265 filename_joblist=fullfile(Rootbat,'job_list.txt');
Note: See TracChangeset
for help on using the changeset viewer.