Updates to fix nvhpc compiler issues#485
Merged
Merged
Conversation
To run the standalone tests on derecho, we want to use nvhpc/25.9 (this includes a bug fix we reported where nvhpc/25.7 was not handling associate statements correctly). The compiler also rightly complained about an instance of a missing kind number when using a real variable (although 1.0 is exactly representable so there shouldn't be any difference between 1.0 and 1.0_r8). Thirdly, I replaced a couple of where statements with the do-loop if-statement combination to avoid dividing by zero. It is unfortunate that the compiler doesn't handle this very well, but it is not a very invasive change.
Collaborator
Author
|
Note: I am trying to create a small example problem highlighting the issue with program where_statements
real, dimension(3,3) :: old_vals, new_vals
integer :: i
old_vals(:,:) = 2.0
old_vals(2,:) = 0.0
do i=1,3
where (old_vals(i,:) > 0.0)
new_vals(i,:) = 1.0 / old_vals(i,:)
else where
new_vals(i,:) = 0.0
end where
print*, new_vals(i,:)
end do
end program where_statementsto fail, but even with the same |
2 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
To run the standalone tests on derecho, we want to use nvhpc/25.9 (this includes a bug fix we reported where nvhpc/25.7 was not handling associate statements correctly).
The compiler also rightly complained about an instance of a missing kind number when using a real variable (although 1.0 is exactly representable so there shouldn't be any difference between 1.0 and 1.0_r8).
Thirdly, I replaced a couple of where statements with the do-loop if-statement combination to avoid dividing by zero. It is unfortunate that the compiler doesn't handle this very well, but it is not a very invasive change.