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 09:33] afo214 |
tutorial:torque [2016/10/26 11:16] sertalpbilal [Cancelling all jobs] |
||
---|---|---|---|
Line 11: | Line 11: | ||
===== Submitting Jobs ===== | ===== Submitting Jobs ===== | ||
+ | |||
+ | <note tip> | ||
Jobs can be submitted either using a submission file or directly from command line. First we explain how it is done and then we will discuss the options. | Jobs can be submitted either using a submission file or directly from command line. First we explain how it is done and then we will discuss the options. | ||
Line 154: | 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 160: | 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 219: | 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. | ||
+ | |||
+ | <code bash> | ||
+ | qselect -u < | ||
+ | </ | ||
+ | will cancel all jobs (both running jobs and queue). | ||
===== Prerequisite ===== | ===== Prerequisite ===== | ||
Line 224: | Line 260: | ||
After connecting to polyps enter: | After connecting to polyps enter: | ||
- | < | + | < |
ssh-keygen -N "" | ssh-keygen -N "" | ||
</ | </ | ||
Line 230: | Line 266: | ||
Then just press ENTER for any question. After that type the following commands: | Then just press ENTER for any question. After that type the following commands: | ||
- | < | + | < |
touch ~/ | touch ~/ | ||
chmod 600 ~/ | chmod 600 ~/ | ||
cat ~/ | cat ~/ | ||
</ | </ | ||
- | Now, you will get the error and output files for your jobs. | + | Now, you will get the error log and output |