Skip to content

(2023-04-04) Lab Notebook: OnDemand RunningMPIJobs

Warning

This is as a Lab Notebook which describes how to solve a specific problem at a specific time. Please keep this in mind as you read and use the content. Please pay close attention to the date,
version information and other details.


Running MPI Job throughs the OnDemand Interactive Desktop Terminal (2023-04-04)

To run an MPI job through the OnDemand Interactive Desktop, you need to make sure that your resource request through OnDemand asks for at least two (2) tasks under "Advanced Options" and that the number of cores per task (N) is set to the number that you want to the MPI job with. After starting the Interactive Desktop, go to the Terminal and you should be able to run your job with:

srun --ntasks=N --cpus-per-task=1

For example, if your want to run a job with 4 tasks inside of the Interactive Terminal, your resource request would look like:

Screenshot showing that Number of cores per task is set to 4, Amount of memory is set to 25 Gigabyte, Advanced options is ticked off and node type is set to any. Additionally, Number of GPUs is 0 and Number of Tasks is 2.

And then your would be able to run your job with

srun --ntasks=4 --cpus-per-task=1 some_job.sh