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

Chapter 8 Introduction to LAPACK 635
Accessing LAPACK
aCC +DD64 [options] file ... Wl,–aarchive_shared llapack8 lcl lm
For Itanium-Based Red Hat Linux Systems
1. To link a program that uses LAPACK for use on the same machine, use one
of the following commands:
ifort [options] file ... –Wl,–Bstatic llapack openmp
icc
[options] file ... –Wl,–Bstatic llapack openmp
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 LAPACK for
use with 32- or 64-bit addressing on a Linux system, use one of the
following:
ifort [options] file ... /opt/mlib/intel_8.0/hpmpi_2.1/lib/[32|64]/liblapack.a
openmp
icc
[options] file ... /opt/mlib/intel_8.0/hpmpi_2.1/lib/[32|64]/liblapack.a
openmp
Replace liblapack.a with liblapack.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 llapack 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:
ifort [options] file...Wl,–Bstatic,L/opt/mlib/intel_8.0/hpmpi_2.1/lib/[32|64]
llapack openmp
icc
[options] file ... Wl,–Bstatic,L/opt/mlib/intel_8.0/hpmpi_2.1/lib/[32|64]
llapack 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”
Then use the llapack option on the compiler command line that links your
program: