← Back to Blog

VASP Installation Record

· (updated ) · 5

Installation Record

1. Source and build directories

The VASP source archive was stored at:

/home/lgd/app/vasp/vasp.6.5.1.tgz

Separate directories were prepared for the CPU and GPU builds:

/home/lgd/app/vasp/vasp.6.5.1-cpu/
/home/lgd/app/vasp/vasp.6.5.1-gpu/

Keeping the two builds in separate directories makes it possible to select the required executable and environment without mixing CPU and GPU libraries.

2. Server and software inspection

2.1 CPU and memory

CPU information was checked with:

lscpu

Relevant output:

Socket(s):              2
Core(s) per socket:    32
Thread(s) per core:     2
CPU(s):                128

The server therefore has 64 physical CPU cores and 128 logical CPUs.

Memory information was checked with:

free -h

Relevant output:

              total        used        free      shared  buff/cache   available
Mem:           503Gi        48Gi       181Gi       4.5Gi       280Gi       454Gi

2.2 GPU

GPU information was checked with:

nvidia-smi

Relevant output:

+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 595.71.05              Driver Version: 595.71.05      CUDA Version: 13.2     |
+-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 5090        Off |   00000000:98:00.0 Off |                  N/A |
| 56%   46C    P1            217W /  575W |   30019MiB /  32607MiB |     97%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
|   1  NVIDIA GeForce RTX 5090        Off |   00000000:C0:00.0 Off |                  N/A |
| 59%   52C    P1            200W /  575W |   29479MiB /  32607MiB |     97%      Default |
|                                         |                        |                  N/A |

The server has two NVIDIA GeForce RTX 5090 GPUs. The recorded driver reported CUDA 13.2 support.

2.3 CUDA Toolkit

The CUDA compiler version was checked with:

nvcc --version

Recorded output:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2026 NVIDIA Corporation
Built on Tue_Jun_09_02:43:40_PM_PDT_2026
Cuda compilation tools, release 13.3, V13.3.73
Build cuda_13.3.r13.3/compiler.38244171_0

[!warning] CUDA version distinction

nvidia-smi reported a driver CUDA version of 13.2, while nvcc reported CUDA Toolkit 13.3. These are different version indicators: the former describes driver support, while the latter describes the installed compiler toolkit. Confirm compatibility before reproducing this build on another server.

2.4 NVIDIA HPC SDK compilers

The NVIDIA C compiler was checked with:

nvc --version

Recorded output:

nvc 25.11-0 64-bit target on x86-64 Linux -tp sapphirerapids
NVIDIA Compilers and Tools
Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES.  All rights reserved.

The NVIDIA Fortran compiler was checked with:

nvfortran --version

Recorded output:

nvfortran 25.11-0 64-bit target on x86-64 Linux -tp sapphirerapids
NVIDIA Compilers and Tools
Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES.  All rights reserved.

nvfortran is NVIDIA's Fortran compiler.

2.5 GNU compilers

The GNU C and Fortran compiler versions were checked with:

gcc --version
gfortran --version

Recorded output:

gcc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
Copyright (C) 2023 Free Software Foundation, Inc.

