installing cp2k-7.1 with gpu shows this file requires compiler and library support for the ISO C++ 2011 standard.

132 views
Skip to first unread message

egbertchang

unread,
Apr 9, 2020, 4:55:19 AM4/9/20
to cp2k
Recently , I tried to install cp2k-7.1 with gpu.

intel2017u4

cuda9.1

but the information showed :
gcc520/include/c++/5.2.0/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.

there is my file
make -j 32   ARCH=Linux-x86-64-intel VERSION=popt

Linux-x86-64-intel.popt

LIBXSMM  = $HOME/soft/cp2k-7.1-need/libxsmm
LIBXC    = $HOME/soft/cp2k-7.1-need/libxc/intel-hsw
LIBINT   = $HOME/soft/cp2k-7.1-need/libint/intel-skx
LIBELPA  = $HOME/soft/cp2k-7.1-need/elpa/intel-skx-omp

NVCC     = nvcc
CC       = cc
FC       = mpiifort
LD       = mpiifort
CXX      = g++
AR       = ar -r
NVFLAGS  = --std=c++11  --cuda -keep --dryrun
DFLAGS   = -D__MKL -D__FFTW3 -D__LIBXSMM \
           -D__parallel -D__SCALAPACK \
           -D__ELPA=201911 \
           -D__LIBXC \
           -D__LIBINT  \
           -D__MAX_CONTR=4
DFLAGS  += -D__ACC -D__DBCSR_ACC -D__PW_CUDA -D__HAS_PATCHED_CUFFT_70
CFLAGS   = $(DFLAGS) -O2 
FCFLAGS  = $(DFLAGS) -O2 -funroll-loops -fpp -free -qopenmp -auto
GPUVER = V100

FCFLAGS += -fp-model precise
FCFLAGS += -g -traceback
FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw
FCFLAGS += -I$(LIBXSMM)/include
FCFLAGS += -I$(LIBXC)/include
FCFLAGS += -I$(LIBINT)/include
FCFLAGS += -I$(LIBELPA)/include/elpa_openmp-2019.11.001/modules -I$(LIBELPA)/include/elpa_openmp-2019.11.001/elpa
LDFLAGS  = $(FCFLAGS) -static-intel
LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main
LIBS     = -L$(LIBELPA)/lib -lelpa
MKL_LIB  = ${MKLROOT}/lib/intel64
LIBS    += $(MKL_LIB)/libmkl_scalapack_lp64.a -Wl,--start-group \
           $(MKL_LIB)/libmkl_intel_lp64.a ${MKL_LIB}/libmkl_sequential.a \
           $(MKL_LIB)/libmkl_core.a \
           ${MKL_LIB}/libmkl_blacs_intelmpi_lp64.a -Wl,--end-group \
           -lpthread -lm
LIBS    += -L$(LIBXSMM)/lib -lxsmmf -lxsmm -ldl
LIBS    += -L$(LIBXC)/lib -lxcf03 -lxc
LIBS    += -L$(LIBINT)/lib -lint2 -lstdc++
LIBS    += -lcudart -lcublas -lcufft -lnvrtc -lstdc++ -lcuda

does my popt file or the enivorment have some mistakes? 
Thanks in advance for your assistance!

Krack Matthias (PSI)

unread,
Apr 9, 2020, 6:16:26 AM4/9/20
to cp...@googlegroups.com

Did you try to add the flag -std=c++11 or -std=gnu++11 also to the CFLAGS?

 

M.

--
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/78a99a91-1baa-4377-a667-39cd327bb9e4%40googlegroups.com.

egbertchang

unread,
Apr 9, 2020, 9:20:35 AM4/9/20
to cp2k
yes, i have already tried both of them. but the problem were still  there

在 2020年4月9日星期四 UTC+8下午6:16:26,Matthias Krack写道:

To unsubscribe from this group and stop receiving emails from it, send an email to cp...@googlegroups.com.

Alfio Lazzaro

unread,
Apr 10, 2020, 3:53:23 AM4/10/20
to cp2k
CUDA requires C++, so you have to set the CXXFLAGS.

(the arch file is reported at the beginning)
Basically, the line is:

CXXFLAGS    = -O2 -std=c++11 -D__CUDA

BTW, you have a legacy macro, you are using CUDA 9, so you don't need -D__HAS_PATCHED_CUFFT_70.

Best regards,

Alfio

egbertchang

unread,
Apr 11, 2020, 4:32:53 AM4/11/20
to cp2k
thank you, the problem was fixed after i following your advise,  however now it showed this mistake

ar: cublas.o: No such file or directory
   

but my cuda lib have the cublas lib 
libcublas_device.a     
libcublas.so            
libcublas.so.9.0       
libcublas.so.9.0.176 


在 2020年4月10日星期五 UTC+8下午3:53:23,Alfio Lazzaro写道:

Alfio Lazzaro

unread,
Apr 12, 2020, 4:31:46 AM4/12/20
to cp2k
This is not the library, it is the compilation of the file cublas.cu (the file is at exts/dbcsr/src/acc/cublaswrap).
I assume something went wrong in the compilation.
Could you run a 

make -j 32   ARCH=Linux-x86-64-intel VERSION=popt distclean

and then recompile again? You can also dum the make.log and attach here:

make -j 32   ARCH=Linux-x86-64-intel VERSION=popt > make.log

Alfio

egbertchang

unread,
Apr 12, 2020, 6:05:15 AM4/12/20
to cp2k
Dear Alfio 

here is my make.log 




在 2020年4月12日星期日 UTC+8下午4:31:46,Alfio Lazzaro写道:
make.log

Alfio Lazzaro

unread,
Apr 12, 2020, 3:42:56 PM4/12/20
to cp2k
From what I can see, you are compiling cublas.cu via

nvcc -c --std=c++11 -O3 --cuda -keep --dryrun -w -g  -I'/gpfs/users_home/20116/cp2k-7.1-icc17u4/cp2k-7.1/exts/dbcsr/src' /gpfs/users_home/20116/cp2k-7.1-icc17u4/cp2k-7.1/exts/dbcsr/src/acc/cublaswrap/cublas.cu

I'm not a nvcc expert, but from the help I found that:

--cuda  (-cuda)                         
        Compile all .cu input files to .cu.cpp.ii output.

Is there any reason why you added this flag? I think it avoids generating the canonical .o file, hence the error you get...
Could you try without it?

Alfio

egbertchang

unread,
Apr 13, 2020, 5:25:01 AM4/13/20
to cp2k
thank so much for your great advise, the mistake has gone 

however after installation, i Run the cp2k.popt , it shows:

ABORT in dbcsr_lib.F:187 DBCSR compiled w/ threading support while libcusmm com
 piled w/o threading support.

should i compile with CXXOMPFLAGS? 

在 2020年4月13日星期一 UTC+8上午3:42:56,Alfio Lazzaro写道:

Alfio Lazzaro

unread,
Apr 13, 2020, 3:23:28 PM4/13/20
to cp2k
Ah, sorry, I thought you ere doing POPT (i.e. no OpenMP) version...

Well, no just that:
1. Need to add OpenMP flag to CXXFLAGS (yes, you are right)
2. Need to add OpenMP flag for NVFLAGS host compilation, i.e. add -Xcompiler='-fopenmp'

Alfio

egbertchang

unread,
Apr 13, 2020, 9:11:27 PM4/13/20
to cp2k
it's working 

i really appreciate for your help.

thank you so much!

在 2020年4月14日星期二 UTC+8上午3:23:28,Alfio Lazzaro写道:
Reply all
Reply to author
Forward
0 new messages