Segmentation fault error by intel compiler (VASP 6.1.1 and WSL2_ubuntu system)

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


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
Seunghyo Noh
Newbie
Newbie
Posts: 1
Joined: Tue Sep 15, 2020 4:35 am

Segmentation fault error by intel compiler (VASP 6.1.1 and WSL2_ubuntu system)

#1 Post by Seunghyo Noh » Fri Oct 09, 2020 4:50 am

Hello,

Recently, I tried to install VASP 6.1.1, but I fail to execute due to segmentation fault error.
I wonder how to solve the segmeation fault after compling VASP

The following is my installation enviroments.
1. windows_WSL2 (Ubuntu 20.04, gcc, gfortran default version 9)
2. intel paralell studio cluster 2018 update 4 (default installation path: /opt/intel/...)
2. VASP: 6.1.1 version

I tried to compile the following combinations.
1. GNU compilers + GNU library > compilation and execution compeleted
2. GNU compilers + intel MKL > compilation and execution compeleted
3. intel compilers + intel MKL > compilation compledted, but segmentation fault error after execution.

When I used intel compiler and MKL combination, I got the following error

##################### Segmetation fault ##########################
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
vasp_std 0000000001B3F81D Unknown Unknown Unknown
libpthread-2.31.s 00007FC449FDB3C0 Unknown Unknown Unknown
libmpifort.so.12. 00007FC44ADBBF45 __I_MPI___intel_s Unknown Unknown
libmpi.so.12.0 00007FC44A34DF4C Unknown Unknown Unknown
libmpi.so.12.0 00007FC44A34EE24 Unknown Unknown Unknown
libmpi.so.12.0 00007FC44A2EFAE3 Unknown Unknown Unknown
libmpi.so.12.0 00007FC44A2DD05B MPI_Init Unknown Unknown
libmpifort.so.12. 00007FC44AD62240 MPI_INIT Unknown Unknown
vasp_std 0000000000451860 Unknown Unknown Unknown
vasp_std 00000000004730A4 Unknown Unknown Unknown
vasp_std 00000000018F8701 Unknown Unknown Unknown
vasp_std 000000000040BB9E Unknown Unknown Unknown
libc-2.31.so 00007FC449CAA0B3 __libc_start_main Unknown Unknown
vasp_std 000000000040BAAE Unknown Unknown Unknown
##############################################################

I utilized the default file in /ARCH/makefile.include_intel,
and modified CXX_PARS = icpc including std=c++11 option since it cause any error without the option.

##################### makefile.include ##########################
# Precompiler options
CPP_OPTIONS= -DHOST=\"LinuxIFC\"\
-DMPI -DMPI_BLOCK=8000 -Duse_collective \
-DscaLAPACK \
-DCACHE_SIZE=4000 \
-Davoidalloc \
-Dvasp6 \
-Duse_bse_te \
-Dtbdyn \
-Dfock_dblbuf

CPP = fpp -f_com=no -free -w0 $*$(FUFFIX) $*$(SUFFIX) $(CPP_OPTIONS)

FC = mpiifort
FCL = mpiifort -mkl=sequential

FREE = -free -names lowercase

FFLAGS = -assume byterecl -w -xHOST
OFLAG = -O2
OFLAG_IN = $(OFLAG)
DEBUG = -O0

MKL_PATH = $(MKLROOT)/lib/intel64
BLAS =
LAPACK =
BLACS = -lmkl_blacs_intelmpi_lp64
SCALAPACK = $(MKL_PATH)/libmkl_scalapack_lp64.a $(BLACS)

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

INCS =-I$(MKLROOT)/include/fftw

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


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 = icc
CFLAGS_LIB = -O
FFLAGS_LIB = -O1
FREE_LIB = $(FREE)

OBJECTS_LIB= linpack_double.o getshmem.o

# For the parser library
CXX_PARS = icpc -std=c++11
LLIBS += -lstdc++

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

##############################################################

henrique_miranda
Global Moderator
Global Moderator
Posts: 490
Joined: Mon Nov 04, 2019 12:41 pm
Contact:

Re: Segmentation fault error by intel compiler (VASP 6.1.1 and WSL2_ubuntu system)

#2 Post by henrique_miranda » Sat Oct 10, 2020 7:05 am

We did not perform tests on the WSL2_ubuntu as part of our internal testing.

Here are some things you can try to debug the problem:
1. The backtrace you posted is not very informative, could you recompile by changing the makefile.include

Code: Select all

FFLAGS = -traceback -assume byterecl -w -xHOST
Some more information about debugging with intel here:
https://software.intel.com/content/www/ ... tions.html
2. Could you show which libraries your VASP executable is effectively linked with?

Code: Select all

$ ldd <full_path>/vasp_std
3. Have you tried the exact same compilation (makefile.include and the same version of intel) on a linux machine with ubuntu if you have one?
I recommend comparing the results of step 2 with what you obtain on the linux machine.
I assume that ubuntu on WSL2 should produce a similar executable but its a good idea to check.

PS: Note that the compilation with gcc9 is not officially supported yet.
Some users have reported issues:
forum/viewtopic.php?f=2&t=17831
Our internal testing also revealed other issues besides those resported here.
I recommend you use gcc7 for the compilation.
Here is the list of our recommended toolchains:
wiki/wiki/index.php/Toolchains
We will support gcc9 in the next VASP update.

Post Reply