Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Classify node processes together with MPI and FORTRAN

I am trying to make an implementation using MPI and Fortran that separates processes wich are on the same node to groups. Does MPI have a routine that can identify that?

I had the idea of separating these processes by their hostnames, that are the same on the nodes of the machine I am using. But I don't know if it is general for all clusters.

like image 685
Matheus Lara Avatar asked Aug 08 '13 15:08

Matheus Lara


1 Answers

You probably want to check out MPI_COMM_SPLIT_TYPE. It will allow you to split an existing communicator based on the split_type you pass in as a parameter:

int MPI_Comm_split_type(MPI_Comm comm, int split_type, int key,
                        MPI_Info info, MPI_Comm *newcomm)

Right now, the only split_type is MPI_COMM_TYPE_SHARED, defined in the standard as:

This type splits the communicator into subcommunicators, each of which can create a shared memory region.

This is usually the same thing as what you're asking, but you'll have to double check that it's true on your machine.

The other thing you need to know is that this is a new function in MPI-3 so it might not be available in all implementations of MPI. I know that it's available for MPICH and it's derivatives. AFAIK, it's not available in the last release of Open MPI. So make sure you have a version of MPI that actually supports it.

like image 93
Wesley Bland Avatar answered Sep 30 '22 06:09

Wesley Bland