Updated 2022-11-23

Run Abinit on the cluster

Overview

  • This guide will focus on running Abinit - a software suite that calculates the optical, mechanical, vibrational, and other observable properties of materials.
  • The example used in this guide comes from this link.

Tips

  • There are many dependencies for this module including intel/20.0.4, gcc/10.3.0,openmpi/4.1.4, hdf5/1.10.8, netcdf/4.8.1, mkl/11.2, fftw/3.3.10. Make sure to load them all before trying to load abinit/9.6.2 in the order presented.
  • Here is a link to the Abinit new user help file.
  • View a list of tutorials for using Abinit at this link. Note that these tutorials are expected to take up to two hours each.

Summary

  • As an example, we will use abinit on an input file to create an output file that reports the point symmetry group and Bravais lattice and expected memory needs for each dataset.

Walkthrough: Run Abinit on the Cluster

  • This walkthrough will use abinit on an input file containing a reference to the 01h.pspgth pseutopotential to create an output file that reports the point symmetry group and Bravais lattice and expected memory needs.
  • The tutorial directory used in this example can be found here
  • You can transfer the files to your account on the cluster to follow along. The file transfer guide may be helpful.

Part 1: The SBATCH Script

#!/bin/bash
#SBATCH -JtestAbinit
#SBATCH -A [Account]
#SBATCH -N1 --ntasks-per-node=2
#SBATCH --mem-per-cpu=2G
#SBATCH -t3
#SBATCH -qinferno
#SBATCH -oReport-%j.out

cd $SLURM_SUBMIT_DIR
module load gcc/10.3.0
module load mvapich2/2.3.6
module load hdf5/1.10.8
module load netcdf-c/4.8.1
module load mkl/20.0.4
module load fftw/3.3.10
module load abinit/9.6.2
abinit < tbase1_x.files
  • The #SBATCH directives are standard, requesting just 3 minutes of walltime and 1 node with 2 cores. More on #SBATCH directives can be found in the Using Slurm on Phoenix Guide
  • $SLURM_SUBMIT_DIR is a variable that represents the directory you submit the SBATCH script from. Make sure the files you want to use (in this case, the abinit_tutorial directory) are in the same directory you put the SBATCH script in.
  • Output File will also show up in this directory as well
  • module load abinit/9.6.2 loads the 9.6.2 version of Abinit. To see what Abinit versions are available, run module spider abinit, and load the one you want. The other module are dependencies that must be loaded before Abinit is loaded.
  • abinit < tbase1_x.files makes files according to what is written in tbase1_x.files. The tbase1_1.in input file and 01h.pspgth pseudopotential are used by tbase1_x.files to create the output file. Other files are also generated but they are not useful for the purposes of this tutorial.

Part 2: Submit Job and Check Status

  • Make sure you're in the directory that contains the SBATCH Script as well as the abinit program
  • Submit as normal, with qsub <sbatch scriptname.sbatch>. In this case sbatch testAbinit.sbatch
  • Check job status with squeue --job <jobID>, replacing with the jobid returned after running sbatch
  • You can delete the job with scancel <jobID> , replacing with the jobid returned after running sbatch

Path 3: Collecting Results

  • In the directory where you submitted the SBATCH script, you should see a Report-<joID>.out file, which contains the results of the job, a tbase1_1.out file which contains the report of the point symmetry group and Bravais lattice and expected memory needs, and other output files useful for tasks not covered in this tutorial.
  • Here is what a part of Report-<jobID>.out looks like:
---------------------------------------
Begin Slurm Prolog: Nov-17-2022 16:35:24
Job ID:    84323
User ID:   svangala3
Account:   phx-pace-staff
Job name:  testAbinit
Partition: cpu-small
QOS:       inferno
---------------------------------------
  ABINIT 9.6.2

 DeprecationWarning:

     The files file has been deprecated in Abinit9 and will be removed in Abinit10.
     Use the syntax `abinit t01.abi` where t01.abi is an input with pseudopotentials e.g.

            pseudos = "al.psp8, as.psp8"


  Give name for formatted input file:
tbase1_1.in
  Give name for formatted output file:
tbase1_1.out
  Give root name for generic input files:
tbase1_xi
  Give root name for generic output files:
tbase1_xo
  Give root name for generic temporary files:
tbase1_x

.Version 9.6.2 of ABINIT
.(MPI version, prepared for a x86_64_linux_gnu10.3 computer)

