-
Notifications
You must be signed in to change notification settings - Fork 868
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fortran module: assumed size arg must match actual array arg of any rank
Here's an example code that fails to compile prior to this checkin: use mpi integer, contiguous, pointer :: requests(:, :) integer :: ierr allocate(requests(2,2)) requests(1,1) = 1 requests(2,1) = 2 requests(1,2) = 3 requests(2,2) = 4 call MPI_Waitall(size(requests),requests,MPI_STATUSES_IGNORE,ierr) end But according to the standard under "A.4 Fortran Bindings with mpif.h or the mpi Module", waitall is supposed to take INTEGER COUNT, ARRAY_OF_REQUESTS(*) and under fortran that assumed size arg should match the above actual arg. The fortran module previously had integer, dimension(count), intent(inout) :: array_of_requests and this checkin changes it to integer, dimension(*), intent(inout) :: array_of_requests According to Rafik Zurob the rules for assumed-size arrays are such that we know the incoming array_of_requests is contiguous so nothing changes in the fundamental operation of the waitall call. Signed-off-by: Austen Lauria <awlauria@us.ibm.com> Co-authored-by: Jeff Squyres <jsquyres@cisco.com>
- Loading branch information
Showing
5 changed files
with
27 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters