I cannot understand why it does not compile against XSMM

David T amazing... at gmail.com
Mon Apr 3 15:46:27 UTC 2017


Dear All

sorry for the not really interesting post but since this morning I am 
struggling trying to have CP2K compiled with libxsmm.

I managed to have it compiled with mkl, and fftw but somehow I cannot 
figure out what I am doing wrong with libxsmm, I tried several 
configuration but I am lost

Below my last arch file attempt, as you can see I also tried to put the 
path explicitly but still I am obtain this error:

/ichec/home/users/davide/scr/cp2k/cp2k/lib/test/xsmm/libdbcsrmm.a(dbcsr_mm_hostdrv.o): 
In function `dbcsr_mm_hostdrv_mp_dbcsr_mm_hostdrv_process_':
dbcsr_mm_hostdrv.f90:(.text+0x1c40): undefined reference to 
`libxsmm_mp_libxsmm_dmmdispatch_'
dbcsr_mm_hostdrv.f90:(.text+0x1c64): undefined reference to 
`libxsmm_mp_libxsmm_dmmavailable_'
dbcsr_mm_hostdrv.f90:(.text+0x1d28): undefined reference to 
`libxsmm_mp_libxsmm_dmmcall_'
dbcsr_mm_hostdrv.f90:(.text+0x1d9a): undefined reference to 
`libxsmm_mp_libxsmm_dmmcall_'
dbcsr_mm_hostdrv.f90:(.text+0x1fc0): undefined reference to 
`libxsmm_mp_libxsmm_dgemm_'
dbcsr_mm_hostdrv.f90:(.text+0x616d): undefined reference to 
`libxsmm_mp_libxsmm_smmdispatch_'
dbcsr_mm_hostdrv.f90:(.text+0x6191): undefined reference to 
`libxsmm_mp_libxsmm_smmavailable_'
dbcsr_mm_hostdrv.f90:(.text+0x624e): undefined reference to 
`libxsmm_mp_libxsmm_smmcall_'
dbcsr_mm_hostdrv.f90:(.text+0x62bd): undefined reference to 
`libxsmm_mp_libxsmm_smmcall_'
dbcsr_mm_hostdrv.f90:(.text+0x64d7): undefined reference to 
`libxsmm_mp_libxsmm_sgemm_'
/ichec/home/users/davide/scr/cp2k/cp2k/lib/test/xsmm/libdbcsrmm.a(dbcsr_mm_hostdrv.o): 
In function `dbcsr_mm_hostdrv_mp_xsmm_process_mm_stack_d_':
dbcsr_mm_hostdrv.f90:(.text+0xcd0a): undefined reference to 
`libxsmm_mp_libxsmm_dmmdispatch_'
dbcsr_mm_hostdrv.f90:(.text+0xcd18): undefined reference to 
`libxsmm_mp_libxsmm_dmmavailable_'
dbcsr_mm_hostdrv.f90:(.text+0xcdc4): undefined reference to 
`libxsmm_mp_libxsmm_dmmcall_'
dbcsr_mm_hostdrv.f90:(.text+0xce20): undefined reference to 
`libxsmm_mp_libxsmm_dmmcall_'
dbcsr_mm_hostdrv.f90:(.text+0xd046): undefined reference to 
`libxsmm_mp_libxsmm_dgemm_'
/ichec/home/users/davide/scr/cp2k/cp2k/lib/test/xsmm/libdbcsrmm.a(dbcsr_mm_hostdrv.o): 
In function `dbcsr_mm_hostdrv_mp_xsmm_process_mm_stack_s_':
dbcsr_mm_hostdrv.f90:(.text+0xe8fa): undefined reference to 
`libxsmm_mp_libxsmm_smmdispatch_'
dbcsr_mm_hostdrv.f90:(.text+0xe908): undefined reference to 
`libxsmm_mp_libxsmm_smmavailable_'
dbcsr_mm_hostdrv.f90:(.text+0xe9b4): undefined reference to 
`libxsmm_mp_libxsmm_smmcall_'
dbcsr_mm_hostdrv.f90:(.text+0xea10): undefined reference to 
`libxsmm_mp_libxsmm_smmcall_'
dbcsr_mm_hostdrv.f90:(.text+0xec36): undefined reference to 
`libxsmm_mp_libxsmm_sgemm_'
make[3]: *** 
[/ichec/home/users/davide/scr/cp2k/cp2k/exe/test/dbcsr_example_1.xsmm] 
Error 1


which if I am not wrong it means the compiler cannot find the library. 

Just to be sure it was not related to xsmm version I tried with v1.1, v1.3, 
v1.7 and this 1.6


I feel a bit stupid at the moment :-S 
Can anyone help? 

Cheers
Davide
 

#Define the correct path for the different variables
MKL=/ichec/packages/intel/2015.u3/composer_xe_2015.3.187/mkl
FFTW=/ichec/packages/fftw/intel_mpi/3.3.4
LIBXSMM=/ichec/home/users/davide/lib/libxsmm.git/tags/1.1
#Define the compilers
CC       = icc
CPP      = /lib/cpp
FC       = mpiifort
FC_fixed = mpiifort
LD       = mpiifort
AR       = /usr/bin/ar -r
#Modify the flags as reqired
DFLAGS   = -D__INTEL -D__FFTSG -D__parallel -D__BLACS -D__SCALAPACK 
-D__FFTW3 \
           -D__LIBXSMM
CPPFLAGS = -C $(DFLAGS) -P -traditional -I$(FFTW)/include/
FCFLAGS  = -O2 -pc64 -unroll -heap-arrays 64 -I$(FFTW)/include 
-I$(LIBXSMM)/include
#verify if the path to the libraries is correct
LDFLAGS  = $(FCFLAGS) -L$(MKL)/lib/intel64 -L$(FFTW)/lib -L$(LIBXSMM)/lib
LDFLAGS_C  = $(LDFLAGS) -nofor_main
#What Libraries 
LIBS     = -mkl -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 
-lmkl_intel_lp64 \
           -lmkl_intel_thread -lmkl_core -lm -lpthread -lfftw3 \
           /ichec/home/users/davide/lib/libxsmm.git/tags/1.6/lib/libxsmm.a
#Not sure what this does but it won't hurt
OBJECTS_ARCHITECTURE = machine_intel.o


as you can see I 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20170403/00fa1e3a/attachment.htm>


More information about the CP2K-user mailing list