While learning MPI using MPICH in windows (1.4.1p1) I found some sample code here. Originally, when I ran the server, I would have to copy the generated port_name
This approach of publishing names, looking them up, and connecting to them is outlandish relative to normal MPI usage.
The standard pattern is to use mpirun
to specify a set of nodes on which to launch a given number of processes. The operation of common implementations of mpirun
implementations is explained in another question
Once the processes are all launched as part of a single parallel job, the MPI library reads whatever information the launcher provided during MPI_Init
to set up MPI_COMM_WORLD
, a communicator over the group of all processes in the job.
Using that communicator, the parallel application can distribute work, exchange information, and so forth. It would do this using the common MPI_Send
and MPI_Recv
routines, in all their variants, the collective operations, and so forth.
I uploaded a working version using OpenMPI 1.6.5 of a client and server in C on Ubuntu that uses the ompi-server name server here:
OpenMPI nameserver client server example in C