-
Notifications
You must be signed in to change notification settings - Fork 2
Remove C-wrapper for MPI_Recv #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d9fadb5
Test: Add MPI_Recv Test
adit4443ya c4aa405
Remove C-wrapper for MPI_Recv
adit4443ya 189991e
Use real(c_double) instead of type(C_PTR) in bind(C) interface functi…
adit4443ya d115467
Merge from main
adit4443ya de3169d
Add case for MPI_STATUS_IGNORE
adit4443ya 2c04af5
Temporarily use status array
adit4443ya File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
program test_recv_1 | ||
use mpi | ||
implicit none | ||
|
||
integer :: ierr, rank, size, comm, tag | ||
real(8), dimension(5) :: buf | ||
integer, dimension(MPI_STATUS_SIZE) :: status | ||
|
||
comm = MPI_COMM_WORLD | ||
tag = 100 | ||
|
||
call MPI_Init(ierr) | ||
call MPI_Comm_rank(comm, rank, ierr) | ||
call MPI_Comm_size(comm, size, ierr) | ||
|
||
if (size < 2) then | ||
print *, "This test works best with at least 2 MPI processes." | ||
else | ||
if (rank == 0) then | ||
! Rank 0: Prepare data and send synchronously. | ||
buf = (/ 1.0d0, 2.0d0, 3.0d0, 4.0d0, 5.0d0 /) | ||
call MPI_Ssend(buf, 5, MPI_REAL8, 1, tag, comm, ierr) | ||
print *, "Rank 0 sent data." | ||
else if (rank == 1) then | ||
! Rank 1: Receive the data. | ||
buf = 0.0d0 ! initialize to zeros | ||
call MPI_Recv(buf, 5, MPI_REAL8, 0, tag, comm, status, ierr) | ||
print *, "Rank 1 received data: ", buf | ||
end if | ||
end if | ||
|
||
call MPI_Finalize(ierr) | ||
|
||
end program test_recv_1 |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is meant to handle the MPi_STATUS_IGNORE
And it's correct as the it works for GFortran But problem is it doesn't work for lfortran with --fast flag .
So need the inspection. Hence i've made another commit to temporily use status array in the
ssend_1.f90
.and Will make MRE for this bug later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To keep it remembered have opened an issue #89