Skip to content

Instantly share code, notes, and snippets.

@vishnuexe
Last active June 23, 2025 07:10
Show Gist options
  • Select an option

  • Save vishnuexe/5cce8677d636707e2381f8ae8ae3d39b to your computer and use it in GitHub Desktop.

Select an option

Save vishnuexe/5cce8677d636707e2381f8ae8ae3d39b to your computer and use it in GitHub Desktop.
Madhava Manual

mpi

#!/bin/bash #SBATCH --job-name=aigc # create a short name for your job
#SBATCH --nodes=2 # node count
#SBATCH --ntasks=1 # total number of tasks across all nodes
#SBATCH --cpus-per-task=4 # cpu-cores per task (>1 if multi-threaded tasks)
#SBATCH --mem-per-cpu=4G # memory per cpu-core (4G per cpu-core is default)
#SBATCH --time=11:59:00 # total run time limit (HH:MM:SS)
#SBATCH --error=%j.err # filename for logging errors while execution
#SBATCH --mail-type=begin #send mail when job begins
#SBATCH --mail-type=end #send mail when job ends
#SBATCH --mail-user=my@email.com
#SBATCH --gres=gpu:1 # number of gpus per node
#SBATCH --partition=gpu
module load anaconda3-2024
source /home/apps/compilers/anaconda3/2024/bin/activate
conda create -n env_name python
conda activate env_name
pip install numpy scipy
python script.py

To view live update of slurm.out

tail -f slurm.out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment