New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
2021WP/HPC-10_mcastril_Mixed_Precision_implementation – NEMO
wiki:2021WP/HPC-10_mcastril_Mixed_Precision_implementation

HPC-10_mcastril_Mixed_Precision_implementation

Last edition: Wikinfo(changed_ts)? by Wikinfo(changed_by)?

The PI is responsible to closely follow the progress of the action, and especially to contact NEMO project manager if the delay on preview (or review) are longer than the 2 weeks expected.

  1. Summary
  2. Preview
  3. Tests
  4. Review

Summary

Action HPC-10_mcastril_Mixed_Precision_implementation
PI(S) Miguel Castrillo
Digest Brief description with motivations and main tasks
Dependencies Availability of the mixed-precision tool and development of a source code checker for compliance with the coding guidelines
Branch source:/NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/
Previewer(s) Italo Epicoco
Reviewer(s) Italo Epicoco
Ticket #2658

Description

Implementation of the mixed precision version of NEMO. Continuation of https://forge.ipsl.jussieu.fr/nemo/wiki/2020WP/HPC-04_mcastril_Mixed_Precision_implementation

The methodology is based on the run of an analysis tool to determine which variables can be safely set in WP and which ones need to be kept in DP. The provided code is the result of one of these analyses for the default configurations.

The code was implemented and ready for 2020 merge. Then it was decided that a more robust maintenance protocol should be agreed in the context of the HPC group.

  • HPC-WG agreed on and will propose to the NEMO ST to support the development of the NEMO code following the guidelines mentioned above, this will lead to a code where:
    • NEMO could be compiled in MP or in DP (as usual) by activating a compiler key
    • The Mixed Precision Advice Tool would be easily and directly applicable to the NEMO code
  • HPC-WG agreed to include the Mixed Precision Advice Tool in the NEMO repository as external tool. The final user will apply this tool on his own configuration if needed.
  • BSC (with the support of ECMWF) is available to take the responsibility of making the next NEMO 4.2 release fully compliant with the guidelines mentioned above. From the NEMO 4.2 on, each NEMO developer should adopt the coding guidelines in order to maintain NEMO fully compliant with the guidelines.
  • BSC with the support of ECMWF is available to write the coding guidelines document to be followed by the developers after NEMO 4.2 is released
  • BSC is available to apply the mixed precision and on the most common configurations

The analysis procedure is documented in the following publication:

http://dx.doi.org/10.5194/gmd-12-3135-2019

Implementation

The implementation of mixed-precision valid to run using mixed-precision with the ORCA2_ICE_PISCES configuration was done in the branch, and has been updated with the trunk as of December 2021.

However, as the development is dependent on the configuration, it required specific discussion about the best way to implement it in NEMO. For this purpose, an interest subgroup was created to make a plan and present it to the NEMO ST.

According to the plan, BSC commits to:

  • Make the mixed-precision tool (the analysis and automatic implementation workflow based on RPE) available to the NEMO community.
  • Develop a checker for NEMO compliance with a set of coding guidelines that facilitate the automatic analysis.

The ST agrees to integrate the mixed-precision support for the ORCA2_ICE_PISCES configuration because it will reduce the number of changes needed to support any other configuration.

Documentation updates

...

Preview

...

Tests

a) When the option is not activated the code should pass all the sette test and should not display any difference in results nor computational performance.

b) When the option is activated there will be many differences that should be appreciable:

  • The implementation must significantly reduce run time and memory fingerprint. The impact is expected to be bigger with heavy workloads, being reduced when the run time start to be constrained by communication.
  • The results won't be bit-to-bit indentical to double-precision runs, although the runs in mixed-precision must be reproducible.
  • Due to the non-linear nature of the model, differences in the results are expected. Tracer conservation or other magnitudes can be measured in order to ensure that the differences remain below an acceptable threshold.

Review

The task will be continued in 2022 with the porting of the mixed-precision toolchain to another machine and its proper documentation, together with the development of the checker.

Last modified 2 years ago Last modified on 2021-12-01T12:23:26+01:00