> For the complete documentation index, see [llms.txt](https://docs-ksc.gitbook.io/neuron-user-guide-eng/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-ksc.gitbook.io/neuron-user-guide-eng/system/running-jobs-through-scheduler-slurm.md).

# Running Jobs Through Scheduler (SLURM)

The Neuron system’s job scheduler uses SLURM. This chapter introduces the method that is used to submit jobs through SLURM and relevant commands. For information on how to write a job script when submitting a job to SLURM, refer to \[Appendix 1] and the example showing how to write a job script file.

**※ User jobs can only be submitted from /scratch/$USER.**

## A. Queue Configuration

wall clock time : 2 days (48 h)

In all queues (partitions), job allocation follows the shared node policy (multiple jobs can run simultaneously on a single node).\
(22.03.17. Update) : To enhance resource efficiency, the policy has been changed from exclusive node usage to shared node usage.

Job queue (partitions)

* <mark style="color:red;">The partitions available to general users include jupyter, cas\_v100nv\_8, cas\_v100nv\_4, cas\_v100\_4, cas\_v100\_2, amd\_a100nv\_8, skl, and bigmem. (You can check the number of nodes, maximum job runtime, and node list using the sinfo command.)</mark>

Job Submission Quantity Limitations

* Maximum number of jobs per user :\
  An error occurs if jobs exceed the submission limit.
* Maximum number of concurrent jobs per user :\
  Jobs wait if they exceed the running job limit.

Resource Occupancy Limit

* Maximum number of nodes per job :\
  Jobs will not execute if they exceed the node limit. This limit is independent of the total number of nodes occupied by running jobs.
* Maximum number of GPUs per user :\
  This setting limits the total number of GPUs each user can occupy, and if the limit is exceeded, jobs wait until previous jobs are completed. It limits the number of GPUs that a user's running jobs can occupy at any given time.

<mark style="color:red;">**※ Node configuration and partitioning may be adjusted during system operation based on system usage.**</mark>

## B. Job Submission and Monitoring

### 1. Summary of the basic commands

| **Command**                 | Description                                  |
| --------------------------- | -------------------------------------------- |
| $ sbatch \[option..] script | Submit a job                                 |
| $ scancel Job ID            | Delete a job                                 |
| $ squeue                    | Check job status                             |
| $ smap                      | Check job status and node status graphically |
| $ sinfo \[option..]         | Check node information                       |

※ You can use the “sinfo –help” command to check the “sinfo” command options.

<mark style="color:red;">**※ To  accurately analyze user resource usage on the Neuron system and to establish effective operational policies based on AI/HPC application fields, it is mandatory to specify the application field (field) and application name (application) with the #SBATCH option.**</mark> \ <mark style="color:red;">**Specifically, before submitting a job, you must include the --comment option in your job script according to the field and application you are using, referring to the below table.**</mark>\ <mark style="color:red;">**\[Format] #SBATCH --comment="field=\<field\_name>;appl=\<application\_name>"**</mark>

<mark style="color:red;">**※ Only pre-defined values are allowed for the field (field) and application (application) parameters. You can check the supported values by referring to the tables below (SBATCH option values for field/application) or by running the following command on the login node:**</mark>\ <mark style="color:red;">**\[Command] $ showappl**</mark>

<mark style="color:red;">**※ The classification of applications will be updated periodically based on collected user requests. If you wish to add an application, please submit a request to <consult@ksc.re.kr>.**</mark>

**\[Table: field values for SBATCH option]**

<table data-search="true"><thead><tr><th width="107.015625" align="center"></th><th width="179.05859375" align="center"></th><th></th></tr></thead><tbody><tr><td align="center">Category</td><td align="center">Field</td><td>Description</td></tr><tr><td align="center">AI</td><td align="center">agenticai</td><td>Agentic AI</td></tr><tr><td align="center">AI</td><td align="center">robotics</td><td>Physical AI &#x26; Robotics</td></tr><tr><td align="center">AI</td><td align="center">aim</td><td>Autonomous Driving &#x26; AI Mobility</td></tr><tr><td align="center">AI</td><td align="center">nlp</td><td>Natural Language Processing, Large Language Models</td></tr><tr><td align="center">AI</td><td align="center">cv</td><td>Computer Vision &#x26; Spatial Intelligence</td></tr><tr><td align="center">AI</td><td align="center">speech</td><td>Speech, Audio AI</td></tr><tr><td align="center">AI</td><td align="center">recsys</td><td>Recommendation System &#x26; Decision Making</td></tr><tr><td align="center">AI</td><td align="center">multimodal</td><td>Multimodal, Generative AI, World Model, Media Synthesis</td></tr><tr><td align="center">AI</td><td align="center">sciai</td><td>AI for Science &#x26; Graph AI</td></tr><tr><td align="center">AI</td><td align="center">efficientai</td><td>Efficient &#x26; Scalable AI Systems, Quantization, Edge AI</td></tr><tr><td align="center">AI</td><td align="center">healthai</td><td>Healthcare AI</td></tr><tr><td align="center">AI</td><td align="center">finai</td><td>Finance AI</td></tr><tr><td align="center">AI</td><td align="center">misc</td><td>Miscellaneous</td></tr><tr><td align="center">HPC</td><td align="center">math</td><td>Mathematics</td></tr><tr><td align="center">HPC</td><td align="center">phys</td><td>Physics</td></tr><tr><td align="center">HPC</td><td align="center">chem</td><td>Chemistry</td></tr><tr><td align="center">HPC</td><td align="center">aac</td><td>Astrophysics and Cosmology</td></tr><tr><td align="center">HPC</td><td align="center">ees</td><td>Earth and Environmental Science</td></tr><tr><td align="center">HPC</td><td align="center">bio</td><td>Bio/life science</td></tr><tr><td align="center">HPC</td><td align="center">med</td><td>Medical/Health science</td></tr><tr><td align="center">HPC</td><td align="center">bns</td><td>Brain and Neurosciences</td></tr><tr><td align="center">HPC</td><td align="center">agf</td><td>Agriculture, Fishery and Food</td></tr><tr><td align="center">HPC</td><td align="center">qst</td><td>Quantum Science and Technology</td></tr><tr><td align="center">HPC</td><td align="center">mse</td><td>Material Science and engineering</td></tr><tr><td align="center">HPC</td><td align="center">ere</td><td>Energy and Resources engineering</td></tr><tr><td align="center">HPC</td><td align="center">mae</td><td>Mechanical and Aerospace engineering</td></tr><tr><td align="center">HPC</td><td align="center">ne</td><td>Nuclear engineering</td></tr><tr><td align="center">HPC</td><td align="center">che</td><td>Chemical Engineering</td></tr><tr><td align="center">HPC</td><td align="center">eee</td><td>Electrical and electronic engineering</td></tr><tr><td align="center">HPC</td><td align="center">ict</td><td>Information/Communication Technology</td></tr><tr><td align="center">HPC</td><td align="center">cse</td><td>Computer science and engineering</td></tr><tr><td align="center">HPC</td><td align="center">cte</td><td>Civil and transportation engineering</td></tr><tr><td align="center">HPC</td><td align="center">ss</td><td>Social Science</td></tr><tr><td align="center">HPC</td><td align="center">caa</td><td>Culture and Arts</td></tr><tr><td align="center">HPC</td><td align="center">hum</td><td>Humanities</td></tr><tr><td align="center">HPC</td><td align="center">misc</td><td>Miscellaneous</td></tr></tbody></table>

**\[Table: application values for SBATCH option]**

<table data-header-hidden><thead><tr><th width="96.78515625" align="center"></th><th width="139.44921875"></th><th width="95.69921875" align="center"></th><th width="149.55078125"></th><th width="96.57421875" align="center"></th><th></th></tr></thead><tbody><tr><td align="center"><strong>category</strong></td><td><strong>appl name</strong></td><td align="center"><strong>category</strong></td><td><strong>appl name</strong></td><td align="center"><strong>category</strong></td><td><strong>appl name</strong></td></tr><tr><td align="center">AI</td><td>pytorch</td><td align="center">AI</td><td>jax</td><td align="center">AI</td><td>triton</td></tr><tr><td align="center">AI</td><td>pytorch-ddp</td><td align="center">AI</td><td>tensorflow</td><td align="center">AI</td><td>jupyter</td></tr><tr><td align="center">AI</td><td>pytorch-fsdp</td><td align="center">AI</td><td>tensorrt</td><td align="center">AI</td><td>r</td></tr><tr><td align="center">AI</td><td>deepspeed</td><td align="center">AI</td><td>ollama</td><td align="center">AI</td><td>misc</td></tr><tr><td align="center">AI</td><td>megatron-lm</td><td align="center">AI</td><td>vllm</td><td align="center"></td><td></td></tr><tr><td align="center">HPC</td><td>abaqus</td><td align="center">HPC</td><td>grims</td><td align="center">HPC</td><td>q-chem</td></tr><tr><td align="center">HPC</td><td>amber</td><td align="center">HPC</td><td>gromacs</td><td align="center">HPC</td><td>qmcpack</td></tr><tr><td align="center">HPC</td><td>ansys</td><td align="center">HPC</td><td>kflow</td><td align="center">HPC</td><td>quantum_espresso</td></tr><tr><td align="center">HPC</td><td>berkeleygw</td><td align="center">HPC</td><td>lammps</td><td align="center">HPC</td><td>r</td></tr><tr><td align="center">HPC</td><td>bwa</td><td align="center">HPC</td><td>ls-dyna</td><td align="center">HPC</td><td>ramses</td></tr><tr><td align="center">HPC</td><td>castep</td><td align="center">HPC</td><td>materials_studio</td><td align="center">HPC</td><td>raspa</td></tr><tr><td align="center">HPC</td><td>cesm</td><td align="center">HPC</td><td>matlab</td><td align="center">HPC</td><td>roms</td></tr><tr><td align="center">HPC</td><td>cgyro</td><td align="center">HPC</td><td>mfdn</td><td align="center">HPC</td><td>rosetta</td></tr><tr><td align="center">HPC</td><td>charmm</td><td align="center">HPC</td><td>mom</td><td align="center">HPC</td><td>siesta</td></tr><tr><td align="center">HPC</td><td>cp2k</td><td align="center">HPC</td><td>mpas</td><td align="center">HPC</td><td>star-ccm</td></tr><tr><td align="center">HPC</td><td>fhi_aims</td><td align="center">HPC</td><td>msc_one</td><td align="center">HPC</td><td>su2</td></tr><tr><td align="center">HPC</td><td>fvcom</td><td align="center">HPC</td><td>namd</td><td align="center">HPC</td><td>vasp</td></tr><tr><td align="center">HPC</td><td>gadget</td><td align="center">HPC</td><td>nw_chem</td><td align="center">HPC</td><td>wannier90</td></tr><tr><td align="center">HPC</td><td>gatk</td><td align="center">HPC</td><td>openfoam</td><td align="center">HPC</td><td>wien2k</td></tr><tr><td align="center">HPC</td><td>gaussian</td><td align="center">HPC</td><td>openmm</td><td align="center">HPC</td><td>wrf</td></tr><tr><td align="center">HPC</td><td>geant4</td><td align="center">HPC</td><td>openmx</td><td align="center">HPC</td><td>xtb</td></tr><tr><td align="center">HPC</td><td>gotpm</td><td align="center">HPC</td><td>orca</td><td align="center">HPC</td><td>in_house</td></tr><tr><td align="center">HPC</td><td>gpaw</td><td align="center">HPC</td><td>pyfr</td><td align="center">HPC</td><td>misc</td></tr></tbody></table>

### **2. Batch job submission**

Submit a job by using the sbatch command as in “sbatch {script file}”.

```shell-session
$ sbath [UserJob.script] 
```

Check job progress

You can check the status of the job by accessing the allocated node.

#### 1) Use the squeue command to check the node name (NODELIST) to which the running job is assigned.

```
$ squeue -u [userID]
JOBID  PARTITION  NAME  USER    STATE     TIME   TIME_LIMI NODES NODELIST(REASON)
99792 cas_v100_4     ior   userID  RUNNING    0:12     5:00:00      1     gpu25
```

#### 2) Access the corresponding node using the ssh command

```shell-session
$ ssh gpu25 
```

#### 3) Once on the compute node, you can check the job's progress using the top or nvidia-smi commands

※ Example of monitoring GPU usage at 2-second intervals

```shell-session
$ nvidia-smi -l 2
```

Example of writing a job script file

* To perform batch jobs in SLURM, you need to create a job script file using SLURM keywords.

※ Refer to “\[Appendix 1] Main Keywords for Job Scripts”.

※ Refer to the KISTI supercomputing blog (<http://blog.ksc.re.kr/127>) for information on how to use the machine-learning framework conda.

* &#x20;SLURM keywords

| Keyword                                                | Description                                     |
| ------------------------------------------------------ | ----------------------------------------------- |
| #SBATCH –J                                             | Specify the job name                            |
| #SBATCH --time                                         | Specify the maximum time to run the job         |
| #SBATCH –o                                             | Specify the file name of the job log            |
| #SBATCH –e                                             | Specify the file name of the error log          |
| #SBATCH –p                                             | Specify the partition to be used                |
| #SBATCH --comment="field=\<field>;appl=\<application>" | Specify the field & application to be used      |
| #SBATCH -–nodelist=(Node List)                         | Specify the node on which the job will be run   |
| #SBATCH -–nodes=(Number of Nodes)                      | Specify the number of nodes to use for the job  |
| #SBATCH —ntasks-per-node=(Number of Processes)         | Specify the number of processes to run per node |
| #SBATCH —cpus-per-task=(Number of CPU Cores)           | Number of CPU cores allocated per process       |
| #SBATCH —cpus-per-gpu=(Number of CPU Cores)            | Number of CPU cores allocated per GPU           |
| #SBATCH --exclusive                                    | Option for exclusive use of nodes               |

**Set memory allocation under the Neuron shared node policy**

To ensure efficient resource use and stable job execution on the Neuron system, memory allocation is automatically adjusted as follows:

```
memory-per-node = ntasks-per-node * cpus-per-task * (95% of available memory per node / total number of cores per node)
```

※ When using the '--exclusive option, 95% of the available memory on a single node is allocated to the job, allowing exclusive use of the node. However, the wait time may increase until a node is available for exclusive use.

**Set the number of CPU cores allocated per GPU under the Neuron shared node policy**

To ensure stable execution of GPU applications, the number of CPU cores per node is proportionally allocated to the GPUs as follows: Memory allocation is also automatically set according to the Neuron shared node policy for memory allocation.

```
cpus-per-gpu = total number of cores in the node / total number of GPUs in the node * requested number of GPUs (--gres=gpu:x)
```

※ If additional memory is required, you can request more resources than the default cpus-per-gpu allocation to secure the necessary memory allocation.

* &#x20;**CPU Serial Program**

```bash
#!/bin/sh
#SBATCH -J Serial_cpu_job
#SBATCH -p skl
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH -o %x_%j.out
#SBATCH -e %x_%j.err
#SBATCH --time=01:00:00
#SBATCH --comment="field=xxx;appl=yyy" #Refer to the Table of SBATCH option values for field and application 

export OMP_NUM_THREADS=1

module purge
module load intel/19.1.2

srun ./test.exe

exit 0
```

※ Example of occupying 1 node and running a sequential job

* &#x20;**CPU OpenMP Program**

```bash
#!/bin/sh
#SBATCH -J OpenMP_cpu_job
#SBATCH -p skl
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --cpus-per-task=10
#SBATCH -o %x_%j.out
#SBATCH -e %x_%j.err
#SBATCH --time=01:00:00
#SBATCH --comment="field=xxx;appl=yyy" #Refer to the Table of SBATCH option values for field and application

export OMP_NUM_THREADS=10

module purge
module load intel/19.1.2

mpirun ./test_omp.exe

exit 0
```

※ Example of occupying 1 node and using 10 threads per node

* &#x20;**CPU MPI Program**

```bash
#!/bin/sh
#SBATCH -J MPI_cpu_job
#SBATCH -p skl
#SBATCH --nodes=2 
#SBATCH --ntasks-per-node=4 
#SBATCH -o %x_%j.out
#SBATCH -e %x_%j.err
#SBATCH --time=01:00:00
#SBATCH --comment="field=xxx;appl=yyy" #Refer to the Table of SBATCH option values for field and application

module purge
module load intel/19.1.2 mpi/impi-19.1.2

mpirun ./test_mpi.exe
```

※ Example of occupying 2 nodes and using 4 processes per node (total of 8 MPI processes)

* &#x20;**CPU Hybrid (OpenMP+MPI) Program**

```bash
#!/bin/sh
#SBATCH -J hybrid_cpu_job
#SBATCH -p skl
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=2
#SBATCH --cpus-per-task=10
#SBATCH -o %x_%j.out
#SBATCH -e %x_%j.err
#SBATCH --time=01:00:00
#SBATCH --comment="field=xxx;appl=yyy" #Refer to the Table of SBATCH option values for field and application
module purge
module load intel/19.1.2 mpi/impi-19.1.2

export OMP_NUM_THREADS=10

mpirun ./test_mpi.exe
```

※ Example of occupying 1 node and using 2 processes per node, with 10 threads per process (total of 2 MPI processes and 20 OpenMP threads)

* &#x20;**GPU Serial Program**

```bash
#!/bin/sh
#SBATCH -J Serial_gpu_job
#SBATCH -p cas_v100_4
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH -o %x_%j.out
#SBATCH -e %x_%j.err
#SBATCH --time=01:00:00
#SBATCH --gres=gpu:1 # using 2 gpus per node
#SBATCH --comment="field=xxx;appl=yyy" #Refer to the Table of SBATCH option values for field and application

export OMP_NUM_THREADS=1

module purge
module load intel/19.1.2 cuda/11.4

srun ./test.exe

exit 0
```

※ Example of occupying 1 node and running a sequential job

* &#x20;**GPU OpenMP Program**

```bash
#!/bin/sh
#SBATCH -J openmp_gpu_job
#SBATCH -p cas_v100_4
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --cpus-per-task=10
#SBATCH -o %x_%j.out
#SBATCH -e %x_%j.err
#SBATCH --time=01:00:00
#SBATCH --gres=gpu:2 # using 2 gpus per node
#SBATCH --comment="field=xxx;appl=yyy" #Refer to the Table of SBATCH option values for field and application

export OMP_NUM_THREADS=10

module purge
module load intel/19.1.2 cuda/11.4

srun ./test_omp.exe

exit 0
```

※ Example of occupying 1 node, using 10 threads and 2 GPUs per node

* &#x20;**GPU MPI Program**

```bash
#!/bin/sh
#SBATCH -J mpi_gpu_job
#SBATCH -p cas_v100_4
#SBATCH --nodes=2 
#SBATCH --ntasks-per-node=4
#SBATCH -o %x_%j.out
#SBATCH -e %x_%j.err
#SBATCH --time=01:00:00
#SBATCH --gres=gpu:2 # using 2 gpus per node
#SBATCH --comment="field=xxx;appl=yyy" #Refer to the Table of SBATCH option values for field and application

module purge
module load intel/19.1.2 cuda/11.4 cudampi/mvapich2-2.3.6

srun ./test_mpi.exe
```

※ Example of occupying 2 nodes, using 4 processes and 2 GPUs per node (total of 8 MPI processes)

* **CPU MPI Program - Execution example of utilizing all CPUs on 1 node**

```
#!/bin/sh
#SBATCH -J mpi_gpu_job
#SBATCH -p cas_v100_4
#SBATCH --nodes=1 
#SBATCH --ntasks-per-node=40
#SBATCH -o %x_%j.out
#SBATCH -e %x_%j.err
#SBATCH --time=01:00:00
#SBATCH --gres=gpu:2 
#SBATCH --comment="field=xxx;appl=yyy" #Refer to the Table of SBATCH option values for field and application

module purge
module load intel/19.1.2 cuda/11.4 cudampi/mvapich2-2.3.6

srun ./test_mpi.exe
```

※ Example of occupying all cores and using 2 GPUs on 1 cas\_v100\_4 node

* **GPU MPI Program - Execution example of utilizing only half of the CPUs on 1 node**

```
#!/bin/sh
#SBATCH -J mpi_gpu_job
#SBATCH -p cas_v100nv_8
#SBATCH --nodes=1 
#SBATCH --ntasks-per-node=16
#SBATCH -o %x_%j.out
#SBATCH -e %x_%j.err
#SBATCH --time=01:00:00
#SBATCH --gres=gpu:4
#SBATCH --comment="field=xxx;appl=yyy" #Refer to the Table of SBATCH option values for field and application

module purge
module load intel/19.1.2 cuda/11.4 cudampi/mvapich2-2.3.6

srun ./test_mpi.exe
```

※ Example of occupying half the cores and using 4 GPUs on 1 cas\_v100nv\_8 node

※ The total number of cores per partition is determined when executing jobs via the scheduler (SLURM) > A. Refer to the queue configuration > Total number of CPU cores

* **Execution example of a program that requires a large memory allocation**

```
#!/bin/sh
#SBATCH -J mem_alloc_job
#SBATCH -p cas_v100_4
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=40
#SBATCH -o %x_%j.out
#SBATCH -e %x_%j.err
#SBATCH --time=01:00:00
#SBATCH --comment="field=xxx;appl=yyy" #Refer to the Table of SBATCH option values for field and application

module purge
module load intel/19.1.2 mpi/impi-19.1.2

mpirun -n 2 ./test.exe

exit 0
```

※ When a program uses few cores but requires a large amount of memory, an example of adjusting memory allocation by setting the number of processes per node to run the program efficiently

※ The '--mem' (memory allocation per node) option is not available. When you enter the number of processes per node (ntasks-per-node) and the number of CPU cores per process (cpus-per-task), the memory allocation is automatically calculated based on the following formula:\
(memory-per-node = ntasks-per-node \* cpus-per-task \*\
(95% of the available memory on a single node / total number of cores on a single node)

※ When using the '--exclusive option, 95% of the available memory on a single node is allocated to the job, allowing exclusive use of the node. However, the wait time may increase until a node is available for exclusive use.

* &#x20;**An example of using GPU singularity**

```bash
1) Single node
#!/bin/sh
#SBATCH -J singularity
#SBATCH --time=1:00:00 
#SBATCH -p ivy_v100_2
#SBATCH --comment="field=cv;appl=tensorflow" #Refer to the Table of SBATCH option name per application
#SBATCH -N 1 # number of nodes
#SBATCH -n 2 
#SBATCH –o %x_%j.out
#SBATCH -e %x_%j.err
#SBATCH --gres=gpu:2
 
module load singularity/3.6.4 
 
singularity run —nv /apps/applications/singularity_images/ngc/tensorflow:20.09-tf1-py3.sif python test.py
 
 
2-1) Multi-node (using horovod)
#!/bin/sh
#SBATCH -J singularity
#SBATCH --time=1:00:00 
#SBATCH -p ivy_v100_2
#SBATCH --comment="field=cv;appl=tensorflow" #Refer to the Table of SBATCH option name per application
#SBATCH -N 2 # number of nodes
#SBATCH –n 4 
#SBATCH –o %x_%j.out
#SBATCH -e %x_%j.err
#SBATCH --gres=gpu:2
 
export Base=/scratch/ID/work_dir
module load singularity/3.6.4 gcc/4.8.5 mpi/openmpi-3.1.5
 
srun singularity run —nv /apps/applications/singularity_images/ngc/tensorflow:20.09-tf1-py3.sif \
python $Base/horovod/examples/keras/keras_imagenet_resnet50.py 
 
 
2-2) Multi-node (using horovod): When the module is loaded, the specified singularity container is automatically run when the user program is executed.
#!/bin/sh
#SBATCH -J singularity
#SBATCH --time=1:00:00 
#SBATCH -p ivy_v100_2
#SBATCH --comment="field=cv;appl=tensorflow" #Refer to the Table of SBATCH option name per application
#SBATCH -N 2 # number of nodes
#SBATCH –n 4 
#SBATCH –o %x_%j.out
#SBATCH -e %x_%j.err
#SBATCH --gres=gpu:2
 
export Base=/scratch/ID/work_dir
module load singularity/3.6.4 ngc/tensorflow:20.09-tf1-py3 
 
# tensorflow:20.09-tf1-py3.sif After the container is run automatically, the resnet50 model is trained in parallel on multiple nodes.
mpirun_wrapper python $Base/horovod/examples/keras/keras_imagenet_resnet50.py
```

※ Container images that support deep learning frameworks, such as TensorFlow, Caffe, and PyTorch, can be accessed in the /apps/applications/singularity\_images and /apps/applications/singularity\_images/ngc directories.

※ Refer to "\[Appendix 3] Method for Using Singularity Container Images - Method for running the user program from the module-based NGC container" for the list of deep learning and HPC application modules that support the automatic execution of the singularity container.

* \[Example]
  * You can use the container images that support deep learning frameworks, such as TensorFlow, Caffe, and PyTorch, by copying them from the /apps/applications/singularity\_images directory to the user work directory.
  * Use the following example if the image file is “/home01/userID/tensorflow-1.13.0-py3.simg”.

```
singularity exec /home01/userID/tensorflow-1.13.0-py3.simg python test.py
```

### **3. Interactive job submission**

* Resource allocation
* Use the GPU 2-node configuration (each with 2 cores and 2 GPUs) in the cas\_v100\_4 partition for interactive purposes.

```shell-session
$ salloc --partition=ivy_v100_2 -N 2 -n 4 --tasks-per-node=2 --gres=gpu:2 --comment={SBATCH option name} # Refer to the Table of SBATCH option name per application 
```

<mark style="color:blue;">※ Refer to the SBATCH option labels for each application to find the appropriate {SBATCH option name}</mark>

<mark style="color:red;">※ The walltime for interactive jobs is fixed at 8 hours</mark>

* Job execution

```shell-session
$ srun ./(executable file) (run option)
```

* Exit from the connected node, or cancel the resource allocation.

```shell-session
$ exit
```

* Delete a job using a command.

```shell-session
$ scancel [Job_ID]
```

※ Job ID can be checked using the squeue command.

### **4. Job monitoring**

Check the partition status

Use the sinfo command to check the status

```shell-session
$ sinfo
PARTITION    AVAIL   TIMELIMIT  NODES STATE NODELIST
jupyter        up       2-00:00:00 6       mix     jupyter[01-05,07]
cas_v100nv_8  up       2-00:00:00 4       idle    gpu[01-04]
cas_v100nv_4  up       2-00:00:00 2       alloc   gpu[06-07]
cas_v100nv_4  up       2-00:00:00 2       idle    gpu[08-09]
cas_v100_4    up       2-00:00:00 1       mix     gpu10
cas_v100_4    up       2-00:00:00 10      idle     gpu[11-20]
cas_v100_2    up       2-00:00:00 1       mix     gpu25
```

※ The node configuration may be adjusted during system operation according to the system load.

* PARTITION : the name of the partition set in the current SLURM

  * AVAIL : partition status (up or down)
  * TIMELIMIT : wall clock time
  * NODES : the number of nodes
  * STATE : node status (alloc-resource is being used/Idle-resource is available)
  * NODELIST : node list

* **Detailed information per node**

Adding the "-Nel" option to the sinfo command provides detailed information.

```shell-session
$ sinfo -Nel
Fri Mar 18 10:52:13 2022
NODELIST NODES PARTITION   STATE CPUS S:C:T  MEMORY TMP_DISK WEIGHT AVAIL_FE REASON
gpu01    1     cas_v100nv_8 idle  32   2:16:1 384000   0         1      TeslaV10 none
gpu02    1     cas_v100nv_8 idle  32   2:16:1 384000   0         1      TeslaV10 none
gpu03    1     cas_v100nv_8 idle  32   2:16:1 384000   0         1      TeslaV10 none
gpu04    1     cas_v100nv_8 idle  32   2:16:1 384000   0         1      TeslaV10 none
- - Omitted Below - -
```

***

* **Check job status**

Use the squeue command to view the job list and status

```shell-session
$ squeue
  JOBID PARTITION NAME     USER  ST TIME NODES. NODELIST(REASON)
  760   cas_v100_4   gpu_burn   userid  R  0:00   10      gpu10
  761   cas_v100_4   gpu_burn   userid  R  0:00   10      gpu11
  762   cas_v100_4   gpu_burn   userid  R  0:00   10      gpu12
```

* **Check job status and node status through graphical displays**

```shell-session
$ smap
```

* **View detailed information on submitted jobs**

```shell-session
$ scontrol show job [Job ID]
```

## C. Controlling Jobs

Delete a job (cancel)

Use the scancel command to delete a job by entering “scancel \[Job\_ID]”.

The Job\_ID can be found using the squeue command.

```shell-session
$ scancel 761
```

## D. Compile, Debugging, Job submission Loacation

Debugging nodes, which can be directly accessed via SSH from the login node, are available.

Compilation, debugging, and job submission to all partitions are possible from the login/debugging nodes.

The CPU time limit for debugging nodes is 120 minutes.

If needed, you can use the SLURM Interactive Job feature to compile and debug in any partition.

{% hint style="info" %}
Last updated on August 12, 2026.
{% endhint %}
