Section: 3.10 Error and warning messages
3.9.5 Unsafe MPI programs
Because of different buffering behavior, some programs may run with MPICH, but not with SMC. Unsafe MPI programs may require resources that are not always guaranteed by SMC, and deadlock might occur (since SMC uses spin locks, these may appear to be live locks). If you want to know more about how to write portable MPI programs, see for example MPI: The complete reference: vol. 1, the MPI core [2].
A typical example that will not work with SMC (for long messages):
while (...) {
MPI_Send(buf, cnt, dtype, partner, tag, comm);
MPI_Recv(buf, cnt, dtype, MPI_ANY_SOURCE, MPI_ANY_TAG, comm, sts); doStuff();
}
Thsi code tries to se the same buffer for both sending and receiving. Such logic can be found, e.g., where processes from a ring where they communicate with their neigbours. Unfortunately writing the code this way leads to deadlock, and to make it work the MPI_Send() must be replaced with MPI_Isend() and MPI_Wait(), or the whole construction should be replaced with MPI_Sendrecv() or MPI_Sendrecv_replace().
3.9.6 Name space pollution
The SMC library is written in C and all of its C names are prefixed with scampi_. Depending on the compiler used, the user may run into problems if he/she has C code using the same scampi_ prefix. In addition, there are a few global variables that may cause problems. All of these functions and variables are listed in the include files mpi.h and mpif.h. Normally, these files are installed in /opt/scali/include.
Given that SMC has not fixed its OS routines to specific libraries, it is good programming practice to avoid using OS functions or standard
3.10 Error and warning messages
3.10.1 User interface errors and warnings
User interface errors usually result from problems where the setup of the environment causes difficulties for mpimon when starting an MPI program. mpimon will not start before the environment is properly defined. These problems are usually easy to fix, by giving mpimon the correct location of the necessary executable. The error message provides a straight forward indication of what to do. Thus, only particularly troublesome user interface errors will be listed here.
Using the
3.10.2 Fatal errors
When a fatal error occurs, SMC prints an error message before calling MPI_Abort() to shut down all
Scali MPI Connect Release 4.4 Users Guide | 33 |