How to use Abinit Apptainer image?
Prerequisites
- Have Apptainer installed (installation guide)
- Have downloaded the abinit.sif image available here
- Have downloaded the input files available here
For more information on Apptainer containers, please look at this page or refer to this tutorial to have a quick look at Apptainer’s main commands.
Input files
To illustrate the various commands, a set of Abinit input files is available in the form of an archive via this link.
Those files correspond to a tutorial example from the Abinit official documentation. The archive contains the following files:
H8.psp8: pseudopotentials for the hydrogen atom,input.abi: Abinit input file.
In this tutorial, we will assume that the input files contained in this archive are in the current directory. To extract them:
tar -xzf abinit-tutorial-inputs.tar.gzQuickstart
For impatient folks, here is how to launch a parallel Abinit computation on N cores using the container image in the case where the current directory contains the abinit.sif container image and all necessary Abinit input files:
apptainer exec abinit.sif mpirun -np <N> abinit input.abiDetailed usage for the Abinit container
This section presents different ways to use the Abinit image. For more details about Apptainer commands, please look at this tutorial.
Introduction
Abinit is an MPI-parallelized open-source software suite for computing material properties via density functional theory (DFT).
The main executable in the image is the abinit executable. The code license can be found under the following path: /share/doc/abinit-10.4.7/COPYING, and can be accessed from outside the container as follows:
apptainer exec abinit.sif cat /share/doc/abinit-10.4.7/COPYINGUsing the Abinit container for parallel runs
The input file input.abi allows us to get the pseudo total energy, the bond length, the charge density and the atomisation energy of the $H_2$ molecule following the
official documentation tutorial. Once the input files have been extracted, Abinit can be run in parallel on N cores as follows:
apptainer exec abinit.sif mpirun -np <N> abinit input.abiThe command above uses Apptainer “embedded” parallel mode. More information on using Apptainer containers in parallel, including usage on clusters and the difference between embedded and hybrid parallel modes, can be found on this page.