<div dir="ltr">Hello Alfio -<div><br></div><div>Thanks for your response!</div><div><br></div><div>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. </div><div><br></div><div>Thank you so much for your help (and thanks for everyone else who replied as well)! </div><div>Zeke</div><div><br>On Monday, March 26, 2018 at 4:20:04 AM UTC-5, Alfio Lazzaro wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr">Dear Zeke,<div>Let me summarize:</div><div>1) You are using CP2K 5.1</div><div>2) You are using Intel 17.0.4</div><div><br></div><div>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 (<a href="https://sourceforge.net/p/cp2k/code/18346/tree//trunk/cp2k/arch/Linux-x86-64-intel.popt" target="_blank" rel="nofollow" onmousedown="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fsourceforge.net%2Fp%2Fcp2k%2Fcode%2F18346%2Ftree%2F%2Ftrunk%2Fcp2k%2Farch%2FLinux-x86-64-intel.popt\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFrK9PKQUZ4Dkfjz0d3t5wVL6sPkQ';return true;" onclick="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fsourceforge.net%2Fp%2Fcp2k%2Fcode%2F18346%2Ftree%2F%2Ftrunk%2Fcp2k%2Farch%2FLinux-x86-64-intel.popt\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFrK9PKQUZ4Dkfjz0d3t5wVL6sPkQ';return true;">https://sourceforge.net/p/<wbr>cp2k/code/18346/tree//trunk/<wbr>cp2k/arch/Linux-x86-64-intel.<wbr>popt</a> ). Which problem do you get?</div><div>Anway, I'm putting here a "clean" version of your latest arch file:</div><div><br></div><div><br></div><div><div>CC       = icc</div><div>CPP      =<br></div><div>FC       = mpiifort<br></div><div>LD       = mpiifort<br></div><div>AR       = ar -r<br></div><div>MKLROOT=/panfs/pfs.local/<wbr>software/install/intel/17.4/<wbr>mkl<br></div><div>MKL_LIB = $(MKLROOT)/lib/intel64<br></div><div><br></div><div>DFLAGS   = -D__MKL  -D__FFTW3 -D__parallel  -D__SCALAPACK -D__STATM_RESIDENT -D__HAS_NO_SHARED_GLIBC<br></div><div>CFLAGS   = $(DFLAGS) -O2<br></div><div>FCFLAGS  = $(DFLAGS) -O2 -funroll-loops -fpp -free -fp-model precise<br></div><div><div>FCFLAGS += -I$(MKLROOT)/include -I$(MKLROOT)/include/fftw</div></div><div><br></div><div>LDFLAGS  = $(FCFLAGS) -static-intel<br></div><div>LDFLAGS_C = $(FCFLAGS) -static-intel -nofor_main<br></div><div><br></div><div><div>LIBS    += $(MKL_LIB)/libmkl_scalapack_<wbr>lp64.a -Wl,--start-group \</div><div>           $(MKL_LIB)/libmkl_intel_lp64.<wbr>a ${MKL_LIB}/libmkl_sequential.a \</div><div>           $(MKL_LIB)/libmkl_core.a \</div><div>           ${MKL_LIB}/libmkl_blacs_<wbr>intelmpi_lp64.a -Wl,--end-group \</div><div>           -lpthread -lm</div></div><div><br></div><div><br></div></div><div><div># Required due to memory leak that occurs if high optimisations are used</div><div>mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F</div><div>                         $(FC) -c $(subst O2,O0,$(FCFLAGS)) $<</div></div><div><br></div><div><br></div><div>In this arch file I'm assuming that you have Intel MPI (or MPICH). Otherwise, you can change the libs (you can use <a href="https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor" target="_blank" rel="nofollow" onmousedown="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fsoftware.intel.com%2Fen-us%2Farticles%2Fintel-mkl-link-line-advisor\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEeDLMY59OF3CfCgrCjFRZCTQ7n4w';return true;" onclick="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fsoftware.intel.com%2Fen-us%2Farticles%2Fintel-mkl-link-line-advisor\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEeDLMY59OF3CfCgrCjFRZCTQ7n4w';return true;">https://software.intel.<wbr>com/en-us/articles/intel-mkl-<wbr>link-line-advisor</a> ). 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.</div><div>BTW, I would suggest to use LIBXSMM to get performance...</div><div><br></div><div>Alfio</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br><br>Il giorno venerdì 23 marzo 2018 21:30:35 UTC+1, Zeke P ha scritto:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Nico,<div><br></div><div>Thanks for your response. I am indeed using that version of the intel compiler.</div><div><br></div><div>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.</div><div><br></div><div>Here is the segfault output:</div><div><br></div><div>---</div><div>







