Changes between Version 49 and Version 50 of Public/User_Guide/Batch_system


Ignore:
Timestamp:
Sep 30, 2021, 10:55:29 AM (3 years ago)
Author:
Jochen Kreutz
Comment:

introductory example updated

Legend:

Unmodified
Added
Removed
Modified
  • Public/User_Guide/Batch_system

    v49 v50  
    7979=== Running directly from the front ends ===
    8080
    81 You can run the application directly from the frontend, bypassing the shell:
    82 
    83 {{{
     81You can run the application directly from the frontend, bypassing the shell. Do not forget to set the correct environment for running your executable on the login node as this will be used for execution with `srun`.
     82
     83{{{
     84[kreutz1@deepv Temp]$ ml GCC/10.3.0 ParaStationMPI/5.4.9-1
    8485[kreutz1@deepv Temp]$ srun -A deep -p dp-cn -N 4 -n 8 -t 00:30:00 ./MPI_HelloWorld
    8586Hello World from rank 7 of 8 on dp-cn04
     
    9394}}}
    9495
    95 In this case, it can be useful to create an allocation which you can use for several runs of your job:
     96It can be useful to create an allocation which you can be used for several runs of your job:
    9697
    9798{{{
     
    117118=== Batch script ===
    118119
    119 Given the following script {{{hello_cluster.sh}}}:
     120As stated above, it is recommended to load the necessary modules within the script and submit the script from a clean environment.
     121
     122The following script {{{hello_cluster.sh}}} will unload all modules and load the modules required for executing the given binary:
    120123
    121124{{{
    122125#!/bin/bash
    123126
    124 #SBATCH --partition=dp-cn
     127#SBATCH --partition=dp-esb
    125128#SBATCH -A deep
    126129#SBATCH -N 4
     
    130133#SBATCH --time=00:10:00
    131134
     135ml purge
     136ml GCC ParaStationMPI
    132137srun ./MPI_HelloWorld
    133138}}}
    134139
    135 This script requests 4 nodes with 8 tasks, specifies the stdout and stderr files, and asks for 10 minutes of walltime. Submit:
     140This script requests 4 nodes of the ESB module with 8 tasks, specifies the stdout and stderr files, and asks for 10 minutes of walltime.
     141You can submit the job script as follows:
    136142
    137143{{{
     
    140146}}}
    141147
    142 Check what it's doing:
     148... and check what it's doing:
    143149
    144150{{{
     
    148154}}}
    149155
    150 Check the result:
     156Once finished, you can check the result (and the error file if needed)
    151157
    152158{{{
    153159[kreutz1@deepv Temp]$ cat /p/project/cdeep/kreutz1/hello_cluster-69264.out
    154 Hello World from rank 6 of 8 on dp-cn04
    155 Hello World from rank 3 of 8 on dp-cn02
    156 Hello World from rank 0 of 8 on dp-cn01
    157 Hello World from rank 4 of 8 on dp-cn03
    158 Hello World from rank 2 of 8 on dp-cn02
    159 Hello World from rank 7 of 8 on dp-cn04
    160 Hello World from rank 5 of 8 on dp-cn03
    161 Hello World from rank 1 of 8 on dp-cn01
     160Hello World from rank 7 of 8 on dp-esb37
     161Hello World from rank 3 of 8 on dp-esb35
     162Hello World from rank 5 of 8 on dp-esb36
     163Hello World from rank 1 of 8 on dp-esb34
     164Hello World from rank 6 of 8 on dp-esb37
     165Hello World from rank 2 of 8 on dp-esb35
     166Hello World from rank 4 of 8 on dp-esb36
     167Hello World from rank 0 of 8 on dp-esb34
    162168}}}
    163169