TABLE OF CONTENTS


::pwtk::SLURM

DESCRIPTION

The master command for the SLURM batch queuing. It instructs PWTK how to submit the script to SLURM system.

USAGE

Either:

   SLURM { ...script... }

Or:

   SLURM options { ...script...}

Or:

   SLURM profile [options] { ...script...}

where "options" are SLURM sbatch options, such as:

   SLURM --nodes 4 --ntasks-per-node 16 --ntasks 64 {
        import job.pwtk
   }

and "profile" is a user defined profile for SLURM (i.e. a set of #SBATCH options). If "profile" is omitted, the "default" profile is used, which is guaranteed to exist (it is defined in the file: $PWTK/config/slurm.tcl). Here is an example for two user defined profiles in the ~/.pwtk/slurm.tcl file, named as "parallel" and "longap":

   set profile(parallel) {
        #!/bin/sh
        #SBATCH --nodes=1
        #SBATCH --ntasks-per-node=64
        #SBATCH --ntasks=64
        #SBATCH --time=6:00:00
        #SBATCH --partition=parallel
   }
    
   set profile(longpar) {
        #!/bin/sh
        #SBATCH --nodes=1
        #SBATCH --ntasks-per-node=64
        #SBATCH --ntasks=64
        #SBATCH --time=24:00:00
        #SBATCH --partition=longpar
   }

The profile can be also defined on the fly within the PWTK script with the slurm_profile command, e.g.:

   slurm_profile n24 {
        #!/bin/sh
        #SBATCH --nodes=2
        #SBATCH --ntasks-per-node=12
        #SBATCH --ntasks=24
        #SBATCH --time=12:00:00
   }

   SLURM n24 {
        import job.pwtk
   }

The final effect of the SLURM command is that the script encapsulated inside the SLURM { ... } command is submitted to "SLURM" via the sbatch command.