<p><span>forrtl: severe (174): SIGSEGV, segmentation fault occurred</span></p>
<p><span>Image<span>              </span>PC<span>                </span>Routine<span>            </span>Line<span>        </span>Source<span>             </span></span></p>
<p><span>cp2k.popt<span>          </span>00000000061CEDD4<span>  </span>Unknown <span>              </span>Unknown<span>  </span>Unknown</span></p>
<p><span>libpthread-2.12.s<span>  </span>00002AFB6C88A710<span>  </span>Unknown <span>              </span>Unknown<span>  </span>Unknown</span></p>
<p><span>cp2k.popt<span>          </span>00000000060C5B41<span>  </span>mkl_lapack_ps_avx <span>    </span>Unknown<span>  </span>Unknown</span></p>
<p><span>cp2k.popt<span>          </span>0000000005FE4287<span>  </span>Unknown <span>              </span>Unknown<span>  </span>Unknown</span></p>
<p><span>cp2k.popt<span>          </span>0000000002F9F719<span>  </span>Unknown <span>              </span>Unknown<span>  </span>Unknown</span></p>
<p><span>cp2k.popt<span>          </span>0000000002DC42D4<span>  </span>Unknown <span>              </span>Unknown<span>  </span>Unknown</span></p>
<p><span>cp2k.popt<span>          </span>0000000002A9B519<span>  </span>Unknown <span>              </span>Unknown<span>  </span>Unknown</span></p>
<p><span>cp2k.popt<span>          </span>0000000000CBE12C<span>  </span>Unknown <span>              </span>Unknown<span>  </span>Unknown</span></p>
<p><span>cp2k.popt<span>          </span>0000000000787E2A<span>  </span>Unknown <span>              </span>Unknown<span>  </span>Unknown</span></p>
<p><span>cp2k.popt<span>          </span>00000000007842BC<span>  </span>Unknown <span>              </span>Unknown<span>  </span>Unknown</span></p>
<p><span>cp2k.popt<span>          </span>0000000000599F37<span>  </span>Unknown <span>              </span>Unknown<span>  </span>Unknown</span></p>
<p><span>cp2k.popt<span>          </span>00000000005999F3<span>  </span>Unknown <span>              </span>Unknown<span>  </span>Unknown</span></p>
<p><span>cp2k.popt<span>          </span>000000000045B876<span>  </span>Unknown <span>              </span>Unknown<span>  </span>Unknown</span></p>
<p><span>cp2k.popt<span>          </span>0000000000450C38<span>  </span>Unknown <span>              </span>Unknown<span>  </span>Unknown</span></p>
<p><span>cp2k.popt<span>          </span>0000000006232E02<span>  </span>Unknown <span>              </span>Unknown<span>  </span>Unknown</span></p>
<p><span><a href="http://libc-2.12.so" rel="nofollow" target="_blank" onmousedown="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Flibc-2.12.so\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF1ODttlONBD7FbdQptRkP9WP8wng';return true;" onclick="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Flibc-2.12.so\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF1ODttlONBD7FbdQptRkP9WP8wng';return true;">libc-2.12.so</a> <span>      </span>00002AFB6E219D5D<span>  </span>__libc_start_main <span>    </span>Unknown<span>  </span>Unknown</span></p>
<p><span>cp2k.popt<span>          </span>0000000000450229<span>  </span>Unknown <span>              </span>Unknown<span>  </span>Unknown</span></p></div><div>---</div><div><br></div><div>Here is the arch file:</div><div><br></div><div>-----</div><div><br></div><div><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"><span style="font-size:16pt;font-family:Menlo">CC       = icc</span></p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"><span style="font-size:16pt;font-family:Menlo">CPP      =</span></p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"><span style="font-size:16pt;font-family:Menlo">FC       = mpiifort</span></p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"><span style="font-size:16pt;font-family:Menlo">LD       = mpiifort</span></p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"><span style="font-size:16pt;font-family:Menlo">AR       = ar -r</span></p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"><span style="font-size:16pt;font-family:Menlo">MKLROOT=/panfs/pfs.local/<wbr>software/install/intel/17.4/<wbr>mkl</span></p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"><span style="font-size:16pt;font-family:Menlo">INTEL_LIB = $(MKLROOT)/lib/intel64</span></p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"><span style="font-size:16pt;font-family:Menlo"> </span></p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"><span style="font-size:16pt;font-family:Menlo">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</span></p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"><span style="font-size:16pt;font-family:Menlo">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</span></p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"><span style="font-size:16pt;font-family:Menlo">FCFLAGS  = $(DFLAGS) -I$ -O3 -msse2 -heap-arrays 64 -funroll-loops -fpp -free -nofor_main</span></p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"><span style="font-size:16pt;font-family:Menlo">FCFLAGS2 = $(DFLAGS) -O1 -msse2 -heap-arrays 64 -fpp -free</span></p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"><span style="font-size:16pt;font-family:Menlo">CPPFLAGS = $(FCFLAGS)</span></p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"><span style="font-size:16pt;font-family:Menlo">LDFLAGS  = $(FCFLAGS)</span></p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"><span style="font-size:16pt;font-family:Menlo">LIBS     = -L$(INTEL_LIB) -lstdc++  ${MKLROOT}/lib/intel64/libmkl_<wbr>blas95_ilp64.a ${MKLROOT}/lib/intel64/libmkl_<wbr>lapack95_ilp64.a ${MKLROOT}/lib/intel64/libmkl_<wbr>scalapack_ilp64.a -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_<wbr>intel_ilp64.a ${MKLROOT}/lib/intel64/libmkl_<wbr>intel_thread.a ${MKLROOT}/lib/intel64/libmkl_<wbr>core.a ${MKLROOT}/lib/intel64/libmkl_<wbr>blacs_intelmpi_ilp64.a -Wl,--end-group -liomp5 -lpthread -lm -ldl</span></p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"><span style="font-size:16pt;font-family:Menlo">OBJECTS_ARCHITECTURE = machine_intel.o</span></p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"><span style="font-size:16pt;font-family:Menlo"> </span></p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"><span style="font-size:16pt;font-family:Menlo">graphcon.o: graphcon.F</span></p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"><span style="font-size:16pt;font-family:Menlo">    $(FC) -c $(FCFLAGS2) $<</span></p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"><span style="font-size:16pt;font-family:Menlo">mao_methods.o: mao_methods.F</span></p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"><span style="font-size:16pt;font-family:Menlo">    $(FC) -c $(FCFLAGS2) $<</span></p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"><span style="font-size:16pt;font-family:Menlo"><br></span></p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">-----</p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"><br></p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">Do you have any thoughts on where the issue might be?</p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"><br></p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">Would it be better if I gave up on the intel compiler for now and switched to trying to compile with gcc?</p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"><br></p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">I really appreciate your response.</p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)"><br></p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">Thanks,</p><p class="MsoNormal" style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)">Zeke</p></div><div> <br><br>On Thursday, March 22, 2018 at 11:40:25 AM UTC-5, Nico Holmberg wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<br><br>Which version of the Intel compiler suite/MKL are you using? Only version  17.0.4 20170411 currently works without issues, see <a href="https://www.cp2k.org/dev:compiler_support" rel="nofollow" target="_blank" onmousedown="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.cp2k.org%2Fdev%3Acompiler_support\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHq7WVu4QkGpDyG7P2tzgPChzf4YQ';return true;" onclick="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.cp2k.org%2Fdev%3Acompiler_support\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHq7WVu4QkGpDyG7P2tzgPChzf4YQ';return true;">https://www.cp2k.org/dev:<wbr>compiler_support</a> and earlier discussions on the Google groups forum. <br><br>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 <a href="https://sourceforge.net/p/cp2k/code/18346/tree//trunk/cp2k/arch/Linux-x86-64-intel.popt" rel="nofollow" target="_blank" onmousedown="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fsourceforge.net%2Fp%2Fcp2k%2Fcode%2F18346%2Ftree%2F%2Ftrunk%2Fcp2k%2Farch%2FLinux-x86-64-intel.popt\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFrK9PKQUZ4Dkfjz0d3t5wVL6sPkQ';return true;" onclick="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fsourceforge.net%2Fp%2Fcp2k%2Fcode%2F18346%2Ftree%2F%2Ftrunk%2Fcp2k%2Farch%2FLinux-x86-64-intel.popt\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFrK9PKQUZ4Dkfjz0d3t5wVL6sPkQ';return true;">https://sourceforge.net/p/<wbr>cp2k/code/18346/tree//trunk/<wbr>cp2k/arch/Linux-x86-64-intel.<wbr>popt</a> from the CP2K repository. For instance, I don't think the <span> -D__FFTMKL</span> flag exists (?), use -D__MKL for MKL linear algebra/FFT<span>. Also, setting</span> -fp-model precise to FCFLAGS might help.<br><br>The error/note you mentioned is harmless.<br><br>- Nico<br><br><br><br>torstai 22. maaliskuuta 2018 16.20.54 UTC+2 Zeke P kirjoitti:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>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.</div><div><br></div><div>Here are the regtest results I am getting:</div><div><br></div><div><span style="color:rgb(0,0,0);font-family:Menlo;font-size:17px">-----</span><br></div><div><br></div><div>







<p><span>Summary of the regression tester run from 2018-03-21_17-21-50 using Linux-x86-64-intel-ku popt</span></p>
<p><span>Number of FAILED<span>  </span>tests 165</span></p>
<p><span>Number of WRONG <span>  </span>tests 1003</span></p>
<p><span>Number of CORRECT tests 1524</span></p>
<p><span>Number of NEW <span>    </span>tests 10</span></p>
<p><span>Total number of <span>  </span>tests 2702</span></p><p><span><br></span></p><p><span>-----</span></p><p><span><br></span></p><p><font size="2"><span>We have compiled CP2K/5.1 using the following arch makefile (created by our cluster support)</span></font></p><p><font size="2"><span><br></span></font></p><p><span>-----</span><font size="2"><span><br></span></font></p><p><span><br></span></p><p><span>INTEL_INC = $(MKL_ROOT)/include/fftw</span></p><p><span>INTEL_LIB = $(MKL_ROOT)/lib/intel64</span></p><p><span>CC = mpiicc</span></p><p><span>FC = mpiifort</span></p><p><span>LD = mpiifort</span></p><p><span>AR = xiar -r</span></p><p><span>DFLAGS = -D__INTEL -D__FFTSG -D__FFTW3 -D__FFTMKL -D__parallel -D__BLACS -D__SCALAPACK</span></p><p><span>CPPFLAGS = -C -traditional $(DFLAGS) -I$(INTEL_INC)</span></p><p><span>FCFLAGS = $(DFLAGS) -I$(INTEL_INC) -O2 -xHost -heap-arrays 64 -fpp -free -unroll -pc 64 -convert big_endian -nofor_main</span></p><p><span>LDFLAGS = $(FCFLAGS)</span></p><p><span>LIBS = -L$(INTEL_LIB) -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64</span></p><p>


















</p><p><span>OBJECTS_ARCHITECTURE = machine_intel.o</span></p><p><span><br></span></p><p><span>-----<br></span></p><p><span><br></span></p><p><span><font size="2">That being said - we aren't having much success. During compilation we are getting remark 8291 which states</font> <font size="2" face="arial, sans-serif">"</font></span><font size="2" face="arial, sans-serif">Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor </font><span style="font-family:arial,sans-serif;font-size:small">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.</span></p><p><span style="font-family:arial,sans-serif;font-size:small"><br></span></p><p><span style="font-family:arial,sans-serif;font-size:small">I would appreciate any suggestions you may have - it is very likely that we are missing something stupid that is causing the compilation trouble.</span></p><p><span style="font-family:arial,sans-serif;font-size:small"><br></span></p><p><span style="font-family:arial,sans-serif;font-size:small">Thanks so much,</span></p><p><span style="font-family:arial,sans-serif;font-size:small">Zeke Piskulich</span></p></div></div></blockquote></div></blockquote></div></div></blockquote></div></div></blockquote></div></div>