vasp.6.2.1 installation on ubuntu.21.01

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

Moderators: Global Moderator, Moderator

Post Reply
Message
Author
celina_sikorska
Newbie
Newbie
Posts: 3
Joined: Wed Dec 16, 2020 11:17 pm

vasp.6.2.1 installation on ubuntu.21.01

#1 Post by celina_sikorska » Tue May 25, 2021 12:56 am

I have followed the instructions of vasp installation on ubuntu (wiki/index.php/A_Ubuntu_based_installation_of_VASP). However, I was unsuccessful. I would like to ask which version(s) of ubuntu are compilable with vasp.6.2.1. Thanks!

andreas.singraber
Global Moderator
Global Moderator
Posts: 231
Joined: Mon Apr 26, 2021 7:40 am

Re: vasp.6.2.1 installation on ubuntu.21.01

#2 Post by andreas.singraber » Tue May 25, 2021 7:43 am

Hello!

Please have a look at the posting guidlines and be more specific about the problems you encountered. I can confirm that Linux Mint 20.1 (which is based on Ubuntu 20.04) works fine, but without more detailed information (your makefile.include, your stdout/stderr during compilation) we are unable to help you.

celina_sikorska
Newbie
Newbie
Posts: 3
Joined: Wed Dec 16, 2020 11:17 pm

Re: vasp.6.2.1 installation on ubuntu.21.01

#3 Post by celina_sikorska » Wed May 26, 2021 2:54 am

Hello Andreas,
Thank you for your answer. Please find enclosed a makefile.include and an error report.
Thank you for your help!
You do not have the required permissions to view the files attached to this post.

andreas.singraber
Global Moderator
Global Moderator
Posts: 231
Joined: Mon Apr 26, 2021 7:40 am

Re: vasp.6.2.1 installation on ubuntu.21.01

#4 Post by andreas.singraber » Wed Jun 09, 2021 9:05 pm

Hello again!

Sorry for the late reply.. I could reproduce this issue with a virtual machine running Ubuntu 21.04. There GCC 10 is the new default compiler and it seems that it is (unlike GCC 9) now much more strict regarding mismatches between subroutine calls and their respective definitions. There may be a fix in the code in the next release but for the moment there is also a simple workaround: just add the flag

Code: Select all

-fallow-argument-mismatch
to the FFLAGS section of the makefile.include. This will degrade the error to a warning and the build should work then.

Unrelated to this error I would also recommend to always start with the makefiles which are provided in the "arch" directory. Here is a version that should work on Ubuntu 21.04 which I derived from "arch/makefile.include.linux_gnu":

Code: Select all

# Precompiler options
CPP_OPTIONS= -DHOST=\"LinuxGNU\" \
             -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
FCL        = mpif90

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

FFLAGS     = -w -march=native -fallow-argument-mismatch
OFLAG      = -O2
OFLAG_IN   = $(OFLAG)
DEBUG      = -O0

LIBDIR     = /usr/lib/x86_64-linux-gnu
BLAS       = -L$(LIBDIR) -lblas
LAPACK     = -L$(LIBDIR) -llapack
BLACS      =
SCALAPACK  = -L/usr/lib -lscalapack-openmpi $(BLACS)

LLIBS      = $(SCALAPACK) $(LAPACK) $(BLAS)

FFTW       ?=
LLIBS      += -lfftw3
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
CFLAGS_LIB = -O
FFLAGS_LIB = -O1
FREE_LIB   = $(FREE)

OBJECTS_LIB= linpack_double.o getshmem.o

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


# Normally no need to change this
SRCDIR     = ../../src
BINDIR     = ../../bin

#================================================
# GPU Stuff

CPP_GPU    = -DCUDA_GPU -DRPROMU_CPROJ_OVERLAP -DCUFFT_MIN=28 -UscaLAPACK -Ufock_dblbuf # -DUSE_PINNED_MEMORY 

OBJECTS_GPU= fftmpiw.o fftmpi_map.o fft3dlib.o fftw3d_gpu.o fftmpiw_gpu.o

CC         = gcc
CXX        = g++
CFLAGS     = -fPIC -DADD_ -openmp -DMAGMA_WITH_MKL -DMAGMA_SETAFFINITY -DGPUSHMEM=300 -DHAVE_CUBLAS

# Minimal requirement is CUDA >= 10.X. For "sm_80" you need CUDA >= 11.X.
CUDA_ROOT  ?= /usr/local/cuda
NVCC       := $(CUDA_ROOT)/bin/nvcc
CUDA_LIB   := -L$(CUDA_ROOT)/lib64 -lnvToolsExt -lcudart -lcuda -lcufft -lcublas

GENCODE_ARCH    := -gencode=arch=compute_60,code=\"sm_60,compute_60\" \
                   -gencode=arch=compute_70,code=\"sm_70,compute_70\" \
                   -gencode=arch=compute_80,code=\"sm_80,compute_80\"

MPI_INC    = /opt/gnu/ompi-3.1.4-GNU-5.4.0/include
Also note that you may not achieve optimal performance if you stick to the default compiler and system libraries. Depending on your hardware it may be worth trying out e.g. the Intel oneAPI toolkit or the NVIDIA HPC SDK.

Best,
Andreas

Post Reply