<div dir="ltr"><div>It compileth !!!!<br><br></div>Thanks You :)<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 10, 2014 at 1:19 PM, Matthias Krack <span dir="ltr"><<a href="mailto:matthia...@psi.ch" target="_blank">matthia...@psi.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<br><br>I would try to change the order of the libraries in the link step, because this matters. Just check the arch files in cp2k/arch to get an idea of an appropriate order. The usual link order is libscalapack, liblapack, and then libblas. The libtmglib is not needed.<span class="HOEnZb"><font color="#888888"><br><br>Matthias</font></span><div><div class="h5"><br><br>On Sunday, 9 November 2014 20:28:52 UTC+1, aldol  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>I am new to cp2k and am trying to install its parallel  version.<br>I downloaded the BLAS, LAPACK and SCALAPACK libraries<br>and installed them as follows:<br><br>Installing BLAS<br>gunzip blas.tgz<br>tar -xvf blas.tar<br>cd BLAS<br>gfortran -c -O3 *.f<br>ar rv libblas.a *.o<br><br>Installing LAPACK<br>tar -xvf lapack-3.5.0.tar<br>cd lapack-3.5.0<br>cp INSTALL/make.inc.gfortran ./make.inc<br>change BLASLIB = ../../librefblas.a to BLASLIB=~/chandan/softs/<u></u>forcp2k/BLAS/libblas.a<br>make 1> make.out 2>&1 &<br><br>Installing SCALAPACK<br>tar -xvf scalapack-2.0.2.tar<br>cd scalapack-2.0.2<br>cp SLmake.inc.example SLmake.inc<br>vi SLmake.inc<br><br>Then I change FC = mpif90 <br>to <br>FC=/home/rbs/chandan/softs/<u></u>openmpi-1.8.3-gcc-4.9.1/bin/<u></u>mpif90<br>and<br>CC = mpicc <br>to <br>CC=/home/rbs/chandan/softs/<u></u>openmpi-1.8.3-gcc-4.9.1/bin/<u></u>mpicc<br><br>BLASLIB= -lblas <br>to <br>BLASLIB= -lblas -L/home/rbs/chandan/softs/<u></u>forcp2k/BLAS/<br><br>LAPACKLIB = -llapack <br>to <br>LAPACKLIB = -llapack -L/home/rbs/chandan/softs/<u></u>forcp2k/lapack-3.5.0/<br><br>make 1> make.out 2>&1 &<br><br>My arch file is as follows:<br>*****************<br>CC         = /home/rbs/chandan/softs/<u></u>openmpi-1.8.3-gcc-4.9.1/bin/<u></u>mpicc<br>CPP        =<br>FC         = /home/rbs/chandan/softs/<u></u>openmpi-1.8.3-gcc-4.9.1/bin/<u></u>mpif90<br>LD         = /home/rbs/chandan/softs/<u></u>openmpi-1.8.3-gcc-4.9.1/bin/<u></u>mpif90<br>AR         = ar -r<br>FFTW_INC   = /home/rbs/chandan/softs/fftw-<u></u>3.3.4-openmpi-1.8.3-gcc-4.9.1/<u></u>include<br>FFTW_LIB   = /home/rbs/chandan/softs/fftw-<u></u>3.3.4-openmpi-1.8.3-gcc-4.9.1/<u></u>lib<br>LIBINT_INC = /home/rbs/chandan/softs/<u></u>LIBINT/include<br>LIBINT_LIB = /home/rbs/chandan/softs/<u></u>LIBINT/lib<br>LIBXC_INC  = /home/rbs/chandan/softs/LIBXC/<u></u>include<br>LIBXC_LIB  = /home/rbs/chandan/softs/LIBXC/<u></u>lib<br>LIBBLAS    = /home/rbs/chandan/softs/<u></u>forcp2k/BLAS<br>LIBLAPACK  = /home/rbs/chandan/softs/<u></u>forcp2k/lapack-3.5.0<br>LIBSCALAPACK = /home/rbs/chandan/softs/<u></u>forcp2k/scalapack-2.0.2<br><br>DFLAGS     = -D__GFORTRAN -D__FFTACML -D__FFTSG -D__FFTW3 -D__LIBINT -D__LIBXC2\<br>             -D__LIBINT_MAX_AM=7 -D__LIBDERIV_MAX_AM1=6 -D__MAX_CONTR=4\<br>             -D__parallel -D__BLACS -D__SCALAPACK<br>CPPFLAGS   =<br>FCFLAGS    = $(DFLAGS) -O2 -ffast-math -ffree-form -ffree-line-length-none\<br>             -ftree-vectorize -funroll-loops \<br>             -mtune=native\<br>             -I$(ACML_INC) -I$(FFTW_INC) -I$(LIBINT_INC) -I$(LIBXC_INC)<br>LDFLAGS    = $(FCFLAGS) -static-libgfortran<br>LIBS       = $(FFTW_LIB)/libfftw3.a\<br>             $(LIBXC_LIB)/libxc.a\<br>             $(LIBINT_LIB)/libderiv.a\<br>             $(LIBINT_LIB)/libint.a\<br>             $(LIBBLAS)/libblas.a \<br>             $(LIBLAPACK)/liblapack.a \<br>             $(LIBLAPACK)/libtmglib.a \<br>             $(LIBSCALAPACK)/libscalapack.a<br><br>******************************<u></u>**********<br><br>Now cp2k compilation stops with the error:<br><br>/home/rbs/local/lib64/gcc/x86_<u></u>64-unknown-linux-gnu/4.9.1/../<u></u>../../../x86_64-unknown-linux-<u></u>gnu/bin/ld: Warning: size of symbol `build_eri' changed from 19208 in /home/rbs/chandan/softs/cp2k-<u></u>2.5.1/makefiles/../lib/Linux-<u></u>x86-64-gfortran-openmpi-<u></u>libint-blas-lapack/popt/<u></u>libcp2k_lib.a(hfx_libint_<u></u>wrapper.o) to 5000 in /home/rbs/chandan/softs/<u></u>LIBINT/lib/libint.a(init_<u></u>libint.o)<br>/home/rbs/chandan/softs/<u></u>forcp2k/lapack-3.5.0/<u></u>liblapack.a(strtri.o): In function `strtri_':<br>strtri.f:(.text+0x264): undefined reference to `strmm_'<br>strtri.f:(.text+0x2ac): undefined reference to `strsm_'<br>strtri.f:(.text+0x580): undefined reference to `strmm_'<br>strtri.f:(.text+0x5eb): undefined reference to `strsm_'<br>/home/rbs/chandan/softs/<u></u>forcp2k/lapack-3.5.0/<u></u>liblapack.a(dgecon.o): In function `dgecon_':<br>dgecon.f:(.text+0x3d6): undefined reference to `idamax_'<br>/home/rbs/chandan/softs/<u></u>forcp2k/lapack-3.5.0/<u></u>liblapack.a(dgetri.o): In function `dgetri_':<br>dgetri.f:(.text+0x2ee): undefined reference to `dswap_'<br>/home/rbs/chandan/softs/<u></u>forcp2k/lapack-3.5.0/<u></u>liblapack.a(dlacn2.o): In function `dlacn2_':<br>dlacn2.f:(.text+0xb1): undefined reference to `dasum_'<br>dlacn2.f:(.text+0x130): undefined reference to `dasum_'<br>dlacn2.f:(.text+0x1ff): undefined reference to `idamax_'<br>dlacn2.f:(.text+0x2c0): undefined reference to `idamax_'<br>dlacn2.f:(.text+0x348): undefined reference to `dasum_'<br><br>The problem seems that these functions are not present in liblapack.a <br>So I checked using:<br>nm -A libblas.a |grep strmm<br>The output was:<br>libblas.a:strmm.o:<u></u>0000000000000000 r .LC8<br>libblas.a:strmm.o:            <u></u>     U lsame_<br>libblas.a:strmm.o:            <u></u>     U memset<br>libblas.a:strmm.o:<u></u>0000000000000000 T strmm_<br>libblas.a:strmm.o:            <u></u>     U xerbla_<br><br>and <br>nm -A liblapack.a |grep strmm<br>The output was:<br>liblapack.a:sgehrd.o:         <u></u>        U strmm_<br>liblapack.a:slahr2.o:         <u></u>        U strmm_<br>liblapack.a:slaqr5.o:         <u></u>        U strmm_<br>liblapack.a:slarfb.o:         <u></u>        U strmm_<br>liblapack.a:slarzb.o:         <u></u>        U strmm_<br>liblapack.a:slauum.o:         <u></u>        U strmm_<br>liblapack.a:ssygst.o:         <u></u>        U strmm_<br>liblapack.a:ssygv.o:          <u></u>       U strmm_<br>liblapack.a:ssygvd.o:         <u></u>        U strmm_<br>liblapack.a:ssygvx.o:         <u></u>        U strmm_<br>liblapack.a:ssytri2x.o:       <u></u>          U strmm_<br>liblapack.a:strtri.o:         <u></u>        U strmm_<br>liblapack.a:spftri.o:         <u></u>        U strmm_<br>liblapack.a:stftri.o:         <u></u>        U strmm_<br>liblapack.a:sgeqrt3.o:        <u></u>         U strmm_<br>liblapack.a:stprfb.o:         <u></u>        U strmm_<br><br>SO my guess is that the function strmm_ is present in BLAS.<br><br>Is this a linking issue ?? If so how to do the correctly link BLAS, LAPACK and SCALAPACK ?<br>Did I miss some flags in the arch file ?<br><br>Any help would be deeply appreciated.<br><br>I am attaching the output files from make for the libraries and cp2k.<br><br>Thanks in advance,<br>Chandan<br><br></div></blockquote></div></div></div><div class="HOEnZb"><div class="h5">

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups "cp2k" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:cp2k+uns...@googlegroups.com" target="_blank">cp2k+uns...@googlegroups.com</a>.<br>
To post to this group, send email to <a href="mailto:cp...@googlegroups.com" target="_blank">cp...@googlegroups.com</a>.<br>
Visit this group at <a href="http://groups.google.com/group/cp2k" target="_blank">http://groups.google.com/group/cp2k</a>.<br>
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank">https://groups.google.com/d/optout</a>.<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">....for afterwards a man finds pleasure in his pains,<br>when he has suffered long and wandered far.<br>                       -Homer</div>
</div>