[CP2K-user] toolchain script can't find system libraries
Ryan Kingsbury
RKing... at lbl.gov
Thu Mar 26 16:25:38 UTC 2020
I'm trying to compile cp2k on Ubuntu (under Windows10 WSL) using the
toolchain script, and I've run into several problems in which it seems the
toolchain script and build system don'tt recognize system installed
libraries.
For example, when running the toolchain script, building fftw3 fails
because it can't find the MPI library:
==================== Installing FFTW ====================
fftw-3.3.8.tar.gz is found
Installing from scratch into /home/ryan/anaconda3/envs/cp2k-2/code/cp2k-7.1/
tools/toolchain/install/fftw-3.3.8
ERROR: (./scripts/install_fftw.sh, line 45) Non-zero exit code detected.
examining the FFTW3 log shows:
checking for ranlib... (cached) /home/ryan/anaconda3/envs/cp2k-2/bin/x86_64-
conda_cos6-linux-gnu-ranlib
checking for ocamlbuild... no
checking for mpicc... mpicc
checking for MPI_Init... no
checking for MPI_Init in -lmpi... no
checking for MPI_Init in -lmpich... no
configure: error: could not find mpi library for --enable-mpi
but I know that the toolchain script detected my (system-installed) MPI
because I see the following in stdout:
>>> ./install_cp2k_toolchain.sh --gpu-ver=P100 --with-openblas=no
MPI is detected and it appears to be OpenMPI
nvcc found, enabling CUDA by default
Compiling with 4 processes.
==================== Finding GCC from system paths ====================
path to gcc is /home/ryan/anaconda3/envs/cp2k-2/bin/gcc
path to g++ is /usr/bin/g++
path to gfortran is /home/ryan/anaconda3/envs/cp2k-2/bin/gfortran
Found include directory /usr/include
Step gcc took 0.00 seconds.
==================== Getting proc arch info using OpenBLAS tools
====================
OpenBLAS detected LIBCORE = haswell
OpenBLAS detected ARCH = x86_64
==================== Installing CMake ====================
cmake-3.15.1 is already installed, skipping it.
Step cmake took 0.00 seconds.
Step valgrind took 0.00 seconds.
==================== Finding OpenMPI from system paths ====================
path to mpirun is /usr/bin/mpirun
path to mpicc is /usr/bin/mpicc
path to mpif90 is /usr/bin/mpif90
path to mpic++ is /usr/bin/mpic++
Step openmpi took 0.00 seconds.
Step reflapack took 0.00 seconds.
Step openblas took 0.00 seconds.
To circumvent the build problems, I tried installing binary packages for
fftw3, libxc, libint, etc. from the Ubuntu repositories. But if I run make
it seems that the /include directories are not set properly:
>> make ARCH=Linux-x86-64-gfortran version='sopt ssmp popt'
Discovering programs ...
Removing stale archives for sopt ...
Resolving dependencies for sopt ...
make -C /home/ryan/anaconda3/envs/cp2k-2/code/cp2k-7.1/exts/dbcsr \
INCLUDEMAKE=/home/ryan/anaconda3/envs/cp2k-2/code/cp2k-7.1/arch/Linux-x86
-64-gfortran.sopt \
LIBDIR=/home/ryan/anaconda3/envs/cp2k-2/code/cp2k-7.1/lib/Linux-x86-64-
gfortran/sopt/exts/dbcsr \
OBJDIR=/home/ryan/anaconda3/envs/cp2k-2/code/cp2k-7.1/obj/Linux-x86-64-
gfortran/sopt/exts/dbcsr \
FYPPEXE=/home/ryan/anaconda3/envs/cp2k-2/code/cp2k-7.1/tools/build_utils/
fypp
Removing stale archives ...
Resolving dependencies ...
/home/ryan/anaconda3/envs/cp2k-2/code/cp2k-7.1/tools/build_utils/fypp -n /
home/ryan/anaconda3/envs/cp2k-2/code/cp2k-7.1/exts/dbcsr/src/base/
dbcsr_kinds.F dbcsr_kinds.F90
gfortran -c -O2 -g -mtune=native -D__FFTW3 -D__LIBINT -D__LIBXC -D__LIBXSMM
-D__SPGLIB -ffree-form -ffree-line-length-none -ftree-vectorize -funroll-loops
-std=f2008 -I/fftw/3.3/include -I/libint/2.6.0-lmax-6/include -I/libxc/4.3.4
/include -I/libxsmm/1.14/include -D__SHORT_FILE__="\"dbcsr_kinds.F\"" -I
'/home/ryan/anaconda3/envs/cp2k-2/code/cp2k-7.1/exts/dbcsr/src/base/' -I
'/home/ryan/anaconda3/envs/cp2k-2/code/cp2k-7.1/exts/dbcsr/src' dbcsr_kinds.
F90
f951: Warning: Nonexistent include directory '/fftw/3.3/include' [-Wmissing-
include-dirs]
f951: Warning: Nonexistent include directory '/libint/2.6.0-lmax-6/include'
[-Wmissing-include-dirs]
f951: Warning: Nonexistent include directory '/libxc/4.3.4/include' [-
Wmissing-include-dirs]
f951: Warning: Nonexistent include directory '/libxsmm/1.14/include' [-
Wmissing-include-dirs]
/home/ryan/anaconda3/envs/cp2k-2/code/cp2k-7.1/tools/build_utils/fypp -n /
home/ryan/anaconda3/envs/cp2k-2/code/cp2k-7.1/exts/dbcsr/src/base/
dbcsr_machine_internal.F dbcsr_machine_internal.F90
gfortran -c -O2 -g -mtune=native -D__FFTW3 -D__LIBINT -D__LIBXC -D__LIBXSMM
-D__SPGLIB -ffree-form -ffree-line-length-none -ftree-vectorize -funroll-loops
-std=f2008 -I/fftw/3.3/include -I/libint/2.6.0-lmax-6/include -I/libxc/4.3.4
/include -I/libxsmm/1.14/include -D__SHORT_FILE__=
"\"dbcsr_machine_internal.F\"" -I
'/home/ryan/anaconda3/envs/cp2k-2/code/cp2k-7.1/exts/dbcsr/src/base/' -I
'/home/ryan/anaconda3/envs/cp2k-2/code/cp2k-7.1/exts/dbcsr/src'
dbcsr_machine_internal.F90
f951: Warning: Nonexistent include directory '/fftw/3.3/include' [-Wmissing-
include-dirs]
f951: Warning: Nonexistent include directory '/libint/2.6.0-lmax-6/include'
[-Wmissing-include-dirs]
f951: Warning: Nonexistent include directory '/libxc/4.3.4/include' [-
Wmissing-include-dirs]
f951: Warning: Nonexistent include directory '/libxsmm/1.14/include' [-
Wmissing-include-dirs]
/home/ryan/anaconda3/envs/cp2k-2/code/cp2k-7.1/tools/build_utils/fypp -n /
home/ryan/anaconda3/envs/cp2k-2/code/cp2k-7.1/exts/dbcsr/src/base/
dbcsr_machine.F dbcsr_machine.F90
gfortran -c -O2 -g -mtune=native -D__FFTW3 -D__LIBINT -D__LIBXC -D__LIBXSMM
-D__SPGLIB -ffree-form -ffree-line-length-none -ftree-vectorize -funroll-loops
-std=f2008 -I/fftw/3.3/include -I/libint/2.6.0-lmax-6/include -I/libxc/4.3.4
/include -I/libxsmm/1.14/include -D__SHORT_FILE__="\"dbcsr_machine.F\"" -I
'/home/ryan/anaconda3/envs/cp2k-2/code/cp2k-7.1/exts/dbcsr/src/base/' -I
'/home/ryan/anaconda3/envs/cp2k-2/code/cp2k-7.1/exts/dbcsr/src'
dbcsr_machine.F90
f951: Warning: Nonexistent include directory '/fftw/3.3/include' [-Wmissing-
include-dirs]
f951: Warning: Nonexistent include directory '/libint/2.6.0-lmax-6/include'
[-Wmissing-include-dirs]
f951: Warning: Nonexistent include directory '/libxc/4.3.4/include' [-
Wmissing-include-dirs]
f951: Warning: Nonexistent include directory '/libxsmm/1.14/include' [-
Wmissing-include-dirs]
dbcsr_machine.F90:62:10:
#if defined(__LIBXSMM)
1
Fatal Error: Can't open module file 'libxsmm.mod' for reading at (1): No
such file or directory
compilation terminated.
/home/ryan/anaconda3/envs/cp2k-2/code/cp2k-7.1/exts/dbcsr/Makefile:428:
recipe for target 'dbcsr_machine.o' failed
make[4]: *** [dbcsr_machine.o] Error 1
Makefile:129: recipe for target 'libdbcsr' failed
make[3]: *** [libdbcsr] Error 2
/home/ryan/anaconda3/envs/cp2k-2/code/cp2k-7.1/exts/Makefile.inc:16: recipe
for target 'dbcsr' failed
make[2]: *** [dbcsr] Error 2
/home/ryan/anaconda3/envs/cp2k-2/code/cp2k-7.1/Makefile:123: recipe for
target 'sopt' failed
make[1]: *** [sopt] Error 2
Makefile:118: recipe for target 'all' failed
make: *** [all] Error 2
How can I make sure the toolchain script and/or build system recognize
system-installed libraries? Thanks in advance for your assistance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20200326/a243f88d/attachment.htm>
More information about the CP2K-user
mailing list