oph:cluster:jobs
Differenze
Queste sono le differenze tra la revisione selezionata e la versione attuale della pagina.
Entrambe le parti precedenti la revisioneRevisione precedenteProssima revisione | Revisione precedente | ||
oph:cluster:jobs [2023/07/25 05:53] – Non vanno usate le partizioni ma i constraint + indicate reservation diego.zuccato@unibo.it | oph:cluster:jobs [2024/11/18 09:08] (versione attuale) – diego.zuccato@unibo.it | ||
---|---|---|---|
Linea 7: | Linea 7: | ||
</ | </ | ||
- | That includes heavy IDEs((Integrated | + | That includes heavy IDEs((Integrated |
To better enforce the fair use of the frontend, the memory (RAM) usage is limited to 1GB per user. | To better enforce the fair use of the frontend, the memory (RAM) usage is limited to 1GB per user. | ||
+ | |||
+ | |||
====== Run a Job ====== | ====== Run a Job ====== | ||
To execute serial or parallel code, it is necessary to use the [[https:// | To execute serial or parallel code, it is necessary to use the [[https:// | ||
- | For each job, it is necessary to specify via a batch script the required resources (e.g. number of nodes, number of processors, memory, execution time) and, optionally, any other constraints (e.g. group of nodes). Optionally, other parameters may also be indicated | + | For each job, it is necessary to specify via a batch script the required resources (e.g. number of nodes, number of processors, memory, execution time) and, optionally, any other constraints (e.g. a group of nodes). Optionally, other parameters may also be indicated |
===== Submission via script ===== | ===== Submission via script ===== | ||
- | Although it is possible to provide job submission information to the WorkLoad Manager via command line parameters, it is normally | + | Although it is possible to provide job submission information to the WorkLoad Manager via command line parameters, it is usually |
The job script is ideally divided into three sections: | The job script is ideally divided into three sections: | ||
- | * The header, consisting of commented text in which information and notes useful to the user but ignored by the system are given (the syntax of the comments is # | + | * The header, consisting of commented text in which information and notes useful to the user but ignored by the system are given (the syntax of the comments is '' |
- | * The Slurm settings, in which instructions for launching the actual job are specified (the syntax of the instructions is #SLURM --option); | + | * The Slurm settings, in which instructions for launching the actual job are specified (the syntax of the instructions is '' |
* The module loading and code execution, the structure of which varies according to the particular software each user is using. | * The module loading and code execution, the structure of which varies according to the particular software each user is using. | ||
Linea 59: | Linea 61: | ||
# --------------------------------------------------------------------------- # | # --------------------------------------------------------------------------- # | ||
- | #- (1) Choose account of your research group (if not using the default) | + | #- (1) [optional] |
##SBATCH --account=oph | ##SBATCH --account=oph | ||
- | ##SBATCH --reservation=prj-can ## use the node reserved for CAN project | + | ##SBATCH --reservation=prj-can ## Use the node reserved for CAN project |
+ | ##SBATCH --qos=normal | ||
+ | ## and ' | ||
- | #- (2) Select the set of nodes to work on, | + | #- (2) Select the subcluster partition |
- | # the number of tasks to be used (or specify the number of node and tasks), | + | # the number of tasks to be used (or specify the number of nodes and tasks), |
- | # the RAM memory available for each node | + | # |
#- | #- | ||
- | #SBATCH --constraint=matrix | + | #SBATCH --constraint=matrix |
- | #SBATCH --nodes=2 | + | ##SBATCH --constraint=blade |
- | #SBATCH --tasks-per-node=28 | + | #SBATCH --ntasks=56 |
- | #SBATCH --ntasks=56 | + | ##SBATCH --nodes=2 |
+ | ##SBATCH --tasks-per-node=28 ## number of tasks per node (multiple of 28) | ||
#SBATCH --mem-per-cpu=2G | #SBATCH --mem-per-cpu=2G | ||
#- (3) Set the name of the job, the log and error files, | #- (3) Set the name of the job, the log and error files, | ||
- | # define the email address for comunications | + | # define the email address for communications |
#- | #- | ||
#SBATCH --job-name=" | #SBATCH --job-name=" | ||
#SBATCH --output=%N_%j.out | #SBATCH --output=%N_%j.out | ||
#SBATCH --error=%N_%j.err | #SBATCH --error=%N_%j.err | ||
- | #SBATCH --mail-type=ALL | + | #SBATCH --mail-type=ALL |
- | #SBATCH --mail-user=nome.cognome@unibo.it | + | #SBATCH --mail-user=nome.cognome@unibo.it |
# --------------------------------------------------------------------------- # | # --------------------------------------------------------------------------- # | ||
Linea 90: | Linea 95: | ||
module load mpi/ | module load mpi/ | ||
- | #- (5) Run the job: just an example | + | #- (5) Run the job: just an example. |
+ | # Note that the number of processors "-np 56" must be equal to --ntasks=56 | ||
#- | #- | ||
mpirun -np 56 ./ | mpirun -np 56 ./ | ||
Linea 101: | Linea 107: | ||
To allocate the resource request in the job script by the WorkLoad Manager, the command must be executed: | To allocate the resource request in the job script by the WorkLoad Manager, the command must be executed: | ||
- | sbatch runParallel.sh [other parameters] | + | sbatch |
+ | |||
+ | <WRAP center round info> | ||
+ | Estimating the value to use for '' | ||
+ | </ | ||
+ | <WRAP center round tip> | ||
+ | '' | ||
+ | |||
+ | While '' | ||
+ | </ | ||
For the management of running jobs, please refer to section "Job Management" | For the management of running jobs, please refer to section "Job Management" | ||
+ | |||
+ | |||
+ | ===== ' | ||
+ | |||
+ | Sometimes you have to run some heavy tasks (unsuitable for the frontend) that require interactivity. For example to compile a complex program that requires you to answer some questions, or to create a container. | ||
+ | |||
+ | You have to first request a node allocation, either by sbatch (as above, possibly with ' | ||
+ | salloc -N 1 --cpus-per-task=... --time=... --mem=... --constraint=blade | ||
+ | salloc will pause while waiting for the requested resources, so be prepared. It also tells you the value for $JOBID to be used in the following steps. | ||
+ | |||
+ | Then you can connect your terminal to the running job via: | ||
+ | srun --pty --overlap --jobid $JOBID bash | ||
+ | that gives you a new shell on the first allocated node for $JOBID (just like SSH-ing a node with the resources you asked for). | ||
+ | |||
+ | Once you're done, remember to call: | ||
+ | scancel $JOBID | ||
+ | to release resources for other users. | ||
===== Job Management ===== | ===== Job Management ===== |
oph/cluster/jobs.1690264396.txt.gz · Ultima modifica: 2023/07/25 05:53 da diego.zuccato@unibo.it