Compilation error version 8.1

181 views
Skip to first unread message

Lucas Wu

unread,
Jan 14, 2021, 2:00:14 PM1/14/21
to cp2k
Dear all,

I'm having an error when compiling cp2k-8.1 on centos7. 

Here's the error message:

/home/wu801/Software/cp2k-8.1/lib/local/sdbg/exts/dbcsr/libdbcsr.a(dbcsr_mpiwrap.o): In function `__dbcsr_mpiwrap_MOD_mp_abort':

/home/wu801/Software/cp2k-8.1/exts/dbcsr/src/mpi/dbcsr_mpiwrap.F:757: undefined reference to `_gfortran_stop_numeric_f08'

/usr/bin/ld: link errors found, deleting executable `/home/wu801/Software/cp2k-8.1/exe/local/cp2k.sdbg'

/usr/bin/sha1sum: /home/wu801/Software/cp2k-8.1/exe/local/cp2k.sdbg: No such file or directory

collect2: error: ld returned 1 exit status

make[3]: *** [/home/wu801/Software/cp2k-8.1/exe/local/cp2k.sdbg] Error 1

make[3]: *** Waiting for unfinished jobs....

/home/wu801/Software/cp2k-8.1/lib/local/sdbg/exts/dbcsr/libdbcsr.a(dbcsr_mpiwrap.o): In function `__dbcsr_mpiwrap_MOD_mp_abort':

/home/wu801/Software/cp2k-8.1/exts/dbcsr/src/mpi/dbcsr_mpiwrap.F:757: undefined reference to `_gfortran_stop_numeric_f08'

/usr/bin/ld: link errors found, deleting executable `/home/wu801/Software/cp2k-8.1/exe/local/libcp2k_unittest.sdbg'

/usr/bin/sha1sum: /home/wu801/Software/cp2k-8.1/exe/local/libcp2k_unittest.sdbg: No such file or directory

collect2: error: ld returned 1 exit status

make[3]: *** [/home/wu801/Software/cp2k-8.1/exe/local/libcp2k_unittest.sdbg] Error 1

make[2]: *** [all] Error 2

make[1]: *** [sdbg] Error 2

make: *** [all] Error 2



My ARCH file is:

CC          = mpicc

CXX         = mpiCC

AR          = ar -r

FC          = mpif90

LD          = mpif90

#

DFLAGS      = -D__LIBXSMM   -D__FFTW3  -D__LIBINT -D__LIBXC       -D__SPGLIB -D__LIBVORI   -D__HAS_IEEE_EXCEPTIONS -D__CHECK_DIAG 

#

WFLAGS      = -Werror=aliasing -Werror=ampersand -Werror=c-binding-type -Werror=intrinsic-shadow -Werror=intrinsics-std -Werror=line-truncation -Werror=tabs -Werror=target-lifetime -Werror=underflow -Werror=unused-but-set-variable -Werror=unused-variable -Werror=unused-dummy-argument -Werror=conversion -Werror=zerotrip -Wno-maybe-uninitialized -Wuninitialized -Wuse-without-only 

#

FCDEBFLAGS  = -fbacktrace -ffree-form -fimplicit-none -std=f2008 -fsanitize=leak -fcheck=all,no-array-temps -ffpe-trap=invalid,zero,overflow -finit-real=snan -finit-integer=-42 -Werror=realloc-lhs -finline-matmul-limit=0

CFLAGS      = -march=native -mtune=native -fno-omit-frame-pointer -g  -O1  -fopenmp   -I'/home/wu801/Software/cp2k-8.1/tools/toolchain/install/openblas-0.3.10/include' -I'/apps/spack/brown/apps/fftw/3.3.7-gcc-6.3.0-d6vmivd/include' -I'/home/wu801/Software/cp2k-8.1/tools/toolchain/install/libint-v2.6.0-cp2k-lmax-5/include' -I'/home/wu801/Software/cp2k-8.1/tools/toolchain/install/libxc-4.3.4/include' -I'/home/wu801/Software/cp2k-8.1/tools/toolchain/install/libxsmm-1.16.1/include' -I'/home/wu801/Software/cp2k-8.1/tools/toolchain/install/cosma-2.2.0/include'  -I'/home/wu801/Software/cp2k-8.1/tools/toolchain/install/gsl-2.6/include' -I/home/wu801/Software/cp2k-8.1/tools/toolchain/install/hdf5-1.12.0/include  -I/home/wu801/Software/cp2k-8.1/tools/toolchain/install/spglib-1.16.0/include -I'/home/wu801/Software/cp2k-8.1/tools/toolchain/install/SpFFT-0.9.13/include'  -std=c99 -Wall -Wextra -Werror $(DFLAGS)

