Scali MPI Connect Release 4.4 Users Guide 21
Chapter 3 Using Scali MPI Connect
This chapter describes how to setup, compile, link and run a program using Scali MPI Connect,
and briefly discusses some useful tools for debugging and profiling.
Please note that the "Scali MPI Connect Release Notes" are also available as a file in the
/opt/scali/doc/ScaMPI directory.

3.1 Setting up a Scali MPI Connect environment

3.1.1 Scali MPI Connect environment variables

The use of Scali MPI Connect requires that some environment variables be defined. These are
usually set in the standard startup scripts (e.g..bashrc when using bash), but can also be
defined manually.
MPI_HOME Installation directory. For a standard installation, the variable should be set
as:export MPI_HOME=/opt/scali
LD_LIBRARY_PATH Path to dynamic link libraries. Must be set to include the path to the
directory where these libraries can be found:
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$MPI_HOME/lib
PATH Path variable. Must be updated to include the path to the directory where
the MPI binaries can be found:
export PATH=${PATH}:$MPI_HOME/bin
Normally, the Scali MPI Connect library’s header files mpi.h and mpif.h reside in the
$MPI_HOME/include directory.

3.2 Compiling and linking

MPI is an "Application Programming Interface" (API) and not an "Application Binary Interface"
(ABI). This means that in general applications should be recompiled and linked when used with
Scali MPI Connect. Since the MPICH-implementation is widely used Scali has made SMC ABI-
compatible, depending on the versions of MPICH and SMC used. Please check the "Scali MPI
Connect Release Notes" for details. For applications that are dynamically linked with MPICH it
should only be necessary to change the library-path (LD_LIBRARY_PATH). For applications with
the necessary object files, only a relinking is needed.

3.2.1 Running

Start the hello-world program on the three nodes called nodeA, nodeB and nodeC.
% mpimon hello-world -- nodeA 1 nodeB 1 nodeC 1
The hello-world program should produce the following output:
Hello-world, I'm rank 0; Size is 3
Hello-world, I'm rank 1; Size is 3
Hello-world, I'm rank 2; Size is 3