This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
guide:moab [2011/04/07 16:22] smabakane |
guide:moab [2021/12/09 16:42] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | The following CHPC HPC systems (e1350, Blue Gene/P and Sun Microsytems) use schedulers and resources managers | + | ======A Guide to the Moab Job Scheduler at the CHPC====== |
| - | e1350 cluster - Moab (Scheduler) | + | To submit jobs to run on CHPC systems, you must write a shell script that will run your job, and then use '' |
| - | Blue Gene/P - Loadleveler (Resource manager). | + | |
| - | Sun Microsystems - Moab (Scheduler) | + | |
| - | Herewith an example script of Moab in e1350 cluster: | + | ====SUN HYBRID SYSTEM==== |
| - | # | + | ===PARTITIONS=== |
| - | #MSUB -l nodes=8:ppn=8 | + | |
| - | #MSUB -l walltime=100:00:00 | + | |
| - | #MSUB -m be | + | |
| - | #MSUB -V | + | |
| - | #MSUB -o / | + | |
| - | #MSUB -e / | + | |
| - | #MSUB -d / | + | |
| - | #MSUB -r y | + | |
| - | #MSUB -M email.address | + | |
| - | # | + | The Sun system is divided into // |
| - | | + | |
| - | | + | - '' |
| - | nproc=`wc $PBS_NODEFILE| | + | - '' |
| - | /CHPC/usr/local/mpiexec-0.83/bin/mpiexec | + | - '' |
| + | - '' | ||
| + | - '' | ||
| + | - '' | ||
| + | - '' | ||
| + | |||
| + | Users can specify different cluster partitions by adding a '' | ||
| + | msub -l feature=nehalem | ||
| + | You are able to choose more than one partition, provided, of course, your code can execute on the requested hardware. The syntax looks like: | ||
| + | msub -l feature=nehalem|harpertown | ||
| + | to use both '' | ||
| + | |||
| + | |||
| + | ===Sun and Dell Westmere Clusters=== | ||
| + | |||
| + | The new **Westmere** clusters are now open to be used and we hope that this will reduce the waiting | ||
| + | |||
| + | **NB:** The new Dell cluster runs a different O/S from the Sun clusters. | ||
| + | |||
| + | Please note that each node of Westmere has **12 cores**, so please change the processes per node value from '' | ||
| + | |||
| + | To run on one of the Westmere clusters specify the '' | ||
| + | |||
| + | For example, in your script | ||
| + | | ||
| + | #MSUB -l nodes=1: | ||
| + | |||
| + | Or on the command line | ||
| + | msub -l feature=westmere -l nodes=1: | ||
| + | |||
| + | See the **//[[guide: | ||
| + | |||
| + | ===QUEUES=== | ||
| + | |||
| + | The Moab scheduler has several different queues on the Sun systems for different sized and priority jobs: | ||
| + | |||
| + | - small (min processors=1 , max processors = 8 , max walltime = 336 hours) | ||
| + | - par32 (min processors=9 , max processors = 32 , max walltime = 336 hours) | ||
| + | - par64 ( min processors=33 ,max processors = 64 , max walltime = 336 hours) | ||
| + | - big ( min processors=65, | ||
| + | - test (min processors=1 , max processors = 8 , max walltime = 10 minutes) | ||
| + | | ||
| + | - special ( min processors=129 , max processors = 512 , max walltime = 336hours ) | ||
| + | - priority ( min processors=129 , max processors = 768 , max walltime = 336hours ) | ||
| + | |||
| + | NOTE: Users need to log a call at http:// | ||
| + | they need to use the //special// or // | ||
| + | |||
| + | |||
| + | |||
| + | Note that it is not necessary for users to specify queues since moab will automatically choose the | ||
| + | correct queue for you from the information supplied in your job script | ||
| + | e.g. using "msub -l nodes=1: ppn=8 and msub -l walltime" | ||
| + | |||
| + | ===Job script example: | ||
| + | |||
| + | ===MPI job=== | ||
| + | |||
| + | Edit the file with, for example, | ||
| + | <file bash mpi.job> | ||
| + | #/bin/sh | ||
| + | #MSUB -l nodes=1: | ||
| + | #MSUB -l feature=nehalem|harpertown | ||
| + | #MSUB -l walltime=3: | ||
| + | #MSUB -m be | ||
| + | #MSUB -V | ||
| + | #MSUB -o / | ||
| + | #MSUB -e / | ||
| + | #MSUB -d / | ||
| + | #MSUB -mb | ||
| + | ##### Running commands | ||
| + | exe=/ | ||
| + | nproc=`cat $PBS_NODEFILE | wc -l` | ||
| + | mpirun -np $nproc -machinefile | ||
| + | </ | ||
| + | |||
| + | |||
| + | To submit this job (the '' | ||
| + | |||
| + | msub mpi.job | ||
| + | |||
| + | By default the job will be submitted to small queue since it only requests 8 processors. | ||
| + | |||
| + | **NB:** Your job MUST be located on the scratch partition, otherwise it will fail to run. | ||
| + | |||
| + | ===Interactive job=== | ||
| + | |||
| + | You have to specify '' | ||
| + | |||
| + | msub -I | ||
| + | |||
| + | There will be a delay while the scheduler allocates and logs you into a free compute node. You can target | ||
| + | a specific free node: | ||
| + | |||
| + | msub -I -l nodes=cnode-9-23 | ||
| + | |||
| + | ===Test jobs=== | ||
| + | |||
| + | Users can use the same script and just change the walltime to 10 minutes or less and then change | ||
| + | #MSUB -l feature=nehalem|harpertown | ||
| + | to | ||
| + | #MSUB -l feature=test | ||
| + | in the job script. | ||
| + | |||
| + | ====GPU CLUSTER==== | ||
| + | |||
| + | ===PARTITIONS=== | ||
| + | |||
| + | - //C2070// (8 of these Nvidia //Fermi// GPU cards are available on two nodes) | ||
| + | - //C1060// (12 of these Nvidia //Tesla// GPU cards are available on three nodes) | ||
| + | |||
| + | Note that GPU cluster has 5 compute nodes and each node has 16 processors and 4 GPUs. In addition the head node (login node) has one each of C2070 and C1060 GPU cards. | ||
| + | |||
| + | ===Job script example: | ||
| + | |||
| + | ===MPI job over infiniband=== | ||
| + | |||
| + | Edit with ''vi mpi.job'' | ||
| + | <file bash mpi.job> | ||
| + | ###These lines are for Moab | ||
| + | #MSUB -l nodes=2: | ||
| + | #MSUB -l feature=c2070 | ||
| + | #MSUB -l walltime=168: | ||
| + | #MSUB -m be | ||
| + | #MSUB -V | ||
| + | #MSUB -o / | ||
| + | #MSUB -e / | ||
| + | #MSUB -d / | ||
| + | #MSUB -mb | ||
| + | ##### Running commands | ||
| + | echo " | ||
| + | echo " | ||
| + | cat $PBS_NODEFILE | ||
| + | echo " | ||
| + | cat $PBS_NODEFILE|sed -e 's/ | ||
| + | echo " | ||
| + | echo " | ||
| + | cat $PBS_STEP_OUT.hostfile | ||
| + | exe=location of the executable | ||
| + | nproc=`cat $PBS_NODEFILE | wc -l` | ||
| + | cd / | ||
| + | mpirun $nproc $exe > / | ||
| + | </ | ||
| + | |||
| + | |||
| + | Type '' | ||
| + | |||
| + | In this example we have requested four C2070 GPUs and 32 processors | ||
| + | |||
| + | ====(Obsolete) BlueGene/P CLUSTER==== | ||
| + | |||
| + | The BlueGene has been decommissioned and is no longer available. | ||
| + | |||
| + | Users can only use 32, 64, 128, 256 or 512 processors ('' | ||
| + | |||
| + | ===Job script example: | ||
| + | |||
| + | ===MPI job=== | ||
| + | |||
| + | The '' | ||
| + | <file bash mpi.job> | ||
| + | ###These lines are for Moab | ||
| + | #MSUB -l ppn=128 | ||
| + | #MSUB -l walltime=168: | ||
| + | #MSUB -m be | ||
| + | #MSUB -V | ||
| + | #MSUB -o /CHPC/work/username/testjob/ | ||
| + | #MSUB -e / | ||
| + | #MSUB -d / | ||
| + | #MSUB -mb | ||
| + | ##### Running commands | ||
| + | / | ||
| + | -mode VN -exe LOCATIONOFTHEEXECUTABLE | ||
| + | </ | ||
| + | As before, use '' | ||
| + | |||
| + | |||
| + | ======Moab Summary====== | ||
| + | |||
| + | |||
| + | ====SUBMITTING A JOB USING MOAB==== | ||
| + | |||
| + | Create a test job using a //text// editor: the job script file is a shell script file and should be a plain Ascii text file with Unix style line end characters. | ||
| + | |||
| + | vi test.job | ||
| + | |||
| + | to create a file called '' | ||
| + | |||
| + | Include the following in your script, for more info check http:// | ||
| + | To get the definitions, | ||
| + | |||
| + | <file bash job.msub> | ||
| + | ###These lines are for Moab | ||
| + | #MSUB -l nodes=4: | ||
| + | #MSUB -l walltime=2: | ||
| + | #MSUB -m be | ||
| + | #MSUB -o / | ||
| + | #MSUB -e / | ||
| + | #MSUB -d / | ||
| + | #MSUB -mb | ||
| + | #MSUB -M nmonama@csir.co.za | ||
| + | |||
| + | ##### Running commands | ||
| + | NP=`cat | ||
| + | mpirun –np $NP –machinefile $PBS_NODEFILE DLPOLY_3.07.SPARC.Y | ||
| + | </file> | ||
| + | |||
| + | Details of each line of the job script: | ||
| + | |||
| + | SCRIPT | ||
| + | |||
| + | #MSUB -a | ||
| + | #MSUB -A account | ||
| + | #MSUB -e | ||
| + | #MSUB -d path | ||
| + | #MSUB -h Put a user hold on the job at submission time. | ||
| + | #MSUB -j oe | ||
| + | #MSUB -l string | ||
| + | #MSUB -m options | ||
| + | #MSUB -N name Gives a user specified name to the job | ||
| + | #MSUB -o filename | ||
| + | #MSUB -p priority | ||
| + | #MSUB -q queue Run the job in the specified queue (short.q, | ||
| + | #MSUB -r y | ||
| + | #MSUB -S path | ||
| + | #MSUB -v list | ||
| + | #MSUB -V | ||
| + | #MSUB -W This option has been deprecated and should be ignored. | ||
| + | |||
| + | |||
| + | To submit the test job script use the following on the Linux command line: | ||
| + | |||
| + | msub test.job | ||
| + | |||
| + | **NB:** Your job should always write its output to scratch. It will be faster if it reads its input from there as well. | ||
| + | |||
| + | There are various controls of Moab and Loadleveler that can help you to manage your job: | ||
| + | |||
| + | Some of Moab controls are as follows: | ||
| + | |||
| + | | Command | Description | | ||
| + | ^ msub | Scheduler job submission | | ||
| + | ^ showq | Show queued jobs | | ||
| + | ^ canceljob | Cancel job | | ||
| + | ^ showres | Show existing reservations | | ||
| + | ^ showstart | Show estimate of when job can or will start | | ||
| + | ^ checkjob | Provide report for specified job | | ||
| | | ||
| - | Below is an example script of Moab in Blue Gene/P: | ||
| - | #@ job_type = bluegene | ||
| - | #@ bg_size = 64 | ||
| - | #@ class = BGP | ||
| - | #@ input = /dev/null | ||
| - | #@ output = dlpoly.$(jobid).out | ||
| - | #@ error = dlpoly.$(jobid).err | ||
| - | #@ wall_clock_limit = 12:00:00 | ||
| - | #@ resources = ConsumableCpus(1) | ||
| - | #@ node_usage = shared | ||
| - | #@ cluster_list = BGP | ||
| - | #@ notification = complete | ||
| - | #@ queue | ||
| - | / | ||