Changeset 336
- Timestamp:
- Dec 16, 2011, 3:17:09 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r332 r336 1481 1481 case 'oar' 1482 1482 1483 oar_modes={'oar-dispatch','mpilauncher' };1483 oar_modes={'oar-dispatch','mpilauncher','oar-parexec'}; 1484 1484 text={'Batch processing on servcalcul3 LEGI';... 1485 1485 'Please choose one of the followint modes';... 1486 '* oar-dispatch : jobs in a container';... 1487 '* mpilauncher : one single job using several cores';... 1486 '* oar-dispatch : jobs in a container of several cores';... 1487 '* mpilauncher : one single parallel mpi job using several cores';... 1488 '* oar-parexec (under development) ';... 1488 1489 '**********************************'... 1489 1490 }; … … 1491 1492 'SelectionMode','single','ListSize',[400 100],'Name','LEGI job mode'); 1492 1493 switch oar_modes{S} 1493 1494 case 'oar-parexec' %oar-dispatch.pl 1495 ncores=str2double(... 1496 inputdlg('Number of cores (max 36)','oarsub parameter',1,{'12'})... 1497 ); 1498 walltime_onejob=600;%seconds 1499 filename_joblist=fullfile(Rootbat,'job_list.txt'); 1500 fid=fopen(filename_joblist,'w'); 1501 for p=1:length(batch_file_list) 1502 fprintf(fid,[batch_file_list{p} '\n']); 1503 end 1504 fclose(fid) 1505 oar_command=['oarsub -n test '... 1506 '-l /core=' num2str(ncores) ','... 1507 'walltime=' datestr(1.05*walltime_onejob/86400*max(length(batch_file_list),ncores)/ncores,13) ' '... 1508 '-E ' regexprep(filename_joblist,'\.txt\>','.errors') ' '... 1509 '-O ' regexprep(filename_joblist,'\.txt\>','.log') ' '... 1510 '"oar-parexec -f ' filename_joblist ' -l ' filename_joblist '.log"']; 1511 filename_oarcommand=fullfile(Rootbat,'oar_command'); 1512 fid=fopen(filename_oarcommand,'w'); 1513 fprintf(fid,[oar_command '\n']); 1514 fclose(fid); 1515 display(oar_command); 1516 eval(['! . ' filename_oarcommand]) 1494 1517 case 'oar-dispatch' %oar-dispatch.pl 1518 ncores=str2double(... 1519 inputdlg('Number of cores (max 36)','oarsub parameter',1,{'12'})... 1520 ); 1495 1521 walltime_onejob=600;%seconds 1496 1522 filename_joblist=fullfile(Rootbat,'job_list.txt'); … … 1503 1529 end 1504 1530 fclose(fid); 1505 ncores=36;1506 1531 oar_command=['oarsub -t container -n civx-container '... 1507 1532 '-l /core=' num2str(ncores)... 1508 ',walltime=' datestr(1.05*walltime_onejob/86400*max(length(batch_file_list),ncores)/ncores,13)... 1509 ' "oar-dispatch -f ' filename_joblist '"']; 1533 ',walltime=' datestr(1.05*walltime_onejob/86400*max(length(batch_file_list),ncores)/ncores,13) ' '... 1534 '-E ' regexprep(filename_joblist,'\.txt\>','.errors') ' '... 1535 '-O ' regexprep(filename_joblist,'\.txt\>','.log') ' '... 1536 '"oar-dispatch -f ' filename_joblist '"']; 1510 1537 filename_oarcommand=fullfile(Rootbat,'oar_command'); 1511 1538 fid=fopen(filename_oarcommand,'w'); … … 1526 1553 '#OAR -n Mylauncher \n'... 1527 1554 '#OAR -l node=4/core=5,walltime=0:15:00 \n'... 1528 '#OAR -E stderrfile.log\n'...1529 '#OAR -O stdoutfile.log\n'...1555 '#OAR -E ' fullfile(Rootbat,'stderrfile.log') ' \n'... 1556 '#OAR -O ' fullfile(Rootbat,'stdoutfile.log') ' \n'... 1530 1557 '# ========================================================= \n'... 1531 1558 '# This simple program launch a multinode parallel OpenMPI mpilauncher \n'...
Note: See TracChangeset
for help on using the changeset viewer.