Code:SGE
From Predictive Chemistry
Revision as of 09:11, 4 November 2013 by David M. Rogers (talk | contribs) (Created page with "Here's a basic template for queuing a job using MPI (here 4 cpus and 6h max run-time). <source lang="bash"> #$ -N a-test-job #$ -cwd #$ -o job-$JOB_ID.out #$ -e job-$JOB_ID.err …")
Here's a basic template for queuing a job using MPI (here 4 cpus and 6h max run-time).
<source lang="bash">
- $ -N a-test-job
- $ -cwd
- $ -o job-$JOB_ID.out
- $ -e job-$JOB_ID.err
- $ -l pcpus=4,h_rt=06:00:00
- Example minimum memory request:
- $ -l mpj=10G
- Max run-time sets queue:
- queue max run-time
- devel 1 hour
- short 6 hours
- medium 2 day
- long 1 week
mpirun parallel-executable </source>
Submit with <source lang="bash"> qsub job.sh </source>
For execution and status, use qstat
For more info, see the CIRCE SGE guide.
Here's a run-down on the environment variables available during running (for scripting): <source lang="bash">
- Environment Menu:
- $JOB_ID: The job number assigned by the scheduler to your job
- 1844896
- $JOBDIR: The directory your job is currently running in
- <blank>
- $USER: The username of the person currently running the job
- anyuser
- $TMPDIR: The directory containing informational files about the job e.g. the machines allocated to run the job, etc.
- /tmp/1844896.1.default
- $SGE_O_WORKDIR: Similar to $JOBDIR
- /home/a/anyuser/test
- $HOME: User's home directory on execution machine
- /home/d/anyuser
- $JOB_NAME: The job name specified by -N option
- a-test-job
- $HOSTNAME: Name of execution host
- wh-520-7-5.rc.usf.edu
- $TASK_ID: You can submit array jobs. This would be the TASK number in the array job of the current task
- <blank>
- $SGE_CELL: SGE cell that the job is currently running in
- default
- $SGE_O_SHELL: Invoking shell of the current SGE job
- /bin/bash
- $QUEUE: Current running queue
- default
</source>