Fixes trac:236
Doing pointer math properly (e.g., incrementing by the right amount) helps you not overflow buffers, cause random chaos, and contribute to the heat death of the universe. Sigh. This commit was SVN r12015. The following Trac tickets were found above: Ticket 236 --> https://svn.open-mpi.org/trac/ompi/ticket/236
Этот коммит содержится в:
родитель
fa01b9b9aa
Коммит
77a5eb3b69
@ -108,7 +108,7 @@ void mpi_testsome_f(MPI_Fint *incount, MPI_Fint *array_of_requests,
|
||||
if (!OMPI_IS_FORTRAN_STATUSES_IGNORE(array_of_statuses)) {
|
||||
for (i = 0; i < OMPI_FINT_2_INT(*outcount); ++i) {
|
||||
if (!OMPI_IS_FORTRAN_STATUS_IGNORE(&array_of_statuses[i])) {
|
||||
MPI_Status_c2f(&c_status[i], &array_of_statuses[i * sizeof(MPI_Status)]);
|
||||
MPI_Status_c2f(&c_status[i], &array_of_statuses[i * (sizeof(MPI_Status) / sizeof(int))]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ void mpi_waitsome_f(MPI_Fint *incount, MPI_Fint *array_of_requests,
|
||||
if (!OMPI_IS_FORTRAN_STATUSES_IGNORE(array_of_statuses)) {
|
||||
for (i = 0; i < OMPI_FINT_2_INT(*incount); ++i) {
|
||||
if (!OMPI_IS_FORTRAN_STATUS_IGNORE(&array_of_statuses[i])) {
|
||||
MPI_Status_c2f(&c_status[i], &array_of_statuses[i * sizeof(MPI_Status)]);
|
||||
MPI_Status_c2f(&c_status[i], &array_of_statuses[i * (sizeof(MPI_Status) / sizeof(int))]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user