1

I would like to distribute the data on multiple machines connected by TCP/IP network using OpenMPI.. can anyone point me to the right resources and direction. I am new to OpenMPI.

Thanks

Coder
  • 3,090
  • 8
  • 49
  • 85

2 Answers2

5

It depends on the language you're going to write the software. But basically, openMPI application look like this:

  1. Call MPI_INIT for MPI to initialize necessary communications for you between the nodes.
  2. Use MPI_Send, MPI_RECV functions to send or to receive data. There are blocking and non-blocking calls for these functions, along with several others - broadcasting (send to everyone), scatter (distribute data from an array in equal portions to every host) etc.
  3. Use MPI_FINALIZE to finish the communication process.

In MPI, there's almost always following workflow is included:

  1. Master host is assigned - usually the one with processId = 0. It's function is to coordinate the work of slave hosts. Basically, if you have to get the maximum value from array in parallel, it's his job to take the array, distribute it in equal portions to slaves, gather the results from slaves and choose the max number from the list.
  2. Slave host - waits for data to receive, performs handling, sends the results back to master.

I'd recommend this MPI tutorial for C++ development and also check out this so post regarding books on the topic.

Community
  • 1
  • 1
Dmitry Reznik
  • 6,812
  • 2
  • 32
  • 27
1

Here's just one of the many MPI tutorials on the net; I'm surprised you didn't find this yourself.

High Performance Mark
  • 77,191
  • 7
  • 105
  • 161