NQS are submitted using the qsub command:
qsub [ -q queue-name ] [ flags ] [ script-file ]
If no script-file is specified, then the set of commands to be executed
as a batch request is taken directly from the standard input (stdin).
In all cases however, the script file is spooled, so that later changes to
the file do not affect previously queued batch requests.
The choice of queue can affect how soon the job will be run and the
maximum CPU-time which can be used --- see the
configuration section for details of available queues.
Example scripts for use with Gaussian and Matlab are included below; instructions for use of the NQS with Abaqus are also given.
The following can be used as a template for NQS submission scripts:
#!/usr/local/bin/bash
#QSUB -r myprog
#QSUB -o myoutput.log
#QSUB -eo -nr -x
# Program to run:
testprog
| -r | assign stated request name to the request; |
| -o | direct the standard output (stdout) to the stated destination; |
| -eo | direct the standard error output (stderr) to the stdout destination; |
| -nr | declare that batch request can not be restartable; |
| -x | export all environment variables with request. |
In addition to the above flags (switches), NQS provides many flags to qsub command. For more detailed information on the qsub flags, please refer to the qsub man page.
Here is a trivial example which is quick to run:
#!/usr/local/bin/bash
#QSUB -r quicktest -eo -ke -ko -nr -x -o zaiem.logfile
# Commands to run :
cd /home/mpciizb/dir-nqs
banner 'This is a Batch NQS Job'
You might run a programme you have written and compiled like this:
#!/usr/local/bin/bash
cd /home/mpciish2/src/lyap_F95
./src/a.out
Matlab jobs can be run in this manner provided they don't produce any graphical output.
Create a Matlab batch file, e.g. matlab_example, as follows
#!/usr/local/bin/bash
matlab12 -nodisplay -nojvm -nosplash 1> matlab.out1 2>&1 <<EOF
5+12
EOF
Then, create an NQS script file that runs the Matlab batch file, e.g.
myjob.nqs
#!/usr/local/bin/bash
#QSUB -r myprog
#QSUB -o myoutput.logfile
#QSUB -eo -nr -x
# Program to run
matlab_example
and submit it to one of the NQS queues, e.g.
qsub -q one_day myjob.nqs
Suppose our Matlab script file is called user.m, then a suitable NQS submission script is:
#!/usr/local/bin/bash
matlab12 -nodisplay -nojvm -nosplash 1> matlab.out1 2>&1 < user.m
This script file may then be submitted in a similar manner to the previous
example.
N.B. The Matlab quit command must be put at the end of the script
file, in this case, user.m.
1. Submitting abaqus jobs to NQS from the command line
To submit an Abaqus job from the command line use the queue= parameter and specify the queue you wish to submit the job to, for example, for Abaqus Version 6.2
abaqus62 job=<my_input_file>.inp queue=one_day
and for Abaqus 6.3
abaqus63 job=<my_input_file>.inp queue=one_day
where <my_input_file>.inp is the name of the abaqus input file
you wish to run.
2. Submitting abaqus jobs to NQS from within Abaqus CAE, Versions 6.2 and 6.3
You can specify the NQS queue to send the job in Job Manager. Open the Job Module within Abaqus CAE (Module->Job). Choose Job -> Manager, then either Create, to create a new job, or Edit to modify an existing job. Choose the Submission tab and check Queue: under Run Mode. Select the desired queue from the pull-down menu at the side of Queue:. Choose OK when happy with this selection. You may then Submit and Monitor the job, using the Submit and Monitor buttons.
...coming...
| ...previous | up (conts) | next... |