<div dir="ltr">Hey Michael and Alfio,<br><br>Thanks for your help! I was finally able to get CP2K 3.0 to compile correctly without errors.<br><br>I was erroneously using Linux-x86-64-gfortran.popt for compiling. I ended up compiling Linux-x86-64-gfortran.sopt, then Linux-x86-64-gfortran.ssmp, then Linux-x86-64-gfortran.popt, then finally Linux-x86-64-gfortran.psmp, to track down compilation errors and correct them.<br><br>Here is the contents of Linux-x86-64-gfortran.psmp which compiled successfully with Scalapack, Lapack, Blas, FFTW, LIBINT, and our OpenMPI and OpenMP libraries:<br><br>CC         = /usr/local/openmpi-1.8.4/bin/mpicc<br>CPP        =<br>FC         = /usr/local/openmpi-1.8.4/bin/mpif90<br>LD         = /usr/local/openmpi-1.8.4/bin/mpif90<br>AR         = /usr/bin/ar -r<br>BLAS_LIB   = /usr/local/blas-3.5.0/lib<br>LAPACK_LIB = /usr/local/lapack-3.5.0/lib<br>ELPA_LIB   = /usr/local/elpa-2015.11.001/lib<br>ELPA_INC   = /usr/local/elpa-2015.11.001/include/elpa/modules<br>FFTW_INC   = /usr/local/fftw-3.3.4-gcc/include<br>FFTW_LIB   = /usr/local/fftw-3.3.4-gcc/lib<br>LIBINT_INC = /usr/local/libint-1.1.5/include<br>LIBINT_LIB = /usr/local/libint-1.1.5/lib<br>MPI_LIBRARY_PATH = /usr/local/scalapack-2.0.2-gcc/lib<br>DFLAGS     = -D__FFTW3 -D__LIBINT -D__ELPA3\<br>             -D__LIBINT_MAX_AM=7 -D__LIBDERIV_MAX_AM1=6 -D__MAX_CONTR=4\<br>             -D__parallel -D__SCALAPACK<br>CPPFLAGS   =<br>FCFLAGS    = $(DFLAGS) -O2 -ffast-math -ffree-form -ffree-line-length-none\<br>             -fopenmp -ftree-vectorize -funroll-loops\<br>             -mtune=native\<br>             -I$(FFTW_INC) -I$(LIBINT_INC) -I$(ELPA_INC)<br>LDFLAGS    = $(FCFLAGS) -static-libgfortran<br>LIBS       = $(MPI_LIBRARY_PATH)/libscalapack-gnu.a\<br>             $(FFTW_LIB)/libfftw3.a\<br>             $(FFTW_LIB)/libfftw3_threads.a\<br>             $(LIBINT_LIB)/libderiv.a\<br>             $(LIBINT_LIB)/libint.a\<br>             $(LIBINT_LIB)/libr12.a\<br>             -L$(LAPACK_LIB) -llapack\<br>             -L$(BLAS_LIB) -lblas\<br>             $(ELPA_LIB)/libelpa_openmp.a\<br>             $(ELPA_LIB)/libelpa_openmp.so<br><br>Please note: the above is what worked for my environment.<br><br>Thanks again for your assistance!<br><br>Ben<br><br>On Tuesday, January 19, 2016 at 11:11:43 AM UTC-7, Michael Banck wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Hi,
<br>
<br>On Tue, Jan 19, 2016 at 09:52:43AM -0800, Ben Fotovich wrote:
<br>> Thank you for your help! I've gotten much farther with compiling this than 
<br>> before! With that said, I'm not sure the ELPA issue has been fixed: after 
<br>> adding BLAS and LAPACK to LIBS in Linux-x86-64-gfortran.popt (see below for 
<br>> contents of file), I get a new compile error, that seems to reference ELPA2:
<br>> 
<br>> /usr/local/openmpi-1.8.4/bin/<wbr>mpif90 -D__FFTW3 -D__LIBINT -D__ELPA3 
<br>> -D__LIBINT_MAX_AM=7 -D__LIBDERIV_MAX_AM1=6 -D__MAX_CONTR=4 -D__parallel 
<br>> -D__SCALAPACK -O2 -ffast-math -ffree-form -ffree-line-length-none 
<br>> -ftree-vectorize -funroll-loops -mtune=native 
<br>> -I/usr/local/fftw-3.3.4/<wbr>include -I/usr/local/libint-1.1.4/<wbr>include 
<br>> -I/usr/local/elpa-2015.11.001/<wbr>include/elpa/modules 
<br>> -D__COMPILE_ARCH="\"Linux-x86-<wbr>64-gfortran\"" -D__COMPILE_DATE="\"Tue Jan 19 
<br>> 10:25:00 MST 2016\"" -D__COMPILE_HOST="\"du-hpc\"" 
<br>> -D__COMPILE_REVISION="\"svn:<wbr>16458\"" 
<br>> -D__DATA_DIR="\"/root/c/cp2k-<wbr>3.0/data\"" -L -L/lib64 
<br>> -L/root/c/cp2k-3.0/lib/Linux-<wbr>x86-64-gfortran/popt -o 
<br>> /root/c/cp2k-3.0/exe/Linux-<wbr>x86-64-gfortran/cp2k_shell.<wbr>popt cp2k_shell.o  
<br>> -lcp2kstart -lcp2kmc -lcp2kswarm -lcp2kmotion -lcp2kthermostat -lcp2kemd 
<br>> -lcp2ktmc -lcp2kmain -lcp2khfxbase -lcp2ksubsys -lcp2kxc -lcp2kao 
<br>> -lcp2kinput -lcp2kpw -lcp2kfft -lcp2kdbcsrwrap -ldbcsr -ldbcsrarnoldi 
<br>> -ldbcsrvec -ldbcsrmm -ldbcsrops -ldbcsrbblock -ldbcsrbdist -ldbcsrbase 
<br>> -ldbcsrdata -ldbcsrerr -lmicsmm -lclsmm -lcp2kacc -lcp2kaccmic 
<br>> -lcp2kaccopencl -lcp2kfm -lcp2kcommon -lcp2kmpiwrap -lcp2kgrid -lcp2kbase 
<br>> /usr/local/scalapack-2.0.2-<wbr>gcc/lib/libscalapack-gnu.a 
<br>> /usr/local/fftw-3.3.4/lib/<wbr>libfftw3.a /usr/local/libint-1.1.4/lib/<wbr>libderiv.a 
<br>> /usr/local/libint-1.1.4/lib/<wbr>libint.a 
<br>> /usr/local/lapack-3.5.0/lib/<wbr>liblapack.a -L/usr/local/blas-3.5.0/lib/<wbr>libblas 
<br>
<br>> -lblas -L/usr/local/elpa-2015.11.001/<wbr>lib/libelpa_openmp.a
<br>
<br>You are listing the elpa library here, but I though the -L option was
<br>for directories.  Try without the -L, similar to
<br>/usr/local/libint-1.1.4/lib/<wbr>libint.a.
<br>
<br>> In function `__cp_fm_diag_MOD_choose_eigv_<wbr>solver':
<br>> cp_fm_diag.F:(.text+0x3514): undefined reference to 
<br>> `__elpa2_MOD_solve_evp_real_<wbr>2stage'
<br>> collect2: error: ld returned 1 exit status
<br>> 
<br>> Looking in cp2k/src/fm/cp_fm_diag.F, I see these three line, at line 60:
<br>> 
<br>> #if defined (__ELPA) || defined(__ELPA2) || defined(__ELPA3)
<br>>   USE ELPA2, ONLY: solve_evp_real_2stage
<br>> #endif
<br>> 
<br>> Could this be the issue?
<br>
<br>ELPA3 is actually misleading in my opinion - there are ELPA1 and ELPA2
<br>functions.  The ELPA3 define you had to add is only to distinguish
<br>between ELPA2 2015.03 and ELPA2 2015.11 - ELPA2b or something might have
<br>been clearer.  In any case, I don't believe this to be a problem.
<br> 
<br>> Contents of Linux-x86-64-gfortran.popt:
<br>
<br>[...]
<br>> ELPA_LIB   = /usr/local/elpa-2015.11.001/<wbr>lib
<br>
<br>[...]
<br>
<br>> LIBS       = $(MPI_LIBRARY_PATH)/<wbr>libscalapack-gnu.a\
<br>>              $(FFTW_LIB)/libfftw3.a\
<br>>              $(LIBINT_LIB)/libderiv.a\
<br>>              $(LIBINT_LIB)/libint.a\
<br>>              $(LAPACK_LIB)/liblapack.a\
<br>>              -L$(BLAS_LIB)/libblas -lblas\
<br>
<br>>              -L$(ELPA_LIB)/libelpa_openmp.<wbr>a
<br>
<br>See above, this line is wrong and should be fixed.
<br>
<br>
<br>Michael
<br></blockquote></div>