LIBXSMM (cp2kflags?)

Nico Holmberg holmbe... at gmail.com
Tue Jun 27 17:41:12 UTC 2017


Hi Luiz,

Looking at this intel 
<https://github.com/cp2k/cp2k/blob/intel/cp2k/arch/Linux-x86-64-intel.x#L581> 
arch-file from the CP2K Intel branch, it seems that you indeed need to set 

IFLAGS  += -I$(LIBXSMMROOT)/include

However, you should also add it to the FCFLAGS (see the link):

FCFLAGS += $(OPTFLAGS) -diag-disable $(DIAG_DISABLE) $(DFLAGS) $(IFLAGS)

Hopefully that helps.


BR, 

Nico

tiistai 27. kesäkuuta 2017 19.19.04 UTC+3 Luiz Fernando Lopes Oliveira 
kirjoitti:
>
> Thank you very much, Nico.
>
> Well, I'm using ifort, and, I think (based on my installation of ELPA and 
> on the howto pages) that
>
> IFLAGS  += -I$(LIBXSMMROOT)/include
>
> is used instead of 
>
> FCFLAGS += -I$(LIBXSMM_INC)
> LDFLAGS  = $(FCFLAGS).
>
> Following your advice I inserted 
>
> LIBS     += -L$(LIBXSMM_LIB) -lxsmm -lxsmmext -lxsmmgen -lxsmmf 
>
> then compiled CP2K without a problem but I still can't see any libxsmm 
> flag on my CP2K outputs.
>
> Any ideas?
>
> Thanks!
>
> On Sunday, June 25, 2017 at 10:27:26 PM UTC-7, Nico Holmberg wrote:
>>
>> Hi,
>>
>> You seem to be missing the library flags for LIBXSMM. I have set the 
>> following flags (gfortran)
>>
>> LIBXSMM_LIB=/homeappl/home/nholmber/appl_sisu/lib/libxsmm-1.7.1/lib
>> LIBXSMM_INC=/homeappl/home/nholmber/appl_sisu/lib/libxsmm-1.7.1/include
>>
>> DFLAGS  += -D__LIBXSMM
>> FCFLAGS += -I$(LIBXSMM_INC)
>> LDFLAGS  = $(FCFLAGS)
>> LIBS     += -L$(LIBXSMM_LIB) -lxsmm -lxsmmext -lxsmmgen -lxsmmf
>>
>> There are no regtests from libxsmm, but you should see the libxsmm flag 
>> listed in CP2K output files once you've successfully linked the library.
>>
>>
>> BR, 
>>
>> Nico
>>
>> torstai 22. kesäkuuta 2017 6.18.38 UTC+3 Luiz Fernando Lopes Oliveira 
>> kirjoitti:
>>>
>>> Hi all.
>>>
>>> I compiled  CP2K with LIBINT, LIBXC, ELPA and PLUMED2, reading 
>>> throughout the forum I found many people (e.g. here 
>>> <https://groups.google.com/forum/#!searchin/cp2k/libxsmm%7Csort:date/cp2k/xgkJc59NKGw/U5v5FtzTBwAJ>) 
>>> saying that LIBXSMM also helps to speed up CP2K.
>>>
>>> I installed it (without errors) with 
>>>
>>> make -f /path/to/libxsmm/Makefile
>>>
>>> following the info from: 
>>> https://github.com/hfp/libxsmm/blob/master/README.md
>>>
>>> And on my arch file I have:
>>>
>>> LIBXSMMROOT = /lflo/cp2k2017/cp2k/cp2k/libxsmm
>>>  ifneq (,$(LIBXSMMROOT))
>>>     DFLAGS  += -D__LIBXSMM
>>>     IFLAGS  += -I$(LIBXSMMROOT)/include
>>>     MIC_LDFLAGS += 
>>> -offload-option,mic,ld,"$(LIBXSMMROOT)/lib/mic/libxsmm.a"
>>>   endif
>>>
>>> I then compile CP2K (also without errors).
>>> However, when running a regtest, I can only see information about the 
>>> other libraries mentioned above:
>>>
>>> cp2kflags: omp libint fftw3 libxc elpa=201611 elpa_qr parallel mpi3 
>>> scalapack libderiv_max_am1=5 libint_max_am=6 plumed2
>>>
>>> Also, the number of tests performed is exactly the same as before the 
>>> LIBXSMM compilation.
>>>
>>> My questions are: should the cp2kflags show something for LIBXSMM? Are 
>>> there any tests for LIBXSMM? 
>>>
>>> Thanks!
>>>
>>>
>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20170627/706561f5/attachment.htm>


More information about the CP2K-user mailing list