<div dir="ltr">Hi,<div><br></div><div>I am trying to install cp2k locally. I have successfully installed cp2k using spack but as I need to modify parts of the source code, a local installation makes things easier.</div><div><br></div><div><b>Some system information:</b></div><div><br></div><div><span style="background-color: rgb(238, 238, 238);">$ lsb_release -a: </span></div><div><div><div><span style="background-color: rgb(238, 238, 238);">LSB Version:    :core-4.1-amd64:core-4.1-ia32:core-4.1-noarch</span></div><div><span style="background-color: rgb(238, 238, 238);">Distributor ID: CentOS</span></div><div><span style="background-color: rgb(238, 238, 238);">Description:    CentOS Linux release 7.6.1810 (Core)</span></div><div><span style="background-color: rgb(238, 238, 238);">Release:        7.6.1810</span></div><div><span style="background-color: rgb(238, 238, 238);">Codename:       Core</span></div><div><span style="background-color: rgb(238, 238, 238);">$ uname -a:</span></div></div></div><div><div><span style="background-color: rgb(238, 238, 238);">Linux arthemis.localdomain 5.0.10-1.el7.elrepo.x86_64 #1 SMP Sat Apr 27 08:40:16 EDT 2019 x86_64 x86_64 x86_64 GNU/Linux</span></div><div><br></div><div><b>Compilers/libraries</b>:</div></div><div><br></div><div><span style="background-color: rgb(238, 238, 238);">$ gfortran --version</span></div><div><div><span style="background-color: rgb(238, 238, 238);">gcc (GCC) 9.2.0</span></div><div><span style="background-color: rgb(238, 238, 238);">Copyright (C) 2019 Free Software Foundation, Inc.</span></div><div><span style="background-color: rgb(238, 238, 238);">This is free software; see the source for copying conditions.  There is NO</span></div><div><span style="background-color: rgb(238, 238, 238);">warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</span></div></div><div><span style="background-color: rgb(238, 238, 238);">$ mpif90 --showme</span></div><div><div><span style="background-color: rgb(238, 238, 238);">/root/usr/bin/gfortran -I/root/usr/spack/opt/spack/linux-centos7-x86_64/gcc-9.2.0/openmpi-4.0.1-v5ndqdyuke2sz3umfee2sigg3ymt2qnd/include -fexceptions -pthread -I/root/usr/spack/opt/spack/linux-centos7-x86_64/gcc-9.2.0/openmpi-4.0.1-v5ndqdyuke2sz3umfee2sigg3ymt2qnd/lib -L/root/usr/spack/opt/spack/linux-centos7-x86_64/gcc-9.2.0/hwloc-1.11.11-relc7hrklipjovl3gbzppgxjb55pc24t/lib -L/root/usr/spack/opt/spack/linux-centos7-x86_64/gcc-9.2.0/zlib-1.2.11-j3zdmzqsbyenjda44kvkceohj352n5ga/lib -Wl,-rpath -Wl,/root/usr/spack/opt/spack/linux-centos7-x86_64/gcc-9.2.0/hwloc-1.11.11-relc7hrklipjovl3gbzppgxjb55pc24t/lib -Wl,-rpath -Wl,/root/usr/spack/opt/spack/linux-centos7-x86_64/gcc-9.2.0/zlib-1.2.11-j3zdmzqsbyenjda44kvkceohj352n5ga/lib -Wl,-rpath -Wl,/root/usr/spack/opt/spack/linux-centos7-x86_64/gcc-9.2.0/openmpi-4.0.1-v5ndqdyuke2sz3umfee2sigg3ymt2qnd/lib -L/root/usr/spack/opt/spack/linux-centos7-x86_64/gcc-9.2.0/openmpi-4.0.1-v5ndqdyuke2sz3umfee2sigg3ymt2qnd/lib -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmp</span>i</div></div><div><br></div><div>I am using Openmpi-4.0.1</div><div><span style="background-color: rgb(238, 238, 238);"><br></span></div><div>I am compiling with the following optional libraries: FFTW3, libint, libxc, Scalpack. Attached is the arch file.</div><div><br></div><div><b>Steps to reproduce error:</b></div><div><br></div><div><span style="background-color: rgb(238, 238, 238);">$ make ARCH=Linux-x86-64-gfortran VERSION=popt</span></div><div><span style="background-color: rgb(238, 238, 238);">...</span></div><div><span style="background-color: rgb(238, 238, 238);">...</span></div><div><div><span style="background-color: rgb(238, 238, 238);">mpif90 -D__F2008 -D__FFTW3 -D__LIBINT -D__LIBXC -D__MPI_VERSION=3 -D__LIBINT_MAX_AM=7 -D__LIBDERIV_MAX_AM1=6 -D__MAX_CONTR=4 -D__parallel -D__SCALAPACK  -O2 -ffast-math -ffree-form -ffree-line-length-none -ftree-vectorize -funroll-loops -mtune=native -std=f2008 -I/root/tmp/fftw-3.3.5/include -I/root/tmp/libint-1.1.4/include -I/root/tmp/libxc/include  -D__COMPILE_ARCH="\"Linux-x86-64-gfortran\"" -D__COMPILE_DATE="\"Mon Sep 16 11:46:43 IDT 2019\"" -D__COMPILE_HOST="\"arthemis.localdomain\"" -D__COMPILE_REVISION="\"svn:18464\"" -D__DATA_DIR="\"/root/tmp/cp2k-6.1.0/share/cp2k-6.1.0/data\"" -static -L/root/tmp/cp2k-6.1.0/share/cp2k-6.1.0/lib/Linux-x86-64-gfortran/popt -o /root/tmp/cp2k-6.1.0/share/cp2k-6.1.0/exe/Linux-x86-64-gfortran/dbcsr_example_1.popt dbcsr_example_1.o  -ldbcsr -ldbcsrmm -ldbcsrops -ldbcsrbblock -ldbcsrbdist -ldbcsrbase -ldbcsrdata -lcp2kmpiwrap -lmicsmm -lclsmm -lcp2kacc -lcp2kaccmic -lcp2kaccopencl -lcp2kbase /root/tmp/scalapack-2.0.2/lib/libscalapack.a /root/tmp/blas/lib/liblapack.a /root/tmp/blas/lib/libblas.a /root/tmp/fftw-3.3.5/lib/libfftw3.a /root/tmp/libxc/lib/libxcf03.a /root/tmp/libxc/lib/libxc.a /root/tmp/libint-1.1.4/lib/libderiv.a /root/tmp/libint-1.1.4/lib/libint.a -ldl</span></div><div><span style="background-color: rgb(238, 238, 238);">/usr/bin/ld: cannot find -lhwloc</span></div></div><div><br></div><div><b>What I've tried:</b></div><div><ul><li>Linking explicity libhwloc</li><ul><li> based on the  <span style="background-color: rgb(238, 238, 238);">mpif90 --showme</span><span style="background-color: rgb(255, 255, 255);"> output, add: </span><span style="background-color: rgb(238, 238, 238);">-L/root/usr/spack/opt/spack/linux-centos7-x86_64/gcc-9.2.0/hwloc-1.11.11-relc7hrklipjovl3gbzppgxjb55pc24t/lib -lhwloc</span></li><li>This only an additional error message: <span style="background-color: rgb(238, 238, 238);">/usr/bin/ld: cannot find -lhwloc</span></li></ul><li>Add the path to LD_LIBRAR_PATH</li><ul><li><span style="background-color: rgb(238, 238, 238);">export LD_LIBRARY_PATH=/root/usr/spack/opt/spack/linux-centos7-x86_64/gcc-9.2.0/hwloc-1.11.11-relc7hrklipjovl3gbzppgxjb55pc24t/lib:$LD_LIBRARY_PATH</span></li><li>No change</li></ul><li>Execute ldd command to all lib* to make sure libhwloc is well linked. </li></ul><div>Any help is appreciated. Thanks</div></div><div><span style="background-color: rgb(238, 238, 238);"><br></span></div><div><span style="background-color: rgb(238, 238, 238);"><br></span></div><div><span style="background-color: rgb(238, 238, 238);"><br></span></div><div><br></div><div><br></div></div>