HP MLIB User's Guide Vol. 2 7th Ed.
Chapter 10 Introduction to ScaLAPACK 701
Accessing ScaLAPACK
Replace libscalapack.a with libscalapack.so on your compiler command line
if you want to link the shared library on an XC4000 system.
3. Use the −
lscalapack option on the compiler command line that links your
program, preceded by:
−Wl,–Bstatic,−L/opt/mlib/lib/pgi_5.1/hpmpi_2.1/lib/64
For example, the command lines in Method 2 for XC4000 could be written:
mpif90 [options] file...−Wl,–Bstatic,−L/opt/mlib/lib/pgi_5.1/
hpmpi_2.1/lib/64 −lscalapack −mp
mpicc
[options] file ...−Wl,–Bstatic,−L/opt/mlib/lib/pgi_5.1/
hpmpi_2.1/lib/64 −lscalapack −mp
−lpgf90 −lpgf90_rpml −lpgf902 −lpgf90rtl
−lpgftnrtl
4. Set the LDOPTS environment variable to include:
–Bstatic,−L/opt/mlib/lib/pgi_5.1/hpmpi_2.1/lib/64
For example:
setenv LDOPTS “–Bstatic,–L/opt/mlib/lib/pgi5.1/hpmpi_2.1/
lib/64”
Then use the −lscalapack option on the compiler command line that links
your program:
mpif90 [options] file ... −lscalapack −mp
mpicc
[options] file ... −lscalapack −mp −lpgf90 −lpgf90_rpml −lpgf902
−lpgf90rtl −lpgftnrtl
NOTE An LDOPTS specification takes precedence over using -Wl on the
compiler command line. That is, if you use the LDOPTS environment
variable to specify a library path, you cannot override that specification
with a -Wl option on your compiler command line.
Problem with +ppu compatibility and duplicated symbols
All MLIB subprograms documented in the HP MLIB User’s Guide have two
entry points: one is compatible with the Fortran compiler option +noppu (no
postpend underbar) and the second is compatible with the Fortran compiler
option +ppu (postpend underbar). For example, the MLIB BLAS error handler
XERBLA has entry points xerbla and xerbla_. Table 10-2 shows the Fortran 90
compiler defaults.