GNU Fortran (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
Copyright (C) 2023 Free Software Foundation, Inc.

2.6 MPI

The MPI launcher version was checked with:

mpirun --version

Recorded output:

mpirun (Open MPI) 4.1.9a1

MPI allows VASP to run multiple processes across CPU cores and, where configured, across multiple nodes. More detailed Open MPI configuration information can be inspected with:

ompi_info

3. CPU installation

3.1 CPU compiler configuration

The CPU build was based on:

arch/makefile.include.gnu

The selected configuration used:

  • GNU Fortran
  • GNU/Open MPI wrappers: mpif90 and mpicc
  • OpenBLAS
  • Open MPI ScaLAPACK
  • FFTW
  • -march=native CPU optimization

The resulting configuration was saved as:

/home/lgd/app/vasp/vasp.6.5.1-cpu/makefile.include

makefile.include specifies the compilers, libraries, and compiler options used to build VASP.

3.2 Compile the CPU version

The CPU build was compiled with:

make DEPS=1 -j32 all

The options mean:

OptionMeaning
makeRun the VASP build system.
DEPS=1Automatically generate Fortran module dependencies.
-j32Use 32 parallel compilation jobs.
allBuild the main VASP executable variants.

The initial CPU build encountered a Fortran module-order problem. Adding DEPS=1 corrected the dependency generation and allowed the build to complete.

3.3 CPU binaries

The build produced:

/home/lgd/app/vasp/vasp.6.5.1-cpu/bin/vasp_std
/home/lgd/app/vasp/vasp.6.5.1-cpu/bin/vasp_gam
/home/lgd/app/vasp/vasp.6.5.1-cpu/bin/vasp_ncl
BinaryPurpose
vasp_stdStandard VASP calculations.
vasp_gamGamma-point-only calculations.
vasp_nclNon-collinear magnetism and spin–orbit coupling calculations.

4. GPU installation

4.1 GPU compiler configuration

The GPU build was based on:

arch/makefile.include.nvhpc_acc

The configuration was adapted for:

  • NVIDIA HPC SDK 25.11
  • HPC-X Open MPI
  • CUDA 13.0 from NVIDIA HPC SDK
  • OpenACC
  • NVIDIA CUDA libraries
  • NCCL
  • Automatic GPU architecture detection using:
-gpu=ccnative,cuda13.0

The resulting configuration was saved as:

/home/lgd/app/vasp/vasp.6.5.1-gpu/makefile.include

4.2 Compile the GPU version

The GPU build used the same compilation command as the CPU build:

make DEPS=1 -j32 all

The initial GPU compilation completed successfully. However, successful compilation did not guarantee that the executable would run correctly.

4.3 GPU runtime problem

During the first GPU test, VASP crashed inside the NVHPC BLAS library. The reported symbols included:

libblas_lp64.so.0
dgemv_n_PRESCOTT

This was treated as a runtime numerical-library problem rather than a source-code compilation problem.

4.4 Relink the GPU build with OpenBLAS

The GPU executable was relinked so that OpenBLAS became the direct BLAS/LAPACK provider.

After relinking:

  • The GPU binary ran successfully.
  • LD_PRELOAD was no longer required.
  • The final GPU build passed the smoke test.

The important distinction was:

Initial GPU build: compiled successfully, but the runtime test failed.
Final GPU build: relinked with OpenBLAS, and the runtime test passed.

4.5 GPU binaries

The build produced:

/home/lgd/app/vasp/vasp.6.5.1-gpu/bin/vasp_std
/home/lgd/app/vasp/vasp.6.5.1-gpu/bin/vasp_gam
/home/lgd/app/vasp/vasp.6.5.1-gpu/bin/vasp_ncl

5. Environment scripts

The environment scripts configure the shell before running VASP. They do not compile or install VASP.

5.1 CPU environment

source /home/lgd/app/vasp/vasp-cpu-env.sh

5.2 GPU environment

source /home/lgd/app/vasp/vasp-gpu-env.sh

These scripts load the appropriate compiler, MPI, CUDA, library, and executable paths into the current shell.

Select the script that matches the intended calculation:

# CPU calculations
source /home/lgd/app/vasp/vasp-cpu-env.sh

# GPU calculations
source /home/lgd/app/vasp/vasp-gpu-env.sh

Do not use both environment scripts in the same shell. Start a new shell before switching between the CPU and GPU environments.

6. Validation

6.1 CPU validation

The CPU version was tested with the bulk_AlPAW test using two MPI ranks:

2 MPI ranks

Result:

SUCCESS: ALL SELECTED TESTS PASSED

6.2 GPU validation

The final GPU version was tested with the bulk_AlPAW test using:

4 MPI ranks
2 visible GPUs

The test checked:

  • Energies
  • Forces
  • Stress

Result:

SUCCESS: ALL SELECTED TESTS PASSED

The test used four MPI ranks on two GPUs. Therefore, multiple MPI ranks shared each GPU, and NCCL was automatically disabled.

For production GPU calculations, the installation report recommends approximately one MPI rank per GPU. For two GPUs:

mpirun -np 2 "$VASP_STD"