HP MLIB User's Guide Vol. 2 7th Ed.
696 HP MLIB LAPACK User’s Guide
Accessing ScaLAPACK
For example, the command lines in Method 2 for HP-UX could be written:
mpif90 [+DD32|+DD64] [options] file...−Wl,–aarchive_shared,−L/opt/mlib/lib/
[hpux32|hpux64]
−lscalapack
mpicc [+DD32|+DD64] [options] file ... −Wl,–aarchive_shared,−L/opt/mlib/lib/
[hpux32|hpux64]
−lscalapack −lcl −lm
mpiCC [+DD32|+DD64]
[options] file ... −Wl,–aarchive_shared,−L/opt/mlib/
lib/[hpux32|hpux64]
−lscalapack −lcl −lm
4. Set the LDOPTS environment variable to include:
–aarchive_shared,−L/opt/mlib/lib/[hpux32|hpux64]
For example:
setenv LDOPTS “–aarchive_shared,–L/opt/mlib/lib/hpux32”
Then use the −lscalapack option on the compiler command line that links
your program:
mpif90 [options] file ... −lscalapack
mpicc
[options] file ... −lscalapack −lcl −lm
mpiCC
[options] file ... −lscalapack −lcl −lm
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.
5. To link with the ScaLAPACK8 libraries on an HP-UX system, use the
+DD64 option to specify memory addresses are 64-bit.
Compile Fortran applications with the +i8, +autodbl, or +autodbl4 option
where:
• +i8 promotes 4-byte integer of logical constants, intrinsics, and user
variables (declared as integer or logical) to 8-byte quantities.
• +autodbl promotes all integer, logical, and real items to 8 bytes, and all
double-precision and complex items to 16 bytes.
• +autodbl4 promotes all integer logical, and real items to 8 bytes, and
complex items to 16 bytes. The +autodbl4 option does not promote the
size of double-precision and double-complex items.
mpif90 +DD64 +i8 [options] file ... −Wl,–aarchive_shared −lscalapack8
mpicc +DD64
[options] file ... −Wl,–aarchive_shared −lscalapack8 /opt/mpi/
lib/pa20_64/hpmpautodbl_isi8.o
−lcl −lm