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

Test script updates and input tests #800

Merged
merged 91 commits into from
Mar 4, 2022
Merged

Conversation

rem1776
Copy link
Contributor

@rem1776 rem1776 commented Aug 13, 2021

Description
Was gonna make this off of the branch from #654 , but figured it might be better to make a separate PR since the comparison was huge with the updates to FMS.

  • takes Seth's updates from 209 darwin.test.fix #654 and converts each test script to use the new harness
  • Adds environment variables for verbose test output when set (TEST_VERBOSE)
  • Adjusts logic so SKIP_TESTS can be used with two digit test numbers and ranges
  • Adds in/fixes some tests that were in PRs or skipped previously
  • Adds a configure flag, --enable-test-input=/path, that enables tests in FMS that require input files. The input directory and structure it needs to be in is on both dev boxes at /home/fms_test_input

Fixes #209
Fixes #322
Fixes #482
Fixes #484

How Has This Been Tested?
Tested on amd and skylake with intel and gnu compilers

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

underwoo and others added 30 commits December 30, 2020 15:23
Fix not casting `void*` to the correct type when dereferencing.
This is to keep the `include` of mkmods.mk from creating the .mod directory
This has the beginnings of the new test harness for autoconf (and hopefully CMake).  This uses a new test-lib.sh test library that outputs in TAP.  This only has affinity, axis_utils, data_override, and diag_manager configured for the new tests.  All other tests are currently commented out.
Needed for the new test harness
This is to better track if the updated tests are working as expected
Missing ./ to allow test to run on systems that do not have . in PATH
Some of the past changes did not allow make dist to work.  This corrects that problem
@rem1776 rem1776 mentioned this pull request Oct 20, 2021
8 tasks
@uramirez8707 uramirez8707 mentioned this pull request Nov 8, 2021
10 tasks
Copy link
Contributor

@bensonr bensonr left a comment

Choose a reason for hiding this comment

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

Nice job breaking up the mpp_domains test into easier to handle individual tests.

