A number of MPI-2 routines were added to the module to support dynamic process creation. The makefile will detect (hopefully) if the library that you are using to build the module contains the MPI-2 routines. Note that not all parallel systems support dynamic process creation even if the library has the functionality. These routines have been tested with openmpi version 1.03(beta) and MPICH2 version 1.0.3 under using the default job launcher that ships with the MPI libraries.
The following MPI-2 related routines are now supported:
mpi_comm_spawn - Spawns additional MPI tasks
mpi_comm_get_parent - Returns the communicator associated with the parent for a newly spawned task
mpi_comm_free - Returns a communicator associated with spawned tasks.
mpi_intercomm_merge - Returns an intracommuncator from an intercommunicator
mpi_open_port - Establish a port at which an application may be contacted
mpi_close_port - Releases the network address represented by port_name
mpi_comm_accept - Accept connections from clients
mpi_comm_connect - Establishes communication with a server specified by port_name
mpi_comm_disconnect - Terminates communication with a server specified by a communicator
mpi_comm_set_errhandler - Sets the behavior if an MPI error occurs using the given communicator
here is also support for the attribute MPI_UNIVERSE_SIZE. This attribute is the number of processors that are available for spawning new tasks. This can be printed using the following:
print " MPI_UNIVERSE_SIZE",mpi.mpi_attr_get(mpi.MPI_COMM_WORLD,mpi.MPI_UNIVERSE_SIZE) |