- 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.
Этот коммит содержится в:
родитель
4c3ea7a0d2
Коммит
9a369d0fc1
@ -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;
|
||||
}
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user