Skip to content

Instantly share code, notes, and snippets.

@dutta-alankar
Created June 18, 2025 11:01
Show Gist options
  • Select an option

  • Save dutta-alankar/9c03c9de869bf624aebf8aa47a1dc1ed to your computer and use it in GitHub Desktop.

Select an option

Save dutta-alankar/9c03c9de869bf624aebf8aa47a1dc1ed to your computer and use it in GitHub Desktop.
Gadget4-slurm-script on Orion
#!/bin/bash -l
# Standard output and error:
#SBATCH -o ./tjob.%x.out.%j
#SBATCH -e ./tjob.%x.err.%j
#SBATCH --job-name="MZ_p-g4"
#
# Number of nodes and MPI tasks per node:
#SBATCH --nodes=15
#SBATCH --ntasks-per-node=112
#
#SBATCH --mail-type=NONE
#SBATCH --mail-user=alankard@mpa-garching.mpg.de
#
# Partition
#SBATCH --partition=p.exclusive
# Wall clock limit:
#SBATCH --time=00-23:59:58
# Load compiler and MPI modules with explicit version specifications,
# consistently with the versions used to build the executable.
echo "Working Directory = $(pwd)"
cd $SLURM_SUBMIT_DIR
export OUTPUT_LOC=$SLURM_SUBMIT_DIR
export PROG="./Gadget4"
export ARGS="param.txt"
export IC_ONLY=6
module purge && module load gcc/11 openmpi/4 hdf5-mpi/1.14.1 gsl/2.7 fftw-mpi/3.3.9
export LD_LIBRARY_PATH="/mpcdf/soft/SLE_15/packages/skylake/openmpi/gcc_11-11.2.0/4.0.7/lib:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="/mpcdf/soft/SLE_15/packages/skylake/gsl/gcc_11-11.2.0/2.7.1/lib:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="/mpcdf/soft/SLE_15/packages/skylake/fftw/gcc_11-11.2.0-openmpi_4-4.0.7/3.3.9/lib:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="/mpcdf/soft/SLE_15/packages/skylake/hdf5/gcc_11-11.2.0-openmpi_4-4.0.7/1.14.1/lib:$LD_LIBRARY_PATH"
srun $PROG $ARGS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment