Page 1 of 1

Not being able to link: undefined reference to `dpttrf_

PostPosted: Tue Feb 24, 2015 4:13 pm
by mikael
Hi,

I am becoming desperate about being unable to link ScaLAPACK libraries. I am trying to use functions
pdpttrf_ and pdpttrs_ from ScaLAPACK. The compiler appears to find both functions (or actually
their Fortran originals), but still gives the following error message:

/home/mikael/Libs/scalapack-2.0.2//libscalapack.a(pdpttrf.o): In function `pdpttrf_':
pdpttrf.f:(.text+0x4b4): undefined reference to `dpttrf_'

I have linked everything I could imagine useful:
-I/home/mikael/Libs/lapack-3.5.0/lapacke/ -L/home/mikael/Libs/lapack-3.5.0/ -lm -llapacke -llapack -lblas
-L/home/mikael/Libs/scalapack-2.0.2/ -lscalapack -lblas -lgfortran

Re: Not being able to link: undefined reference to `dpttrf_

PostPosted: Tue May 19, 2015 4:33 am
by zerothi
You need to link lapack after scalapack.

Scalapack relies on lapack, and searches for functions after the library linking.

So -llapack -lscalapack will fail while
-lscalapack -llapack will not fail.

Re: Not being able to link: undefined reference to `dpttrf_

PostPosted: Fri Dec 25, 2015 6:57 am
by mcmarrie
I am having the same trouble as well.