Skip to content
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

Mixed precision axis_utils unit tests - Let's try again #1172

Merged
merged 2 commits into from
Mar 30, 2023

Conversation

J-Lentz
Copy link
Contributor

@J-Lentz J-Lentz commented Mar 29, 2023

Description
Unit tests have been implemented for all procedures in axis_utils2 which deal with real numbers (as well as get_axis_cart, which does not).

Fully implemented tests

  • axis_edges (already existed)
  • get_axis_cart
  • lon_in_range
  • frac_index
  • nearest_index
  • tranlon

Skeletal tests (to be fully implemented at a later time)

  • interp_1d_1d
  • interp_1d_2d
  • interp_1d_3d

Not yet implemented

  • get_axis_modulo
  • get_axis_modulo_times

Tests which fail

How has this been tested?
Tests compile and run on the AMD box with gcc and ifort.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included
  • make distcheck passes

!* License along with FMS. If not, see <http://www.gnu.org/licenses/>.
!***********************************************************************

program test_axis_utils
Copy link
Member

@thomas-robinson thomas-robinson Mar 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs more documentation.

@rem1776
Copy link
Contributor

rem1776 commented Mar 29, 2023

Something seems to be causing it to hang indefinitely while running the tests. Thought it might have been the outage, but github status shows everything as up now.

Looks like this test was the issue when I ran it in the CI image (gcc 9):

FAIL: test_axis_utils2.sh 16 - Testing axis utils: ./test_axis_utils_r8 --tranlon

Interestingly, the r4 version of the tranlon test is fine. Maybe this is related to the commented out lines in test?

@J-Lentz
Copy link
Contributor Author

J-Lentz commented Mar 30, 2023

Something seems to be causing it to hang indefinitely while running the tests. Thought it might have been the outage, but github status shows everything as up now.

Looks like this test was the issue when I ran it in the CI image (gcc 9):

FAIL: test_axis_utils2.sh 16 - Testing axis utils: ./test_axis_utils_r8 --tranlon

Interestingly, the r4 version of the tranlon test is fine. Maybe this is related to the commented out lines in test?

This is almost certainly due to tranlon's out-of-bound memory bug (#1137). It corrupts 8 bytes of memory in the r8 version, which seems to have more catastrophic consequences than the r4 version which merely corrupts 4 bytes.

@rem1776
Copy link
Contributor

rem1776 commented Mar 30, 2023

@J-Lentz Nice, we can skip that test to get the CI passing for now since theres already a issue and PR for it. We'll just need to remember to re-enable it later on when the fix is in.

If you set this in the script it should show the test as skipped and pass:

SKIP_TESTS="test_axis_utils2.16"

@rem1776 rem1776 merged commit f1adb5e into NOAA-GFDL:mixedmode Mar 30, 2023
rem1776 pushed a commit to rem1776/FMS that referenced this pull request May 25, 2023
rem1776 added a commit that referenced this pull request Jun 2, 2023
…re, and fms_mod (#1239)

* feat: mixed precision axis_utils2 (#1104)

* feat: mixed precision fms_mod (#1147)

* feat: horiz interp mixed precision (#1067)

* mixed precision sat_vapor_pressure  (#1095)

* feat: add mixed precision axis_utils unit tests (#1172)

* fix: move type definitions to before first usage to fix nvhpc bug (#1187)

* fix: change allocatable type for intel errors (#1221)

Co-authored-by: Caitlyn McAllister <65364559+mcallic2@users.noreply.github.com>
Co-authored-by: Jesse Lentz <42011922+J-Lentz@users.noreply.github.com>
Co-authored-by: MiKyung Lee <58964324+mlee03@users.noreply.github.com>
rem1776 added a commit that referenced this pull request Jun 16, 2023
…re, and fms_mod (#1239) (#1258)

* feat: mixed precision axis_utils2 (#1104)

* feat: mixed precision fms_mod (#1147)

* feat: horiz interp mixed precision (#1067)

* mixed precision sat_vapor_pressure  (#1095)

* feat: add mixed precision axis_utils unit tests (#1172)

* fix: move type definitions to before first usage to fix nvhpc bug (#1187)

* fix: change allocatable type for intel errors (#1221)

Co-authored-by: Caitlyn McAllister <65364559+mcallic2@users.noreply.github.com>
Co-authored-by: Jesse Lentz <42011922+J-Lentz@users.noreply.github.com>
Co-authored-by: MiKyung Lee <58964324+mlee03@users.noreply.github.com>
@J-Lentz J-Lentz deleted the axis_utils2_fresh branch July 19, 2023 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants