Getting started on bluevista
last update:
06/12/2006
You can resubmit jobs from within your job script. The example below shows how to do this in your script using a file named "resubmit." You can insert the file "resubmit" in your run directory to control the number of times your batch queue script is resubmitted.
- In your run directory, create a file called "resubmit" that contains a number representing the number of times you want to resubmit your batch queue script. (It is good practice to cd to the directory containing the batch script before issuing the LSF bsub command.)
- In your batch queuing script, at the point where you want to resubmit the batch queue script, include the following:
# This script is named s3 in your current working directory. Enter # 'bsub < s3' to start the sequence of 1 job run and N (as defined # by the contents of the file ./resubmit) job resubmissions. #! /bin/csh #BSUB -o out.%J #BSUB -e err.%J #BSUB -q share #BSUB -W 0:05 #BSUB -N #BSUB -P 00000000 #project number set RESUBMIT = 'FALSE' if ( -e ./resubmit ) then @ N = `cat ./resubmit` echo "file resubmit exists and requests $N more job submissions" if ( $N > 0 ) then set RESUBMIT = 'TRUE' @ N-- echo $N >! ./resubmit endif endif if ( $RESUBMIT == 'TRUE' ) then echo "Note: resubmitting job" date sleep 120 date bsub < s3 else echo "Note: not resubmitting job" endifNote: If you have specified multiple resubmissions and discover a problem, simply rename the job script, so that it will not be resubmitted.
To see your LSF job, type bjobs. To kill a job, type
bkill jobid
It may be necessary to try bkill with the -r option. Use bkill -r only on jobs that cannot be killed in the operating system, or on jobs that cannot be otherwise removed using bkill. If the job still cannot be removed, contact CISL Customer Support (consult1@ucar.edu, 303-497-1278).
Next page | Table of contents - Getting started on bluevista
If you have questions about this document, please contact CISL Customer Support. You can also reach us by telephone 24 hours a day, seven days a week at 303-497-1278. Additional contact methods: consult1@ucar.edu and during business hours in NCAR Mesa Lab Suite 39.
© Copyright 2005. University Corporation for Atmospheric Research (UCAR). All Rights Reserved.
Address of this page: http://www.cisl.ucar.edu/docs/bluevista/tips.html