Skip to content

Commit 2fa8f4d

Browse files
committed
Revert "fortran: optimize testall and waitall when MPI_STATUSES_IGNORE is used"
Optimization was incorrect, so revert this commit. This reverts commit 83375bc.
1 parent e6017c8 commit 2fa8f4d

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

ompi/mpi/fortran/mpif-h/testall_f.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
1212
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
13-
* Copyright (c) 2015 Research Organization for Information Science
14-
* and Technology (RIST). All rights reserved.
1513
* $COPYRIGHT$
1614
*
1715
* Additional copyrights may follow
@@ -109,10 +107,11 @@ void ompi_testall_f(MPI_Fint *count, MPI_Fint *array_of_requests, ompi_fortran_l
109107

110108
/* All Fortran Compilers have FALSE == 0, so just check for any
111109
nonzero value (because TRUE is not always == 1) */
112-
if (MPI_SUCCESS == c_ierr && !OMPI_IS_FORTRAN_STATUSES_IGNORE(array_of_statuses) && *flag) {
110+
if (MPI_SUCCESS == c_ierr && *flag) {
113111
for (i = 0; i < OMPI_FINT_2_INT(*count); ++i) {
114112
array_of_requests[i] = c_req[i]->req_f_to_c_index;
115-
if (!OMPI_IS_FORTRAN_STATUS_IGNORE(&array_of_statuses[i])) {
113+
if (!OMPI_IS_FORTRAN_STATUSES_IGNORE(array_of_statuses) &&
114+
!OMPI_IS_FORTRAN_STATUS_IGNORE(&array_of_statuses[i])) {
116115
MPI_Status_c2f(&c_status[i], &array_of_statuses[i * (sizeof(MPI_Status) / sizeof(int))]);
117116
}
118117
}

ompi/mpi/fortran/mpif-h/waitall_f.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
1212
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
13-
* Copyright (c) 2015 Research Organization for Information Science
14-
* and Technology (RIST). All rights reserved.
1513
* $COPYRIGHT$
1614
*
1715
* Additional copyrights may follow
@@ -104,10 +102,11 @@ void ompi_waitall_f(MPI_Fint *count, MPI_Fint *array_of_requests,
104102
c_ierr = MPI_Waitall(OMPI_FINT_2_INT(*count), c_req, c_status);
105103
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
106104

107-
if (MPI_SUCCESS == c_ierr && !OMPI_IS_FORTRAN_STATUSES_IGNORE(array_of_statuses)) {
105+
if (MPI_SUCCESS == c_ierr) {
108106
for (i = 0; i < OMPI_FINT_2_INT(*count); ++i) {
109107
array_of_requests[i] = c_req[i]->req_f_to_c_index;
110-
if (!OMPI_IS_FORTRAN_STATUS_IGNORE(&array_of_statuses[i])) {
108+
if (!OMPI_IS_FORTRAN_STATUSES_IGNORE(array_of_statuses) &&
109+
!OMPI_IS_FORTRAN_STATUS_IGNORE(&array_of_statuses[i])) {
111110
MPI_Status_c2f( &c_status[i], &array_of_statuses[i * (sizeof(MPI_Status) / sizeof(int))]);
112111
}
113112
}

0 commit comments

Comments
 (0)