-
Notifications
You must be signed in to change notification settings - Fork 15
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
Created new test file for mkieee.f using chatGPT #526
Conversation
tests/test_mkieee_ChatGPT.F90
Outdated
@@ -0,0 +1,54 @@ | |||
program ieee_array_large_conversion_test |
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.
Add a comment explaining this file, with your name as author, "using ChatGPT". Also put the exact prompt you used to generate this code.
Wow ChatGPT did a lot better than I thought it would!! |
This test is currently not running. You need to add it to the tests in the tests/CMakeLists.txt file. Just do for this file what is already done for test_mkieee. |
OK, now that I look at this, I'm kind of surprised that the mac was the only one to fail! One complexity here is that we are running tests for a _4 build of the library and a _d build. The _4 build has regular 4-byte reals, but the _d build has 8-bytes as the default real. This is a bad idea but we are stuck with it for now. But clearly, from the code, mkieee() is only intended to be used with 4-byte reals. It's not clear whether rdieee() will work with 8-byte reals, but it might. However, some of the code in addfield() certainly looks like it will fail _d builds, because it seems to be passing 8-byte reals into mkieee(), which clearly only accepts 4-byte reals. OK, so change your test so the whole test is ifdef'd away unless KIND_4 is set. Like this: program whatever ... all the test code #endif This will resolve the problems with _d builds, but macos is also failing with _4 builds. However, let's resolve the _d first and then circle back to the _4 problem. |
Please add the ifdef as described and lets see if we can get this test working... |
Comment out this test in the tests/CMakeLists.txt file, so that the test is not being run. That will allow me to merge it and then check it out easily to work on it... |
! | ||
! Aidan Hartnett | ||
|
||
!program ieee_array_large_conversion_test |
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.
Don't comment out the lines:
program ieee_array_large_conversion_test
and
end program ieee_array_large_conversion_test
part of #426