-
-
Notifications
You must be signed in to change notification settings - Fork 55
Defect: sendget_by_ref() incorrect assignment on LHS when rank == 2 #654
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
Comments
Thanks for the report Nathan! |
It took me some time to understand your example: The allocation do i = 1, num_images()
do j = 1, num_images()
! R_send[i]%A(j,this_image()) = R_get[j]%A(j)
R_send[i]%A(j,i) = R_get[j]%A(j)
end do
end do Here, I did replace this_image() with i, and got the same output as yours above. Thus, the runtime does seem to not use this_image() for the index. Isn't it? |
And after some further testing it seems that the problem is deeper and not related to the use of this_image()? Maybe a failure to map the distributed non-symmetric memory addressing? I can only guess. See the paper 'Rationale for Co-Arrays in Fortran 2008' by Aleksandar Donev, chapter 3.2. |
IIRC, the image index is getting passed correctly to sendget_by_ref(), so it seems the issue is somewhere in subsequent code that puts data into the right spot on the remote image specified in the LHS of the assignment. |
The sendget_by_ref issue first reported in #632 (comment) still applies in OpenCoarrays as of d13375d.
This routine is exercised when a coarray of derived type with allocatable component is on both the LHS and the RHS of an assignment statement.
Specifically, there is a problem with the result of the assignment (LHS), at least when the allocatable component on the LHS is an array of rank == 2:
Output:
The values for R_get%A (before the "|" in preceding output) look correct; however, the values of the R_send%A array (after the "|" in the preceding output) should be for all images:
System information
The text was updated successfully, but these errors were encountered: