Abinit on Ubuntu

Last modified by Xwiki VePa on 2024/02/07 07:36

This guide will help the user understand how to compile, install, and use Abinit on their own Ubuntu workstation. If you are using another platform, please refer to the appropriate documentation or contact Benjamin Alldritt for assistance.

Step-by-step guide

To compile Abinit, you will need the following software:

Requirements

  • FORTRAN Compiler (gfortran)
  • C Compiler
  • C++ Compiler
  • MPI
  • LAPACK
  • BLAS
  • ATLAS
  • FFTW
  • NetCDF
  • ETSF-IO

Instructions

Package Installation

Abinit v5.3.4 is available in the Ubuntu package repositories. You can install it using the following command:

sudo apt-get install abinit

Ubuntu 12.04 (64 bit)

  1. Install the required programs and libraries.

    sudo apt-get install g++ gfortran liblapack-dev libblas-dev libatlas-base-dev libmpich2-dev libfftw3-dev libnetcdf-dev libetsf-io-dev etsf-io
  2. Download the latest version of Abinit and unpack.

    mkdir ${HOME}/software
    mkdir ${HOME}/software/abinit
    cd ${HOME}/software/abinit
    wget http://ftp.abinit.org/abinit-7.8.1.tar.gz
    tar -xvzf abinit-7.8.1.tar.gz
    cd abinit-7.8.1
  3. Create a configuration file ubuntu.ac and place in the Abinit root directory.

    prefix="${HOME}/software/abinit"
    enable_64bit_flags="yes"
    enable_openmp="yes"
    enable_mpi="yes"
    enable_mpi_io="yes"
    with_mpi_prefix="/usr"
    with_trio_flavor="netcdf+etsf_io+fox-fallback"
    with_netcdf_incs="-I/usr/include"
    with_netcdf_libs="-L/usr/lib -lnetcdf -lnetcdff"
    with_etsf_io_incs="-I/usr/include"
    with_etsf_io_libs="-L/usr/lib -letsf_io_low_level -letsf_io_utils -letsf_io"
    with_fft_flavor="fftw3"
    with_fft_incs="-I/usr/include/"
    with_fft_libs="-L/usr/lib -lfftw3 -lfftw3f"
    with_linalg_flavor="atlas"
    with_linalg_libs="-L/usr/lib -llapack -lf77blas -lcblas -latlas"
    with_dft_flavor="atompaw-fallback+bigdft-fallback+libxc-fallback+wannier90-fallback"
    enable_gw_dpc="yes"
    enable_maintainer_checks="no"
  4. Configure and build the software.

    ./configure --with-config-file="./ubuntu.ac"
    make mj4
    make install

Ubuntu 14.04 (64 bit)

  1. Install the required programs and libraries.

    sudo apt-get install g++ gfortran liblapack-dev libblas-dev libatlas-base-dev libmpich2-dev libfftw3-dev libnetcdf-dev libetsf-io-dev etsf-io libxc-dev
  2. Download the latest version of Abinit and unpack.

    mkdir ${HOME}/software
    mkdir ${HOME}/software/abinit
    cd ${HOME}/software/abinit
    wget http://ftp.abinit.org/abinit-7.8.1.tar.gz
    tar -xvzf abinit-7.8.1.tar.gz
    cd abinit-7.8.1
  3. Create a configuration file ubuntu.ac and place in the Abinit root directory.

    prefix="${HOME}/software/abinit"
    enable_64bit_flags="yes"
    enable_openmp="yes"
    enable_mpi="yes"
    enable_mpi_io="yes"
    with_mpi_prefix="/usr"
    #with_trio_flavor="netcdf+etsf_io"
    with_trio_flavor="netcdf-fallback+etsf_io-fallback+fox-fallback"
    #with_netcdf_incs="-I/usr/include"
    #with_netcdf_libs="-L/usr/lib -lnetcdf -lnetcdff"
    #with_etsf_io_incs="-I/usr/include"
    #with_etsf_io_libs="-L/usr/lib -letsf_io_low_level -letsf_io_utils -letsf_io"
    with_fft_flavor="fftw3"
    with_fft_incs="-I/usr/include/"
    with_fft_libs="-L/usr/lib -lfftw3 -lfftw3f"
    with_linalg_flavor="atlas"
    with_linalg_libs="-L/usr/lib -llapack -lf77blas -lcblas -latlas"
    with_dft_flavor="atompaw-fallback+bigdft-fallback+libxc+wannier90-fallback"
    enable_gw_dpc="yes"
    enable_maintainer_checks="no"
  4. Configure and build the software.

    ./configure --with-config-file="./ubuntu.ac"
    make mj4
    make install

Tips & Warnings

  • A few of the 500 prebuilt tests fail due to errors with the test-suite, not necessarily with the program. Depending on the items you need, this may not impact you.
  • GPU compilation and installation has not yet been tested
  • Ubuntu 12.04
    • No known errors
  • Ubuntu 14.04
    • ETSF-IO and NetCDF require compilation at the same time Abinit on Ubuntu 14.04 due to package errors. These issues have been reported to the packagers.
    • AtomPAW, FoX, Wannier90, and BigDFT must also be compiled at installation time by Abinit

 

You may also want to use visual panels to communicate related information, tips or things users need to be aware of.

Related articles

Unknown macro: contentbylabel. Click on this message for details.