Sun MPI 4.0 Programming and Reference Guide

Choosing a Library Path

The eight Sun MPI 4.0 libraries are described in "The Libraries". The paths for each of these libraries, which you must specify when you are compiling and linking your program, are listed in the following table.

Table 3-2 Sun MPI 4.0 Libraries

Category 

Description 

Path: /opt/SUNWhpc/lib/...

32-Bit Libraries

Default, not thread-safe 

libmpi.so

C++ (in addition to libmpi.so)

SC4.2/libmpi++.so

 

Thread-safe 

libmpi_mt.so

Trace

Trace, not thread-safe 

tnf/libmpi.so

 

Trace, thread-safe  

tnf/libmpi_mt.so

64-Bit Libraries

Non-thread-safe 

sparcv9/libmpi.so

C++ (in addition to sparcv9/libmpi.so)

SC5.0/libmpi++.so

 

Thread-safe 

sparcv9/libmpi_mt.so

Trace

Trace, not thread-safe 

tnf/sparcv9/libmpi.so

 

Trace, thread-safe 

tnf/sparcv9/libmpi_mt.so

Overriding the Run-Time Library

As shown in the sample compile and link lines in Table 3-1, you use the -R flag in the compile and link line to specify the path for a run-time library when you are compiling. At run time, you can override the library specified in the -R argument by setting the LD_LIBRARY_PATH environment variable. For example, to link to the 32-bit trace libraries before running your program, do this:

% setenv LD_LIBRARY_PATH /opt/SUNWhpc/lib/tnf

(This is a C shell example.)