← Back to team overview

dolfin team mailing list archive

Re: [HG DOLFIN] Added CHOLMOD as optional dependency.

 

This is looking suspiously like a libatlas bug on Hardy. The simula-scons tests fail for umfpack and cholmod if libatlas-base-dev is installed. For plain blas and lapack, I get

    >ldd /usr/lib/libblas.so /usr/lib/liblapack.so
    libblas.so:
	    linux-gate.so.1 =>  (0xb7f97000)
	    libgfortran.so.2 (0xb7e80000)
  	    libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7d1b000)
	    libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7cf5000)
	    /lib/ld-linux.so.2 (0xb7f98000)
    liblapack.so:
	    linux-gate.so.1 =>  (0xb7fe2000)
	    libblas.so.3gf (0xb7870000)
	    libgfortran.so.2 (0xb77d9000)
	    libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb779d000)
	    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7792000)
	    libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7643000)
	    /lib/ld-linux.so.2 (0xb7fe3000)

Note that gfortran is present. For atlas (libatlas-base-dev),

    >ldd /usr/lib/atlas/libblas.so /usr/lib/atlas/liblapack.so
    /usr/lib/atlas/libblas.so:
	    linux-gate.so.1 =>  (0xb7f4b000)
	    libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7a99000)
	    /lib/ld-linux.so.2 (0xb7f4c000)
    /usr/lib/atlas/liblapack.so:
	    linux-gate.so.1 =>  (0xb7fc1000)
	    libblas.so.3gf => /usr/lib/atlas/libblas.so.3gf (0xb753c000)
	    libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb73ed000)
	    /lib/ld-linux.so.2 (0xb7fc2000)

Note that libgfortran is missing. On a Debian machine (lenny), I get

    >ldd /usr/lib/atlas/libblas.so /usr/lib/atlas/liblapack.so
    /usr/lib/atlas/libblas.so:
        linux-gate.so.1 =>  (0xb7f01000)
        libgfortran.so.3 => /usr/lib/libgfortran.so.3 (0xb7abf000)
        libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7a99000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7a8b000)
        libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7930000)
        /lib/ld-linux.so.2 (0xb7f02000)
    /usr/lib/atlas/liblapack.so:
        linux-gate.so.1 =>  (0xb7f88000)
        libblas.so.3gf => /usr/lib/atlas/libblas.so.3gf (0xb7478000)
        libgfortran.so.3 => /usr/lib/libgfortran.so.3 (0xb73c6000)
        libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb739f000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7392000)
        libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7237000)
        /lib/ld-linux.so.2 (0xb7f89000)


Any idea if this is bug or is it correct behaviour?

Garth




Garth N. Wells wrote:

Johannes Ring wrote:
On Thu, August 21, 2008 14:57, Garth N. Wells wrote:
Johannes Ring wrote:
Should be fixed now. Can you try again?

Mixed success. Doesn't work for Hardy, but does work for the alpha
version of Intrepid (inside a VM).

There is no liblapack.so in /usr/lib/atlas, just liblapack.so.3gf, under
Hardy. There is a liblapack.so in /usr/lib/atlas for Intrepid.

Somehow I have blas and lapack libs with a suffix "-3",

   /usr/lib/lapack-3.so   -> /etc/alternatives/liblapack-3.so
   /usr/lib/libblas-3.so -> /etc/alternatives/libblas-3.so

which pick up the atlas libs via /etc/alternatives/. I don't know what
the '-3' is supposed to mean or why it's there.

