Not being able to link: undefined reference to `dpttrf_

Post here if you have a question about linking your program with LAPACK or ScaLAPACK library

Not being able to link: undefined reference to `dpttrf_

Postby mikael » Tue Feb 24, 2015 4:13 pm

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
mikael
 
Posts: 4
Joined: Tue Feb 24, 2015 4:04 pm

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

Postby zerothi » Tue May 19, 2015 4:33 am

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.
zerothi
 
Posts: 16
Joined: Thu Apr 30, 2015 8:42 am

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

Postby mcmarrie » Fri Dec 25, 2015 6:57 am

I am having the same trouble as well.
mcmarrie
 
Posts: 1
Joined: Thu Dec 03, 2015 3:30 am


Return to Linking Problem

Who is online

Users browsing this forum: No registered users and 3 guests