Folks,

currently, the dynamic/intercomm_create test from the ibm test suite output
the following messages :

dpm_base_disconnect_init: error -12 in isend to process 1

the root cause it task 0 tries to send messages to already exited tasks.

one way of seeing things is that this is an application issue :
task 0 should have MPI_Comm_free'd all its communicator before calling
MPI_Comm_disconnect.
This can be achieved via the attached patch

an other way of seeing things is that this is a bug in OpenMPI.
In this case, what would be the the right approach ?
- automatically free communicators (if needed) when MPI_Comm_disconnect is
invoked ?
- simply remove communicators (if needed) from ompi_mpi_communicators when
MPI_Comm_disconnect is invoked ?
  /* this causes a memory leak, but the application can be seen as
responsible of it */
- other ?

Thanks in advance for your feedback,

Gilles
Index: ibm/dynamic/intercomm_create.c
===================================================================
--- ibm/dynamic/intercomm_create.c	(revision 2370)
+++ ibm/dynamic/intercomm_create.c	(working copy)
@@ -104,6 +104,10 @@
     err = MPI_Barrier(abc_intra);
     printf( "%s: barrier (%d)\n", whoami, err );
 
+    MPI_Comm_free(&abc_intra);
+    MPI_Comm_free(&ab_c_inter);
+    MPI_Comm_free(&ab_intra);
+    MPI_Comm_free(&ac_intra);
     MPI_Comm_disconnect(&ab_inter);
     MPI_Comm_disconnect(&ac_inter);
 }

Reply via email to