1
1

adding a check whether the f_to_c_index is initialized in the destructor for consistency reasons.

removing the warning in comm_split_f pointed out be the 64bit architecture. Actually, I wonder why g77 did not detect that, since this was a real bug and not just a warning :-)

This commit was SVN r2113.
Этот коммит содержится в:
Edgar Gabriel 2004-08-13 13:31:26 +00:00
родитель ecb2efdced
Коммит 573b4ea950
2 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -267,7 +267,8 @@ static void ompi_comm_destruct(ompi_communicator_t* comm)
}
/* reset the ompi_comm_f_to_c_table entry */
if ( NULL != ompi_pointer_array_get_item ( &ompi_mpi_communicators,
if ( MPI_UNDEFINED != comm->c_f_to_c_index &&
NULL != ompi_pointer_array_get_item(&ompi_mpi_communicators,
comm->c_f_to_c_index )) {
ompi_pointer_array_set_item ( &ompi_mpi_communicators,
comm->c_f_to_c_index, NULL);

Просмотреть файл

@ -52,6 +52,6 @@ void mpi_comm_split_f(MPI_Fint *comm, MPI_Fint *color, MPI_Fint *key, MPI_Fint *
MPI_Comm c_newcomm;
MPI_Comm c_comm = MPI_Comm_f2c ( *comm );
*ierr = MPI_Comm_split ( c_comm, (int) color, (int) key, &c_newcomm );
*ierr = MPI_Comm_split ( c_comm, (int) *color, (int) *key, &c_newcomm );
*newcomm = MPI_Comm_c2f (c_newcomm);
}