Connect INET to MPI

OMNeT++ is a public-source discrete event simulation environment. INET is a framework for OMNeT++ to simulate the IP stack. We enhanced INET and added support for SCTP and an interface to connect the simulation to real networks. Those two features are included in the public INET version. Another interface that connects the upper layer to real applications has been integrated but has not been published yet. These interfaces have been used to send data coming from several real upper layer processes, like MPI, to the simulation and back to the application.

To set up INET with the possibility to use real applications proceed as follows:

Download and unzip sctpapp.zip

Copy the files to inet/src/applications/sctpapp. Download and unzip ipctest.zip

Copy the directory to inet/examples/sctp.

In this version two algorithms that have influence on the time synchronization between the simulation and the real applications have been implemented. Their type has to be set in inet/examples/sctp/ipctest/omnetpp.ini for use in the simulation. Set tfType to 1 for STATIC_ALG and 2 for NO_TF_REAL_ALG. For the real applications the algorithm has to be set in inet/src/applications/sctpapp/sctplikeapi.h via the definition MYALGORITHM.

The STATIC_ALG needs a time factor. To be recognized in the simulation, it can be set in inet/examples/sctp/ipctest/omnetpp.ini to a value greater or equal to 1. For the real application it has to be set as environment variable (see the following example).

The NO_TF_REAL_ALG algorithm does not need a time factor.

For more information about the two algorithms, have a look at the following paper:

Irene Ruengeler, Michael Tuexen, Brad Penoff, and Alan Wagner. A New Fast Algorithm for Connecting the INET Simulation Framework to Applications in Real-time. In the fourth International ICST Conference on Simulation Tools and Techniques (SIMUTools 2011), March 2011

Before connecting to real MPI applications the setup can be tested with programs needing several hosts. To start an example with four hosts proceed as follows:

The SCTPLIKE_SLEEP_FACTOR is necessary to adjust the fast real applications to the slower simulation. In real MPI applications a small time factor might result in a change in the sequence of the messages. The time factor used when starting the applications must be equal to the one in inet/examples/sctp/ipctest/omnetpp.ini. If you want to change it, you have to do it in both places. You can play with the message size or set the parameter 'e' instead of 'n' to echo the message.

To change the algorithm to NO_TF_REAL_ALG you have to set tfType=2 in omnetpp.ini and sctplikeapi.h.

A custom version of MPICH2 is necessary to connect real MPI programs to execute on the simulated network. Download and tar zxf mpich2-mpinetsim.tgz (or from here may be faster).