| | 143 | I've started playing around with running jobs with the MOAB scheduler, and after being completely confused by the msub/srun split, I think I've sorted out more details on how to submit jobs. |
| | 144 | |
| | 145 | My first test was to submit a ppImage job to the Moab scheduler. Using the command {{{msub -v ppI_test.cmd}}} where that command script contains: |
| | 146 | |
| | 147 | {{{ |
| | 148 | #!/bin/tcsh |
| | 149 | ##### Moab controll lines |
| | 150 | #MSUB -l nodes=1:ppn=4,walltime=1:00:00 |
| | 151 | #MSUB -j oe |
| | 152 | #MSUB -V |
| | 153 | #MSUB -o /scratch3/watersc1/job.out |
| | 154 | |
| | 155 | ##### Commands |
| | 156 | date |
| | 157 | ppImage -file /scratch3/watersc1/o5303g0240o.ota67.fits /scratch3/watersc1/ppI_test -recipe PPIMAGE CHIP -Db PHOTOM F -Db DARK F -Db FLAT F -Db NOISEMAP F -Db MASK F -Db NONLIN F -threads 4 |
| | 158 | date |
| | 159 | }}} |
| | 160 | |
| | 161 | This submitted the job and executed it, saving the stderr/stdout information in the job.out file specified. This runs all the commands contained sequentially, meaning that there is no parallelization internal to the task, and all allocated resources can be used by each command in the task. |
| | 162 | |
| | 163 | The second test used srun as the main command, allowing multiple jobs to be run in parallel, sharing the allocated resources: {{{msub -V ppI_srun_test.cmd}}}. |
| | 164 | |
| | 165 | {{{ |
| | 166 | #!/bin/tcsh |
| | 167 | ##### Moab controll lines |
| | 168 | #MSUB -l nodes=2:ppn=4,walltime=0:10:00 |
| | 169 | #MSUB -j oe |
| | 170 | #MSUB -V |
| | 171 | #MSUB -o /scratch3/watersc1/job_srun.out |
| | 172 | |
| | 173 | ##### Commands |
| | 174 | date |
| | 175 | srun -n2 -l --multi-prog ppI_srun_test.config |
| | 176 | date |
| | 177 | }}} |
| | 178 | |
| | 179 | The config file for srun: |
| | 180 | {{{ |
| | 181 | # ppI double run test config file |
| | 182 | # srun -n2 -l --multiprog ppI_srun_test.config |
| | 183 | |
| | 184 | 0 ppImage -file /scratch3/watersc1/o5303g0240o.ota67.fits /scratch3/watersc1/ppI_srun_test_0 -recipe PPIMAGE CHIP -Db PHOTOM F -Db DARK F -Db FLAT F -Db NOISEMAP F -Db MASK F -Db NONLIN F -threads 1 |
| | 185 | 1 ppImage -file /scratch3/watersc1/o5303g0240o.ota67.fits /scratch3/watersc1/ppI_srun_test_1 -recipe PPIMAGE CHIP -Db PHOTOM F -Db DARK F -Db FLAT F -Db NOISEMAP F -Db MASK F -Db NONLIN F -threads 1 |
| | 186 | }}} |