Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions ompi/mpi/fortran/mpif-h/testall_f.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -109,10 +107,11 @@ void ompi_testall_f(MPI_Fint *count, MPI_Fint *array_of_requests, ompi_fortran_l

/* All Fortran Compilers have FALSE == 0, so just check for any
nonzero value (because TRUE is not always == 1) */
if (MPI_SUCCESS == c_ierr && !OMPI_IS_FORTRAN_STATUSES_IGNORE(array_of_statuses) && *flag) {
if (MPI_SUCCESS == c_ierr && *flag) {
for (i = 0; i < OMPI_FINT_2_INT(*count); ++i) {
array_of_requests[i] = c_req[i]->req_f_to_c_index;
if (!OMPI_IS_FORTRAN_STATUS_IGNORE(&array_of_statuses[i])) {
if (!OMPI_IS_FORTRAN_STATUSES_IGNORE(array_of_statuses) &&
!OMPI_IS_FORTRAN_STATUS_IGNORE(&array_of_statuses[i])) {
MPI_Status_c2f(&c_status[i], &array_of_statuses[i * (sizeof(MPI_Status) / sizeof(int))]);
}
}
Expand Down
15 changes: 7 additions & 8 deletions ompi/mpi/fortran/mpif-h/waitall_f.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
*
* Additional copyrights may follow
*
*
* $HEADER$
*/

Expand Down Expand Up @@ -104,11 +102,12 @@ void ompi_waitall_f(MPI_Fint *count, MPI_Fint *array_of_requests,
c_ierr = MPI_Waitall(OMPI_FINT_2_INT(*count), c_req, c_status);
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);

if (MPI_SUCCESS == c_ierr && !OMPI_IS_FORTRAN_STATUSES_IGNORE(array_of_statuses)) {
if (MPI_SUCCESS == c_ierr) {
for (i = 0; i < OMPI_FINT_2_INT(*count); ++i) {
array_of_requests[i] = c_req[i]->req_f_to_c_index;
if (!OMPI_IS_FORTRAN_STATUS_IGNORE(&array_of_statuses[i])) {
MPI_Status_c2f( &c_status[i], &array_of_statuses[i * (sizeof(MPI_Status) / sizeof(int))]);
if (!OMPI_IS_FORTRAN_STATUSES_IGNORE(array_of_statuses) &&
!OMPI_IS_FORTRAN_STATUS_IGNORE(&array_of_statuses[i])) {
MPI_Status_c2f( &c_status[i], &array_of_statuses[i * (sizeof(MPI_Status) / sizeof(int))]);
}
}
}
Expand Down