It is recommended to write the job script using a text editors on the VSC Linux cluster. Editors in Windows may add additional invisible characters to the job file which render it unreadable and, thus, it is not executed.
#$ -N <job_name> #$ -pe mpich <slots> #$ -V #$ -l h_rt=hh:mm:ss #$ -M <email address to notify of job events> #$ -m beas # all job events sent via email
The job can be started in several ways,
./<executable>
mpirun -m $TMPDIR/machines -np $NSLOTS <executable>
“<executable>” is substituted by the path of the MPI-enabled application.
Please note that the particular options to mpirun depend on the MPI version that you use. Current IntelMPI versions, for example, require the option -machinefile
instead of -m
:
mpirun -machinefile $TMPDIR/machines -np $NSLOTS <executable>
Please always check for the correct options with
mpirun -help
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:
#$ -N hitchhiker #$ -pe mpich 32 #$ -V #$ -M <my.name@example.at> #$ -m be #$ -l h_rt=03:00:00 mpirun -machinefile $TMPDIR/machines -np $NSLOTS ./myjob
qsub <job_file>
qstat
$ ls -l hitchhiker.o42 hitchhiker.e42 hitchhiker.po42 hitchhiker.pe42
In this example hitchhiker.o42 contains the output of your job. hitchhiker.e42 contains possible error messages. In hitchhiker.po42 and hitchhiker.pe42 you might find additional information related to the parallel computing environment.
$ qdel <job_id>
$ qstat -u \*
when the option #$ -V
is specified this error message will be generated in one of the output files of the grid engine:
/bin/sh: module: line 1: syntax error: unexpected end of file /bin/sh: error importing function definition for `module' bash: module: line 1: syntax error: unexpected end of file bash: error importing function definition for `module'
This message occurs due to a known bug in the grid engine which cannot handle functions defined in the user environment. This message can be safely ignored. This error message can be avoided by exporting particular environment variables only in your job-script:
#$ -v PATH #$ -v LD_LIBRARY_PATH