HP MLIB User's Guide Vol. 2 7th Ed.
728 HP MLIB LAPACK User’s Guide
Accessing Distributed SuperLU
mpif90 [options] file ... –Wl,–Bstatic −lsuperlu_dist −openmp
mpicc
[options] file ... –Wl,–Bstatic −lsuperlu_dist −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 SuperLU_DIST
for use with 32 or 64-bit addressing on a Linux system, use one of the
following:
mpif90 [options] file ... /opt/mlib/intel_8.0/hpmpi_2.1/lib/[32|64]/
libsuperlu_dist.a −openmp
mpicc
[options] file ... /opt/mlib/intel_8.0/hpmpi_2.1/lib/[32|64]/
libsuperlu_dist.a −openmp
Replace libsuperlu_dist.a with libsuperlu_dist.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 −lsuperlu_dist 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] −lsuperlu_dist
−openmp
mpicc
[options] file ...
−Wl,–Bstatic,−L/opt/mlib/intel_8.0/hpmpi_2.1/lib[32|/64] −lsuperlu_dist
−openmp
When you use the C compiler for linking, you may require one or more of
-1CEPCF90, -1F90, -1IEPCF90, -1PEPCF90, or -1POSF90.
Link with –Bdynamic if you want the archive library on a Linux system.
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”
Then use the −lsuperlu_dist option on the compiler command line that links
your program:
mpif90 [options] file ... −lsuperlu_dist −openmp