1

I downloaded and compiled Openblas, and now I am trying to compile and link openblas to Suitesparse 4.4.4. After compiling all lib files, I get the following error when the compiler tries to compile umfpack_di_demo.c:


    ../Lib/libumfpack.a(umf_di_local_search.o): In function  `umfdi_local_search':
    umf_local_search.c:(.text+0x4c0): undefined reference to `dtrsv_'
    umf_local_search.c:(.text+0x634): undefined reference to `dgemv_'
    ../Lib/libumfpack.a(umf_di_blas3_update.o): In function    `umfdi_blas3_update':
    umf_blas3_update.c:(.text+0x11d): undefined reference to `dtrsm_'
    umf_blas3_update.c:(.text+0x1de): undefined reference to `dgemm_'
    umf_blas3_update.c:(.text+0x2ae): undefined reference to `dger_'

which I took to mean that the linking is not proper. But, as directed in SuiteSparse_config.mk, I gave the absolute location of libopenblas.a on my system. Also, I also gcc-nm to see if the symbol dtrsv_ is defined in libopenblas.a, and I got the following output which shows that the symbol is defined in the library:


    0000000000000000 T dtrsv_
                     U dtrsv_NLN
                     U dtrsv_NLU
                     U dtrsv_NUN
                     U dtrsv_NUU
                     U dtrsv_TLN
                     U dtrsv_TLU
                     U dtrsv_TUN
                     U dtrsv_TUU
                     U dtrsv_NLN
                     U dtrsv_NLU
                     U dtrsv_NUN
                     U dtrsv_NUU
                     U dtrsv_TLN
                     U dtrsv_TLU
                     U dtrsv_TUN
                     U dtrsv_TUU
    dtrsv_NUU.o:
    0000000000000000 T dtrsv_NUU
    dtrsv_NUN.o:
    0000000000000000 T dtrsv_NUN
    dtrsv_NLU.o:
    0000000000000000 T dtrsv_NLU
    dtrsv_NLN.o:
    0000000000000000 T dtrsv_NLN
    dtrsv_TUU.o:
    0000000000000000 T dtrsv_TUU
    dtrsv_TUN.o:
    0000000000000000 T dtrsv_TUN
    dtrsv_TLU.o:
    0000000000000000 T dtrsv_TLU
    dtrsv_TLN.o:
    0000000000000000 T dtrsv_TLN
                     U dtrsv_NLU
                     U dtrsv_NUN
                     U dtrsv_TLU
                     U dtrsv_TUN
                     U dtrsv_NLU
                     U dtrsv_NUN
                     U dtrsv_TLU
                     U dtrsv_TUN
                     U dtrsv_
                     U dtrsv_
                     U dtrsv_

I am not sure whats going wrong here. Should I include lapack with openblas in the suitesparse_config.mk file? Any help is appreciated. Thanks.

Note: if it helps, I used gcc 4.4.7 for all compilation and my system details are:


    Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u3 x86_64 GNU/Linux

== EDIT 1: the steps i followed ==

For Openblas:

  1. Downloaded openblas from http://github.com/xianyi/OpenBLAS/zipball/v0.2.14.
  2. Unzipped and compiled it on my system using gcc-4.4.7 and the following command make FC=/usr/bin/lgfortran-4.4 I had to provide 'FC' as my system is not having libgfortran.* present in /usr/lib/.
  3. After compilation is done, I type make install to install to a custom directory in my home folder.

For suitesparse:

  1. Downloaded suitesparse from http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-4.4.4.tar.gz
  2. Unzipped it, and edited the suitsparse_config.mk file to do the following modifications: A) enabled GPU configuration for CHOLMOD and SPQR, B) Not using metis, so commented "METIS_PATH = ../../metis-4.0" and "METIS = ../../metis-4.0/libmetis.a". Also, uncommitted "CHOLMOD_CONFIG = -DNPARTITION". C) gave path to custom installation of openblas: BLAS = -L//OpenBLAS/local/lib/libopenblas.a -lpthread -L/usr/lib/gcc/x86_64-linux-gnu/4.4.7/libgfortran.so
  3. type make in srcdir.
Chatter
  • 193
  • 8
  • It's very particular case. Could you please provide your build log as a set of commands like `wget` to download sources, `./configure `and `make` to build libraries etc., so we can try and repeat exactly what you are doing and observe the same errors? At first glance seems like some dependencies are missing or dependencies version mismatch or something like that. But to say for sure I need the whole build history of yours. – Sam Protsenko Apr 06 '15 at 23:15
  • @SamProtsenko i added the steps i used for compilation. – Chatter Apr 06 '15 at 23:58
  • I take it you are using Debian. So am I, and I can see next packages in Debian repositories (for my Debian Jessie): `libsuitesparse-dev` and `libopenblas-dev`. I also can see that they are available for Wheezy. Why don't you want to use them? – Sam Protsenko Apr 07 '15 at 00:11
  • 1
    Also there is `liblapack-dev` package. Seems like they all can play nice together. If you still have your reasons to have custom built libraries, specify which lapack library you want to use (from Debian repository or also custom built), and I will try to provide you with instructions tomorrow. – Sam Protsenko Apr 07 '15 at 00:22
  • I am not an admin on my machine. That being said, I was unaware that `libopenblas-dev` is available in the repository. Also, I already had suitesparse installed but its based on the reference BLAS implementation. I will ask the sysadmin to install `libopenblas-dev` and an optimized suitesparse based on openblas. Thanks for the info. – Chatter Apr 07 '15 at 00:25
  • 1: Why do you not use the suitesparse package from your distribution? 2: Get a newer compiler! GCC 4.4 was first released 2009, this is six years in the past. Try GCC 4.9 and you'll get completely different results, especially on today's hardware. – usr1234567 Apr 07 '15 at 06:05
  • @usr1234567 Hi. I am using the suitesparse package from my distribution, but I suspect that I will obtain better speeds by building the most recent suitesparse linked with openblas. It is worth trying! About the newer gcc, yes that's a good idea. Unfortunately for me, I am not the sysadmin :'(. I have asked them to install the newer versions. Lets hope they get it done soon. – Chatter Apr 07 '15 at 17:24

0 Answers0