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

Chapter 10 Introduction to ScaLAPACK 697
Accessing ScaLAPACK
mpiCC +DD64 [options] file ... Wl,–aarchive_shared lscalapack8 /opt/mpi/
lib/pa20_64/hpmpautodbl_isi8.o
lcl lm
For Itanium-Based Red Hat Linux Systems
1. To link a program that uses ScaLAPACK for use on the same machine, use
one of the following commands:
mpif90 [options] file ... –Wl,–Bstatic lscalapack openmp
mpicc [options] file ... –Wl,–Bstatic lscalapack openmp
Link with –Bdynamic if you want the archive library on a Linux system.
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 a Linux system, use one of the following:
mpif90 [options] file ... /opt/mlib/intel_8.0/hpmpi_2.1/lib/64/libscalapack.a
openmp
mpicc
[options] file ... /opt/mlib/intel_8.0/hpmpi_2.1/lib/64/libscalapack.a
openmp
Replace libscalapack.a with libscalapack.so on your compiler command line
if you want to link the shared library on a Linux system.
When you use the C compiler for linking, you may require one or more of
-1CEPCF90, -1F90, -1IEPCF90, -1PEPCF90, or -1POSF90.
3. Use the lscalapack option on the compiler command line that links your
program, preceded by:
Wl,–Bstatic,L/opt/mlib/intel_8.0/hpmpi_2.1/lib/[32|64]
For example, the command lines in Method 2 for Linux could be written:
mpif90 [options] file...Wl,–Bstatic,L/opt/mlib/intel_8.0/hpmpi_2.1/lib/
[32|64] lscalapack openmp
mpicc
[options] file ... Wl,–Bstatic,L/opt/mlib/intel_8.0/hpmpi_2.1/lib/
[32|64] lscalapack openmp
When you use the C compiler for linking, you may require one or more of
-1CEPCF90, -1F90, -1IEPCF90, -1PEPCF90, or -1POSF90.
4. Set the LDOPTS environment variable to include:
–Bstatic,L/opt/mlib/intel_8.0/hpmpi_2.1/lib/[32|64]
For example:
setenv LDOPTS “–Bstatic,–L/opt/mlib/lib/linux”