<div dir="ltr"><div dir="ltr">Hi. <div><br></div><div>Those undefined references are provided by scalapack and I don't see a reference to libscalapack.a or the MKL scalapack in your .popt file. </div><div>I have a line that reads  <span style="font-family:'courier new',monospace">LIBS     = /home/me/source/scalapack-2.0.<wbr>2/libscalapack.a ... </span><span style="font-family:arial,sans-serif">and when I remove it I produce the same errors you are seeing. </span></div><div><br></div><div>Because you are using MKL you may want/need to add this library:</div><div><pre style="color:rgb(0,0,0);font-size:9pt"><font face="courier new, monospace">libmkl_scalapack_lp64.a </font></pre><pre style="color:rgb(0,0,0);font-size:9pt"><br></pre><pre><font face="arial, sans-serif"><font color="#000000"><span style="font-size:9pt">You probably want to consult the Intel </span></font><a href="http://software.intel.com/sites/products/documentation/hpc/mkl/mklman/GUID-1C7A97AF-0177-48CC-BE0E-F228531C5FEE.htm" style="color:rgb(0,0,0);font-size:9pt" target="_blank">documentation</a><font color="#000000"><span style="font-size:9pt"> for linking MKL scalapack. </span></font></font></pre><pre>http://software.intel.com/sites/products/documentation/hpc/mkl/mklman/GUID-1C7A97AF-0177-48CC-BE0E-F228531C5FEE.htm<font face="arial, sans-serif"><font color="#000000"><span style="font-size:9pt"><br></span></font></font></pre><pre><br></pre><pre><font face="arial, sans-serif"><font color="#000000"><span style="font-size:9pt">Another approach (if you aren't </span><span style="font-size:12px">committed</span><span style="font-size:9pt"> to using scalapack provided by MKL) is build your own </span></font></font><span style="font-size:9pt;color:rgb(0,0,0);font-family:arial,sans-serif">scalapack library. </span></pre><pre style="color:rgb(0,0,0);font-size:9pt"><font face="arial, sans-serif"><br></font></pre><pre style="color:rgb(0,0,0);font-size:9pt"><font face="arial, sans-serif"><br></font></pre><pre style="color:rgb(0,0,0);font-size:9pt"><font face="arial, sans-serif">Hope you find this helpful.</font></pre><pre style="color:rgb(0,0,0);font-size:9pt"><font face="arial, sans-serif"><br></font></pre><pre style="color:rgb(0,0,0);font-size:9pt"><font face="arial, sans-serif"><br></font></pre><pre style="color:rgb(0,0,0);font-size:9pt"><font face="arial, sans-serif"><br></font></pre></div><div><br>On Friday, December 27, 2013 7:27:25 PM UTC-5, <a>jia...@gmail.com</a> wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>linux OS: ubuntu 13.10-64</div><div>intel fortran compiler : ifort (IFORT) 14.0.1 20131008 with MKL </div><div>libint-2.0.3</div><div>libxc-2.0.2</div><div>openmpi-1.6.5</div><div><br></div><div>when I compile cp2k, there are some errors.</div><div>how can I deal with it?  Thanks</div><div><br></div><div>this is the Linux-x86-64-intel.popt</div><div><br></div><div>##############################<wbr>############################</div><div>CC       = icc</div><div>CPP      =</div><div>FC       = mpif90</div><div>LD       = mpif90</div><div>AR       = ar -r</div><div>INTEL_MKL=/opt/intel/mkl</div><div>INTEL_INC = $(INTEL_MKL)/include/fftw</div><div>INTEL_LIB = $(INTEL_MKL)/lib/intel64</div><div>DFLAGS   = -D__INTEL -D__FFTSG -D__parallel -D__BLACS -D__SCALAPACK -D__FFTW3  -D__LIBINT -D_LIBXC2</div><div>CPPFLAGS =</div><div>FCFLAGS  = $(DFLAGS) -I$(INTEL_INC) -O3 -msse2 -heap-arrays 64 -funroll-loops -fpp -free</div><div>FCFLAGS2 = $(DFLAGS) -I$(INTEL_INC) -O1 -msse2 -heap-arrays 64 -fpp -free</div><div>LDFLAGS  = $(FCFLAGS) -I$(INTEL_INC)</div><div>LIBS     = -Wl,--start-group -L${INTEL_LIB}  -lmkl_blas95_lp64 -lmkl_lapack95_lp64  \</div><div>-lmkl_sequential -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_intel_thread \</div><div>$(INTEL_MKL)/interfaces/<wbr>fftw3xf/libfftw3xf_intel.a -Wl,--end-group \</div><div>/usr/local/libint/2.0.3-<wbr>stable/lib/libint2.a \</div><div>/home/myu1310/work/cp2k/libxc/<wbr>libxcforme/lib/libxc.a \</div><div>-lstdc++ -lm -lpthread  -liomp5</div><div><br></div><div><br></div><div>OBJECTS_ARCHITECTURE = machine_intel.o</div><div><br></div><div><br></div><div>graphcon.o: graphcon.F</div><div>        $(FC) -c $(FCFLAGS2) $<</div><div><br></div><div>##############################<wbr>############################</div><div><br></div><div>this is the error:</div><div>##############################<wbr>##############################<wbr>##################</div><div><br></div><div>/home/myu1310/work/cp2k/cp2k-<wbr>2.4.0/makefiles/../lib/Linux-<wbr>x86-64-intel/popt/libcp2k_lib.<wbr>a(library_tests.o):In the function‘library_tests_mp_cp_<wbr>fm_gemm_test_’:</div><div>/home/myu1310/work/cp2k/cp2k-<wbr>2.4.0/makefiles/../src/<wbr>library_tests.F:(.text+<wbr>0x1a669):undefined reference to‘pilaenv_’</div><div>/home/myu1310/work/cp2k/cp2k-<wbr>2.4.0/makefiles/../lib/Linux-<wbr>x86-64-intel/popt/libcp2k_lib.<wbr>a(qs_linres_op.o):In the function‘qs_linres_op_mp_fm_<wbr>scale_by_pbc_ac_’:</div><div>/home/myu1310/work/cp2k/cp2k-<wbr>2.4.0/makefiles/../src/qs_<wbr>linres_op.F:(.text+0x3fc7):<wbr>undefined reference to‘indxl2g_’</div><div>/home/myu1310/work/cp2k/cp2k-<wbr>2.4.0/makefiles/../src/qs_<wbr>linres_op.F:(.text+0x408b):<wbr>undefined reference to‘indxl2g_’</div><div>/home/myu1310/work/cp2k/cp2k-<wbr>2.4.0/makefiles/../lib/Linux-<wbr>x86-64-intel/popt/libcp2k_lib.<wbr>a(cp_cfm_basic_linalg.o):In the function‘cp_cfm_basic_linalg_<wbr>mp_cp_cfm_lu_decompose_’:</div><div><br></div><div>......</div><div>......</div><div>......</div><div><br></div><div><div>/home/myu1310/work/cp2k/cp2k-<wbr>2.4.0/makefiles/../lib/Linux-<wbr>x86-64-intel/popt/libcp2k_lib.<wbr>a(qs_localization_methods.o):/<wbr>home/myu1310/work/cp2k/cp2k-2.<wbr>4.0/makefiles/../src/qs_<wbr>localization_methods.F:(.text+<wbr>0x10aef): more undefined references to `pzrot_' follow</div><div>make[1]: *** [/home/myu1310/work/cp2k/cp2k-<wbr>2.4.0/makefiles/../exe/Linux-<wbr>x86-64-intel/cp2k.popt] error 1</div><div>make[1]:  `/home/myu1310/work/cp2k/<wbr>cp2k-2.4.0/obj/Linux-x86-64-<wbr>intel/popt'</div><div>make: *** [build] error 2</div></div><div><br></div><div><br></div></div></blockquote></div></div></div>