HP MLIB User's Guide Vol. 1 7th Ed.
14 HP MLIB User’s Guide
Accessing VECLIB
4. Set the LDOPTS environment variable to include:
–Bstatic,−L/opt/mlib/lib/pgi_5.1/hpmpi_2.1/lib/64
For example:
setenv LDOPTS “–Bstatic,–L/opt/mlib/lib/pgi5.1/hpmpi_2.1/lib/64”
Then use the −lveclib option on the compiler command line that links your
program:
pgf90 [options] file ... −lveclib −mp
pgcc
[options] file ... −lveclib −mp −lpgf90 −lpgf90_rpml −lpgf902 −lpgf90rtl
−lpgftnrtl
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.
Problem with +ppu compatibility and duplicated symbols
All MLIB subprograms documented in the HP MLIB User’s Guide have two
entry points: one is compatible with the Fortran compiler option +noppu (no
postpend underbar) and the second is compatible with the Fortran compiler
option +ppu (postpend underbar). For example, the MLIB BLAS error handler
XERBLA has entry points xerbla and xerbla_. Table 1-1 shows the Fortran 90
compiler defaults.
Table 1-2 Compiler Defaults
Different compiler defaults can cause duplicate symbol definitions at link time
as the following examples illustrate.
PA-RISC processors
Suppose you write your own Fortran version of the XERBLA subroutine. You
compile on PA-RISC with +DA2.0W and the compiler turns on +ppu (See Table
1-1), so your xerbla.o object file has an entry point xerbla_. However, the
PA-RISC MLIB libraries were compiled with +noppu and the entry points with
underbars were added as synonyms to the entry points without underbars.
Hence, the various MLIB subprograms that call XERBLA reference them as
xerbla (without the postpended underbar). Therefore, your xerbla_ does not
satisfy their CALL XERBLA, so the linker accesses xerbla.o from the library.
32-bit Addressing 64-bit Addressing
PA-RISC +noppu +ppu
Itanium +ppu +ppu