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:11] sertalpbilal |
tutorial:torque [2017/01/13 10:11] sertalpbilal Changed Example Hierarchy |
||
---|---|---|---|
Line 2: | Line 2: | ||
TORQUE provides control over batch jobs and distributed computing resources. It is an advanced open-source product based on the original PBS project and incorporates the best of both community and professional development. It incorporates significant advances in the areas of scalability, | TORQUE provides control over batch jobs and distributed computing resources. It is an advanced open-source product based on the original PBS project and incorporates the best of both community and professional development. It incorporates significant advances in the areas of scalability, | ||
+ | |||
+ | |||
+ | |||
+ | ===== Prerequisite ===== | ||
+ | In order to extract your output and error results in Torque, you need to have password-less connection between nodes. If you have not set it once, execute the following commands. These commands create a public and private key so that when a node want to transfer a file to your home folder, it does not require the password. | ||
+ | After connecting to polyps enter: | ||
+ | |||
+ | <code bash> | ||
+ | ssh-keygen -N "" | ||
+ | </ | ||
+ | |||
+ | Then just press ENTER for any question. After that type the following commands: | ||
+ | |||
+ | <code bash> | ||
+ | touch ~/ | ||
+ | chmod 600 ~/ | ||
+ | cat ~/ | ||
+ | </ | ||
+ | Now, you will get the error log and output log files for your jobs. | ||
+ | |||
+ | |||
+ | |||
===== Hardware ===== | ===== Hardware ===== | ||
Line 11: | Line 33: | ||
===== Submitting Jobs ===== | ===== Submitting Jobs ===== | ||
- | |||
- | Check [[# | ||
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 71: | Line 91: | ||
To show the jobs use '' | To show the jobs use '' | ||
< | < | ||
- | To show jobs of some user use '' | + | To show jobs of some user use '' |
+ | <code shell> | ||
+ | qdel JOB_ID | ||
+ | </ | ||
==== Queues ==== | ==== Queues ==== | ||
- | We have few queues '' | + | We have few queues '' |
< | < | ||
Queue Memory CPU Time Walltime Node Run Que Lm State | Queue Memory CPU Time Walltime Node Run Que Lm State | ||
---------------- ------ -------- -------- ---- --- --- -- ----- | ---------------- ------ -------- -------- ---- --- --- -- ----- | ||
+ | gpu -- -- | ||
medium | medium | ||
short -- -- | short -- -- | ||
long | long | ||
batch -- -- | batch -- -- | ||
- | verylong | + | verylong |
- | | + | AMPL -- -- |
- | 0 | + | MOSEK |
</ | </ | ||
+ | |||
+ | If you want to use AMPL or MOSEK, you have to use queue: AMPL or MOSEK, because we have limited licenses for them. | ||
+ | |||
+ | |||
You can see limits using this command '' | You can see limits using this command '' | ||
Line 96: | Line 125: | ||
| very long | 240:00:00 | | | very long | 240:00:00 | | ||
- | ==== Examples ==== | + | ===== Examples |
- | === Submitting Large Memory Job === | + | ==== Submitting Large Memory Job ==== |
Sometimes your job needs more memory. This can be achieved by '' | Sometimes your job needs more memory. This can be achieved by '' | ||
< | < | ||
- | === Running MATLAB -- Example === | + | ==== Running MATLAB -- Example |
You just have to create a submission job which looks like this | You just have to create a submission job which looks like this | ||
Line 116: | Line 145: | ||
</ | </ | ||
- | === Interactive Jobs === | + | <note tip>Use **-singleCompThread** [[https:// |
+ | |||
+ | ==== Interactive Jobs ==== | ||
Line 126: | Line 157: | ||
and you will be running interactive session on polyp15. | and you will be running interactive session on polyp15. | ||
- | === Using GPU's === | + | ==== Using GPU' |
Line 134: | Line 165: | ||
However, first you have to have a permission to use GPU (given by Prof. Takac) -- this is just formality to allow to certain users to use video driver on polyp30 | However, first you have to have a permission to use GPU (given by Prof. Takac) -- this is just formality to allow to certain users to use video driver on polyp30 | ||
- | === Running MPI and Parallel Jobs === | + | ==== Running MPI and Parallel Jobs ==== |
<code bash mpi.pbs> | <code bash mpi.pbs> | ||
Line 156: | Line 187: | ||
</ | </ | ||
- | 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 193: | ||
* 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 196: | Line 227: | ||
c2 | c2 | ||
</ | </ | ||
+ | |||
+ | ===== 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). | ||
+ | |||
===== Advanced ===== | ===== Advanced ===== | ||
Line 221: | Line 288: | ||
* **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) | ||
- | |||
- | ===== Prerequisite ===== | ||
- | In order to extract your output and error results in Torque, you need to have password-less connection between nodes. If you have not set it once, execute the following commands. These commands create a public and private key so that when a node want to transfer a file to your home folder, it does not require the password. | ||
- | After connecting to polyps enter: | ||
- | |||
- | < | ||
- | ssh-keygen -N "" | ||
- | </ | ||
- | |||
- | Then just press ENTER for any question. After that type the following commands: | ||
- | |||
- | < | ||
- | touch ~/ | ||
- | chmod 600 ~/ | ||
- | cat ~/ | ||
- | </ | ||
- | Now, you will get the error log and output log files for your jobs. | ||