fixing a stupid bug in comm_nextcid: forgot to free the value in the pointer_array in case the others did not agree with my suggestion for the cid.
This commit was SVN r2631.
Этот коммит содержится в:
родитель
64e983a88a
Коммит
d2d6379578
@ -129,8 +129,9 @@ int ompi_comm_nextcid ( ompi_communicator_t* newcomm,
|
||||
else {
|
||||
ompi_pointer_array_set_item(&ompi_mpi_communicators,
|
||||
nextlocal_cid, NULL);
|
||||
nextlocal_cid = nextcid;
|
||||
flag = ompi_pointer_array_test_and_set_item(&ompi_mpi_communicators,
|
||||
nextcid, comm );
|
||||
nextlocal_cid, comm );
|
||||
if (true == flag) {
|
||||
response = 1; /* works as well */
|
||||
}
|
||||
@ -142,10 +143,16 @@ int ompi_comm_nextcid ( ompi_communicator_t* newcomm,
|
||||
|
||||
(allredfnct)(&response, &glresponse, 1, MPI_MIN, comm, bridgecomm,
|
||||
local_leader, remote_leader, send_first );
|
||||
if (glresponse == 1) {
|
||||
if (1 == glresponse) {
|
||||
done = 1; /* we are done */
|
||||
break;
|
||||
}
|
||||
else if ( 0 == glresponse ) {
|
||||
/* we could use that, but other don't agree */
|
||||
ompi_pointer_array_set_item(&ompi_mpi_communicators,
|
||||
nextlocal_cid, NULL);
|
||||
start = nextcid+1;
|
||||
}
|
||||
}
|
||||
|
||||
/* set the according values to the newcomm */
|
||||
|
@ -177,10 +177,15 @@ int ompi_comm_finalize(void)
|
||||
ompi_mpi_comm_self.c_flags = 0;
|
||||
OBJ_DESTRUCT( &ompi_mpi_comm_self );
|
||||
|
||||
ompi_mpi_comm_parent->c_local_group->grp_flags = 0;
|
||||
ompi_mpi_comm_parent->c_flags = 0;
|
||||
OBJ_RETAIN (&ompi_mpi_comm_parent);
|
||||
|
||||
ompi_mpi_comm_null.c_local_group->grp_flags = 0;
|
||||
ompi_mpi_comm_null.c_flags = 0;
|
||||
OBJ_DESTRUCT( &ompi_mpi_comm_null );
|
||||
|
||||
|
||||
/* Check whether we have some communicators left */
|
||||
max = ompi_pointer_array_get_size(&ompi_mpi_communicators);
|
||||
for ( i=3; i<max; i++ ) {
|
||||
@ -285,12 +290,12 @@ static void ompi_comm_destruct(ompi_communicator_t* comm)
|
||||
|
||||
}
|
||||
|
||||
if (NULL != comm->c_local_group) {
|
||||
OBJ_RELEASE ( comm->c_local_group );
|
||||
}
|
||||
if (NULL != comm->c_remote_group) {
|
||||
OBJ_RELEASE ( comm->c_remote_group );
|
||||
}
|
||||
if (NULL != comm->c_local_group) {
|
||||
OBJ_RELEASE ( comm->c_local_group );
|
||||
}
|
||||
if (NULL != comm->error_handler) {
|
||||
OBJ_RELEASE ( comm->error_handler );
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user