[CP2K-user] cp2k-7.1 compilation error

leyu liu liu-... at mails.tsinghua.edu.cn
Sat Sep 26 13:08:20 UTC 2020



Dear all,
When i install cp2k-7.1 with intel compiler 2020 and intel MKL (and also i 
have installed libxsmm-1.16, libxc-4.3.4, libinit-v2.6.0-cp2k-lmax-6 and 
elpa-2020.05.001 by myself), i always get the following errors:

`Updating archive 
/home/liuly/opt/cp2k-7.1/lib/Linux-x86-64-intelx/psmp/libcp2kfpga.a
/home/liuly/opt/cp2k-7.1/src/sockets.c(73): error: incomplete type is not 
allowed
struct addrinfo hints, *res;
^

xiar: executing 'ar'
/home/liuly/opt/cp2k-7.1/src/sockets.c(79): error: identifier "AI_PASSIVE" 
is undefined
hints.ai_flags = AI_PASSIVE;
^

/home/liuly/opt/cp2k-7.1/src/sockets.c(82): warning #266 
<https://github.com/cp2k/cp2k/pull/266>: function "getaddrinfo" declared 
implicitly
ai_err = getaddrinfo(host, service, &hints, &res);
^

/home/liuly/opt/cp2k-7.1/src/sockets.c(86): error: pointer to incomplete 
class type is not allowed
sockfd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
^

/home/liuly/opt/cp2k-7.1/src/sockets.c(86): error: pointer to incomplete 
class type is not allowed
sockfd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
^

/home/liuly/opt/cp2k-7.1/src/sockets.c(86): error: pointer to incomplete 
class type is not allowed
sockfd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
^

/home/liuly/opt/cp2k-7.1/src/sockets.c(90): error: pointer to incomplete 
class type is not allowed
if (connect(sockfd, res->ai_addr, res->ai_addrlen) < 0) { perror("Error 
opening INET socket: wrong port or server unreachable"); exit(-1); }
^

/home/liuly/opt/cp2k-7.1/src/sockets.c(90): error: pointer to incomplete 
class type is not allowed
if (connect(sockfd, res->ai_addr, res->ai_addrlen) < 0) { perror("Error 
opening INET socket: wrong port or server unreachable"); exit(-1); }
^

/home/liuly/opt/cp2k-7.1/src/sockets.c(91): warning #266 
<https://github.com/cp2k/cp2k/pull/266>: function "freeaddrinfo" declared 
implicitly
freeaddrinfo(res);
^

/home/liuly/opt/cp2k-7.1/src/sockets.c(163): error: incomplete type is not 
allowed
struct timespec wt, rem;
^

/home/liuly/opt/cp2k-7.1/src/sockets.c(163): error: incomplete type is not 
allowed
struct timespec wt, rem;
^

/home/liuly/opt/cp2k-7.1/src/sockets.c(165): warning #266 
<https://github.com/cp2k/cp2k/pull/266>: function "nanosleep" declared 
implicitly
rn = nanosleep(&wt, &rem);
^

ar: creating 
/home/liuly/opt/cp2k-7.1/lib/Linux-x86-64-intelx/psmp/libcp2kfpga.a
/home/liuly/opt/cp2k-7.1/.inject.sh dbcsr_ -DNDEBUG mpiifort -c -align 
array64byte -complex-limited-range -free -fpp -threads -qopenmp-simd 
-qopt-matmul -fopenmp -O3 -xHost -qopt-zmm-usage=low -D__parallel 
-D__SCALAPACK -D__MPI_VERSION=3 -D__INTEL -D__LIBINT -D__MAX_CONTR=4 
-D__LIBXC -D__ELPA -D__LIBXSMM=1 -D_OPENMP_SIMD -D__MKL -D__FFTW3 
-I/home/liuly/opt/cp2k-7.1/obj/Linux-x86-64-intelx/psmp/exts/dbcsr 
-I/home/liuly/opt/libint/intel-skx/include 
-I/home/liuly/opt/libxc/intel-skx/include 
-I/home/liuly/opt/elpa/intel-skx-omp/include/elpa/elpa/ 
-I/home/liuly/opt/elpa/intel-skx-omp/include/elpa/elpa/../modules 
-I/home/liuly/opt/cp2k-7.1/lib/Linux-x86-64-intelx/psmp/libxsmm/include 
-I/opt/intel/2020u2/compilers_and_libraries_2020.2.254/linux/mkl/include 
-I/opt/intel/2020u2/compilers_and_libraries_2020.2.254/linux/mkl/include/fftw 
-diag-disable 8290,8291,10010,10212,10411,11060 
-D__COMPILE_ARCH=""Linux-x86-64-intelx"" -D__COMPILE_DATE=""Sat Sep 26 
13:52:11 CST 2020"" -D__COMPILE_HOST=""mu01"" 
-D__COMPILE_REVISION=""git:e635599"" 
-D__DATA_DIR=""/home/liuly/opt/cp2k-7.1/data"" 
-D__SHORT_FILE__=""pilaenv_hack.F"" -I'/home/liuly/opt/cp2k-7.1/src/' 
-I'/home/liuly/opt/cp2k-7.1/obj/Linux-x86-64-intelx/psmp/exts/dbcsr' 
pilaenv_hack.F90
compilation aborted for /home/liuly/opt/cp2k-7.1/src/sockets.c (code 2)
make[3]: *** [sockets.o] Error 2
make[3]: *** Waiting for unfinished jobs....
xiar: executing 'ar'
make[2]: *** [all] Error 2
make[1]: *** [psmp] Error 2
make: *** [all] Error 2
`
I have struggled for these errors many days, could anyone give me some 
suggestions to solve them?
Thanks a lot !!!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20200926/c3f8d8b0/attachment.htm>


More information about the CP2K-user mailing list