librelist archives

« back to archive

Issues linking p4est against blas/lapack

Issues linking p4est against blas/lapack

From:
Le Chenadec, Vincent
Date:
2014-08-27 @ 15:26
Hi there,

I'm having issues compiling p4est against blas. After running the boostrap
script on the latest commit of the develop branch, I run the following
command:

./configure --enable-mpi --enable-mpiio --enable-shared --with-blas
--with-lapack

and ultimately get the following error:

configure: Checking BLAS
checking for dgemm_... no
checking for ATL_xerbla in -latlas... no
checking for dgemm_ in -lmkl... no
checking for dgemm_... (cached) no
checking for dgemm_ in -lcxml... no
checking for dgemm_ in -ldxml... no
checking for dgemm_ in -lscs... no
checking for dgemm_ in -lcomplib.sgimath... no
checking for dgemm_ in -lblas... no
checking for dgemm_... (cached) no
checking for dgemm_ in -lblas... (cached) no
configure: error: Cannot find BLAS library, specify a path using
LIBS=-L<DIR> (ex. LIBS=-L/usr/path/lib) or a specific library using
BLAS_LIBS=DIR/LIB (for example BLAS_LIBS=/usr/path/lib/libcxml.a)

The path to libblas.a (and liblapack.a) is however including in
LD_LIBRARY_PATH. It turns out setting explicitly BLAS_LIBS (or LIBS) to the
absolute path of libblas.a does not make any difference...

I'm using Intel 11 compiler on a x86_64-suse-linux cluster... I should also
mention that p4est compiles compiles fine on the same machine without blas
(--without-blas).

Any ideas are very much welcome! Thanks a lot,
Vincent

Re: [p4est] Issues linking p4est against blas/lapack

From:
Tobin Isaac
Date:
2014-08-27 @ 16:52
On Wed, Aug 27, 2014 at 05:26:25PM +0200, Le Chenadec, Vincent wrote:
> Hi there,
> 
> I'm having issues compiling p4est against blas. After running the boostrap
> script on the latest commit of the develop branch, I run the following
> command:
> 
> ./configure --enable-mpi --enable-mpiio --enable-shared --with-blas
> --with-lapack
> 
> and ultimately get the following error:
> 
> configure: Checking BLAS
> checking for dgemm_... no
> checking for ATL_xerbla in -latlas... no
> checking for dgemm_ in -lmkl... no
> checking for dgemm_... (cached) no
> checking for dgemm_ in -lcxml... no
> checking for dgemm_ in -ldxml... no
> checking for dgemm_ in -lscs... no
> checking for dgemm_ in -lcomplib.sgimath... no
> checking for dgemm_ in -lblas... no
> checking for dgemm_... (cached) no
> checking for dgemm_ in -lblas... (cached) no
> configure: error: Cannot find BLAS library, specify a path using
> LIBS=-L<DIR> (ex. LIBS=-L/usr/path/lib) or a specific library using
> BLAS_LIBS=DIR/LIB (for example BLAS_LIBS=/usr/path/lib/libcxml.a)
> 
> The path to libblas.a (and liblapack.a) is however including in
> LD_LIBRARY_PATH. It turns out setting explicitly BLAS_LIBS (or LIBS) to the
> absolute path of libblas.a does not make any difference...

LD_LIBRARY_PATH is used to find shared libraries at runtime, not
static libraries when linking.  For the latter, gcc uses LIBRARY_PATH.

> 
> I'm using Intel 11 compiler on a x86_64-suse-linux cluster... I should also
> mention that p4est compiles compiles fine on the same machine without blas
> (--without-blas).
> 
> Any ideas are very much welcome! Thanks a lot,
> Vincent

Re: [p4est] Issues linking p4est against blas/lapack

From:
Le Chenadec, Vincent
Date:
2014-08-27 @ 16:57
Hi Tody,

ok, thanks for pointing out the LD_LIBRARY_PATH/LIBRARY_PATH confusion.

