Linking libraries in the right order
mirix
miro... at gmail.com
Sat Mar 9 13:33:52 UTC 2013
OK, I have realised that in that particular example libhwloc is linked
twice, but removing either one also gives errors.
On Saturday, March 9, 2013 2:30:33 PM UTC+1, mirix wrote:
>
> Hello,
>
> I would like to know if there are any general rules on the correct order
> for linking libraries when compiling CP2K.
>
> For instance, I have this:
>
> LIBS = -L/home/mirix/hwloc/lib/libhwloc.a -lxml2 -lpci\
> /home/mirix/Software/cp2k/cp2k-2.3/tools/build_libsmm/lib/libsmm_znn.a\
> /home/mirix/Software/cp2k/scalapack-2.0.2/libscalapack.a\
> $(ATLASPATH)/liblapack.a\
> $(ATLASPATH)/libcblas.a\
> $(ATLASPATH)/libf77blas.a\
> $(ATLASPATH)/libptcblas.a\
> $(ATLASPATH)/libptf77blas.a\
> $(ATLASPATH)/libatlas.a\
> $(LIBINTPATH)/libderiv.a\
> $(LIBINTPATH)/libr12.a\
> $(LIBINTPATH)/libint.a\
> /usr/local/lib/libfftw3f.a\
> /usr/local/cuda/lib64/libcudart.so.5.0\
> /usr/local/cuda/lib64/libcufft.so.5.0\
> /usr/local/cuda/lib64/libcublas.so.5.0\
> /home/mirix/hwloc/lib/libhwloc.a -lxml2 -lpci\
> -lstdc++ -lpthread -lrt
>
>
> This gives: cuda_cublas.f90:(.text+0x91): undefined reference to
> `cpu_d_gemm_'
>
> Depending on the order of the libraries I receive different "undefined
> reference" errors. I am trying different options, but I still have not
> found a working combination.
>
> Any ideas?
>
> Best regards,
>
> Miro
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20130309/1f48d34d/attachment.htm>
More information about the CP2K-user
mailing list