.Copyright (C) 1998-2021 ABINIT group .
 ABINIT comes with ABSOLUTELY NO WARRANTY.
 It is free software, and you are welcome to redistribute it
 under certain conditions (GNU General Public License,
 see ~abinit/COPYING or http://www.gnu.org/copyleft/gpl.txt).

 ABINIT is a project of the Universite Catholique de Louvain,
 Corning Inc. and other collaborators, see ~abinit/doc/developers/contributors.txt .
 Please read https://docs.abinit.org/theory/acknowledgments for suggested acknowledgments of the ABINIT effort.
 For more information, see https://www.abinit.org .

.Starting date : Thu 17 Nov 2022.
- ( at 16h35 )


 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 === Build Information ===
  Version       : 9.6.2
  Build target  : x86_64_linux_gnu10.3
  Build date    : 20221111

 === Compiler Suite ===
  C compiler       : gnu10.3
  C++ compiler     : gnu10.3
  Fortran compiler : gnu10.3
  CFLAGS           : -g -O2 -mtune=native -march=native
  CXXFLAGS         : -g -O2 -mtune=native -march=native
  FCFLAGS          : -g -ffree-line-length-none -fallow-argument-mismatch     -I/usr/loc ...
  FC_LDFLAGS       :

 === Optimizations ===
  Debug level        : basic
  Optimization level : standard
  Architecture       : intel_xeon

 === Multicore ===
  Parallel build : yes
  Parallel I/O   :
  openMP support : no
  GPU support    :

 === Connectors / Fallbacks ===
  LINALG flavor  : openblas
  FFT flavor     : fftw3
  HDF5           : yes
  NetCDF         : yes
  NetCDF Fortran : yes
  LibXC          : yes
  Wannier90      : no
  • Here is what a part of tbase1_1.out looks like:
.Version 9.6.2 of ABINIT
.(MPI version, prepared for a x86_64_linux_gnu10.3 computer)

.Copyright (C) 1998-2021 ABINIT group .
 ABINIT comes with ABSOLUTELY NO WARRANTY.
 It is free software, and you are welcome to redistribute it
 under certain conditions (GNU General Public License,
 see ~abinit/COPYING or http://www.gnu.org/copyleft/gpl.txt).

 ABINIT is a project of the Universite Catholique de Louvain,
 Corning Inc. and other collaborators, see ~abinit/doc/developers/contributors.txt .
 Please read https://docs.abinit.org/theory/acknowledgments for suggested
 acknowledgments of the ABINIT effort.
 For more information, see https://www.abinit.org .

.Starting date : Thu 17 Nov 2022.
- ( at 16h35 )

- input  file    -> tbase1_1.in
- output file    -> tbase1_1.out
- root for input  files -> tbase1_xi
- root for output files -> tbase1_xo


 Symmetries : space group P4/m m m (#123); Bravais tP (primitive tetrag.)
================================================================================
 Values of the parameters that define the memory need of the present run
     intxc =       0    ionmov =       0      iscf =       7    lmnmax =       1
     lnmax =       1     mgfft =      30  mpssoang =       1    mqgrid =    3001
     natom =       2  nloc_mem =       1    nspden =       1   nspinor =       1
    nsppol =       1      nsym =      16    n1xccc =       0    ntypat =       1
    occopt =       1   xclevel =       1
-    mband =           2        mffmem =           1         mkmem =           1
       mpw =         752          nfft =       27000          nkpt =           1
================================================================================
P This job should need less than                       8.597 Mbytes of memory.
  Rough estimation (10% accuracy) of disk space for files :
_ WF disk file :      0.025 Mbytes ; DEN or POT disk file :      0.208 Mbytes.
================================================================================

--------------------------------------------------------------------------------
------------- Echo of variables that govern the present computation ------------
--------------------------------------------------------------------------------
-
- outvars: echo of selected default values
-   iomode0 =  0 , fftalg0 =312 , wfoptalg0 =  0
-
- outvars: echo of global parameters not present in the input file
-  max_nthreads =    0
-
 -outvars: echo values of preprocessed input variables --------
            acell      1.0000000000E+01  1.0000000000E+01  1.0000000000E+01 Bohr
              amu      1.00794000E+00
           diemac      2.00000000E+00
             ecut      1.00000000E+01 Hartree
-          fftalg         312
           istwfk        2
           kptopt           0
P           mkmem           1
            natom           2
            nband           2
            ngfft          30      30      30
             nkpt           1
            nstep          10
             nsym          16
           ntypat           1
              occ      2.000000  0.000000
          spgroup         123
           symrel      1  0  0   0  1  0   0  0  1      -1  0  0   0 -1  0   0  0 -1
                      -1  0  0   0  1  0   0  0 -1       1  0  0   0 -1  0   0  0  1
                      -1  0  0   0 -1  0   0  0  1       1  0  0   0  1  0   0  0 -1
                       1  0  0   0 -1  0   0  0 -1      -1  0  0   0  1  0   0  0  1
                       1  0  0   0  0  1   0  1  0      -1  0  0   0  0 -1   0 -1  0
                      -1  0  0   0  0  1   0 -1  0       1  0  0   0  0 -1   0  1  0
                      -1  0  0   0  0 -1   0  1  0       1  0  0   0  0  1   0 -1  0
                       1  0  0   0  0 -1   0 -1  0      -1  0  0   0  0  1   0  1  0
           toldfe      1.00000000E-06 Hartree
            typat      1  1
           xangst     -3.7042404601E-01  0.0000000000E+00  0.0000000000E+00
                       3.7042404601E-01  0.0000000000E+00  0.0000000000E+00
  • After the result files are produced, you can move the files off the cluster, refer to the file transfer guide for help.
  • Congratulations! You successfully ran Abinit on the cluster.