...
The second part of the script is the lines beginning with #SBATCH
. These lines are the options that tell Slurm what type and how many resources you need. In this example, we first set the job name to “myappjob”. The job name is just an easy way for you to view your job later. The output and error parameters are the next two lines. These setup the screen output and screen error redirects to the file you specify. This is not your program output files, but rather what you would usually see on the screen if you ran your command without the scheduler. The last parameter is the number of tasks my job needs. In this example, I am requesting 2 tasks, which is essentially 2 cpu’s. Please read the Tasks vs CPU’s section below for more information about tasks. The next section of this document provides a list of the most common Slurm parameters, an example, and a brief description of what they doPlease read the Slurm Parameters section below for more information about SBATCH parameters.
The last part of this script is the actual commands needed to run my program. In this example, I first load the mpi module. You will need to load any modules your program needs before you actually run your program. I then call the program name, myapp, telling it to start running.
...