Skip to content
NAISS Logo Allocations Support Training Software naiss.se

Abinit

How to use on Dardel

To activate one of the modules built for CPU nodes

ml PDC/<version>
ml abinit/10.6.7-cpeGNU-26.03

Below follows an example job script for ABINIT to run a CPU node

#!/bin/bash

# time allocation
#SBATCH -A <your-project-account>

# name of this job
#SBATCH -J abinit-job

# partition
#SBATCH --partition=main

# wall time for this job
#SBATCH -t 01:00:00

# number of nodes
#SBATCH --nodes=1

# number of MPI processes per node
#SBATCH --ntasks-per-node=128

ml PDC/26.03
ml abinit/10.6.7-cpeGNU-26.03

export ABI_PSPDIR=<pseudo potentials directory>

srun -n 128 abinit <input file>.abi > out.log

Assuming the script is named jobscriptabinit.sh, it can be submitted using:

sbatch jobscriptabinit.sh

GPU Support

Below follows an example job script for ABINIT, for running on one Dardel GPU node using 8 MPI tasks per node (corresponding to one MPI task per GPU) and 8 OpenMP threads. You need to replace pdc.staff with an active project that you belong to. Note: This script is a simple template. For efficient calculation the script needs to be augmented with settings to pin appropriately the computation threads to the CCDs and GCD.

#!/bin/bash
#SBATCH -A pdc.staff
#SBATCH -p gpu
#SBATCH -J abinit
#SBATCH -t 02:00:00
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=8
#SBATCH --cpus-per-task=8

# Number and placement of OpenMP threads
export SRUN_CPUS_PER_TASK=$SLURM_CPUS_PER_TASK
export OMP_NUM_THREADS=8
export OMP_PLACES=cores
export OMP_PROC_BIND=false
export MPICH_GPU_SUPPORT_ENABLED=1

ml PDC/26.03
ml abinit/10.6.5-cpeGNU-26.03-gpu

echo "Script initiated at `date` on `hostname`"

export ABI_PSPDIR=<pseudo potentials directory>

srun --hint=nomultithread abinit <input file>.abi > out.log

echo "Script finished at `date` on `hostname`"

Assuming the script is named jobscriptABINIT.sh, it can be submitted using

sbatch jobscriptABINIT.sh