This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
tutorial:torque [2016/10/07 10:10] sertalpbilal |
tutorial:torque [2016/10/18 15:13] sertalpbilal |
||
---|---|---|---|
Line 156: | Line 156: | ||
</ | </ | ||
- | Allocating more than one CPU under PBS can be done in a number of ways, using the -l flag and the following resource descriptions: | + | Allocating more than one CPU under PBS can be done in a number of ways, using the '' |
* nodes - specifies the number of separate nodes that should be allocated | * nodes - specifies the number of separate nodes that should be allocated | ||
Line 162: | Line 162: | ||
* ppn - how many processes to allocate for each node | * ppn - how many processes to allocate for each node | ||
- | The allocation made by pbs will be reflected in the contents of the nodefile, which can be accessed via the $PBS_NODEFILE environment variable. | + | The allocation made by pbs will be reflected in the contents of the nodefile, which can be accessed via the '' |
The difference between ncpus and ppn is a bit subtle. ppn is used when you actually want to allocate multiple processes per node. ncpus is used to qualify the sort of nodes you want, and only secondarily to allocate multiple slots on a cpus. Some examples should help. | The difference between ncpus and ppn is a bit subtle. ppn is used when you actually want to allocate multiple processes per node. ncpus is used to qualify the sort of nodes you want, and only secondarily to allocate multiple slots on a cpus. Some examples should help. | ||
Line 221: | Line 221: | ||
* **PBS_WALLTIME** (the walltime requested by the user or default walltime allotted by the scheduler) | * **PBS_WALLTIME** (the walltime requested by the user or default walltime allotted by the scheduler) | ||
+ | ===== Mass Operations ===== | ||
+ | |||
+ | ==== Submitting multiple jobs ==== | ||
+ | An easy way to submit multiple jobs via PBS is using a batch script. Suppose we would like to give all file names inside a folder with MPS extension into our solver. We can write a PBS Script such as | ||
+ | <code bash submit.pbs> | ||
+ | cd / | ||
+ | / | ||
+ | </ | ||
+ | and a BASH script: | ||
+ | <code bash bashloop.sh> | ||
+ | for f in dataset/ | ||
+ | do | ||
+ | qsub -q batch -v FILENAME=$f submit.pbs | ||
+ | done | ||
+ | </ | ||
+ | Here, option '' | ||
+ | |||
+ | After having these two files, simply calling | ||
+ | < | ||
+ | ./ | ||
+ | </ | ||
+ | will submit all jobs into Torque. | ||
+ | |||
+ | ==== Cancelling all jobs ==== | ||
+ | You can call | ||
+ | <code bash> | ||
+ | qselect -u < | ||
+ | </ | ||
+ | to cancel all of your running jobs. | ||
===== Prerequisite ===== | ===== Prerequisite ===== | ||
Line 237: | Line 266: | ||
cat ~/ | cat ~/ | ||
</ | </ | ||
- | Now, you will get the error and output files for your jobs. | + | Now, you will get the error log and output |