-
-
Notifications
You must be signed in to change notification settings - Fork 287
Fortran configury: Ensure F08 real_kinds are actually valid kinds #5401
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
Conversation
For consistency, the same changes should be made to FC_AVAIL_KINDS. |
m4/aclocal_fc.f90
Outdated
INTEGER :: num_rkinds, num_ikinds, num_lkinds | ||
logical :: found_rkinds( 1:SIZE(real_kinds) ) |
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.
please use uppercase keyword intrinsics
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.
Addressed.
I have to ensure this does not suppress detected kinds of other compilers since that scenario would not cause tests to fail. |
Done!
Sure. In my testing I saw that GNU Fortran was unaffected. You can see output here. For these next two points let me clarify that SELECTED_REAL_KIND is correct in ACfL, it is only the F08 ISO_FORTRAN_ENV array REAL_KINDS that was wrong. That array was only used to print the real kinds the compiler supported (not max precision), so I don't think the following comments items require a change:
The REAL_KINDS array was not used in the loop to determine max decimal precision, so it is already correct.
The non-F08 version of this loop builds the list of kinds based on the return values of SELECTED_REAL_KIND, so it never had the problem. ... however it makes me wonder if the preferred fix is just to ignore REAL_KINDS altogether and use FC_AVAIL_KINDS's logic to find real kinds. |
I'm not sure the compiler does not also have an issue with SELECTED_REAL_KIND, as from our discussion, #5090,
Printed -1, so it does not support KIND=16. |
Correct. ACfL does not support |
@brtnfld so are there other changes you think are required? |
|
@brtnfld Yes,
No. On line 216 |
|
Issue: HDFGroup#5090 Signed-off-by: Luke Robison <[email protected]>
I see, I had missed that, thank you for pointing it out. Testing with
and ACfL prints
The test program itself prints:
|
@brtnfld fixed and rebased |
@brtnfld can you take another look? |
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.
LGTM, thanks for the fix.!
Closes #5090