Linking lapack

I’m having trouble linking to a lapack routine ‘ssytrd’.

but am getting lots of “undefined reference errors”, i.e.

pgf95 testlapack.f95 -llapack
/opt/pgi/linux86-64/10.8/lib/liblapack.a(ssytrd.o): In function ssytrd_': /proj/pgrel/extract/x86/2010/rte/lapack/hammer/lib-linux86-64/../../port/lapack-src/ssytrd.f:228: undefined reference to ssyr2k_’
/proj/pgrel/extract/x86/2010/rte/lapack/hammer/lib-linux86-64/…/…/port/lapack-src/ssytrd.f:259: undefined reference to ssyr2k_' /opt/pgi/linux86-64/10.8/lib/liblapack.a(slatrd.o): In function slatrd_’:
/proj/pgrel/extract/x86/2010/rte/lapack/hammer/lib-linux86-64/…/…/port/lapack-src/slatrd.f:175: undefined reference to `sgemv_’

and so on.

Help!?

Thanks.

Hi tsalem,

Lapack needs to be linked with a BLAS library. Try adding “-lblas”.

Hope this helps,
Mat

Thanks, Mat. That worked like a charm.