Skip to content

Enable user to provide an MPI communication context for ns-3

Steven Smith requested to merge smithsg84/ns-3-dev:mpi-comm-world into master

In parallel co-simulation a user may wish to run ns-3 on one set of MPI processes and another simulation on another set of MPI processes. The ns-3 MpiInterface assumed it had control of all MPI processes. This patch enables two methods to initialize MPI. The current Enable method is retained in which ns-3 initializes MPI and uses all available processes for ns-3. A new Enable call was added that takes a user supplied MPI_Communicator which enables partitioning of the MPI processes.

The patch also adds several parallel MPI tests when MPI is enabled at configuration time to test this new feature and several other MPI examples.

Edited by Steven Smith

Merge request reports