Installing VASP CPU only version on AMD EPYC 7742

Questions regarding the compilation of VASP on various platforms: hardware, compilers and libraries, etc.

Moderators: Global Moderator, Moderator

Post Reply
Posts: 20
Joined: Tue Jan 12, 2021 3:17 pm

Installing VASP CPU only version on AMD EPYC 7742

#1 Post by david_keller » Mon May 10, 2021 5:35 pm

Which would be the appropriate starting makefile to use to compile 6.2 on nodes comprised of AMD EPYC 7742 64-Core Processors, running 5.3.0-62-generic #56~18.04.1-Ubuntu SMP Wed Jun 24 16:17:03 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux? The CPUs are AMD EPYC 7742 64-Core Processors. I want to compile a CPU only version and an OpenACC version.

Global Moderator
Global Moderator
Posts: 25
Joined: Mon Apr 26, 2021 7:40 am

Re: Installing VASP CPU only version on AMD EPYC 7742

#2 Post by andreas.singraber » Wed May 12, 2021 4:23 pm


I am working on a Linux Mint 20.1 machine with AMD Epyc 7402P processor (24 cores), so it looks like a very similar setup:

Code: Select all

Linux 5.4.0-70-generic #78-Ubuntu SMP Fri Mar 19 13:29:52 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
I have not yet tried anything special but starting from the makefile.include

Code: Select all

I could compile the CPU version with gfortran 9.3 and the system libraries. You may need to install some packages:

Code: Select all

sudo apt install libscalapack-openmpi-dev libfftw3-dev libopenblas-dev
With this setup the "fast" testsuite runs without errors. Here is the makefile.include I used:

Code: Select all

# Precompiler options
             -DMPI -DMPI_BLOCK=8000 -Duse_collective \
             -DscaLAPACK \
             -DCACHE_SIZE=4000 \
             -Davoidalloc \
             -Dvasp6 \
             -Duse_bse_te \
             -Dtbdyn \
             -Dfock_dblbuf \

CPP        = gcc -E -P -C -w $*$(FUFFIX) >$*$(SUFFIX) $(CPP_OPTIONS)

FC         = mpif90 -fopenmp
FCL        = mpif90 -fopenmp

FREE       = -ffree-form -ffree-line-length-none

FFLAGS     = -w -march=native
OFLAG      = -O2
DEBUG      = -O0

BLAS       = -lopenblas
LAPACK     =
BLACS      = 
SCALAPACK  = -lscalapack-openmpi $(BLACS)


FFTW       ?= 
LLIBS      += -lfftw3 -lfftw3_omp
INCS       = -I/usr/include

OBJECTS    = fftmpiw.o fftmpi_map.o  fftw3d.o  fft3dlib.o

OBJECTS_O1 += fftw3d.o fftmpi.o fftmpiw.o
OBJECTS_O2 += fft3dlib.o

# For what used to be vasp.5.lib
CPP_LIB    = $(CPP)
FC_LIB     = $(FC)
CC_LIB     = gcc

OBJECTS_LIB= linpack_double.o getshmem.o

# For the parser library
CXX_PARS   = g++
LLIBS      += -lstdc++

### For the fft library
##CXX_FFTLIB = g++ -fopenmp -std=c++11 -DFFTLIB_THREADSAFE 
##INCS_FFTLIB= -I./include -I$(FFTW)/include
##LIBS       += fftlib
##LLIBS      += -ldl

# Normally no need to change this
SRCDIR     = ../../src
BINDIR     = ../../bin
I am currently looking into the AMD Optimizing Compiler (AOCC, and Libraries (AOCL, but I cannot give you a recommendation yet.

Please also have a look at the Wiki page regarding the installation of VASP (in particular for the OpenACC version): wiki/index.php/Installing_VASP.6.X.X

Posts: 1
Joined: Tue Aug 31, 2021 1:16 am

Re: Installing VASP CPU only version on AMD EPYC 7742

#3 Post by tromanfl » Thu Sep 09, 2021 5:31 am

Thank you @andreas.singraber for the detailed reply. I was wondering if you / the VASP team have/s made progress on a makefile for AMD Optimizing Compiler 3.1 and AMD Optimizing Libraries 3.0? Like @david_keller who started this thread, I also need to optimize VASP for the AMD EPYC family of processors (including 7742). Thank you so much!

Post Reply