Single-precision-safe OIFS/OASIS coupling + XIOS output - #1029
Merged
Conversation
Type the OASIS exchange buffer exfld as WP_full (always double) and route every FESOM-internal coupling MPI call through MPI_WP so USE_SINGLE_PRECISION (WP=real32) coupled builds no longer pass MPI_DOUBLE_PRECISION for real(kind=WP) buffers. Make the XIOS tracks/grid coordinate paths double (io_tracks/io_xios). Relax the CMake guard to allow SP for the OIFS-via-OASIS combination.
…-coupled # Conflicts: # src/io_tracks.F90
…nto feat/single-precision-coupled
Collaborator
Author
|
I did some test runs. It works in AWI-ESM3. Yet to test speedup. |
Collaborator
Author
|
I did a short test with core3 coupled to tco95.
Works. Not optimized at all. But i see substantial speedup in this short test already. |
suvarchal
reviewed
Aug 31, 2026
suvarchal
approved these changes
Aug 31, 2026
kind=8 is not portable (NEC compilers number real kinds 1,2,3). Switch the double-precision geometry declarations and the two xios_duration literals to the WP_full parameter (=real64), which is defined portably in o_param. Addresses review feedback on PR #1029.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes
USE_SINGLE_PRECISION(WP=real32) work in coupled OIFS-via-OASIS builds.cpl_driver.F90
exfldtypedWP_full(always double), matching theoasis_Doubletransient and mirroring OpenIFS' dedicated double coupling kind JPRO.MPI_WPinstead of hardcodedMPI_DOUBLE_PRECISION, so the MPI type tracks WP.gen_forcing_couple.F90
integrate_2Dreductions useMPI_WP. The raw FESOM<->atmosphere net-flux exchange innet_rec_from_atmis left double (skipped for__oifs) with an explanatory note.io_tracks.F90 / io_xios.F90
real(kind=8)/ matchingmod_tracks_geometryTG_WP), so SP + XIOS compiles.CMakeLists.txt
OASIS accepts single-precision buffers (its put/get and grid-write interfaces are generic over real4/real8 and promote to double internally), so nothing is corrupted when WP=real32; the genuine breakage was FESOM's own hardcoded double MPI calls on
real(kind=WP)buffers.Draft: builds and initializes coupled; runtime coupled validation on albedo (AWI-ESM3 TCO95/CORE3, single precision) in progress.