From 9a369d0fc19b364c0fc61d7c440dec42c2feac40 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Mon, 20 Jul 2009 19:54:24 +0000 Subject: [PATCH] - we accidentally decreased the counter for the number of dynamic communicators twice, once in dpm.disconnect_wait, and once in comm_free. The second location seems to be the right place for that (since a communicator could be freed, and not disconnected), remove the instance in disconnect_wait. - add some error messages in case something goes wrong. This commit was SVN r21720. --- ompi/mca/dpm/base/dpm_base_common_fns.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/ompi/mca/dpm/base/dpm_base_common_fns.c b/ompi/mca/dpm/base/dpm_base_common_fns.c index bea18170bf..869b4e207c 100644 --- a/ompi/mca/dpm/base/dpm_base_common_fns.c +++ b/ompi/mca/dpm/base/dpm_base_common_fns.c @@ -120,7 +120,8 @@ ompi_dpm_base_disconnect_obj *ompi_dpm_base_disconnect_init ( ompi_communicator_ int i; obj = (ompi_dpm_base_disconnect_obj *) calloc(1,sizeof(ompi_dpm_base_disconnect_obj)); - if ( NULL == obj ) { + if ( NULL == obj ) { + printf("Could not allocate disconnect object\n"); return NULL; } @@ -133,6 +134,7 @@ ompi_dpm_base_disconnect_obj *ompi_dpm_base_disconnect_init ( ompi_communicator_ obj->comm = comm; obj->reqs = (ompi_request_t **) malloc(2*obj->size*sizeof(ompi_request_t *)); if ( NULL == obj->reqs ) { + printf("Could not allocate request array for disconnect object\n"); free (obj); return NULL; } @@ -145,17 +147,18 @@ ompi_dpm_base_disconnect_obj *ompi_dpm_base_disconnect_init ( ompi_communicator_ &(obj->reqs[2*i]))); if ( OMPI_SUCCESS != ret ) { + printf("dpm_base_disconnect_init: error %d in irecv to process %d\n", ret, i); free (obj->reqs); free (obj); return NULL; } - ret = MCA_PML_CALL(isend (&(obj->buf), 0, MPI_INT, i, OMPI_COMM_BARRIER_TAG, MCA_PML_BASE_SEND_SYNCHRONOUS, comm, &(obj->reqs[2*i+1]))); if ( OMPI_SUCCESS != ret ) { + printf("dpm_base_disconnect_init: error %d in isend to process %d\n", ret, i); free (obj->reqs); free (obj); return NULL; @@ -218,11 +221,6 @@ void ompi_dpm_base_disconnect_waitall (int count, ompi_dpm_base_disconnect_obj * free (reqs); - /* decrease the counter for dynamic communicators by 'count'. - Attention, this approach now requires, that we are just using - these routines for communicators which have been flagged dynamic */ - ompi_comm_num_dyncomm -=count; - return; }