CP2K Intel Compiler Build Issues

Zeke P ezekielp... at gmail.com
Tue Apr 3 01:11:15 UTC 2018


Hello Alfio -

Thanks for your response!

I went ahead and compiled with the arch file that you suggested and it 
worked like a charm. The compilation worked - and the first simulation I 
ran with it seems to be producing what I think are reasonable results. I am 
going to do a regression test soon and check - but I feel much better about 
this than what I was using before. I agree with you that it seems like it 
was a MKL linkage issue. 

Thank you so much for your help (and thanks for everyone else who replied 
as well)! 
Zeke

On Monday, March 26, 2018 at 4:20:04 AM UTC-5, Alfio Lazzaro wrote:
>
> Dear Zeke,
> Let me summarize:
> 1) You are using CP2K 5.1
> 2) You are using Intel 17.0.4
>
> OK, as Nico said, your arch file contains old flags that you can remove. 
> It is strange that the official arch doesn't work for you (
> https://sourceforge.net/p/cp2k/code/18346/tree//trunk/cp2k/arch/Linux-x86-64-intel.popt 
> ). Which problem do you get?
> Anway, I'm putting here a "clean" version of your latest arch file:
>
>
> CC       = icc
> CPP      =
> FC       = mpiifort
> LD       = mpiifort
> AR       = ar -r
> MKLROOT=/panfs/pfs.local/software/install/intel/17.4/mkl
> MKL_LIB = $(MKLROOT)/lib/intel64
>
> DFLAGS   = -D__MKL  -D__FFTW3 -D__parallel  -D__SCALAPACK 
> -D__STATM_RESIDENT -D__HAS_NO_SHARED_GLIBC
> CFLAGS   = $(DFLAGS) -O2
> FCFLAGS  = $(DFLAGS) -O2 -funroll-loops -fpp -free -fp-model precise
> FCFLAGS += -I$(MKLROOT)/include -I$(MKLROOT)/include/fftw
>
> LDFLAGS  = $(FCFLAGS) -static-intel
> LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main
>
> 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
>
>
> # 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)) $<
>
>
> In this arch file I'm assuming that you have Intel MPI (or MPICH). 
> Otherwise, you can change the libs (you can use 
> https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor ). 
> I didn't test it, probably there are typos (sorry in advance). My feeling 
> about the error you showed is that there was something wrong in the linking 
> of MKL (it mentions AVX, but you were compiling with SSE2 support). Please, 
> try and let me know.
> BTW, I would suggest to use LIBXSMM to get performance...
>
> Alfio
>
>
>
>
>
>
>
> Il giorno venerdì 23 marzo 2018 21:30:35 UTC+1, Zeke P ha scritto:
>>
>> Hi Nico,
>>
>> Thanks for your response. I am indeed using that version of the intel 
>> compiler.
>>
>> With a new arch file (provided to me after my original post) - I was able 
>> to compile cp2k again. I didn't have much luck with the arch file that you 
>> linked. This time - I am getting a segmentation fault when I run the 
>> executable for any input. This is probably due to a small mistake in the 
>> arch file.
>>
>> Here is the segfault output:
>>
>> ---
>>
>> forrtl: severe (174): SIGSEGV, segmentation fault occurred
>>
>> Image              PC                Routine            Line        
>> Source             
>>
>> cp2k.popt          00000000061CEDD4  Unknown               Unknown  
>> Unknown
>>
>> libpthread-2.12.s  00002AFB6C88A710  Unknown               Unknown  
>> Unknown
>>
>> cp2k.popt          00000000060C5B41  mkl_lapack_ps_avx     Unknown  
>> Unknown
>>
>> cp2k.popt          0000000005FE4287  Unknown               Unknown  
>> Unknown
>>
>> cp2k.popt          0000000002F9F719  Unknown               Unknown  
>> Unknown
>>
>> cp2k.popt          0000000002DC42D4  Unknown               Unknown  
>> Unknown
>>
>> cp2k.popt          0000000002A9B519  Unknown               Unknown  
>> Unknown
>>
>> cp2k.popt          0000000000CBE12C  Unknown               Unknown  
>> Unknown
>>
>> cp2k.popt          0000000000787E2A  Unknown               Unknown  
>> Unknown
>>
>> cp2k.popt          00000000007842BC  Unknown               Unknown  
>> Unknown
>>
>> cp2k.popt          0000000000599F37  Unknown               Unknown  
>> Unknown
>>
>> cp2k.popt          00000000005999F3  Unknown               Unknown  
>> Unknown
>>
>> cp2k.popt          000000000045B876  Unknown               Unknown  
>> Unknown
>>
>> cp2k.popt          0000000000450C38  Unknown               Unknown  
>> Unknown
>>
>> cp2k.popt          0000000006232E02  Unknown               Unknown  
>> Unknown
>>
>> libc-2.12.so       00002AFB6E219D5D  __libc_start_main     Unknown  
>> Unknown
>>
>> cp2k.popt          0000000000450229  Unknown               Unknown  
>> Unknown
>> ---
>>
>> Here is the arch file:
>>
>> -----
>>
>> CC       = icc
>>
>> CPP      =
>>
>> FC       = mpiifort
>>
>> LD       = mpiifort
>>
>> AR       = ar -r
>>
>> MKLROOT=/panfs/pfs.local/software/install/intel/17.4/mkl
>>
>> INTEL_LIB = $(MKLROOT)/lib/intel64
>>
>>  
>>
>> DFLAGS   = -D__INTEL -D__FFTSG -D__parallel -D__BLACS -D__SCALAPACK 
>> -D__FFTSG -D__MAX_CONTR=3 -D__HAS_NO_GETLOG -D__STATM_RESIDENT 
>> -D__HAS_NO_SHARED_GLIBC
>>
>> FCFLAGS   = -D__INTEL -D__FFTSG -D__parallel -D__BLACS -D__SCALAPACK 
>> -D__FFTSG  -D__MAX_CONTR=3 -D__HAS_NO_GETLOG -D__STATM_RESIDENT 
>> -D__HAS_NO_SHARED_GLIBC
>>
>> FCFLAGS  = $(DFLAGS) -I$ -O3 -msse2 -heap-arrays 64 -funroll-loops -fpp 
>> -free -nofor_main
>>
>> FCFLAGS2 = $(DFLAGS) -O1 -msse2 -heap-arrays 64 -fpp -free
>>
>> CPPFLAGS = $(FCFLAGS)
>>
>> LDFLAGS  = $(FCFLAGS)
>>
>> LIBS     = -L$(INTEL_LIB) -lstdc++  
>> ${MKLROOT}/lib/intel64/libmkl_blas95_ilp64.a 
>> ${MKLROOT}/lib/intel64/libmkl_lapack95_ilp64.a 
>> ${MKLROOT}/lib/intel64/libmkl_scalapack_ilp64.a -Wl,--start-group 
>> ${MKLROOT}/lib/intel64/libmkl_intel_ilp64.a 
>> ${MKLROOT}/lib/intel64/libmkl_intel_thread.a 
>> ${MKLROOT}/lib/intel64/libmkl_core.a 
>> ${MKLROOT}/lib/intel64/libmkl_blacs_intelmpi_ilp64.a -Wl,--end-group 
>> -liomp5 -lpthread -lm -ldl
>>
>> OBJECTS_ARCHITECTURE = machine_intel.o
>>
>>  
>>
>> graphcon.o: graphcon.F
>>
>>     $(FC) -c $(FCFLAGS2) $<
>>
>> mao_methods.o: mao_methods.F
>>
>>     $(FC) -c $(FCFLAGS2) $<
>>
>>
>> -----
>>
>>
>> Do you have any thoughts on where the issue might be?
>>
>>
>> Would it be better if I gave up on the intel compiler for now and 
>> switched to trying to compile with gcc?
>>
>>
>> I really appreciate your response.
>>
>>
>> Thanks,
>>
>> Zeke
>>  
>>
>> On Thursday, March 22, 2018 at 11:40:25 AM UTC-5, Nico Holmberg wrote:
>>>
>>> Hi,
>>>
>>> Which version of the Intel compiler suite/MKL are you using? Only 
>>> version 17.0.4 20170411 currently works without issues, see 
>>> https://www.cp2k.org/dev:compiler_support and earlier discussions on 
>>> the Google groups forum. 
>>>
>>> I am no expert on Intel compiling but I think there are some issues with 
>>> the arch-file, compare yours e.g. with this one 
>>> https://sourceforge.net/p/cp2k/code/18346/tree//trunk/cp2k/arch/Linux-x86-64-intel.popt 
>>> from the CP2K repository. For instance, I don't think the  -D__FFTMKL 
>>> flag exists (?), use -D__MKL for MKL linear algebra/FFT. Also, setting 
>>> -fp-model precise to FCFLAGS might help.
>>>
>>> The error/note you mentioned is harmless.
>>>
>>> - Nico
>>>
>>>
>>>
>>> torstai 22. maaliskuuta 2018 16.20.54 UTC+2 Zeke P kirjoitti:
>>>>
>>>> Hello,
>>>>
>>>> I have been trying to work with our cluster support people here to 
>>>> install CP2K with intel compilers and I have been having difficulty getting 
>>>> an executable that passes the regtest.
>>>>
>>>> Here are the regtest results I am getting:
>>>>
>>>> -----
>>>>
>>>> Summary of the regression tester run from 2018-03-21_17-21-50 using 
>>>> Linux-x86-64-intel-ku popt
>>>>
>>>> Number of FAILED  tests 165
>>>>
>>>> Number of WRONG   tests 1003
>>>>
>>>> Number of CORRECT tests 1524
>>>>
>>>> Number of NEW     tests 10
>>>>
>>>> Total number of   tests 2702
>>>>
>>>>
>>>> -----
>>>>
>>>>
>>>> We have compiled CP2K/5.1 using the following arch makefile (created by 
>>>> our cluster support)
>>>>
>>>>
>>>> -----
>>>>
>>>>
>>>> INTEL_INC = $(MKL_ROOT)/include/fftw
>>>>
>>>> INTEL_LIB = $(MKL_ROOT)/lib/intel64
>>>>
>>>> CC = mpiicc
>>>>
>>>> FC = mpiifort
>>>>
>>>> LD = mpiifort
>>>>
>>>> AR = xiar -r
>>>>
>>>> DFLAGS = -D__INTEL -D__FFTSG -D__FFTW3 -D__FFTMKL -D__parallel 
>>>> -D__BLACS -D__SCALAPACK
>>>>
>>>> CPPFLAGS = -C -traditional $(DFLAGS) -I$(INTEL_INC)
>>>>
>>>> FCFLAGS = $(DFLAGS) -I$(INTEL_INC) -O2 -xHost -heap-arrays 64 -fpp 
>>>> -free -unroll -pc 64 -convert big_endian -nofor_main
>>>>
>>>> LDFLAGS = $(FCFLAGS)
>>>>
>>>> LIBS = -L$(INTEL_LIB) -lmkl_intel_lp64 -lmkl_sequential -lmkl_core 
>>>> -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64
>>>>
>>>> OBJECTS_ARCHITECTURE = machine_intel.o
>>>>
>>>>
>>>> -----
>>>>
>>>>
>>>> That being said - we aren't having much success. During compilation we 
>>>> are getting remark 8291 which states "Recommended relationship between 
>>>> field width 'W' and the number of fractional digits 'D' in this edit 
>>>> descriptor is 'W>=D+7'."  Could this be causing the problem? I am 
>>>> attaching the error summary output by the regtest in case that would help.
>>>>
>>>>
>>>> I would appreciate any suggestions you may have - it is very likely 
>>>> that we are missing something stupid that is causing the compilation 
>>>> trouble.
>>>>
>>>>
>>>> Thanks so much,
>>>>
>>>> Zeke Piskulich
>>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20180402/f62f3ff6/attachment.htm>


More information about the CP2K-user mailing list