Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This article will guide you to run the Python script using Slurm script on the LANTA HPC system. You can find an An overview of the content from can be found in the table of contents below for immediate viewing visualization of the interesting parts.

Table of Contents

Slurm script example for running the Python script

Running on Compute node

Code Block
#!/bin/bash
#SBATCH -p compute                  # Specify partition [Compute/Memory/GPU]
#SBATCH -N 1 -c 128   			    # Specify number of nodes and processors per task
#SBATCH --ntasks-per-node=1		    # Specify tasks per node
#SBATCH -t 120:00:00                # Specify maximum time limit (hour: minute: second)
#SBATCH -A ltxxxxxx                 # Specify project name
#SBATCH -J JOBNAME                  # Specify job name

module purge				        # Unload all modules
module load Miniconda3/22.11.1-1    # Load the Miniconda3 module
conda activate tensorflow-2.6.0		# Activate your environment

python3 file.py                     # Run your program or executable code

...

Info

1 GPU card: --ntasks-per-node=1, 2 GPU cards: --ntasks-per-node=2, 4 GPU cards: --ntasks-per-node=4

Submit a job

Use the sbatch script.sh command to submit your job to the Slurm system.

...

Note

Before you use the sbatch script.sh command, you must ensure that your environment is disabled.

...

Related articles

Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@48ae393
sortmodified
showSpacefalse
reversetrue
typepage
cqllabel in ( "jupyter" , "env" ) and space = currentSpace ( )
labelssingularity python container

...