The fix on libsc definitely helped: the error I now get is (I uploaded the
full config.log file at
https://www.dropbox.com/s/3rpxfge9xzasmz5/config2.log?dl=0)

configure: Checking BLAS
checking for dgemm_ in
/home/chenadecv/lib/lapack/3.4.2/intel-11.1.073/libblas.a... no
configure: error: Cannot find BLAS library, specify a path using
LIBS=-L<DIR> (ex. LIBS=-L/usr/path/lib) or a specific library using
BLAS_LIBS=DIR/LIB (for example BLAS_LIBS=/usr/path/lib/libcxml.a)

It now seems to be related to the name used to call dgemm from C, correct?

Thanks Toby, your help is very much appreciated!
  Vincent


On Wed, Aug 27, 2014 at 6:52 PM, Tobin Isaac <tisaac@ices.utexas.edu> wrote:

> On Wed, Aug 27, 2014 at 05:26:25PM +0200, Le Chenadec, Vincent wrote:
> > Hi there,
> >
> > I'm having issues compiling p4est against blas. After running the
> boostrap
> > script on the latest commit of the develop branch, I run the following
> > command:
> >
> > ./configure --enable-mpi --enable-mpiio --enable-shared --with-blas
> > --with-lapack
> >
> > and ultimately get the following error:
> >
> > configure: Checking BLAS
> > checking for dgemm_... no
> > checking for ATL_xerbla in -latlas... no
> > checking for dgemm_ in -lmkl... no
> > checking for dgemm_... (cached) no
> > checking for dgemm_ in -lcxml... no
> > checking for dgemm_ in -ldxml... no
> > checking for dgemm_ in -lscs... no
> > checking for dgemm_ in -lcomplib.sgimath... no
> > checking for dgemm_ in -lblas... no
> > checking for dgemm_... (cached) no
> > checking for dgemm_ in -lblas... (cached) no
> > configure: error: Cannot find BLAS library, specify a path using
> > LIBS=-L<DIR> (ex. LIBS=-L/usr/path/lib) or a specific library using
> > BLAS_LIBS=DIR/LIB (for example BLAS_LIBS=/usr/path/lib/libcxml.a)
> >
> > The path to libblas.a (and liblapack.a) is however including in
> > LD_LIBRARY_PATH. It turns out setting explicitly BLAS_LIBS (or LIBS) to
> the
> > absolute path of libblas.a does not make any difference...
>
> LD_LIBRARY_PATH is used to find shared libraries at runtime, not
> static libraries when linking.  For the latter, gcc uses LIBRARY_PATH.
>
> >
> > I'm using Intel 11 compiler on a x86_64-suse-linux cluster... I should
> also
> > mention that p4est compiles compiles fine on the same machine without
> blas
> > (--without-blas).
> >
> > Any ideas are very much welcome! Thanks a lot,
> > Vincent
>

Re: [p4est] Issues linking p4est against blas/lapack

From:
Tobin Isaac
Date:
2014-08-27 @ 17:44
Hi Vincent,

For some reason our configure script did not try to set the fortran
compilers like it's supposed to.  I can't figure out why from the
logs, but I think adding 

F77=mpif77 FC=mpif90

to your ./configure arguments might work until we get it fixed.

Cheers,
  Toby

On Wed, Aug 27, 2014 at 06:57:07PM +0200, Le Chenadec, Vincent wrote:
> Hi Tody,
> 
> ok, thanks for pointing out the LD_LIBRARY_PATH/LIBRARY_PATH confusion.
> 
> The fix on libsc definitely helped: the error I now get is (I uploaded the
> full config.log file at
> https://www.dropbox.com/s/3rpxfge9xzasmz5/config2.log?dl=0)
> 
> configure: Checking BLAS
> checking for dgemm_ in
> /home/chenadecv/lib/lapack/3.4.2/intel-11.1.073/libblas.a... no
> configure: error: Cannot find BLAS library, specify a path using
> LIBS=-L<DIR> (ex. LIBS=-L/usr/path/lib) or a specific library using
> BLAS_LIBS=DIR/LIB (for example BLAS_LIBS=/usr/path/lib/libcxml.a)
> 
> It now seems to be related to the name used to call dgemm from C, correct?
> 
> Thanks Toby, your help is very much appreciated!
>   Vincent
> 
> 
> On Wed, Aug 27, 2014 at 6:52 PM, Tobin Isaac <tisaac@ices.utexas.edu> wrote:
> 
> > On Wed, Aug 27, 2014 at 05:26:25PM +0200, Le Chenadec, Vincent wrote:
> > > Hi there,
> > >
> > > I'm having issues compiling p4est against blas. After running the
> > boostrap
> > > script on the latest commit of the develop branch, I run the following
> > > command:
> > >
> > > ./configure --enable-mpi --enable-mpiio --enable-shared --with-blas
> > > --with-lapack
> > >
> > > and ultimately get the following error:
> > >
> > > configure: Checking BLAS
> > > checking for dgemm_... no
> > > checking for ATL_xerbla in -latlas... no
> > > checking for dgemm_ in -lmkl... no
> > > checking for dgemm_... (cached) no
> > > checking for dgemm_ in -lcxml... no
> > > checking for dgemm_ in -ldxml... no
> > > checking for dgemm_ in -lscs... no
> > > checking for dgemm_ in -lcomplib.sgimath... no
> > > checking for dgemm_ in -lblas... no
> > > checking for dgemm_... (cached) no
> > > checking for dgemm_ in -lblas... (cached) no
> > > configure: error: Cannot find BLAS library, specify a path using
> > > LIBS=-L<DIR> (ex. LIBS=-L/usr/path/lib) or a specific library using
> > > BLAS_LIBS=DIR/LIB (for example BLAS_LIBS=/usr/path/lib/libcxml.a)
> > >
> > > The path to libblas.a (and liblapack.a) is however including in
> > > LD_LIBRARY_PATH. It turns out setting explicitly BLAS_LIBS (or LIBS) to
> > the
> > > absolute path of libblas.a does not make any difference...
> >
> > LD_LIBRARY_PATH is used to find shared libraries at runtime, not
> > static libraries when linking.  For the latter, gcc uses LIBRARY_PATH.
> >
> > >
> > > I'm using Intel 11 compiler on a x86_64-suse-linux cluster... I should
> > also
> > > mention that p4est compiles compiles fine on the same machine without
> > blas
> > > (--without-blas).
> > >
> > > Any ideas are very much welcome! Thanks a lot,
> > > Vincent
> >

Re: [p4est] Issues linking p4est against blas/lapack

From:
Le Chenadec, Vincent
Date:
2014-08-27 @ 19:36
Hi Toby,

it worked, modulo the small change F77=mpif90.

I still end of with warning such as

*** Warning: Linking the shared library src/libp4est.la against the
*** static library
/home/chenadecv/lib/lapack/3.4.2/intel-11.1.073/liblapack.a is not portable!

even after recompiling both libblas.a and liblapack.a with '-fPIC -DPIC'
flags, but at least p4est compiles.

Thanks again Toby,
  Vincent


On Wed, Aug 27, 2014 at 7:44 PM, Tobin Isaac <tisaac@ices.utexas.edu> wrote:

>
> Hi Vincent,
>
> For some reason our configure script did not try to set the fortran
> compilers like it's supposed to.  I can't figure out why from the
> logs, but I think adding
>
> F77=mpif77 FC=mpif90
>
> to your ./configure arguments might work until we get it fixed.
>
> Cheers,
>   Toby
>
> On Wed, Aug 27, 2014 at 06:57:07PM +0200, Le Chenadec, Vincent wrote:
> > Hi Tody,
> >
> > ok, thanks for pointing out the LD_LIBRARY_PATH/LIBRARY_PATH confusion.
> >
> > The fix on libsc definitely helped: the error I now get is (I uploaded
> the
> > full config.log file at
> > https://www.dropbox.com/s/3rpxfge9xzasmz5/config2.log?dl=0)
> >
> > configure: Checking BLAS
> > checking for dgemm_ in
> > /home/chenadecv/lib/lapack/3.4.2/intel-11.1.073/libblas.a... no
> > configure: error: Cannot find BLAS library, specify a path using
> > LIBS=-L<DIR> (ex. LIBS=-L/usr/path/lib) or a specific library using
> > BLAS_LIBS=DIR/LIB (for example BLAS_LIBS=/usr/path/lib/libcxml.a)
> >
> > It now seems to be related to the name used to call dgemm from C,
> correct?
> >
> > Thanks Toby, your help is very much appreciated!
> >   Vincent
> >
> >
> > On Wed, Aug 27, 2014 at 6:52 PM, Tobin Isaac <tisaac@ices.utexas.edu>
> wrote:
> >
> > > On Wed, Aug 27, 2014 at 05:26:25PM +0200, Le Chenadec, Vincent wrote:
> > > > Hi there,
> > > >
> > > > I'm having issues compiling p4est against blas. After running the
> > > boostrap
> > > > script on the latest commit of the develop branch, I run the
> following
> > > > command:
> > > >
> > > > ./configure --enable-mpi --enable-mpiio --enable-shared --with-blas
> > > > --with-lapack
> > > >
> > > > and ultimately get the following error:
> > > >
> > > > configure: Checking BLAS
> > > > checking for dgemm_... no
> > > > checking for ATL_xerbla in -latlas... no
> > > > checking for dgemm_ in -lmkl... no
> > > > checking for dgemm_... (cached) no
> > > > checking for dgemm_ in -lcxml... no
> > > > checking for dgemm_ in -ldxml... no
> > > > checking for dgemm_ in -lscs... no
> > > > checking for dgemm_ in -lcomplib.sgimath... no
> > > > checking for dgemm_ in -lblas... no
> > > > checking for dgemm_... (cached) no
> > > > checking for dgemm_ in -lblas... (cached) no
> > > > configure: error: Cannot find BLAS library, specify a path using
> > > > LIBS=-L<DIR> (ex. LIBS=-L/usr/path/lib) or a specific library using
> > > > BLAS_LIBS=DIR/LIB (for example BLAS_LIBS=/usr/path/lib/libcxml.a)
> > > >
> > > > The path to libblas.a (and liblapack.a) is however including in
> > > > LD_LIBRARY_PATH. It turns out setting explicitly BLAS_LIBS (or LIBS)
> to
> > > the
> > > > absolute path of libblas.a does not make any difference...
> > >
> > > LD_LIBRARY_PATH is used to find shared libraries at runtime, not
> > > static libraries when linking.  For the latter, gcc uses LIBRARY_PATH.
> > >
> > > >
> > > > I'm using Intel 11 compiler on a x86_64-suse-linux cluster... I
> should
> > > also
> > > > mention that p4est compiles compiles fine on the same machine without
> > > blas
> > > > (--without-blas).
> > > >
> > > > Any ideas are very much welcome! Thanks a lot,
> > > > Vincent
> > >
>

Re: [p4est] Issues linking p4est against blas/lapack

From:
Tobin Isaac
Date:
2014-08-27 @ 15:34
Hi Vincent,

Could you please attach your config.log file?

Thanks,
  Toby

On Wed, Aug 27, 2014 at 05:26:25PM +0200, Le Chenadec, Vincent wrote:
> Hi there,
> 
> I'm having issues compiling p4est against blas. After running the boostrap
> script on the latest commit of the develop branch, I run the following
> command:
> 
> ./configure --enable-mpi --enable-mpiio --enable-shared --with-blas
> --with-lapack
> 
> and ultimately get the following error:
> 
> configure: Checking BLAS
> checking for dgemm_... no
> checking for ATL_xerbla in -latlas... no
> checking for dgemm_ in -lmkl... no
> checking for dgemm_... (cached) no
> checking for dgemm_ in -lcxml... no
> checking for dgemm_ in -ldxml... no
> checking for dgemm_ in -lscs... no
> checking for dgemm_ in -lcomplib.sgimath... no
> checking for dgemm_ in -lblas... no
> checking for dgemm_... (cached) no
> checking for dgemm_ in -lblas... (cached) no
> configure: error: Cannot find BLAS library, specify a path using
> LIBS=-L<DIR> (ex. LIBS=-L/usr/path/lib) or a specific library using
> BLAS_LIBS=DIR/LIB (for example BLAS_LIBS=/usr/path/lib/libcxml.a)
> 
> The path to libblas.a (and liblapack.a) is however including in
> LD_LIBRARY_PATH. It turns out setting explicitly BLAS_LIBS (or LIBS) to the
> absolute path of libblas.a does not make any difference...
> 
> I'm using Intel 11 compiler on a x86_64-suse-linux cluster... I should also
> mention that p4est compiles compiles fine on the same machine without blas
> (--without-blas).
> 
> Any ideas are very much welcome! Thanks a lot,
> Vincent

Re: [p4est] Issues linking p4est against blas/lapack

From:
Le Chenadec, Vincent
Date:
2014-08-27 @ 15:40
Hi Toby,

good point, the file is here:
https://www.dropbox.com/s/jr1s42cbbiloc28/config.log?dl=0

Thanks,
  Vincent

On Wed, Aug 27, 2014 at 5:34 PM, Tobin Isaac <tisaac@ices.utexas.edu> wrote:

>
> Hi Vincent,
>
> Could you please attach your config.log file?
>
> Thanks,
>   Toby
>
> On Wed, Aug 27, 2014 at 05:26:25PM +0200, Le Chenadec, Vincent wrote:
> > Hi there,
> >
> > I'm having issues compiling p4est against blas. After running the
> boostrap
> > script on the latest commit of the develop branch, I run the following
> > command:
> >
> > ./configure --enable-mpi --enable-mpiio --enable-shared --with-blas
> > --with-lapack
> >
> > and ultimately get the following error:
> >
> > configure: Checking BLAS
> > checking for dgemm_... no
> > checking for ATL_xerbla in -latlas... no
> > checking for dgemm_ in -lmkl... no
> > checking for dgemm_... (cached) no
> > checking for dgemm_ in -lcxml... no
> > checking for dgemm_ in -ldxml... no
> > checking for dgemm_ in -lscs... no
> > checking for dgemm_ in -lcomplib.sgimath... no
> > checking for dgemm_ in -lblas... no
> > checking for dgemm_... (cached) no
> > checking for dgemm_ in -lblas... (cached) no
> > configure: error: Cannot find BLAS library, specify a path using
> > LIBS=-L<DIR> (ex. LIBS=-L/usr/path/lib) or a specific library using
> > BLAS_LIBS=DIR/LIB (for example BLAS_LIBS=/usr/path/lib/libcxml.a)
> >
> > The path to libblas.a (and liblapack.a) is however including in
> > LD_LIBRARY_PATH. It turns out setting explicitly BLAS_LIBS (or LIBS) to
> the
> > absolute path of libblas.a does not make any difference...
> >
> > I'm using Intel 11 compiler on a x86_64-suse-linux cluster... I should
> also
> > mention that p4est compiles compiles fine on the same machine without
> blas
> > (--without-blas).
> >
> > Any ideas are very much welcome! Thanks a lot,
> > Vincent
>

Re: [p4est] Issues linking p4est against blas/lapack

From:
Tobin Isaac
Date:
2014-08-27 @ 16:37
Hi Vincent,

It looks like you posted the config.log for when you tried to set
BLAS_LIBS manually, but that's okay, because it looks like there might
be a simple fix.

I can't push my fix to Carsten's repo, but you could try it from my
repo, and if it works we'll integrate it.  Please try the following
lines from the top p4est source directory, which will get the bugfix
in the sc submodule.

cd sc
git remote add tisaac https://github.com/tisaac/libsc
git fetch tisaac
git checkout -b vincentlechenadec/fix-blas-ok-bug 
tisaac/vincentlechenadec/fix-blas-ok-bug
cd ..

Then bootstrap and try to configure with BLAS_LIBS set to the absolute
path to libblas.a again.  Let me know if it works or not.

Cheers,
  Toby

On Wed, Aug 27, 2014 at 05:40:35PM +0200, Le Chenadec, Vincent wrote:
> Hi Toby,
> 
> good point, the file is here:
> https://www.dropbox.com/s/jr1s42cbbiloc28/config.log?dl=0
> 
> Thanks,
>   Vincent
> 
> On Wed, Aug 27, 2014 at 5:34 PM, Tobin Isaac <tisaac@ices.utexas.edu> wrote:
> 
> >
> > Hi Vincent,
> >
> > Could you please attach your config.log file?
> >
> > Thanks,
> >   Toby
> >
> > On Wed, Aug 27, 2014 at 05:26:25PM +0200, Le Chenadec, Vincent wrote:
> > > Hi there,
> > >
> > > I'm having issues compiling p4est against blas. After running the
> > boostrap
> > > script on the latest commit of the develop branch, I run the following
> > > command:
> > >
> > > ./configure --enable-mpi --enable-mpiio --enable-shared --with-blas
> > > --with-lapack
> > >
> > > and ultimately get the following error:
> > >
> > > configure: Checking BLAS
> > > checking for dgemm_... no
> > > checking for ATL_xerbla in -latlas... no
> > > checking for dgemm_ in -lmkl... no
> > > checking for dgemm_... (cached) no
> > > checking for dgemm_ in -lcxml... no
> > > checking for dgemm_ in -ldxml... no
> > > checking for dgemm_ in -lscs... no
> > > checking for dgemm_ in -lcomplib.sgimath... no
> > > checking for dgemm_ in -lblas... no
> > > checking for dgemm_... (cached) no
> > > checking for dgemm_ in -lblas... (cached) no
> > > configure: error: Cannot find BLAS library, specify a path using
> > > LIBS=-L<DIR> (ex. LIBS=-L/usr/path/lib) or a specific library using
> > > BLAS_LIBS=DIR/LIB (for example BLAS_LIBS=/usr/path/lib/libcxml.a)
> > >
> > > The path to libblas.a (and liblapack.a) is however including in
> > > LD_LIBRARY_PATH. It turns out setting explicitly BLAS_LIBS (or LIBS) to
> > the
> > > absolute path of libblas.a does not make any difference...
> > >
> > > I'm using Intel 11 compiler on a x86_64-suse-linux cluster... I should
> > also
> > > mention that p4est compiles compiles fine on the same machine without
> > blas
> > > (--without-blas).
> > >
> > > Any ideas are very much welcome! Thanks a lot,
> > > Vincent
> >