SRUN Command Parameters SLURM
The SRUN command in SLURM enables the submission of a parallel high performance computing (HPC) job in a batch job script in order to analyze big data. It is usually often in job scripts and has a couple of command-line parameters that can be also transferred to SLURM via batch script details as shown below.
The following example of the SLURM SRUN command is about the submission of a parallel prediction job using the piSVM parallel code. This code is an implementation of a parallel and scalable Support Vector Machine (SVM). The implementation and example is derived from the article On Understanding Big Data Impacts in Remotely Sensed Image Classification Using Support Vector Machine Methods. In the example below the walltime limit is set to 1 hour (SBATCH–time) and a particular batch partition is configured on the corresponding HPC machine (SBATCH–partition=batch). It uses some remote sensing testing data from an indian pines dataset (area_panch_testdata) and an already trained SVM model with identified support vectors (area_panch_trainingdata.model). The SRUN command uses all these pieces of Information and the SBATCH Statements in the script and starts a parallel Job on 2 nodes with each 24 cores resulting in 48 parallel tasks in this example.
file content submit-prediction.sh
#!/bin/bash #SBATCH--nodes=2 #SBATCH--ntasks=48 #SBATCH--ntasks-per-node=24 #SBATCH--output=mpi-out.%j #SBATCH--error=mpi-err.%j #SBATCH--time=01:00:00 #SBATCH--partition=batch #SBATCHfirstname.lastname@example.org #SBATCH--mail-type=ALL #SBATCH--job-name=train-record-2-48-24 ### location executable PISVMPRED=/home/tools/pisvm-1.2.1/pisvm-predict ### location test data TESTDATA=/home/bigdata/indianpines/area_panch_testdata ### trained model data MODELDATA=/home/bigdata/indianpines/models/area_panch_trainingdata.model ### submit SRUN $PISVMPRED $TESTDATA $MODELDATA results.txt
The following command can be used to submit the Job to the SLURM scheduler:
More details about the SRUN command
We recommend to look the following video about this topic: