Page 1 of 1

Link problems with lapack 3.5.0

PostPosted: Thu Dec 05, 2013 4:45 pm
by fercaba
Hi, i just install aparently succesfully lapack libreries.
But, when y try to compile and link with lapack i get the following errors:

/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/liblapack.a(dsygv.o): In function `dsygv_':
dsygv.f:(.text+0x441): undefined reference to `dtrmm_'
dsygv.f:(.text+0x4f4): undefined reference to `dtrsm_'
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/liblapack.a(dpotrf.o): In function `dpotrf_':
dpotrf.f:(.text+0x269): undefined reference to `dsyrk_'
dpotrf.f:(.text+0x364): undefined reference to `dgemm_'
dpotrf.f:(.text+0x3fe): undefined reference to `dtrsm_'
dpotrf.f:(.text+0x58e): undefined reference to `dsyrk_'
dpotrf.f:(.text+0x681): undefined reference to `dgemm_'
dpotrf.f:(.text+0x719): undefined reference to `dtrsm_'
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/liblapack.a(dsyev.o): In function `dsyev_':
dsyev.f:(.text+0x597): undefined reference to `dscal_'
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/liblapack.a(dsygst.o): In function `dsygst_':
dsygst.f:(.text+0x3ac): undefined reference to `dtrmm_'
dsygst.f:(.text+0x434): undefined reference to `dsymm_'
dsygst.f:(.text+0x49a): undefined reference to `dsyr2k_'
dsygst.f:(.text+0x4fa): undefined reference to `dsymm_'
dsygst.f:(.text+0x572): undefined reference to `dtrmm_'
dsygst.f:(.text+0x76f): undefined reference to `dtrmm_'
dsygst.f:(.text+0x800): undefined reference to `dsymm_'
dsygst.f:(.text+0x868): undefined reference to `dsyr2k_'
dsygst.f:(.text+0x8ca): undefined reference to `dsymm_'
dsygst.f:(.text+0x950): undefined reference to `dtrmm_'
dsygst.f:(.text+0xb9f): undefined reference to `dtrsm_'
dsygst.f:(.text+0xc55): undefined reference to `dsymm_'
dsygst.f:(.text+0xd16): undefined reference to `dsyr2k_'
dsygst.f:(.text+0xdc3): undefined reference to `dsymm_'
dsygst.f:(.text+0xe7f): undefined reference to `dtrsm_'
dsygst.f:(.text+0x10e8): undefined reference to `dtrsm_'
dsygst.f:(.text+0x1192): undefined reference to `dsymm_'
dsygst.f:(.text+0x1250): undefined reference to `dsyr2k_'
dsygst.f:(.text+0x12fa): undefined reference to `dsymm_'
dsygst.f:(.text+0x13ae): undefined reference to `dtrsm_'
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/liblapack.a(dsytrd.o): In function `dsytrd_':
dsytrd.f:(.text+0x336): undefined reference to `dsyr2k_'
dsytrd.f:(.text+0x683): undefined reference to `dsyr2k_'
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/liblapack.a(dsteqr.o): In function `dsteqr_':
dsteqr.f:(.text+0x155e): undefined reference to `dswap_'
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/liblapack.a(dlatrd.o): In function `dlatrd_':
dlatrd.f:(.text+0xfc): undefined reference to `dscal_'
dlatrd.f:(.text+0x155): undefined reference to `ddot_'
dlatrd.f:(.text+0x1aa): undefined reference to `daxpy_'
dlatrd.f:(.text+0x287): undefined reference to `dgemv_'
dlatrd.f:(.text+0x321): undefined reference to `dgemv_'
dlatrd.f:(.text+0x428): undefined reference to `dsymv_'
dlatrd.f:(.text+0x4ea): undefined reference to `dgemv_'
dlatrd.f:(.text+0x587): undefined reference to `dgemv_'
dlatrd.f:(.text+0x633): undefined reference to `dgemv_'
dlatrd.f:(.text+0x6c6): undefined reference to `dgemv_'
dlatrd.f:(.text+0x7ec): undefined reference to `dgemv_'
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/liblapack.a(dlatrd.o):dlatrd.f:(.text+0x88c): more undefined references to `dgemv_' follow
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/liblapack.a(dlatrd.o): In function `dlatrd_':
dlatrd.f:(.text+0x9ae): undefined reference to `dsymv_'
dlatrd.f:(.text+0xa56): undefined reference to `dgemv_'
dlatrd.f:(.text+0xaef): undefined reference to `dgemv_'
dlatrd.f:(.text+0xb98): undefined reference to `dgemv_'
dlatrd.f:(.text+0xc30): undefined reference to `dgemv_'
dlatrd.f:(.text+0xc80): undefined reference to `dscal_'
dlatrd.f:(.text+0xcf4): undefined reference to `ddot_'
dlatrd.f:(.text+0xd66): undefined reference to `daxpy_'
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/liblapack.a(dpotf2.o): In function `dpotf2_':
dpotf2.f:(.text+0x1a2): undefined reference to `dgemv_'
dpotf2.f:(.text+0x1ee): undefined reference to `dscal_'
dpotf2.f:(.text+0x24d): undefined reference to `ddot_'
dpotf2.f:(.text+0x3aa): undefined reference to `ddot_'
dpotf2.f:(.text+0x481): undefined reference to `dgemv_'
dpotf2.f:(.text+0x4ca): undefined reference to `dscal_'
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/liblapack.a(dsygs2.o): In function `dsygs2_':
dsygs2.f:(.text+0x2b6): undefined reference to `dtrmv_'
dsygs2.f:(.text+0x309): undefined reference to `daxpy_'
dsygs2.f:(.text+0x357): undefined reference to `dsyr2_'
dsygs2.f:(.text+0x381): undefined reference to `daxpy_'
dsygs2.f:(.text+0x3aa): undefined reference to `dscal_'
dsygs2.f:(.text+0x520): undefined reference to `dtrmv_'
dsygs2.f:(.text+0x56d): undefined reference to `daxpy_'
dsygs2.f:(.text+0x5b9): undefined reference to `dsyr2_'
dsygs2.f:(.text+0x5e5): undefined reference to `daxpy_'
dsygs2.f:(.text+0x609): undefined reference to `dscal_'
dsygs2.f:(.text+0x7cd): undefined reference to `dscal_'
dsygs2.f:(.text+0x831): undefined reference to `daxpy_'
dsygs2.f:(.text+0x897): undefined reference to `dsyr2_'
dsygs2.f:(.text+0x8d6): undefined reference to `daxpy_'
dsygs2.f:(.text+0x93e): undefined reference to `dtrsv_'
dsygs2.f:(.text+0xaba): undefined reference to `dscal_'
dsygs2.f:(.text+0xb17): undefined reference to `daxpy_'
dsygs2.f:(.text+0xb7c): undefined reference to `dsyr2_'
dsygs2.f:(.text+0xbb4): undefined reference to `daxpy_'
dsygs2.f:(.text+0xc18): undefined reference to `dtrsv_'
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/liblapack.a(dsytd2.o): In function `dsytd2_':
dsytd2.f:(.text+0x1ec): undefined reference to `dsymv_'
dsytd2.f:(.text+0x237): undefined reference to `ddot_'
dsytd2.f:(.text+0x282): undefined reference to `daxpy_'
dsytd2.f:(.text+0x2dc): undefined reference to `dsyr2_'
dsytd2.f:(.text+0x4e1): undefined reference to `dsymv_'
dsytd2.f:(.text+0x548): undefined reference to `ddot_'
dsytd2.f:(.text+0x5b0): undefined reference to `daxpy_'
dsytd2.f:(.text+0x631): undefined reference to `dsyr2_'
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/liblapack.a(dlarfg.o): In function `dlarfg_':
dlarfg.f:(.text+0x54): undefined reference to `dnrm2_'
dlarfg.f:(.text+0x19b): undefined reference to `dscal_'
dlarfg.f:(.text+0x22c): undefined reference to `dscal_'
dlarfg.f:(.text+0x277): undefined reference to `dnrm2_'
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/liblapack.a(dlarfb.o): In function `dlarfb_':
dlarfb.f:(.text+0x1d7): undefined reference to `dcopy_'
dlarfb.f:(.text+0x28b): undefined reference to `dtrmm_'
dlarfb.f:(.text+0x31d): undefined reference to `dtrmm_'
dlarfb.f:(.text+0x3b8): undefined reference to `dtrmm_'
dlarfb.f:(.text+0x52d): undefined reference to `dcopy_'
dlarfb.f:(.text+0x5c5): undefined reference to `dtrmm_'
dlarfb.f:(.text+0x657): undefined reference to `dtrmm_'
dlarfb.f:(.text+0x6e6): undefined reference to `dtrmm_'
dlarfb.f:(.text+0x82d): undefined reference to `dcopy_'
dlarfb.f:(.text+0x8c5): undefined reference to `dtrmm_'
dlarfb.f:(.text+0x957): undefined reference to `dtrmm_'
dlarfb.f:(.text+0x9e6): undefined reference to `dtrmm_'
dlarfb.f:(.text+0xb17): undefined reference to `dcopy_'
dlarfb.f:(.text+0xbe6): undefined reference to `dtrmm_'
dlarfb.f:(.text+0xc78): undefined reference to `dtrmm_'
dlarfb.f:(.text+0xd1d): undefined reference to `dtrmm_'
dlarfb.f:(.text+0xe67): undefined reference to `dcopy_'
dlarfb.f:(.text+0xf34): undefined reference to `dtrmm_'
dlarfb.f:(.text+0xfc4): undefined reference to `dtrmm_'
dlarfb.f:(.text+0x106a): undefined reference to `dtrmm_'
dlarfb.f:(.text+0x1188): undefined reference to `dcopy_'
dlarfb.f:(.text+0x122c): undefined reference to `dtrmm_'
dlarfb.f:(.text+0x12bc): undefined reference to `dtrmm_'
dlarfb.f:(.text+0x134c): undefined reference to `dtrmm_'
dlarfb.f:(.text+0x1484): undefined reference to `dcopy_'
dlarfb.f:(.text+0x1536): undefined reference to `dtrmm_'
dlarfb.f:(.text+0x15c6): undefined reference to `dtrmm_'
dlarfb.f:(.text+0x1662): undefined reference to `dtrmm_'
dlarfb.f:(.text+0x1788): undefined reference to `dcopy_'
dlarfb.f:(.text+0x182c): undefined reference to `dtrmm_'
dlarfb.f:(.text+0x18bc): undefined reference to `dtrmm_'
dlarfb.f:(.text+0x194c): undefined reference to `dtrmm_'
dlarfb.f:(.text+0x1a7e): undefined reference to `dgemm_'
dlarfb.f:(.text+0x1b0c): undefined reference to `dgemm_'
dlarfb.f:(.text+0x1ba7): undefined reference to `dgemm_'
dlarfb.f:(.text+0x1c5e): undefined reference to `dgemm_'
dlarfb.f:(.text+0x1cea): undefined reference to `dgemm_'
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/liblapack.a(dlarfb.o):dlarfb.f:(.text+0x1d83): more undefined references to `dgemm_' follow
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/liblapack.a(dlarft.o): In function `dlarft_':
dlarft.f:(.text+0x5a7): undefined reference to `dgemv_'
dlarft.f:(.text+0x637): undefined reference to `dtrmv_'
dlarft.f:(.text+0x7db): undefined reference to `dgemv_'
dlarft.f:(.text+0xa6a): undefined reference to `dgemv_'
dlarft.f:(.text+0xb12): undefined reference to `dtrmv_'
dlarft.f:(.text+0xcc4): undefined reference to `dgemv_'
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/liblapack.a(dorg2l.o): In function `dorg2l_':
dorg2l.f:(.text+0x2ba): undefined reference to `dscal_'
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/liblapack.a(dorg2r.o): In function `dorg2r_':
dorg2r.f:(.text+0x393): undefined reference to `dscal_'
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/liblapack.a(dlarf.o): In function `dlarf_':
dlarf.f:(.text+0x150): undefined reference to `dgemv_'
dlarf.f:(.text+0x1a2): undefined reference to `dger_'
dlarf.f:(.text+0x244): undefined reference to `dgemv_'
dlarf.f:(.text+0x295): undefined reference to `dger_'
collect2: ld returned 1 exit status

Does anybody have an idea?

Thanks!

Re: Link problems with lapack 3.5.0

PostPosted: Thu Dec 05, 2013 6:13 pm
by admin
Just add the BLAS library -
make blaslib is the command
then make
Julie

Re: Link problems with lapack 3.5.0

PostPosted: Sat Dec 07, 2013 2:20 pm
by fercaba
Julie, it was not necessary to build the BLAS library. I had run "make all" and modified the makefile exchanging a comment on 2 lines.

# lib: lapacklib tmglib
lib: blaslib variants lapacklib tmglib

Originally the # was on the second line.

The BLAS library had been built, therefore, i had to add -lblas to compile the program, had only used -llapack

Another question, why the BLAS library is called librefblas by default instead of libblas as it mentioned in make.inc?

Thank you very much for everything

Re: Link problems with lapack 3.5.0

PostPosted: Sat Dec 07, 2013 3:23 pm
by admin
We call it the Reference BLAS, because this is the reference implementation of the BLAS library.
This reference library won't give you any performance.
In order to get better performance you need to get an optimized BLAS library.
See http://www.netlib.org/blas/faq.html#5 for more info.
Hope it helps
Julie