[CP2K-user] CP2K Not linked to Libint despite link flags

Nicholas Winner nwi... at berkeley.edu
Fri Jan 31 18:34:26 UTC 2020


Hello all,

I am trying to compile my own cp2k 7.1 executable. Up until now I've used 
those pre-made by my cluster admins, so I'm new to this. 

I start by trying to simply build cp2k with libint 2.6.0 support using the 
intel makefile in arch/ as a template:

LIBINT = $(HOME)/build/libint/2.6.0


CC       = cc

FC       = mpiifort

LD       = mpiifort

AR       = ar -r

DFLAGS   = -D__MKL -D__FFTW3 \

           -D__parallel -D__SCALAPACK \

           -D__LIBINT -D__MAX_CONTR=6

CFLAGS   = $(DFLAGS) -O2

FCFLAGS  = $(DFLAGS) -O2 -funroll-loops -fpp -free

FCFLAGS += -fp-model precise

FCFLAGS += -g -traceback

FCFLAGS += -I${MKLROOT}/include -I${MKLROOT}/include/fftw

FCFLAGS += -I$(LIBINT)/include

LDFLAGS  = $(FCFLAGS) -static-intel

LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main

MKL_LIB  = ${MKLROOT}/lib/intel64

LIBS    += $(MKL_LIB)/libmkl_scalapack_lp64.a -Wl,--start-group \

           $(MKL_LIB)/libmkl_intel_lp64.a ${MKL_LIB}/libmkl_sequential.a \

           $(MKL_LIB)/libmkl_core.a \

           ${MKL_LIB}/libmkl_blacs_intelmpi_lp64.a -Wl,--end-group \

           -lpthread -lm

LIBS    += -L$(LIBINT)/lib -lint2


# Required due to memory leak that occurs if high optimisations are used

mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F

                         $(FC) -c $(subst O2,O0,$(FCFLAGS)) $<


When I run make, it returns no errors and the cp2k.popt executable is 
created. But then, when I run a calculation that uses the &HF section:

*******************************************************************************

 *   ___                                                                   
    *

 *  /   \                                                                  
    *

 * [ABORT]                                                                 
    *

 *  \___/      This CP2K executable has not been linked against the 
required   *

 *    |                               library libint.                      
    *

 *  O/|                                                                    
    *

 * /| |                                                                    
    *
 * / \                                                    libint_wrapper.F:599 
* 



What am I doing wrong? The linker flags are present and libint is built, 
but still cp2k isn't linked to it? 

Any help is extremely appreciated.

Best,

*Nicholas Winner*
Graduate Student Researcher, Asta Group
Department of Materials Science and Engineering
University of California Berkeley
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20200131/afe7af49/attachment.htm>


More information about the CP2K-user mailing list