38,760
edits
(Importing a new version from external source) |
(Importing a new version from external source) |
||
Line 1: | Line 1: | ||
For example, when a long list of [[OpenMP]] tasks are executed as a single job submitted with <tt>--nodes=N</tt>, <tt>--ntasks-per-node=5</tt> and <tt>--cpus-per-task=8</tt>, the following command will take into account all processes to be started on all reserved nodes and the number of OpenMP threads per process: | For example, when a long list of [[OpenMP]] tasks are executed as a single job submitted with <tt>--nodes=N</tt>, <tt>--ntasks-per-node=5</tt> and <tt>--cpus-per-task=8</tt>, the following command will take into account all processes to be started on all reserved nodes and the number of OpenMP threads per process: | ||
{{Command | {{Command | ||
|parallel --jobs $SLURM_NTASKS_PER_NODE --sshloginfile ./node_list_${SLURM_JOB_ID} --workdir $PWD --env OMP_NUM_THREADS{{=}}$SLURM_CPUS_PER_TASK ./my_program | |parallel --jobs $SLURM_NTASKS_PER_NODE --sshloginfile ./node_list_${SLURM_JOB_ID} --workdir $PWD --env OMP_NUM_THREADS{{=}}$SLURM_CPUS_PER_TASK --sshdelay 30 ./my_program | ||
}} | }} | ||
In this case, up to <tt>5*N</tt> OpenMP processes are running simultaneously with a CPU usage of up to 800% each. | In this case, up to <tt>5*N</tt> OpenMP processes are running simultaneously with a CPU usage of up to 800% each. |