FCFLAGS     = -march=native -mtune=native -fno-omit-frame-pointer -g  -O1  -fopenmp   -I'/home/wu801/Software/cp2k-8.1/tools/toolchain/install/openblas-0.3.10/include' -I'/apps/spack/brown/apps/fftw/3.3.7-gcc-6.3.0-d6vmivd/include' -I'/home/wu801/Software/cp2k-8.1/tools/toolchain/install/libint-v2.6.0-cp2k-lmax-5/include' -I'/home/wu801/Software/cp2k-8.1/tools/toolchain/install/libxc-4.3.4/include' -I'/home/wu801/Software/cp2k-8.1/tools/toolchain/install/libxsmm-1.16.1/include' -I'/home/wu801/Software/cp2k-8.1/tools/toolchain/install/cosma-2.2.0/include'  -I'/home/wu801/Software/cp2k-8.1/tools/toolchain/install/gsl-2.6/include' -I/home/wu801/Software/cp2k-8.1/tools/toolchain/install/hdf5-1.12.0/include  -I/home/wu801/Software/cp2k-8.1/tools/toolchain/install/spglib-1.16.0/include -I'/home/wu801/Software/cp2k-8.1/tools/toolchain/install/SpFFT-0.9.13/include'  $(FCDEBFLAGS) $(WFLAGS) $(DFLAGS)

#

LDFLAGS     = $(FCFLAGS) -Wl,--enable-new-dtags   -L'/home/wu801/Software/cp2k-8.1/tools/toolchain/install/openblas-0.3.10/lib' -Wl,-rpath='/home/wu801/Software/cp2k-8.1/tools/toolchain/install/openblas-0.3.10/lib' -L'/apps/spack/brown/apps/fftw/3.3.7-gcc-6.3.0-d6vmivd/lib' -Wl,-rpath='/apps/spack/brown/apps/fftw/3.3.7-gcc-6.3.0-d6vmivd/lib' -L'/home/wu801/Software/cp2k-8.1/tools/toolchain/install/libint-v2.6.0-cp2k-lmax-5/lib' -L'/home/wu801/Software/cp2k-8.1/tools/toolchain/install/libxc-4.3.4/lib' -Wl,-rpath='/home/wu801/Software/cp2k-8.1/tools/toolchain/install/libxc-4.3.4/lib' -L'/home/wu801/Software/cp2k-8.1/tools/toolchain/install/libxsmm-1.16.1/lib' -Wl,-rpath='/home/wu801/Software/cp2k-8.1/tools/toolchain/install/libxsmm-1.16.1/lib'  -L'/home/wu801/Software/cp2k-8.1/tools/toolchain/install/cosma-2.2.0/lib' -Wl,-rpath='/home/wu801/Software/cp2k-8.1/tools/toolchain/install/cosma-2.2.0/lib'  -L'/home/wu801/Software/cp2k-8.1/tools/toolchain/install/gsl-2.6/lib' -Wl,-rpath='/home/wu801/Software/cp2k-8.1/tools/toolchain/install/gsl-2.6/lib' -L'/home/wu801/Software/cp2k-8.1/tools/toolchain/install/hdf5-1.12.0/lib' -Wl,-rpath='/home/wu801/Software/cp2k-8.1/tools/toolchain/install/hdf5-1.12.0/lib'  -L'/home/wu801/Software/cp2k-8.1/tools/toolchain/install/spglib-1.16.0/lib' -Wl,-rpath='/home/wu801/Software/cp2k-8.1/tools/toolchain/install/spglib-1.16.0/lib' -L'/home/wu801/Software/cp2k-8.1/tools/toolchain/install/libvori-201229/lib' -Wl,-rpath='/home/wu801/Software/cp2k-8.1/tools/toolchain/install/libvori-201229/lib' -L'/home/wu801/Software/cp2k-8.1/tools/toolchain/install/SpFFT-0.9.13/lib' -Wl,-rpath='/home/wu801/Software/cp2k-8.1/tools/toolchain/install/SpFFT-0.9.13/lib' 

LIBS        =   -lsymspg       -lxsmmf -lxsmm -ldl -lpthread -lxcf03 -lxc -lint2  -lfftw3 -lfftw3_omp    -lopenblas -lvori -lstdc++ -lstdc++

#

FYPPFLAGS   = -n --line-marker-format=gfortran5


Could you give me advice on how to proceed?

Thank you and best regards,
Lucas Wu

Tiziano Müller

unread,
Jan 14, 2021, 2:22:28 PM1/14/21
to cp...@googlegroups.com
Hi Lucas,

can you please post the output of:

which mpif90
mpif90 --version
which python3

and/or make sure that do not have an Anaconda-environment enabled when
building CP2K?

The problem seems to be that the compiler tries to link the CP2K
executable against an older version of libgfortran. Usually the compiler
(called by the mpif90 wrapper) provides this library, which makes it a
bit weird.
One way this could happen is if some other environment with its own
libgfortran is loaded (like a conda-environment), hence checking the
compiler version.

Best,
Tiziano
> --
> 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
> <mailto:cp2k+uns...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/cp2k/1dceb6b4-8e32-4d3e-a1c4-136a4b1d9a4bn%40googlegroups.com
> <https://groups.google.com/d/msgid/cp2k/1dceb6b4-8e32-4d3e-a1c4-136a4b1d9a4bn%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
Tiziano Müller
University of Zurich
Department of Chemistry
Winterthurerstrasse 190
CH-8057 Zürich

Tel: +41 44 63 54234
www.chem.uzh.ch
tiziano...@chem.uzh.ch
Reply all
Reply to author
Forward
0 new messages