[CP2K-user] [CP2K:16527] Difficulties with Install & existing libraries

Krack Matthias (PSI) matthias.krack at psi.ch
Sat Jan 29 17:03:26 UTC 2022


Hello Sam

It is difficult to guess what’s wrong from the info you provided.
In case you have a standard GNU/Linux system, you can try to install the current CP2K trunk version running


  *   git clone --recursive https://github.com/cp2k/cp2k.git cp2k
  *   cd cp2k
  *   source arch/Linux-gnu-x86_64.psmp
  *   make -j ARCH=Linux-gnu-x86_64 VERSION=psmp

Did you try that already?

Matthias

Von: cp2k at googlegroups.com <cp2k at googlegroups.com> Im Auftrag von Sam Broderick
Gesendet: Samstag, 29. Januar 2022 15:14
An: cp2k <cp2k at googlegroups.com>
Betreff: Re: [CP2K:16527] Difficulties with Install & existing libraries

My saga with installation continued. I got a weird interaction between -llapack and -lscalapack.

If I'm not mistaken, at least some other codes handle scalapack as optional per a direction in the input code.
Apparently, it causes issues for cp2k and I got errors complaining about:

undefined reference to `std::ios_base::Init::Init()'

starting with `_GLOBAL__sub_I_libint2_build_default' and 3891 more.

If I remove -llapack, it goes away. Any thoughts or comments?
On Friday, January 28, 2022 at 2:15:53 PM UTC+1 Sam Broderick wrote:
Thanks! That did the trick!

I had used --enable-fortran per the command line help, but it apparently was ignored.

Rgds
Sam
On Thursday, January 27, 2022 at 5:34:14 PM UTC+1 Matthias Krack wrote:
Hi

The libint installer sometimes fails to build the Fortran interface, i.e. the module file libint_f.mod. The installer (makefile) uses the CXX instead of the Fortran linker to generate the module file which does not work in all cases. Change to the libint-2.6.0 build folder and run “make fortran” there. This should generate a libint_f.mod file in the subfolder libint-2.6.0/fortran which is installed (copied) after “make install”.

I don’t see any --D__SCALAPACK flag in your arch file which is required for parallel builds (-D__parallel) using MPI.

HTH

Matthias

Von: cp... at googlegroups.com<mailto:cp... at googlegroups.com> <cp... at googlegroups.com<mailto:cp... at googlegroups.com>> Im Auftrag von Sam Broderick
Gesendet: Donnerstag, 27. Januar 2022 16:53
An: cp2k <cp... at googlegroups.com<mailto:cp... at googlegroups.com>>
Betreff: [CP2K:16517] Difficulties with Install & existing libraries

Good Evening!

After much reading, searching (this list, too) and trial-and-error, I am still unable to install cp2k. While I am hardly an expert, I have had success in installing a variety of packages such as blas/fftw/gcc11.2/gsl/hdf/lapack/libint/libxc/netcdf/openmpi/pfft/scalapack.

The crux of the issue is convincing the CP2K v9.1 to link to external libraries. From the best I can tell, my arch file leaves make wanting to use source code, e.g.:

/home/sam/Downloads/cp2k/cp2k-9.1/src/libint_wrapper.F:31:8:

   31 |    USE libint_f, ONLY: &
      |        1
Fatal Error: Cannot open module file ‘libint_f.mod’ for reading at (1): No such file or directory
compilation terminated.

I already have linint and libxc installed. My fairly short arch file (Linux-x86-64-mpifort.psmp) is below.

Does anyone see what I am doing wrong?

Many thanks,
Sam Broderick

CC       := mpicc
CXX      := mpic++ -g
FC       := mpifort
LD       := mpifort
AR       := ar -r
DFLAGS   := -D__NO_STATM_ACCESS -D__parallel -D__MPI_VERSION=3
DFLAGS   += -D__LIBXC
DFLAGS   += -D__LIBINT
DFLAGS   += -D__FFTW3

LIBXC_INC      := /opt/extlib/libxc/5.1.7/mpicc/4.1.1/gcc/11.2.0/include
LIBINT_INC     := /opt/extlib/libint/2.6.0/mpicc/4.1.1/gcc/11.2.0/include
FFTW_INC       := /opt/extlib/fftw/3.3.10/mpicc/4.1.1/gcc/11.2.0/include

CFLAGS   := -fopenmp
CFLAGS   += -I$(LIBINT_INC)
CFLAGS   += -I$(LIBXC_INC)
CFLAGS   += -I$(FFTW_INC)

FCFLAGS  := -O2 -funroll-loops -ftree-vectorize -march=native -ffree-form $(DFLAGS) $(CFLAGS)
LDFLAGS  := $(FCFLAGS)

LIBXC_LIB      := /opt/extlib/libxc/5.1.7/mpicc/4.1.1/gcc/11.2.0/lib
LIBINT_LIB     := /opt/extlib/libint/2.6.0/mpicc/4.1.1/gcc/11.2.0/lib
FFTW_LIB       := /opt/extlib/fftw/3.3.10/mpicc/4.1.1/gcc/11.2.0/lib
BLAS_LIB       := /opt/extlib/blas/3.10.0/mpicc/4.1.1/gcc/11.2.0/lib
SCALAPACK_LIB  := /opt/extlib/scalapack/2.1.0/mpicc/4.1.1/gcc/11.2.0/lib
LAPACK_LIB     := /opt/extlib/lapack/3.10.0/mpicc/4.1.1/gcc/11.2.0/lib

LIBS     := -llapack -lblas -lscalapack -lfftw3 -lfftw3_omp -lmpi
LIBS     += -Wl,-rpath=$(LIBXC_LIB) -L$(LIBXC_LIB) -lxcf03 -lxc
LIBS     += -Wl,-rpath=$(LIBINT_LIB) -L$(LIBINT_LIB) -lint2
LIBS     += -Wl,-rpath=$(FFTW_LIB) -L$(FFTW_LIB) -lfftw3_mpi -lfftw3_omp -lfftw3
LIBS     += -Wl,-rpath=$(SCALAPACK_LIB) -L$(SCALAPACK_LIB) -lscalapack
LIBS     += -Wl,-rpath=$(LAPACK_LIB) -L$(LAPACK_LIB) -llapack
LIBS     += -Wl,-rpath=$(BLAS_LIB) -L$(BLAS_LIB) -lblas
--
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... at googlegroups.com<mailto:cp2k+uns... at googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/29efe32b-d4eb-40a0-9024-bb9dc45e4e60n%40googlegroups.com<https://groups.google.com/d/msgid/cp2k/29efe32b-d4eb-40a0-9024-bb9dc45e4e60n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
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+unsubscribe at googlegroups.com<mailto:cp2k+unsubscribe at googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/b77db556-b193-47d0-9004-57d340cafa25n%40googlegroups.com<https://groups.google.com/d/msgid/cp2k/b77db556-b193-47d0-9004-57d340cafa25n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/caf53a2f162d4b399cb7fb4062e3cd6f%40psi.ch.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20220129/4839fccc/attachment.htm>


More information about the CP2K-user mailing list