-
Notifications
You must be signed in to change notification settings - Fork 134
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
Fix two output conversion errors #378
Fix two output conversion errors #378
Conversation
With kcatbound = -1 (single category run) (or kcatbound = 2), hin_max(n) is 100 (or 999), which is one character too long for the format specification '(f6.3)' used to output it in icepack_init_itd_hist. This leads to an "output conversion error" (Intel Fortran runtime error code 63, [1]), which is usually not fatal. However, this error becomes fatal if FOR_DUMP_CORE_FILE [2] is defined in the environment, which is necessary on some platforms to get core dumps from a crashing program. Note that this interaction is *not* mentioned in the Intel documentation. Increase the format specifier by one digit to avoid this error. For consistency, also increase it for 'hin_max(n-1)'. [1] https://www.intel.com/content/www/us/en/develop/documentation/fortran-compiler-oneapi-dev-guide-and-reference/top/compiler-reference/error-handling/handling-run-time-errors/list-of-run-time-error-messages.html [2] https://www.intel.com/content/www/us/en/develop/documentation/fortran-compiler-oneapi-dev-guide-and-reference/top/compilation/supported-environment-variables.html#supported-environment-variables_GUID-D3C9AA20-CD90-4833-8B90-AB971E7B90B1
If floe_rad(n) or floe_rad(n-1) is greater or equal to 100, writing it to c_fsd[12] with the format specifier '(f6.3)' causes an "output conversion error" when compiling with the Intel compiler, as the format spec is one digit short. This is not ideal for reasons detailed in the previous commit. Bump the format spec by one digit to avoid that error.
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.
Are we still OK with the temporary strings being 8 characters long? Should we increase the string length further and/or further increase the 7.3 to 10.3 or something? Just thought I'd ask, but will approve as is.
@apcraig I'll check. My understanding is that the 7 in |
* icepack_itd: fix format string length causing "output conversion error" With kcatbound = -1 (single category run) (or kcatbound = 2), hin_max(n) is 100 (or 999), which is one character too long for the format specification '(f6.3)' used to output it in icepack_init_itd_hist. This leads to an "output conversion error" (Intel Fortran runtime error code 63, [1]), which is usually not fatal. However, this error becomes fatal if FOR_DUMP_CORE_FILE [2] is defined in the environment, which is necessary on some platforms to get core dumps from a crashing program. Note that this interaction is *not* mentioned in the Intel documentation. Increase the format specifier by one digit to avoid this error. For consistency, also increase it for 'hin_max(n-1)'. [1] https://www.intel.com/content/www/us/en/develop/documentation/fortran-compiler-oneapi-dev-guide-and-reference/top/compiler-reference/error-handling/handling-run-time-errors/list-of-run-time-error-messages.html [2] https://www.intel.com/content/www/us/en/develop/documentation/fortran-compiler-oneapi-dev-guide-and-reference/top/compilation/supported-environment-variables.html#supported-environment-variables_GUID-D3C9AA20-CD90-4833-8B90-AB971E7B90B1 * icepack_fsd: fix format string length causing "output conversion error" If floe_rad(n) or floe_rad(n-1) is greater or equal to 100, writing it to c_fsd[12] with the format specifier '(f6.3)' causes an "output conversion error" when compiling with the Intel compiler, as the format spec is one digit short. This is not ideal for reasons detailed in the previous commit. Bump the format spec by one digit to avoid that error. url cannot include %
PR checklist
title
me
Only affects textual model output - I did not run the test suite but can if we feel it's needed.
I stumbled upon this on our new systems, where I have to define
FOR_DUMP_CORE_FILE
in order to get core dumps (which was not necessary on Cray). This, along with the flag-check
which we use in debug builds, leads to "output conversion error" being fatal instead of just severe (and so the model aborts instead of continuing and writing ****** for the offending write).Note that we can also add
-check nooutput_conversion
to the compiling flags to completely bypass these errors, but I think it's better to fix them.Full commit messages follow:
5edb20e icepack_fsd: fix format string length causing "output conversion error"
If floe_rad(n) or floe_rad(n-1) is greater or equal to 100, writing it
to c_fsd[12] with the format specifier '(f6.3)' causes an "output
conversion error" when compiling with the Intel compiler, as the format
spec is one digit short. This is not ideal for reasons detailed in the
previous commit.
Bump the format spec by one digit to avoid that error.
91ae9f3 icepack_itd: fix format string length causing "output conversion error"
With kcatbound = -1 (single category run) (or kcatbound = 2), hin_max(n)
is 100 (or 999), which is one character too long for the format
specification '(f6.3)' used to output it in icepack_init_itd_hist. This
leads to an "output conversion error" (Intel Fortran runtime error code
63, [1]), which is usually not fatal.
However, this error becomes fatal if FOR_DUMP_CORE_FILE [2] is defined in
the environment, which is necessary on some platforms to get core dumps
from a crashing program. Note that this interaction is not mentioned
in the Intel documentation.
Increase the format specifier by one digit to avoid this error. For
consistency, also increase it for 'hin_max(n-1)'.
[1] https://www.intel.com/content/www/us/en/develop/documentation/fortran-compiler-oneapi-dev-guide-and-reference/top/compiler-reference/error-handling/handling-run-time-errors/list-of-run-time-error-messages.html
[2] https://www.intel.com/content/www/us/en/develop/documentation/fortran-compiler-oneapi-dev-guide-and-reference/top/compilation/supported-environment-variables.html#supported-environment-variables_GUID-D3C9AA20-CD90-4833-8B90-AB971E7B90B1