Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: [OMPI devel] [patch] MPI_Comm_Spawn(), parent name is empty
From: Guillaume Thouvenin (guillaume.thouvenin_at_[hidden])
Date: 2010-01-20 09:54:30


Hello,

 When calling MPI_Comm_get_name() on the predefined communicator
MPI_COMM_PARENT after a call to MPI_Comm_spawn(), we are expecting the
name MPI_COMM_PARENT as stated into the MPI Standard 2.2.

 In practice, MPI_Comm_get_name() returns an empty string. As far as I
understand the problem, it seems that there is a bug into dyn_init().
The name is set but the flags is not updated. The following patch fixes
the problem.

Guillaume

---
diff --git a/ompi/mca/dpm/orte/dpm_orte.c b/ompi/mca/dpm/orte/dpm_orte.c
--- a/ompi/mca/dpm/orte/dpm_orte.c
+++ b/ompi/mca/dpm/orte/dpm_orte.c
@@ -965,6 +965,7 @@ static int dyn_init(void)
     
     /* Set name for debugging purposes */
     snprintf(newcomm->c_name, MPI_MAX_OBJECT_NAME, "MPI_COMM_PARENT");
+    newcomm->c_flags |= OMPI_COMM_NAMEISSET;
     
     return OMPI_SUCCESS;
 }