-
Notifications
You must be signed in to change notification settings - Fork 0
Using Slurm to submit jobs on Cannon (Part 2)
Large jobs (e.g. GEOS-Chem simulations) should be submitted as a batch job. This will run your job in non-interactive mode on one of the computational nodes. using a script.
Each GEOS-Chem Classic or GCHP run directory that you create will contain sample run scripts that you can modify. Here are some examples:
-
GEOS-Chem Classic run script: geoschem.run
-
GCHP run script GCHP run
We recommend specifying multiple partitions by adding this command to the top of your run script:
#SBATCH -p sapphire,huce_cascade,seas_compute,shared,serial_requeueYour job will start executing in the partition that has availability first.
NOTE: The serial_requeue partition can only be used with jobs of 8 CPU or less. These jobs may be pre-empted if priority demands. This would be an OK choice for short testing runs but not for long production simulations.
The seas_compute partition consists of nodes with different CPU types. Normally, your job will run on whichever node frees up first. If you wish to restrict your run to a specific CPU type, add one of these commands to the top of your run script:
#SBATCH --constraint=haswell
#SBATCH --constraint=broadwell
#SBATCH --constraint=cascadelake
#SBATCH --constraint=skylake
#SBATCH --constraint=icelake
#SBATCH --constraint=sapphirerapidsThis will tell SLURM not to run your job until a node with your desired CPU type frees up. This may result in longer wait times. Also, if there are no nodes of a given CPU type in the seas_compute partition, your job will not run.
- The former
huce_intelpartition (now part ofseas_compute) contained mostlyhaswellandbroadwellCPUs. - The former
huce_cascadepartition (now part ofseas_compute) contained exclusivelycascadelakeCPUs.
You can use the Slurm sbatch command to submit a batch job:
sbatch geoschem.run
Some jobs may need to be split up into a series of several jobs. To run a set of jobs in a specified order, you will need to make each job dependent on another job so that it won't execute until the earlier job has finished. You can specify job dependencies in SLURM using the --dependency option. For example:
sbatch geoschem.run.1
sbatch --dependency=afterok:JOBID geoschem.run.2
The dependency type afterok means that the second job will only begin after the specified JOBID has successfully executed.
Adding this tag
#SBATCH --test-only
at the top of your GEOS-Chem run script will invoke SLURM's "dry-run" option. SLURM will not schedule your job, but will instead return its interpretation of the requested resources and an example time for when it would be scheduled to run based on the current queue load. Here is a sample output:
sbatch: Job 40513378 to start at 2018-03-31T15:16:26 using 24 processors on holyjacob01
This option can be very useful in helping to determine your workflow. If your job is not scheduled to start for a long time, you might want to consider starting other jobs that request less memory, cores, and/or time first.
For more information, also see: https://docs.rc.fas.harvard.edu/kb/running-jobs/
To kill a job that you've submitted, use the scancel command:
scancel JOBID