Changes between Version 49 and Version 50 of Public/User_Guide/Batch_system
- Timestamp:
- Sep 30, 2021, 10:55:29 AM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Public/User_Guide/Batch_system
v49 v50 79 79 === Running directly from the front ends === 80 80 81 You can run the application directly from the frontend, bypassing the shell: 82 83 {{{ 81 You 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 84 85 [kreutz1@deepv Temp]$ srun -A deep -p dp-cn -N 4 -n 8 -t 00:30:00 ./MPI_HelloWorld 85 86 Hello World from rank 7 of 8 on dp-cn04 … … 93 94 }}} 94 95 95 I n this case, it can be useful to create an allocation which you can usefor several runs of your job:96 It can be useful to create an allocation which you can be used for several runs of your job: 96 97 97 98 {{{ … … 117 118 === Batch script === 118 119 119 Given the following script {{{hello_cluster.sh}}}: 120 As stated above, it is recommended to load the necessary modules within the script and submit the script from a clean environment. 121 122 The following script {{{hello_cluster.sh}}} will unload all modules and load the modules required for executing the given binary: 120 123 121 124 {{{ 122 125 #!/bin/bash 123 126 124 #SBATCH --partition=dp- cn127 #SBATCH --partition=dp-esb 125 128 #SBATCH -A deep 126 129 #SBATCH -N 4 … … 130 133 #SBATCH --time=00:10:00 131 134 135 ml purge 136 ml GCC ParaStationMPI 132 137 srun ./MPI_HelloWorld 133 138 }}} 134 139 135 This script requests 4 nodes with 8 tasks, specifies the stdout and stderr files, and asks for 10 minutes of walltime. Submit: 140 This script requests 4 nodes of the ESB module with 8 tasks, specifies the stdout and stderr files, and asks for 10 minutes of walltime. 141 You can submit the job script as follows: 136 142 137 143 {{{ … … 140 146 }}} 141 147 142 Check what it's doing:148 ... and check what it's doing: 143 149 144 150 {{{ … … 148 154 }}} 149 155 150 Check the result: 156 Once finished, you can check the result (and the error file if needed) 151 157 152 158 {{{ 153 159 [kreutz1@deepv Temp]$ cat /p/project/cdeep/kreutz1/hello_cluster-69264.out 154 Hello World from rank 6 of 8 on dp-cn04155 Hello World from rank 3 of 8 on dp- cn02156 Hello World from rank 0 of 8 on dp-cn01157 Hello World from rank 4 of 8 on dp-cn03158 Hello World from rank 2 of 8 on dp-cn02159 Hello World from rank 7 of 8 on dp-cn04160 Hello World from rank 5 of 8 on dp-cn03161 Hello World from rank 1 of 8 on dp-cn01160 Hello World from rank 7 of 8 on dp-esb37 161 Hello World from rank 3 of 8 on dp-esb35 162 Hello World from rank 5 of 8 on dp-esb36 163 Hello World from rank 1 of 8 on dp-esb34 164 Hello World from rank 6 of 8 on dp-esb37 165 Hello World from rank 2 of 8 on dp-esb35 166 Hello World from rank 4 of 8 on dp-esb36 167 Hello World from rank 0 of 8 on dp-esb34 162 168 }}} 163 169