HP MLIB User's Guide Vol. 2 7th Ed.

Chapter 10 Introduction to ScaLAPACK 699
Accessing ScaLAPACK
For example, the command lines in Method 2 for XC6000 could be written:
mpif90 [options] file...Wl,–Bstatic,L/opt/mlib/lib/intel_8.0/
hpmpi_2.1/lib/64 lscalapack openmp
lmpi
mpicc [options] file ... Wl,–Bstatic,L/opt/mlib/lib/intel_8.0/
hpmpi_2.1/lib/64 lscalapack openmp
lmpi
4. Set the LDOPTS environment variable to include:
–Bstatic,L/opt/mlib/lib/intel_8.0/hpmpi_2.1/lib/64
For example:
setenv LDOPTS “–Bstatic,–L/opt/mlib/lib/intel_8.0/hpmpi_2.1/lib/64”
Then use the lscalapack option on the compiler command line that links
your program:
mpif90 [options] file ... lscalapack openmp lmpi
mpicc
[options] file ... lscalapack openmp lmpi
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.
For XC6000 Systems with the Intel V7.1 Compiler
1. Use one of the following compile line commands to link ScaLAPACK:
mpif90 [options] file ... –L/opt/mlib/intel_7.1/hpmpi_2.1/lib/64 lscalapack
openmp lmpi
mpicc
[options] file ... –L/opt/mlib/intel_7.1/hpmpi_2.1/lib/64 lscalapack
openmp lmpi
2. Specify the entire path of the library file on the compiler command line that
links your program. For example, to link your program with ScaLAPACK for
use with 64-bit addressing on an XC6000 system with the Intel V7.1
compiler, use one of the following:
mpif90 [options] file ... /opt/mlib/lib/intel_7.1/hpmpi_2.1/lib/64/libscalapack.a
openmp
lmpi
mpicc
[options] file ... /opt/mlib/lib/intel_7.1/hpmpi_2.1/lib/64/libscalapack.a
openmp
lmpi
Replace libscalapack.a with libscalapack.so on your compiler command line
if you want to link the shared library on an XC6000 system.