209 | | As first step add information to your configuration file. You may edit an existing file (.e.g. {{{.palm.config.default}}}) or create a new one (e.g. by copying the default file to e.g. {{{.palm.config.batch}}} and then editing the new file. It is not necessarily required to create a new file, since you can use the same configuration file for running interactive jobs and batch jobs as well. Let's assume here that you have created a new file {{.palm.config.batch}}}. Edit this file and add ... |
| 209 | For running PALM in batch mode you need to include additional options in the {{{palmrun}}} command to specify the system resources requested by the job, and to modify your configuration file. A minimum set of additional {{{palmrun}}} options is |
| 210 | {{{ |
| 211 | palmrun .... -t <cputime> -X <total number of cores> -T <MPI tasks per node> -q <queue> -m <memory per core> |
| 212 | }}} |
| 213 | where |
| 214 | * {{{<cputime>}}} is the maximum CPU time (wall clock time) in seconds requested by the batch job |
| 215 | * {{{<total number of cores>}}} is the total number of CPU cores (not CPUs!) that shall be used for your run |
| 216 | * {{{<MPI tasks per node>}}} is the number of MPI tasks to be started on one node of the computer system. Typically, {{{<MPI tasks per node>}}} is chosen as the total number of CPU cores available on one node, e.g. if a node has two CPUs with 12 cores each, then {{{<MPI tasks per node> = 24}}}. |
| 217 | * {{{<queue>>> is the name of the batch job queue that you like to use. See your batch system documentation about available queues and keep in mind that usually each queue has special limits for requested resources. |
| 218 | * {{{<memory per core>}}} is the memory in MByte requested by each core |
| 219 | |
| 220 | As first step add information to your configuration file. You may edit an existing file (.e.g. {{{.palm.config.default}}}) or create a new one (e.g. by copying the default file to e.g. {{{.palm.config.batch}}} and then editing the new file. It is not necessarily required to create a new file, since you can use the same configuration file for running interactive jobs and batch jobs as well. Let's assume here that you have created a new file {{.palm.config.batch}}}. Edit this file and add those batch directives required by your batch system. Keep in mind that there is a wide variety of batch systems and that many computer centers introduce their own special settings for these systems. Please read the documentation of your respective batch system carefully in order to figure out the required settings for your system (e.g. to run an MPI job on multiple cores). The following lines give a minimum example for the portable batch system (PBS). |
| 221 | {{{ |
| 222 | BD:#!/bin/bash |
| 223 | BD:#PBS -N {{job_id}} |
| 224 | BD:#PBS -l walltime={{cpu_hours}}:{{cpu_minutes}}:{{cpu_seconds}} |
| 225 | BD:#PBS -l nodes={{nodes}}:ppn={{tasks_per_node}} |
| 226 | BD:#PBS -o {{job_protocol_file}} |
| 227 | BD:#PBS -j oe |
| 228 | BD:#PBS -q {{queue}} |
| 229 | }}} |
| 230 | Batch directive lines in the configuration file must start in the first column with string {{{BD:}}}, immediately followed by the directive of the respective batch system (the PBS directives must e.g. start with {{{#PBS}}} followed by a {{{blank}}}). Strings parenthesized by double curly brackets {{{ {{...}} }}} are variables used in {{{palmrun}}} and will be replaced by their respective values while {{{palmrun}}} creates the batch job file. A complete list of {{{palmrun}}} variables that can be used in batch directives is given in section [wiki:doc/app/batch_directives batch_directives]. |
| 231 | |
| 232 | |