Personal computer installation: Difference between revisions

From VASP Wiki
No edit summary
No edit summary
Line 11: Line 11:
| 6.3.0
| 6.3.0
|-
|-
| Debian
| '''Debian'''
| 11.3
| 11.3
| style="background-color:#ACE9E5;" | [[#Building VASP 6.3.0 on Debian 11.3|Link]]
| style="background-color:#ACE9E5;" | [[#Building VASP 6.3.0 on Debian 11.3|Link]]
|-
|-
| Ubuntu
| '''Ubuntu'''
| 20.04
| 20.04
| style="background-color:#ACE9E5;" | [[#Building VASP 6.3.0 on Ubuntu 20.04|Link]]
| style="background-color:#ACE9E5;" | [[#Building VASP 6.3.0 on Ubuntu 20.04|Link]]
|-
|-
| Fedora
|  
| 22.04
| style="background-color:#ACE9E5;" | [[#Building VASP 6.3.0 on Ubuntu 22.04|Link]]
|-
| '''Fedora'''
| 35
| 35
| style="background-color:#ACE9E5;" | [[#Building VASP 6.3.0 on Fedora 35|Link]]
| style="background-color:#ACE9E5;" | [[#Building VASP 6.3.0 on Fedora 35|Link]]
|-
|-
| Rocky Linux
| '''Rocky Linux'''
| 8.5
| 8.5
| style="background-color:#ACE9E5;" | [[#Building VASP 6.3.0 on Rocky Linux 8.5|Link]]
| style="background-color:#ACE9E5;" | [[#Building VASP 6.3.0 on Rocky Linux 8.5|Link]]
Line 57: Line 61:
LLIBS      += -lfftw3 -lfftw3_omp
LLIBS      += -lfftw3 -lfftw3_omp
INCS      += -I/usr/include</pre>
INCS      += -I/usr/include</pre>
<li>Leave <code>HDF5_ROOT</code> variable commented out (not needed). Set <code>LLIBS</code> and <code>INCS</code> in the HDF5 section:</li>
<li>Enable HDF5 support by adding <code>-DVASP_HDF5</code> to the <code>CPP_OPTIONS</code> variable. Leave <code>HDF5_ROOT</code> variable commented out (not needed). Set <code>LLIBS</code> and <code>INCS</code> in the HDF5 section:</li>
<pre># HDF5-support (optional but strongly recommended)
<pre># HDF5-support (optional but strongly recommended)
CPP_OPTIONS+= -DVASP_HDF5
#HDF5_ROOT  ?= /path/to/your/hdf5/installation
#HDF5_ROOT  ?= /path/to/your/hdf5/installation
LLIBS      += -L/usr/lib/x86_64-linux-gnu/hdf5/openmpi/ -lhdf5_fortran
LLIBS      += -L/usr/lib/x86_64-linux-gnu/hdf5/openmpi/ -lhdf5_fortran
Line 68: Line 73:
  make DEPS=1 -j
  make DEPS=1 -j


Once the build process is complete the binaries are located in the {{VASP}} <code>bin</code> subfolder. They were compiled with OpenMP threading support. Before running {{VASP}} please always check if the <code>OMP_NUM_THREADS</code> environment variable is set according to your needs. For example, if you require only pure MPI parallelization without OpenMP threading add
Once the build process is complete the binaries are located in the {{VASP}} <code>bin</code> subfolder. They were compiled with [[Hybrid MPI/OpenMP parallelization|OpenMP threading support]]. Before running {{VASP}} please always check if the <code>OMP_NUM_THREADS</code> environment variable is set according to your needs. For example, if you require only pure MPI parallelization without OpenMP threading add


  export OMP_NUM_THREADS=1
  export OMP_NUM_THREADS=1
Line 105: Line 110:
LLIBS      += -lfftw3 -lfftw3_omp
LLIBS      += -lfftw3 -lfftw3_omp
INCS      += -I/usr/include</pre>
INCS      += -I/usr/include</pre>
<li>Leave <code>HDF5_ROOT</code> variable commented out (not needed). Set <code>LLIBS</code> and <code>INCS</code> in the HDF5 section:</li>
<li>Enable HDF5 support by adding <code>-DVASP_HDF5</code> to the <code>CPP_OPTIONS</code> variable. Leave <code>HDF5_ROOT</code> variable commented out (not needed). Set <code>LLIBS</code> and <code>INCS</code> in the HDF5 section:</li>
<pre># HDF5-support (optional but strongly recommended)
<pre># HDF5-support (optional but strongly recommended)
CPP_OPTIONS+= -DVASP_HDF5
#HDF5_ROOT  ?= /path/to/your/hdf5/installation
#HDF5_ROOT  ?= /path/to/your/hdf5/installation
LLIBS      += -L/usr/lib/x86_64-linux-gnu/hdf5/openmpi/ -lhdf5_fortran
LLIBS      += -L/usr/lib/x86_64-linux-gnu/hdf5/openmpi/ -lhdf5_fortran
Line 116: Line 122:
  make DEPS=1 -j
  make DEPS=1 -j


Once the build process is complete the binaries are located in the {{VASP}} <code>bin</code> subfolder. They were compiled with OpenMP threading support. Before running {{VASP}} please always check if the <code>OMP_NUM_THREADS</code> environment variable is set according to your needs. For example, if you require only pure MPI parallelization without OpenMP threading add
Once the build process is complete the binaries are located in the {{VASP}} <code>bin</code> subfolder. They were compiled with [[Hybrid MPI/OpenMP parallelization|OpenMP threading support]]. Before running {{VASP}} please always check if the <code>OMP_NUM_THREADS</code> environment variable is set according to your needs. For example, if you require only pure MPI parallelization without OpenMP threading add


  export OMP_NUM_THREADS=1
  export OMP_NUM_THREADS=1


in your <code>~/.bashrc</code> file.
in your <code>~/.bashrc</code> file.
===Building VASP 6.3.0 on Ubuntu 22.04===


==Fedora==
==Fedora==
Line 159: Line 167:
LLIBS      += -lfftw3 -lfftw3_omp
LLIBS      += -lfftw3 -lfftw3_omp
INCS      += -I/usr/include</pre>
INCS      += -I/usr/include</pre>
<li>Leave <code>HDF5_ROOT</code> variable commented out (not needed). Set <code>LLIBS</code> and <code>INCS</code> in the HDF5 section:</li>
<li>Enable HDF5 support by adding <code>-DVASP_HDF5</code> to the <code>CPP_OPTIONS</code> variable. Leave <code>HDF5_ROOT</code> variable commented out (not needed). Set <code>LLIBS</code> and <code>INCS</code> in the HDF5 section:</li>
<pre># HDF5-support (optional but strongly recommended)
<pre># HDF5-support (optional but strongly recommended)
CPP_OPTIONS+= -DVASP_HDF5
#HDF5_ROOT  ?= /path/to/your/hdf5/installation
#HDF5_ROOT  ?= /path/to/your/hdf5/installation
LLIBS      += -lhdf5_fortran
LLIBS      += -lhdf5_fortran
Line 170: Line 179:
  make DEPS=1 -j
  make DEPS=1 -j


Once the build process is complete the binaries are located in the {{VASP}} <code>bin</code> subfolder. They were compiled with OpenMP threading support. Before running {{VASP}} please always check if the <code>OMP_NUM_THREADS</code> environment variable is set according to your needs. For example, if you require only pure MPI parallelization without OpenMP threading add
Once the build process is complete the binaries are located in the {{VASP}} <code>bin</code> subfolder. They were compiled with [[Hybrid MPI/OpenMP parallelization|OpenMP threading support]]. Before running {{VASP}} please always check if the <code>OMP_NUM_THREADS</code> environment variable is set according to your needs. For example, if you require only pure MPI parallelization without OpenMP threading add


  export OMP_NUM_THREADS=1
  export OMP_NUM_THREADS=1
Line 179: Line 188:


===Building VASP 6.3.0 on Rocky Linux 8.5===
===Building VASP 6.3.0 on Rocky Linux 8.5===
Please install the required software packages with the package manager:
sudo yum install automake gcc gcc-c++ gcc-gfortran lapack-devel openblas-devel openmpi-devel scalapack-openmpi-devel fftw-devel hdf5-openmpi-devel
Add the following lines to your <code>.bashrc</code> file located in your home directory:
export PATH=${PATH}:/usr/lib64/openmpi/bin/
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib64/openmpi/lib
and either open a new shell or run this command to activate the lines above:
source ~/.bashrc
Change into the {{VASP}} directory and use the <code>arch/makefile.include.gnu_omp</code> template as basis for the <code>[[makefile.include]]</code>:
cp arch/makefile.include.gnu_omp makefile.include
Search for the paragraph in <code>makefile.include</code> starting with <code>## Customize as of this point!</code> and apply the following changes below:
<ul>
<li>Comment out the <code>OPENBLAS_ROOT</code> variable (not needed) and set <code>BLASPACK</code>:</li>
<pre># BLAS and LAPACK (mandatory)
#OPENBLAS_ROOT ?= /path/to/your/openblas/installation
BLASPACK    = -lopenblas</pre>
<li>Comment out the <code>SCALAPACK_ROOT</code> variable (not needed) and set <code>SCALAPACK</code>:</li>
<pre># scaLAPACK (mandatory)
#SCALAPACK_ROOT ?= /path/to/your/scalapack/installation
SCALAPACK  = -lscalapack</pre>
<li>Comment out the <code>FFTW_ROOT</code> variable (not needed). Set <code>LLIBS</code> and <code>INCS</code> in the FFTW section:</li>
<pre># FFTW (mandatory)
#FFTW_ROOT  ?= /path/to/your/fftw/installation
LLIBS      += -lfftw3 -lfftw3_omp
INCS      += -I/usr/include</pre>
<li>Enable HDF5 support by adding <code>-DVASP_HDF5</code> to the <code>CPP_OPTIONS</code> variable. Leave <code>HDF5_ROOT</code> variable commented out (not needed). Set <code>LLIBS</code> and <code>INCS</code> in the HDF5 section:</li>
<pre># HDF5-support (optional but strongly recommended)
CPP_OPTIONS+= -DVASP_HDF5
#HDF5_ROOT  ?= /path/to/your/hdf5/installation
LLIBS      += -lhdf5_fortran
INCS      += -I/usr/lib64/gfortran/modules/openmpi/</pre>
</ul>
Save your <code>makefile.include</code> and compile {{VASP}}:
make DEPS=1 -j
Once the build process is complete the binaries are located in the {{VASP}} <code>bin</code> subfolder. They were compiled with [[Hybrid MPI/OpenMP parallelization|OpenMP threading support]]. Before running {{VASP}} please always check if the <code>OMP_NUM_THREADS</code> environment variable is set according to your needs. For example, if you require only pure MPI parallelization without OpenMP threading add
export OMP_NUM_THREADS=1
in your <code>~/.bashrc</code> file.

Revision as of 16:06, 22 April 2022

Here you will find instructions on how to install VASP on some widely-used Linux distributions. For the sake of simplicity the suggested build processes rely as much as possible on compilers and libraries provided by the operating system's package manager. The focus is on minimizing the effort to obtain working VASP binaries with only little changes required to the provided makefile.include templates in the arch directory.

Warning: These short and convenient installation instructions may come at the cost of performance. They are not optimized with respect to compilers, libraries and hardware. Please consider benchmarking and optimizing your build process prior to large-scale production runs.

In order to verify each build we run the FAST category tests of the testsuite.

Tip: All build instructions presented here include HDF5 support to allow post-processing of results with py4vasp.

The build instructions have been tested on clean installations of the operating systems in the following table:

Operating system VASP
Name Version 6.3.0
Debian 11.3 Link
Ubuntu 20.04 Link
22.04 Link
Fedora 35 Link
Rocky Linux 8.5 Link

The table and corresponding instructions will be updated when either a new version of VASP or a major release of the operating systems is available.

Debian

Building VASP 6.3.0 on Debian 11.3

Please install required software packages with the package manager:

sudo apt install make build-essential rsync g++ gfortran libopenblas-dev liblapack-dev libopenmpi-dev libscalapack-openmpi-dev libfftw3-dev

Change into the VASP directory and use the arch/makefile.include.gnu_omp template as basis for the makefile.include:

cp arch/makefile.include.gnu_omp makefile.include

Search for the paragraph in makefile.include starting with ## Customize as of this point! and apply the following changes below:

  • Comment out the OPENBLAS_ROOT variable (not needed) and set BLASPACK:
  • # BLAS and LAPACK (mandatory)
    #OPENBLAS_ROOT ?= /path/to/your/openblas/installation
    BLASPACK    = -lopenblas
  • Comment out the SCALAPACK_ROOT variable (not needed) and set SCALAPACK:
  • # scaLAPACK (mandatory)
    #SCALAPACK_ROOT ?= /path/to/your/scalapack/installation
    SCALAPACK   = -lscalapack-openmpi
  • Comment out the FFTW_ROOT variable (not needed). Set LLIBS and INCS in the FFTW section:
  • # FFTW (mandatory)
    #FFTW_ROOT  ?= /path/to/your/fftw/installation
    LLIBS      += -lfftw3 -lfftw3_omp
    INCS       += -I/usr/include
  • Enable HDF5 support by adding -DVASP_HDF5 to the CPP_OPTIONS variable. Leave HDF5_ROOT variable commented out (not needed). Set LLIBS and INCS in the HDF5 section:
  • # HDF5-support (optional but strongly recommended)
    CPP_OPTIONS+= -DVASP_HDF5
    #HDF5_ROOT  ?= /path/to/your/hdf5/installation
    LLIBS      += -L/usr/lib/x86_64-linux-gnu/hdf5/openmpi/ -lhdf5_fortran
    INCS       += -I/usr/include/hdf5/openmpi/

Save your makefile.include and compile VASP:

make DEPS=1 -j

Once the build process is complete the binaries are located in the VASP bin subfolder. They were compiled with OpenMP threading support. Before running VASP please always check if the OMP_NUM_THREADS environment variable is set according to your needs. For example, if you require only pure MPI parallelization without OpenMP threading add

export OMP_NUM_THREADS=1

in your ~/.bashrc file.

Ubuntu

Building VASP 6.3.0 on Ubuntu 20.04

Please install the required software packages with the package manager:

sudo apt install make build-essential g++ gfortran libopenblas-dev liblapack-dev libopenmpi-dev libscalapack-openmpi-dev libfftw3-dev libhdf5-openmpi-dev

Change into the VASP directory and use the arch/makefile.include.gnu_omp template as basis for the makefile.include:

cp arch/makefile.include.gnu_omp makefile.include

Search for the paragraph in makefile.include starting with ## Customize as of this point! and apply the following changes below:

  • Comment out the line adding -fallow-argument-mismatch to the variable FFLAGS:
  • # For gcc-10 and higher (comment out for older versions)
    #FFLAGS     += -fallow-argument-mismatch
  • Comment out the OPENBLAS_ROOT variable (not needed) and set BLASPACK:
  • # BLAS and LAPACK (mandatory)
    #OPENBLAS_ROOT ?= /path/to/your/openblas/installation
    BLASPACK    = -lopenblas
  • Comment out the SCALAPACK_ROOT variable (not needed) and set SCALAPACK:
  • # scaLAPACK (mandatory)
    #SCALAPACK_ROOT ?= /path/to/your/scalapack/installation
    SCALAPACK   = -lscalapack-openmpi
  • Comment out the FFTW_ROOT variable (not needed). Set LLIBS and INCS in the FFTW section:
  • # FFTW (mandatory)
    #FFTW_ROOT  ?= /path/to/your/fftw/installation
    LLIBS      += -lfftw3 -lfftw3_omp
    INCS       += -I/usr/include
  • Enable HDF5 support by adding -DVASP_HDF5 to the CPP_OPTIONS variable. Leave HDF5_ROOT variable commented out (not needed). Set LLIBS and INCS in the HDF5 section:
  • # HDF5-support (optional but strongly recommended)
    CPP_OPTIONS+= -DVASP_HDF5
    #HDF5_ROOT  ?= /path/to/your/hdf5/installation
    LLIBS      += -L/usr/lib/x86_64-linux-gnu/hdf5/openmpi/ -lhdf5_fortran
    INCS       += -I/usr/include/hdf5/openmpi/

Save your makefile.include and compile VASP:

make DEPS=1 -j

Once the build process is complete the binaries are located in the VASP bin subfolder. They were compiled with OpenMP threading support. Before running VASP please always check if the OMP_NUM_THREADS environment variable is set according to your needs. For example, if you require only pure MPI parallelization without OpenMP threading add

export OMP_NUM_THREADS=1

in your ~/.bashrc file.

Building VASP 6.3.0 on Ubuntu 22.04

Fedora

Building VASP 6.3.0 on Fedora 35

Please install the required software packages with the package manager:

sudo yum install automake gcc gcc-c++ gcc-gfortran lapack-devel openblas-devel openmpi-devel scalapack-openmpi-devel fftw-devel hdf5-openmpi-devel

Add the following lines to your .bashrc file located in your home directory:

export PATH=${PATH}:/usr/lib64/openmpi/bin/
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib64/openmpi/lib

and either open a new shell or run this command to activate the lines above:

source ~/.bashrc

Change into the VASP directory and use the arch/makefile.include.gnu_omp template as basis for the makefile.include:

cp arch/makefile.include.gnu_omp makefile.include

Search for the paragraph in makefile.include starting with ## Customize as of this point! and apply the following changes below:

  • Comment out the OPENBLAS_ROOT variable (not needed) and set BLASPACK:
  • # BLAS and LAPACK (mandatory)
    #OPENBLAS_ROOT ?= /path/to/your/openblas/installation
    BLASPACK    = -lopenblas
  • Comment out the SCALAPACK_ROOT variable (not needed) and set SCALAPACK:
  • # scaLAPACK (mandatory)
    #SCALAPACK_ROOT ?= /path/to/your/scalapack/installation
    SCALAPACK   = -lscalapack
  • Comment out the FFTW_ROOT variable (not needed). Set LLIBS and INCS in the FFTW section:
  • # FFTW (mandatory)
    #FFTW_ROOT  ?= /path/to/your/fftw/installation
    LLIBS      += -lfftw3 -lfftw3_omp
    INCS       += -I/usr/include
  • Enable HDF5 support by adding -DVASP_HDF5 to the CPP_OPTIONS variable. Leave HDF5_ROOT variable commented out (not needed). Set LLIBS and INCS in the HDF5 section:
  • # HDF5-support (optional but strongly recommended)
    CPP_OPTIONS+= -DVASP_HDF5
    #HDF5_ROOT  ?= /path/to/your/hdf5/installation
    LLIBS      += -lhdf5_fortran
    INCS       += -I/usr/lib64/gfortran/modules/openmpi/

Save your makefile.include and compile VASP:

make DEPS=1 -j

Once the build process is complete the binaries are located in the VASP bin subfolder. They were compiled with OpenMP threading support. Before running VASP please always check if the OMP_NUM_THREADS environment variable is set according to your needs. For example, if you require only pure MPI parallelization without OpenMP threading add

export OMP_NUM_THREADS=1

in your ~/.bashrc file.

Rocky Linux

Building VASP 6.3.0 on Rocky Linux 8.5

Please install the required software packages with the package manager:

sudo yum install automake gcc gcc-c++ gcc-gfortran lapack-devel openblas-devel openmpi-devel scalapack-openmpi-devel fftw-devel hdf5-openmpi-devel

Add the following lines to your .bashrc file located in your home directory:

export PATH=${PATH}:/usr/lib64/openmpi/bin/
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib64/openmpi/lib

and either open a new shell or run this command to activate the lines above:

source ~/.bashrc

Change into the VASP directory and use the arch/makefile.include.gnu_omp template as basis for the makefile.include:

cp arch/makefile.include.gnu_omp makefile.include

Search for the paragraph in makefile.include starting with ## Customize as of this point! and apply the following changes below:

  • Comment out the OPENBLAS_ROOT variable (not needed) and set BLASPACK:
  • # BLAS and LAPACK (mandatory)
    #OPENBLAS_ROOT ?= /path/to/your/openblas/installation
    BLASPACK    = -lopenblas
  • Comment out the SCALAPACK_ROOT variable (not needed) and set SCALAPACK:
  • # scaLAPACK (mandatory)
    #SCALAPACK_ROOT ?= /path/to/your/scalapack/installation
    SCALAPACK   = -lscalapack
  • Comment out the FFTW_ROOT variable (not needed). Set LLIBS and INCS in the FFTW section:
  • # FFTW (mandatory)
    #FFTW_ROOT  ?= /path/to/your/fftw/installation
    LLIBS      += -lfftw3 -lfftw3_omp
    INCS       += -I/usr/include
  • Enable HDF5 support by adding -DVASP_HDF5 to the CPP_OPTIONS variable. Leave HDF5_ROOT variable commented out (not needed). Set LLIBS and INCS in the HDF5 section:
  • # HDF5-support (optional but strongly recommended)
    CPP_OPTIONS+= -DVASP_HDF5
    #HDF5_ROOT  ?= /path/to/your/hdf5/installation
    LLIBS      += -lhdf5_fortran
    INCS       += -I/usr/lib64/gfortran/modules/openmpi/

Save your makefile.include and compile VASP:

make DEPS=1 -j

Once the build process is complete the binaries are located in the VASP bin subfolder. They were compiled with OpenMP threading support. Before running VASP please always check if the OMP_NUM_THREADS environment variable is set according to your needs. For example, if you require only pure MPI parallelization without OpenMP threading add

export OMP_NUM_THREADS=1

in your ~/.bashrc file.