Problem compiling Scalapack Tests

I am using version 5.1-5 of the compiler on Linux (AMD64).
I’ve compiled and tested BLACS with pgf90 and pgcc = no problems.
I’ve compiled Scalapack with pf90 and pgcc.

There is no problem with compiling and executing the PBLAS test routines, however the REDIST test routines (c-programs) give me the following error during the linking:

/export/home/share/BLACS.PGI/LIB/blacs_MPI-LINUX-0.a (bi_f77_get_constants.o)(.data+0x0): undefined reference to `pgf90_compiled’
make: *** [/export/home/share/SCALAPACK.PGI/TESTING/xigemr] Error 2

I can’t seem to figure this one out. If I do all of the above using pgf77 instead of pgf90, I don’t get an error. I’m hoping someone has seen this before.

Thanks for help in advance,
Rob

Hi Rob,

When linking a library built using pgf90 with a C or C++ program you need to add several pgf90 libraries to the link line. With the upcoming 6.0 release, we’ve added a flag “-pgf90libs” which will add them for you. For now however, run the following command:

pgf90 -dryrun x.f

Grab all the “pgf90” libraries (below) from the “ld” command and add them to the link line of your C program.

pgcc -fast my.o ./myf90lib.a -lpgf90 -lpgf90_rpm1 -lpgf902 -lpgf90rtl -lpgftnrtl

Hope this helps,
Mat