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 performance monitoring #7

Closed
wants to merge 152 commits into from
Closed

Test performance monitoring #7

wants to merge 152 commits into from

Conversation

marshallward
Copy link
Owner

Check if having an actual base_ref fixes the build issues.

gustavo-marques and others added 30 commits December 15, 2020 18:13
* Also reducing line lenghts > 120
Fixes inconsistency in the calculation of tendency due to lateral diffusion
See https://arxiv.org/abs/2004.06278. Not an exact reproduction of "squares" because Fortran doesn't have a uint64 type, and not all compilers provide integers with > 64 bits...
…_diff

Adds mask2dT checker to avoid calling boundary_k_range at land points
Added a counter-based PRNG to MOM_random
Remove an omp parallel do directive due to thread-unsafe cpu_clock
This patch fixes a sign bug, in both MCT and NUOPC, when
accounting for the latent heat from fprec and frunnoff.
Following MOM6's definition, both fprec
and frunoff are > 0 into the ocean. Therefore, the latent heat
associated with these terms should be negative.
* Fixes latent heat contribution from fprec and frunoff (MCT and NUOPC)
…ndidate_2021-02-19

Fix LBD module after merging main candidate 2021 02 19
Add med2mod_areacor and move where area correction is applied
Sync with main to bring in new file layout
marshallward and others added 26 commits May 27, 2021 23:23
This patch fixes up and enables several of the derived type destructor
functions (`_end()`) used to handle memory management of the model.

- Two uninitialized logical flags which would cause errors in optimized
  builds have also been fixed.

  * `Visbeck_S_max` in thickness diffusion is now initialized to zero,
    which acts to disable it in subsequent operations.

  * `remap_answers_2018` is now unset when `NDIFF_CONTINUOUS` is false.

- Several of the destructor functions were restructured so that they do
  not explicitly deallocate their pointer inputs.  This will allow us to
  stage the functions as formal destructors for the derived types via
  the `final` keyword in a later patch.  It also allows us to pass the
  inputs on stack rather than as pointers.

  * `barotropic_end`
  * `continuity_end`
  * `CoriolisAdv_end`
  * `deallocate_MOM_domain`
  * `diabatic_driver_end`
  * `geothermal_end`
  * `hor_visc_end`
  * `MEKE_end`
  * `MOM_CVMix_conv_end`
  * `MOM_CVMix_ddiff_end`
  * `MOM_CVMix_shear_end`
  * `MOM_diagnostics_end`
  * `MOM_regridding_end`
  * `MOM_sum_output_end`
  * `PressureForce_end`
  * `set_diffusivity_end`
  * `thickness_diffuse_end`
  * `tidal_forcing_end`
  * `VarMix_end`
  * `vertvisc_end`

- In a few cases, the deallocations were re-ordered to match the
  reversed order of allocation.

  * `MOM_CVMix_conv_mod`
  * `MOM_CVMix_ddiff_mod`
  * `MOM_CVMix_shear_mod`

- A few constructors always initialized their control structures, even
  when disabled.  In some of these cases, the allocation is now skipped
  if the corresponding feature is disabled.

- `diag_mediator_end` now includes the following changes:

  * `axes_grp_end` was introduced to deallocate axes_grp types.
    The `remap_axes*` are now deallocated.

  * We now cycles through the diagnostic list and deallocate the
    supplemental diagnostics.

  * Downsampled diagnostic masks and remaps are now deallocated

- The initialized `blockName` of the param file parser are now
  dellocated before reinitializing them.  Although the existing value is
  still lost, it is at least now deallocated from heap.

- A bug was fixed in `hor_visc_end`; Smag_Ah and Leith_Ah areas were
  incorrectly swapped.

The principal motivation for this work is to eliminate any errors
detected by valgrind, and to integrated automated memcheck testing to
the verification test suite.
  Revised the dimensional rescaling of the various tracer_stock routines to
occur in a single line and be standardized across the tracer packages.  Also
added units to the descriptions of some some arguments in the tracer registry
routines.  All answers are bitwise identical.
… from a constant to a field to allow for its spatial variability; several parameters are added to a restart file. In MOM_ice_shelf_initialize.F90 a subroutine initialize_ice_AGlen is added; it initializes the ice-stiffness parameter A_Glen either by reading it from a file or assigning a constant value.
…_code

+Dimensional rescaling of user OBC test cases
Memory management cleanup and initialization fixes
Standardize dimensional rescaling in tracer stocks
…patch

Change the declaration of stack variable in apply_flux_adjustments
First pass towards setting up a performance tracker and logger.

This patch includes the following components:

* A rule to build "OPT" builds for the current code and the reference
  target (usually dev/gfdl).

* A sample experiment, stored on p0 (basically my default profiling
  example)

* A script to parse the model stdout and return the clock data as a JSON
  file.

* Makefile updated to build the profile executables and run p0 for opt
  and opt_target.

What is missing?

* stdout still needs to passed through the new helper script

* Clock data needs to either be stored locally or sent to some external
  database

* Comparison of results needs to be reported.
The .testing Makefile was updated to parse the profile run stdout
content to produce the clocks.json file.  Also the file was renamed from
prof.json to clocks.json.

The clock parsing tool was updated to not pretty-format the output on
default, and now uses a flag to control this behavior.  Might change the
default in the future.

An experimental GitHub Actions config was added to run the profile
rules.  I have never done this before, so it may not actually do
anything, but let's see what happens.
We now include MOM_parameter_doc.* and input.nml data into the
clocks.json file, and can now use this to better organize our results.
This adds a `perf` test to the Makefile and a (probably futile) attempt
to run it on the GH Actions cloud.

I've also bundled a script to read and parse the perf.data output and
return an equivalent JSON output file.

Not expecting a whole lot here but let's see what happens...
marshallward pushed a commit that referenced this pull request Sep 14, 2021
marshallward added a commit that referenced this pull request Dec 1, 2021
Corrected the descriptions of 60 variables
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.