@@ -259,13 +259,13 @@ void get_var_data(const char *file, const char *name, void *data)
switch (vartype) {
case NC_DOUBLE:case NC_FLOAT:
#ifdef OVERLOAD_R4
status = nc_get_var_float(ncid, varid, data);
status = nc_get_var_float(ncid, varid, (float *)data);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this OVERLOAD potentially affecting how things work and should the NC_DOUBLE and NC_FLOAT cases be broken into individual cases?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These changes were put in by seth in #654 actually to fix some compile issues on darwin, but they look good to me. With the previous logic it would read in data as float or double based on whichever is the fortran default kind so this just adds the cast to data since its a void pointer.

@@ -319,13 +319,13 @@ void get_var_data_region(const char *file, const char *name, const size_t *start
switch (vartype) {
case NC_DOUBLE:case NC_FLOAT:
#ifdef OVERLOAD_R4
status = nc_get_vara_float(ncid, varid, start, nread, data);
status = nc_get_vara_float(ncid, varid, start, nread, (float *)data);
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above

@rem1776
Copy link
Contributor Author

rem1776 commented Mar 4, 2022

@bensonr This should be ready now, I put in fixes for everything but the mosaic changes

@rem1776 rem1776 merged commit 7b78a73 into NOAA-GFDL:main Mar 4, 2022
@rem1776 rem1776 mentioned this pull request Mar 8, 2022
8 tasks
MinsukJi-NOAA added a commit to NOAA-EMC/FMS that referenced this pull request Apr 15, 2022
* get_unit warning now only prints on root_pe (NOAA-GFDL#872)

Co-authored-by: Eric Stofferahn <[email protected]>

* Update changelog, version numbers and build info (NOAA-GFDL#873)

Co-authored-by: rem1776 <[email protected]>

* chore: Change version number to next development version (NOAA-GFDL#874)

* CI: Update build action for yaml parser (NOAA-GFDL#871)

Update build actions
Change images to organization's repo and fix mixed mode parser test failure

* test(parser): Change real comparison value to double (NOAA-GFDL#886)

Co-authored-by: rem1776 <[email protected]>

* Make 'unsupported kind' error messages more descriptive. Change author of constants4.F90

* Add doxygen comment to valid_types in sat_vapor_pres/sat_vapor_pres_k.F90

* Modify codes for r8-r4 conversion to remove compiler warnings

* Remove OVERLOAD_R8 directives regarding send_data_*d_r8 subroutines

* Add Doxygen comments to constants4.F90

* Updates AM4 regression test suite to run intel 21 only on PW (NOAA-GFDL#893)

* feat: emc changes for mixedmode (NOAA-GFDL#857) (NOAA-GFDL#898)

* Change send_data interface and any necessary routines for mixed real precision support
* Adds an r4 size constants file

BREAKING CHANGE: changes some argument types in diag_manager, tracer_manager, sat_vapor_pres, and time_manager from real to class(*)

Co-authored-by: Minsuk Ji <[email protected]>

* feat: adds option to override (ignore) checksum test when reading restarts (NOAA-GFDL#889)

* update to fms2_io to allow reads to ignore embedded checksums on a fileobj basis
* added fms2_io test cases for the ignore_checksum option to restart reads
tests the domain, domain_wrap, and bc restart options

* docs: add CI information file (NOAA-GFDL#899)

* test: Adds check_nml_error after reading a namelist, so it could crash only as expected (NOAA-GFDL#904)

* Revert "feat: emc changes for mixedmode (NOAA-GFDL#857) (NOAA-GFDL#898)" (NOAA-GFDL#914)

This reverts commit 516a5ef.

* fix: clean up unused/uninitialized variables and other warnings (NOAA-GFDL#859)

Remove unused variables throughout and changes/removals for other warnings such as uninitialized values and implicit casts

* docs: update function style and branch names

* Changes master to main in CONTRIBUTING.md

* Claifies function return documentation in CODE_STYLE.md

* feat: adds support for logical variables in the yaml parser (NOAA-GFDL#907)

* Adds support for logical variables in the yaml parser

* correctly determines if a string is true or false

* fix: add check for affinity to self-initialize and update test program (NOAA-GFDL#917)

* fix: adds casts to class(*) calls to match doubles in C routines (NOAA-GFDL#920)

Co-authored-by: rem1776 <[email protected]>

* build: add intel code coverage build option to autotools (NOAA-GFDL#895)

* refactor: change to inclusive variable names (NOAA-GFDL#926)

* feat: Allow maximum number of restart variables to be set at build time (NOAA-GFDL#909)

* fix: Fixes for linter action and code style (NOAA-GFDL#869)

* test: Test script updates and input tests (NOAA-GFDL#800)

Rewrites test script to use added testing shell functions
Adds previously skipped or removed unit tests and support for testing with input files

Co-authored-by: Seth Underwood <[email protected]>
Co-authored-by: Uriel Ramirez <[email protected]>

* chore: 2022.01 release changes (NOAA-GFDL#941)

* chore: change version number to next development version (NOAA-GFDL#945)

* Add option for position independent code (NOAA-GFDL#930)

* fix: document and change parameter names for grid versions (NOAA-GFDL#918)

* fix: Moving empty and non-existent data table handling inside data_override (NOAA-GFDL#933)

Enables the processing of an empty or non-existent data_table or data_table.yaml from within data_override, so that any routine can call data_override_init without worry

* fix: Removal of internal FMS use of fms_io and mpp_io (NOAA-GFDL#928)

* fix: mpp changes to solve compile issues with serial builds (NOAA-GFDL#949)

* feat: adds build option for compiling with different sets of constants (NOAA-GFDL#929)

* feat: add and aggregate mpp_chksum unit tests (NOAA-GFDL#946)

* feat: add module for string utility routines (NOAA-GFDL#911)

Adds module and accompanying test for common string operations

* revert: reinstated the mpp_io routines and put them at the end for future elimination. (NOAA-GFDL#952)

* fix: add back in small_fac parameter to constants .h files (NOAA-GFDL#954)

* fix: root pe bug with fms2_io::flush_file (NOAA-GFDL#958)

* fix: clean up string routines for fms_string_utils_mod (NOAA-GFDL#953)

* Make changes to lines with more than 120 columns

Co-authored-by: Ryan Mulhall <[email protected]>
Co-authored-by: Eric Stofferahn <[email protected]>
Co-authored-by: rem1776 <[email protected]>
Co-authored-by: Tom Robinson <[email protected]>
Co-authored-by: Rusty Benson <[email protected]>
Co-authored-by: uramirez8707 <[email protected]>
Co-authored-by: Raffaele Montuoro <[email protected]>
Co-authored-by: Seth Underwood <[email protected]>
Co-authored-by: Uriel Ramirez <[email protected]>
Co-authored-by: Matthew Thompson <[email protected]>
Co-authored-by: Eric <[email protected]>
MinsukJi-NOAA added a commit to NOAA-EMC/FMS that referenced this pull request Apr 15, 2022
* get_unit warning now only prints on root_pe (NOAA-GFDL#872)

Co-authored-by: Eric Stofferahn <[email protected]>

* Update changelog, version numbers and build info (NOAA-GFDL#873)

Co-authored-by: rem1776 <[email protected]>

* chore: Change version number to next development version (NOAA-GFDL#874)

* CI: Update build action for yaml parser (NOAA-GFDL#871)

Update build actions
Change images to organization's repo and fix mixed mode parser test failure

* test(parser): Change real comparison value to double (NOAA-GFDL#886)

Co-authored-by: rem1776 <[email protected]>

* Make 'unsupported kind' error messages more descriptive. Change author of constants4.F90

* Add doxygen comment to valid_types in sat_vapor_pres/sat_vapor_pres_k.F90

* Modify codes for r8-r4 conversion to remove compiler warnings

* Remove OVERLOAD_R8 directives regarding send_data_*d_r8 subroutines

* Add Doxygen comments to constants4.F90

* Updates AM4 regression test suite to run intel 21 only on PW (NOAA-GFDL#893)

* feat: emc changes for mixedmode (NOAA-GFDL#857) (NOAA-GFDL#898)

* Change send_data interface and any necessary routines for mixed real precision support
* Adds an r4 size constants file

BREAKING CHANGE: changes some argument types in diag_manager, tracer_manager, sat_vapor_pres, and time_manager from real to class(*)

Co-authored-by: Minsuk Ji <[email protected]>

* feat: adds option to override (ignore) checksum test when reading restarts (NOAA-GFDL#889)

* update to fms2_io to allow reads to ignore embedded checksums on a fileobj basis
* added fms2_io test cases for the ignore_checksum option to restart reads
tests the domain, domain_wrap, and bc restart options

* docs: add CI information file (NOAA-GFDL#899)

* test: Adds check_nml_error after reading a namelist, so it could crash only as expected (NOAA-GFDL#904)

* Revert "feat: emc changes for mixedmode (NOAA-GFDL#857) (NOAA-GFDL#898)" (NOAA-GFDL#914)

This reverts commit 516a5ef.

* fix: clean up unused/uninitialized variables and other warnings (NOAA-GFDL#859)

Remove unused variables throughout and changes/removals for other warnings such as uninitialized values and implicit casts

* docs: update function style and branch names

* Changes master to main in CONTRIBUTING.md

* Claifies function return documentation in CODE_STYLE.md

* feat: adds support for logical variables in the yaml parser (NOAA-GFDL#907)

* Adds support for logical variables in the yaml parser

* correctly determines if a string is true or false

* fix: add check for affinity to self-initialize and update test program (NOAA-GFDL#917)

* fix: adds casts to class(*) calls to match doubles in C routines (NOAA-GFDL#920)

Co-authored-by: rem1776 <[email protected]>

* build: add intel code coverage build option to autotools (NOAA-GFDL#895)

* refactor: change to inclusive variable names (NOAA-GFDL#926)

* feat: Allow maximum number of restart variables to be set at build time (NOAA-GFDL#909)

* fix: Fixes for linter action and code style (NOAA-GFDL#869)

* test: Test script updates and input tests (NOAA-GFDL#800)

Rewrites test script to use added testing shell functions
Adds previously skipped or removed unit tests and support for testing with input files

Co-authored-by: Seth Underwood <[email protected]>
Co-authored-by: Uriel Ramirez <[email protected]>

* chore: 2022.01 release changes (NOAA-GFDL#941)

* chore: change version number to next development version (NOAA-GFDL#945)

* Add option for position independent code (NOAA-GFDL#930)

* fix: document and change parameter names for grid versions (NOAA-GFDL#918)

* fix: Moving empty and non-existent data table handling inside data_override (NOAA-GFDL#933)

Enables the processing of an empty or non-existent data_table or data_table.yaml from within data_override, so that any routine can call data_override_init without worry

* fix: Removal of internal FMS use of fms_io and mpp_io (NOAA-GFDL#928)

* fix: mpp changes to solve compile issues with serial builds (NOAA-GFDL#949)

* feat: adds build option for compiling with different sets of constants (NOAA-GFDL#929)

* feat: add and aggregate mpp_chksum unit tests (NOAA-GFDL#946)

* feat: add module for string utility routines (NOAA-GFDL#911)

Adds module and accompanying test for common string operations

* revert: reinstated the mpp_io routines and put them at the end for future elimination. (NOAA-GFDL#952)

* fix: add back in small_fac parameter to constants .h files (NOAA-GFDL#954)

* fix: root pe bug with fms2_io::flush_file (NOAA-GFDL#958)

* fix: clean up string routines for fms_string_utils_mod (NOAA-GFDL#953)

* chore: update libFMS module with new routines (NOAA-GFDL#912)

* fix: removes fms_c.c and fms_c.h (NOAA-GFDL#961)

* Make changes to lines with more than 120 columns

Co-authored-by: Ryan Mulhall <[email protected]>
Co-authored-by: Eric Stofferahn <[email protected]>
Co-authored-by: rem1776 <[email protected]>
Co-authored-by: Tom Robinson <[email protected]>
Co-authored-by: Rusty Benson <[email protected]>
Co-authored-by: uramirez8707 <[email protected]>
Co-authored-by: Raffaele Montuoro <[email protected]>
Co-authored-by: Seth Underwood <[email protected]>
Co-authored-by: Uriel Ramirez <[email protected]>
Co-authored-by: Matthew Thompson <[email protected]>
Co-authored-by: Eric <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
6 participants