A good place to get information relevant to Slurm scripts that you can run on Vista is the User Guide, which lists batch options and offers sample commands for launching applications that you may be able to adapt to fit your needs. The examples cover most of the scenarios described previously in Ways to Run Jobs.

Here, we examine just one sample batch script that illustrates several of the techniques that were described in Optional Job Attributes. We also introduce a new trick for launching multiple MPI runs within a single batch job using ibrun:

Usually, ibrun ./mpi_prog is sufficient to start an MPI program. This command will automatically use the full number of tasks and nodes assigned to the batch job. Here, however, the -n and -o flags to ibrun are used to specify the task counts and hostfile offsets respectively for 5 separate MPI runs. Given that the above batch script specifies a total of 90 tasks on 5 nodes, Slurm's hostfile is going to be constructed so that the first 18 entries refer to the first node, the next 18 entries refer to the second node, etc.; thus, each of the 5 runs is confined to a single node. (You can view Slurm's hostfile for a given job by issuing srun hostname in your batch script or interactive session.)

Other things to notice above are the ampersands (&) to launch the MPI runs in the background, allowing them to run simultaneously; and the wait command to pause the script until all the background runs complete.

Of course, the 5 MPI runs initiated by the script should all take about the same amount of time to complete; otherwise, you would be wasting compute nodes, as well as your allocation. The example also assumes that each MPI task needs 8 cores in order to run successfully—perhaps because each task is multithreaded with OpenMP, or because each task uses 8 cores' worth of memory. If not, each task would use only a fraction of the resources available on a 144-core Vista gg node (144 = 18×8).

 
©  |   Cornell University    |   Center for Advanced Computing    |   Copyright Statement    |   Access Statement
CVW material development is supported by NSF OAC awards 1854828, 2321040, 2323116 (UT Austin) and 2005506 (Indiana University)