Changes between Version 51 and Version 52 of Public/User_Guide/Batch_system
- Timestamp:
- Oct 15, 2021, 10:59:53 AM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Public/User_Guide/Batch_system
v51 v52 55 55 First, start a shell on a node. Assume you would like to run your mpi task on 4 cluster nodes with 2 tasks per node: 56 56 {{{ 57 [kreutz1@deepv /p/project/cdeep/kreutz1/Temp]$ srun -A deep -p dp-cn -N 4 -n 8 -t 00:30:00 --pty /bin/bash -i57 [kreutz1@deepv /p/project/cdeep/kreutz1/Temp]$ srun -A deep -p dp-cn -N 4 -n 8 -t 00:30:00 --pty --interactive /bin/bash -i 58 58 [kreutz1@dp-cn01 /p/project/cdeep/kreutz1/Temp]$ 59 59 }}} … … 63 63 Once you get to the compute node, start your application using {{{srun}}}. Note that the number of tasks used is the same as specified in the initial {{{srun}}} command above (4 nodes with two tasks each): 64 64 {{{ 65 [kreutz1@deepv Temp]$ s run -A deep -p dp-cn -N 4 -n 8 -t 00:30:00 --pty/bin/bash -i66 [kreutz1@dp-cn01 Temp]$ srun ./MPI_HelloWorld65 [kreutz1@deepv Temp]$ salloc -A deep -p dp-cn -N 4 -n 8 -t 00:30:00 srun --pty --interactive /bin/bash -i 66 [kreutz1@dp-cn01 Temp]$ srun -N 2 -n 8 ./MPI_HelloWorld 67 67 Hello World from rank 3 of 8 on dp-cn02 68 68 Hello World from rank 7 of 8 on dp-cn04 … … 76 76 77 77 You can ignore potential warnings about the cpu binding. !ParaStation will pin your processes. 78 79 If you just need to one node to run your interactive session on you can simply use the `srun` command (without `salloc`), e.g.: 80 81 {{{ 82 [kreutz1@deepv ~]$ srun -A deep -N 1 -n 8 -p dp-cn -t 00:30:00 --pty --interactive bash -i 83 [kreutz1@dp-cn22 ~]$ srun -n 8 hostname 84 dp-cn22 85 dp-cn22 86 dp-cn22 87 dp-cn22 88 dp-cn22 89 dp-cn22 90 dp-cn22 91 dp-cn22 92 }}} 78 93 79 94 === Running directly from the front ends === … … 94 109 }}} 95 110 96 It can be useful to create an allocation which youcan be used for several runs of your job:111 It can be useful to create an allocation which can be used for several runs of your job: 97 112 98 113 {{{ … … 115 130 salloc: Relinquishing job allocation 69263 116 131 }}} 132 133 Note that in this case the `-N` and `-n` options for the `srun` command can be skipped (they default to the corresponding options given to `salloc`). 117 134 118 135 === Batch script ===