I give up for now trying to use atlas :(.
Have you installed the libatlas-base-dev package?


Yes. I see /usr/lib/atlas/liblapack.so now (not sure what happened before).

Back to the cholmod issue, now -lgfortran is also required (see below).

Garth

g++ -I/usr/include/suitesparse cholmod_config_test_include.cpp -L/usr/lib/atlas -llapack -L/usr/lib/atlas -lblas -L/usr/lib -lcholmod -L/usr/lib -lamd -L/usr/lib -lcolamd
Failed test program was:

#include <stdio.h>
#include <cholmod.h>

int main() {
   #ifdef CHOLMOD_MAIN_VERSION
     #ifdef CHOLMOD_SUB_VERSION
       #ifdef CHOLMOD_SUBSUB_VERSION
printf("%d.%d.%d", CHOLMOD_MAIN_VERSION,CHOLMOD_SUB_VERSION,CHOLMOD_SUBSUB_VERSION);
       #else
         printf("%d.%d", CHOLMOD_MAIN_VERSION,CHOLMOD_SUB_VERSION);
       #endif
     #else
       printf("%d", CHOLMOD_MAIN_VERSION);
     #endif
   #endif
   return 0;
}

Error message:
/usr/lib/atlas/liblapack.so: undefined reference to `_gfortran_concat_string' /usr/lib/atlas/liblapack.so: undefined reference to `_gfortran_st_write_done' /usr/lib/atlas/liblapack.so: undefined reference to `_gfortran_transfer_integer'
/usr/lib/atlas/liblapack.so: undefined reference to `_gfortran_stop_numeric'
/usr/lib/atlas/liblapack.so: undefined reference to `_gfortran_pow_i4_i4'
/usr/lib/atlas/liblapack.so: undefined reference to `_gfortran_st_write'
/usr/lib/atlas/liblapack.so: undefined reference to `_gfortran_compare_string'
/usr/lib/atlas/liblapack.so: undefined reference to `_gfortran_etime'
/usr/lib/atlas/liblapack.so: undefined reference to `_gfortran_pow_r8_i4'
/usr/lib/atlas/liblapack.so: undefined reference to `_gfortran_transfer_character'
/usr/lib/atlas/liblapack.so: undefined reference to `_gfortran_pow_r4_i4'
collect2: ld returned 1 exit status



Johannes

Garth


Johannes

On Thu, August 21, 2008 13:42, Garth N. Wells wrote:
The test for CHOLMOD fail on my machine when I remove liblapack3fg and
use atlas,

g++ -I/usr/include/suitesparse cholmod_config_test_include.cpp -L/usr
-llapack -L/usr -lblas -L/usr/lib -lcholmod -L/usr/lib -lamd -L/usr/lib
-lcolamd
Failed test program was:

#include <stdio.h>
#include <cholmod.h>

int main() {
   #ifdef CHOLMOD_MAIN_VERSION
     #ifdef CHOLMOD_SUB_VERSION
       #ifdef CHOLMOD_SUBSUB_VERSION
         printf("%d.%d.%d",
CHOLMOD_MAIN_VERSION,CHOLMOD_SUB_VERSION,CHOLMOD_SUBSUB_VERSION);
       #else
         printf("%d.%d", CHOLMOD_MAIN_VERSION,CHOLMOD_SUB_VERSION);
       #endif
     #else
       printf("%d", CHOLMOD_MAIN_VERSION);
     #endif
   #endif
   return 0;
}

Error message:
/usr/bin/ld: cannot find -llapack
collect2: ld returned 1 exit status

Garth

DOLFIN wrote:
One or more new changesets pushed to the primary dolfin repository.
A short summary of the last three changesets is included below.

changeset:   4599:bcc140c752dceba8fd4cf370997ad457871e3bbe
tag:         tip
user:        Johannes Ring <johannr@xxxxxxxxx>
date:        Mon Aug 18 13:09:15 2008 +0200
files:       SConstruct dolfin/scons.cfg
description:
Added CHOLMOD as optional dependency.


changeset:   4598:1a2d241d7d00401800fa1dbe2a17aa75287479c8
user:        Johannes Ring <johannr@xxxxxxxxx>
date:        Mon Aug 18 13:08:37 2008 +0200
files:       scons/simula-scons/simula_scons/Customize.py
scons/simula-scons/simula_scons/__init__.py
scons/simula-scons/simula_scons/pkgconfig.py
scons/simula-scons/simula_scons/pkgconfiggenerators/cholmod.py
scons/simula-scons/simula_scons/pkgconfiggenerators/commonPkgConfigUtils.py
description:
simula-scons update.


changeset:   4597:52fe4d684f7e7703f285d9dbb5237926e817b73e
parent:      4594:e92305bdc5377cd49f854d1d835b749fadb835b7
parent:      4596:7a229461cb9d1e29f0e4e8c9d98c6d321759d15b
user:        "Garth N. Wells <gnw20@xxxxxxxxx>"
date:        Mon Aug 18 11:03:17 2008 +0100
files:
description:
merge.

----------------------------------------------------------------------
For more details, visit http://www.fenics.org/hg/dolfin
_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev
_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev

_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev


_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev


References