HP MLIB for Itanium Linux Version 9.6 Release Note

HP MLIB for Itanium Linux Version 9.6 Release Note
Known Problems and Workarounds
HP MLIB for Itanium Linux Version 9.6 Release Note 15
The order is critical for both performance and accuracy. Explicit use of -lm, in some cases,
causes -lm to be emitted into the generated linker command before -limf. It is recommended
that end users generating new makefiles or scripts temporarily insert the option -# on the
link command line, which will cause the expanded gnu ld command to be echoed but not
executed. Then inspect the actual ld command to verify that order sensitive arguments are in
the proper order.
When the Intel C/C++ compiler is used to invoke the linker, libimf.(a,so) will automatically be
specified but libm.(a,so) will NOT be. If libm.(a,so) is required, the user must specify -limf
-lm to ensure that both libraries are searched and that the search occurs in the correct order.
Similarly, for shared executables referencing libimf.so and libm.so, the user's
LD_LIBRARY_PATH environment variable should discover libimf.so prior to discovering libm.so
when execution is invoked.
Failure to ensure the correct order of linking/searching can result in obscure errors in addition
to performance degradation.
Dealing with Underscore Compatibility and Duplicated Symbols
Different compilers on a given computer (operating system) have differing conventions
regarding the construction of object file entry point names from source code names. The
Fortran compiler, by default, adds a trailing underscore to the source code name to yield the
object file entry point name. The C compiler yields the same name in source and object. As a
result, complications can arise when one attempts to link object code written in C with object
code written in Fortran. The Fortran compiler provides a command line option flag -nus (no
underscore) that will change the behavior to match the C compiler behavior.
In order to accommodate the widest range of customer needs, all MLIB subprograms
documented in the HP MLIB User’s Guide have two entry points—one with a trailing
underscore and one lacking a trailing underscore.
For example, the MLIB BLAS error handler XERBLA has entry points xerbla and xerbla_.
Assuming the file xerbla.f contains a line
SUBROUTINE XERBLA(...)
Table 1-2 shows the relationship between the Fortran command line and the resulting entry
point.
Table 2 Command Line/Entry Point Relationship
Command Line Fragment Entry Point
ifort xerbla.f ... xerbla_