Hp XC System 2.x Software Instrukcja Użytkownika Strona 122

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 154
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 121
% export MPI_USE_LIBELAN=0
8.9.10 MPI_USE_LIBELAN_SUB
The use of Elan’s native collective op eration s may be extended to include communicators which
are sma ller than MPI_COMM_WORLD by setting the MPI_USE_LIBELAN_SUB environment
variable to TRUE”. By default, t his functionality is d isabl ed due to the fact th at libelan
memory resources are consumed and may eventually cause run-time failures when too many
sub-communicators are created. When set to TRUE, the num ber of sub-com m unicators that can
be simultan e ously created is limited to 10. This limit can be changed to any desirable value by
setting the var iab le to a posi tive integer larger than 0.
% export MPI_USE_LIBELAN_USE=5
8.10 MPICH Object Compatibility
The MPI standard sp ecifies the function prototypes for the M PI functions, but does not specify
the types of the MPI opaque objects like communicators or the values of the MPI constants.
Hence an o bject file compiled using one vendor ’s MPI will generally not function correctly if
linked against another vendors MPI library.
There are some cases where such compatibility would be desirable. For instance a third-party
tool such as Vam pir might only be available using the MPICH interface.
To allow such compatibility, H P-MPI now in cludes a layer of MPICH w rappers which provides
an interface identical to MPICH 1.2.5, and translates th ese calls into the c or resp onding H P- M P I
interface. This MPICH compatibility interface is only provided for functions defined in MPICH
1.2.5 and cannot be used by an application which calls fu nctions outside the scope of MPICH
1.2.5.
HP-MPI can be used in MPICH mode by co mp iling using mpicc.mpich and running with
mpirun.mpich. The com piler script mpicc.mpich uses an include file which d efines the
interfaces the same as MPICH 1.2.5, and at link time it links against libmpich.so which is
the set of wrappers defining MPICH 1.2.5 compatible entry points for the MPI functions. The
mpirun.mpich takes the same arguments as the trad itional HP-MPI mpirun command, but
sets LD_LIBRARY_PATH so that libmpich.so is found.
An example of using a program with Vampir:
% $MPI_ROOT/bin/mpicc.mpich -o prog.x $MPI_ROOT/help
/communicator.c \ -L/path/to/vampir/lib -lVT -lpthread -lm
% $MPI_ROOT/bin/mpirun.mpich -np 2 ./prog.x
Here, the program communicator.c is being compiled with M PICH compatible interfaces
and is being linked against Vampirs libVT first from the co mm and line option, followed
by HP-MPI’s libmpich.so then libmpi.so whichareaddedbythempicc.mpich
compiler wr a pper script. Thus libVT sees only the MPICH compatible interface to HP-MPI.
In general, object files built with HP-MPI’s MPICH mode can be used in an MPICH application,
and conversely object files built under MPICH can b e linked into an HP-MPI application using
MPICH mode. How ever using MPICH compatibility mode to produce a sing le executable to
run under both MPICH an d HP-MPI will be more problematic and is not advised.
communicator.c could be compiled under HP-MPI MPICH compatibility mode as:
% export MPI_ROOT=/opt/hpmpi%
$MPI_ROOT/bin/mpicc.mpich -o prog.x $MPI_ROOT
/help/communicator.c
8-12 Using HP-MPI
Przeglądanie stron 121
1 2 ... 117 118 119 120 121 122 123 124 125 126 127 ... 153 154

Komentarze do niniejszej Instrukcji

Brak uwag