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
3.2.1 Running
Start the
%mpimon
The hello-world program should produce the following output:
Scali MPI Connect Release 4.4 Users Guide | 21 |