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

Abinit

Support tier: 3

Read information about support tiers.

Installed versions

Resource Version
Arrhenius 10.6.7
Dardel/cpe26.03 10.6.7

Read information about how to load this software in your environment by searching for Lmod module.

General information

ABINIT is a package whose main program allows one to find the total energy, charge density and electronic structure of systems made of electrons and nuclei (molecules and periodic solids) within Density Functional Theory (DFT), using pseudopotentials and a planewave or wavelet basis. For more information, please visit https://www.abinit.org


How to use on Arrhenius

To activate one of the modules built for CPU nodes

ml ABINIT/10.6.7-gcc-2026.03-mpich-eb

Below follows an example job script for ABINIT, to run on 64 cores on a CPU node.

#!/bin/bash
#SBATCH -A <your-project-account>
#SBATCH -J abinit-job
#SBATCH -p cpu
#SBATCH -t 02:00:00
#SBATCH -n 64

ml ABINIT/10.6.7-gcc-2026.03-mpich-eb

export ABI_PSPDIR=<pseudo potentials directory>

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

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

sbatch jobscriptabinit.sh


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