This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
using_ogs_sge [2017/05/24 15:19] mgstauff [Parallel Isn't Always Better!] |
using_ogs_sge [2018/03/02 20:35] (current) mgstauff [Per-job memory limit] |
||
---|---|---|---|
Line 56: | Line 56: | ||
The most common way to use SGE is to run batch jobs via '' | The most common way to use SGE is to run batch jobs via '' | ||
- | '' | + | '' |
- | You run a batch job like so: | + | You run a batch job like so, where '' |
- | [mgstauff@chead ~]$ qsub myjob | + | [mgstauff@chead ~]$ qsub myjobscript |
- | Your job 27657 ("myjob") has been submitted | + | Your job 27657 ("myjobscript") has been submitted |
| | ||
- | //myjob// is any kind of script | + | Here's an example BASH script that could be in the file named '' |
- | The output says that your job has been submitted to the queue. It's either | + | //# |
+ | echo I am a job running | ||
+ | ZZZ=5 | ||
+ | echo Sleeping | ||
+ | sleep $ZZZ | ||
+ | echo NSLOTS: $NSLOTS | ||
+ | echo All Done. | ||
===== Output from your job ===== | ===== Output from your job ===== | ||
- | Your script should be setup to save your image or data output files as you normally would, i.e. typically in your /jet directory somewhere in your project tree. | + | Your script should be setup to save your image or data output files as you normally would, i.e. typically in your /data/< |
But what happens to the terminal output of your script? That is, the text or error messages your script normally generates and shows on the screen when you run it from the command line? This output is saved to special files for each job in the job's working directory. They look like this: | But what happens to the terminal output of your script? That is, the text or error messages your script normally generates and shows on the screen when you run it from the command line? This output is saved to special files for each job in the job's working directory. They look like this: | ||
- | [mgstauff@chead ~]$ ls myjob.* | + | [mgstauff@chead ~]$ ls myjobscript.* |
myjob.e27657 | myjob.e27657 | ||
myjob.o27657 | myjob.o27657 | ||
Line 414: | Line 420: | ||
__**However, | __**However, | ||
+ | === Java Memory Issues === | ||
+ | |||
+ | Java like to allocate lots of RAM. You usually have to limit its memory. [[java|Click here for details.]] | ||
+ | |||
==== Jobs on chead ==== | ==== Jobs on chead ==== | ||
If you're running something directly on chead, there are different limits. [[clusterbasics# | If you're running something directly on chead, there are different limits. [[clusterbasics# | ||
Line 466: | Line 476: | ||
==== Per-job memory limit ==== | ==== Per-job memory limit ==== | ||
- | There is a limit of 62GB per job at this point. | + | There is a limit of 30GB per job at this point for jobs running on the default queue, 'all.q'. See notes on the himem.q queue on this page if your job uses more memory. |
NOTE that if you request this much memory, you might have to wait for a node to become free since this means using most of a node's memory resources, and your job might be slowed along with other jobs on the node because memory swap space will most likely be used. | NOTE that if you request this much memory, you might have to wait for a node to become free since this means using most of a node's memory resources, and your job might be slowed along with other jobs on the node because memory swap space will most likely be used. | ||
Line 544: | Line 554: | ||
In your '' | In your '' | ||
- | Use this variable in your scripts/ | + | Use this variable in your scripts/ |
Line 583: | Line 593: | ||
__NOTE__ Because the -V option will pass your environment variables to your qsub sessions, be careful what value you set for ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS. If it does not match the number of slots you're requesting for qsub, threading will not work properly and performance will decrease. | __NOTE__ Because the -V option will pass your environment variables to your qsub sessions, be careful what value you set for ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS. If it does not match the number of slots you're requesting for qsub, threading will not work properly and performance will decrease. | ||
+ | |||
+ | === Limiting threads in OMP-based apps like FSL=== | ||
+ | The default environment is setup to include | ||
+ | |||
+ | export OMP_NUM_THREADS=${NSLOTS} | ||
+ | export OMP_THREAD_LIMIT=${NSLOTS} | ||
+ | |||
+ | which limits OMP-based apps (like FSL) to use only as many threads as you have slots. | ||
=== Limiting threads in Matlab === | === Limiting threads in Matlab === |