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

724 HP MLIB LAPACK User’s Guide
Accessing Distributed SuperLU
When you use the –aarchive_shared flag on the compiler command line for
HP-UX, it ensures that the compiler links with the archive library. If the
archive library is not available, then it links the shared library. If you omit
–aarchive_shared and –ashared_archive, the linker defaults to linking the
shared library. Link with –Bstatic on Linux systems.
If your program uses subprograms from VECLIB, LAPACK, ScaLAPACK,
Distributed SuperLU, and VMATH, specify llapack, lveclib, lscalapack,
lsuperlu_dist, lsolvers and lvmath or llapack8, lveclib8, lscalapack8,
lsuperlu_dist8, lsolvers8 and lvmath8 on the compiler command line.
NOTE Do not mix subprograms from the two types of 64-bit address libraries
(those with 32-bit integers and those with 64-bit integers) in the same
program.
For PA-Based Systems
1. To link a program that uses SuperLU_DIST for use on the same machine,
use one of the following commands:
mpif90 [options] file ... –Wl,–aarchive_shared lsuperlu_dist
mpicc
[options] file ... –Wl,–aarchive_shared lsuperlu_dist lcl lm
mpiCC
[options] file ... –Wl,–aarchive_shared lsuperlu_dist lcl lm
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 SuperLU_DIST
for use with 32- or 64-bit addressing on a PA-based system, use one of the
following:
mpif90 [options] file ... /opt/mlib/lib/[pa2.0|pa20_64]/libsuperlu_dist.a
mpicc
[options] file ... /opt/mlib/lib/[pa2.0|pa20_64]/libsuperlu_dist.a lcl lm
mpiCC
[options] file ... /opt/mlib/lib/[pa2.0|pa20_64]/libsuperlu_dist.a lcl
lm
Replace libsuperlu_dist.a with libsuperlu_dist.sl on your compiler command
line if you want to link the shared library on a PA-based system.
3. Use the lsuperlu_dist option on the compiler command line that links your
program, preceded by:
Wl,–aarchive_shared,L/opt/mlib/lib/[pa2.0|pa20_64]
For example, the command lines in Method 2 for PA could be written:
mpif90 [options] file ... Wl,–aarchive_shared,L/opt/mlib/lib/[pa2.0|
pa20_64]
lsuperlu_dist