Both sides previous revision Previous revision Next revision | Previous revision |
doku:testquickstart [2014/06/17 14:53] – [The job script] ir | doku:testquickstart [Unknown date] (current) – external edit (Unknown date) 127.0.0.1 |
---|
| |
==== The job script ==== | ==== The job script ==== |
Define name and number of slots: \\ <code>#$ -N <job_name> | === header === |
| <code>#$ -N <job_name> |
#$ -pe mpich <slots> | #$ -pe mpich <slots> |
#$ -V | #$ -V |
#$ -l h_rt=hh:mm:ss</code> | #$ -l h_rt=hh:mm:ss |
| #$ -M <email address to notify of job events> |
| #$ -m beas # all job events sent via email </code> |
- "<job_name>" is a freely chosen descriptive name, | - "<job_name>" is a freely chosen descriptive name, |
- "<slots>" is the number of processor cores that you want to use for the calculation. To ensure exclusive reservation of the compute nodes for your job, the value for "<slots>" has to be a multiple of 8. | - "<slots>" is the number of processor cores that you want to use for the calculation. To ensure exclusive reservation of the compute nodes for your job, the value for "<slots>" has to be a multiple of 8. |
- "-V" declares that all environment variables in the qsub command's environment are to be exported to the batch job. | - "-V" declares that all environment variables in the qsub command's environment are to be exported to the batch job. |
- "-l" specifies the job's runtime. This explicit specification is in particular advisable for jobs with short run times, i.e., several hours or even minutes. In order to **reduce the time in the queue**, see also the section on [[doku:runtime|maximum runtime specification.]] | - "-l" specifies the job's runtime. This explicit specification is in particular advisable for jobs with short run times, i.e., several hours or even minutes. In order to **reduce the time in the queue**, see also the section on [[doku:runtime|maximum runtime specification.]] |
| - "-M <email address>; -m beas" request E-Mail notifications concerning job events (b .. beginning, e .. end, a .. abort or reschedule, s .. suspend). |
| |
| === run executable === |
The job can be started in several ways, | The job can be started in several ways, |
- as single core job on one core (no MPI) task <code>./<executable></code> | - as single core job on one core (no MPI) task <code>./<executable></code> |
mpirun -m $TMPDIR/machines -np $NSLOTS <executable></code> | mpirun -m $TMPDIR/machines -np $NSLOTS <executable></code> |
| |
"<executable>" is substituted by the path of the MPI-enabled application.\\ To receive E-Mail notifications concerning job events (b .. beginning, e .. end, a .. abort or reschedule, s .. suspend), use these lines in your job script: \\ <code>#$ -M <email address to notify of job events> | "<executable>" is substituted by the path of the MPI-enabled application. |
#$ -m beas # all job events sent via email</code> | |
| |
| |
| ==== example ==== |
Here is an example job-script, requesting 32 processor cores, which will run for a maximum of 3 hours and sends emails at the beginning and at the end of the job: <code> | Here is an example job-script, requesting 32 processor cores, which will run for a maximum of 3 hours and sends emails at the beginning and at the end of the job: <code> |
#$ -N hitchhiker | #$ -N hitchhiker |