Alpha
Server SC User Guide
Compiling
and Linking C Programs
|
To build MPI programs, use the MPI header file in
your source files and specify the MPI compiler in your make
files, as follows:
1. Include the MPI header file, mpi.h, in your program, with the following include
directive:
#include
<mpi.h>
2. Compile the program linking it with the MPI and Elan libraries.
cc -o myprog myprog.c -lmpi -lelan
Compiling
and Linking Fortran Programs
|
To build MPI programs, use the MPI header file in
your source files and specify the MPI compiler in your make
files, as follows:
1.
Include the MPI header file, mpif.h, in your program with the following include
directive:
2.
Compile the program
with f77 or f90 and link with the MPI and Elan libraries.
f90 -o myprog myprog.f -lfmpi -lmpi –lelan
Elan
Library Environment Variables
|
o
The Elan library provides a set of tagged message passing routines,
which make use of tagged message ports, known as tports, for
point-to-point communications.
o
The following environment variables can be used to tune the
behavior; of these routines.
o Since the MPI library is
layered on top of the tagged message passing routines, these environment
variables also affect the performance of MPI programs on Compaq
AlphaServer SC systems.
o LIBELAN_TPORT_BIGMSG=bytes
Messages that are larger (in bytes) than the value of LIBELAN_TPORT_BIGMSG are sent only when a matching receive has been
posted. This means the transfer is synchronous and the receiver can limit the
size of receive message buffers. The default value of the variable is 4MBytes.
o LIBELAN_SHM_ENABLE=1
o This variable
enables or disables communications within a node being transferred via shared
memory. The default value is TRUE (1).
o LIBELAN_ALLOC_SIZE=bytes
o
This variable defines the amount of virtual memory (in
bytes) that is allocated for use by the MPI system buffer pool. The
default value is 200MBytes.
Troubleshooting
|
o
MPI programs that send large numbers of messages without
performing matching receives will eventually run out of system buffer memory.
If this happens you will get the message
tportBuf: Main memory exhausted ...
o
You can put off (or in some cases avoid) this problem
by increasing the size of the buffer pool, but in general you should not rely
on system buffering; it uses up memory and
reduces performance.
References
and Revisions
|
|
|
© Copyright
2000, Compaq, All Rights Reserved
For
more information on Compaq’s MPI contact Frank.Pietryka@Compaq.com
011100 – Pietryka – Created
from Version
Four of the Alpha Server SC Users Guide
|