Changeset 86 for trunk/oarutils
- Timestamp:
- Jun 1, 2012, 11:39:17 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/oarutils/oar-parexec
r85 r86 243 243 }; 244 244 245 $job_cmd =~ s/(\s+##.*)$//; # suppress comment245 #$job_cmd =~ s/(\s+##.*)$//; # suppress comment 246 246 247 247 # set job environment, run it and clean … … 260 260 $fh->print("trap 'kill -$sig_checkpoint \$(jobs -p)' $sig_checkpoint\n"); 261 261 $fh->print("echo \$\$ > $job_pidfile\n"); 262 $fh->print("$job_cmd $job_stdout $job_stderr \&\n"); 262 $fh->print("{\n"); 263 $fh->print("$job_cmd\n"); 264 $fh->print("} $job_stdout $job_stderr \&\n"); 263 265 $fh->print("while [ \$(jobs -p | wc -l) -gt 0 ]\n"); 264 266 $fh->print("do\n"); … … 268 270 } 269 271 else { 270 $fh->print("$job_cmd $job_stdout $job_stderr\n"); 272 $fh->print("{\n"); 273 $fh->print("$job_cmd\n"); 274 $fh->print("} $job_stdout $job_stderr\n"); 271 275 } 272 276 $fh->print("rm -f $job_nodefile\n") if $job_np > 1; … … 481 485 - empty line 482 486 - comment line begin with # 483 - valid shell command with double # for meta comment487 - valid shell command (can containt comment) 484 488 485 489 Example where F<$HOME/test/subjob1.sh> is a shell script (executable). 486 490 487 $HOME/test/subjob01.sh # #name=subjob01488 $HOME/test/subjob02.sh # #name=subjob02489 $HOME/test/subjob03.sh # #name=subjob03490 $HOME/test/subjob04.sh # #name=subjob04491 $HOME/test/subjob01.sh # name=subjob01 492 $HOME/test/subjob02.sh # name=subjob02 493 $HOME/test/subjob03.sh # name=subjob03 494 $HOME/test/subjob04.sh # name=subjob04 491 495 ... 492 $HOME/test/subjob38.sh # #name=subjob38493 $HOME/test/subjob39.sh # #name=subjob39494 $HOME/test/subjob40.sh # #name=subjob40496 $HOME/test/subjob38.sh # name=subjob38 497 $HOME/test/subjob39.sh # name=subjob39 498 $HOME/test/subjob40.sh # name=subjob40 495 499 496 500 These jobs could be launch by:
Note: See TracChangeset
for help on using the changeset viewer.