Skip to content

Conversation

@joewallwork
Copy link
Contributor

@joewallwork joewallwork commented Oct 24, 2025

Automation and pruning for the XIOS handler class

Towards #850
Merges into #951

Task List

  • Defined the tests that specify a complete and functioning change (It may help to create a design specification & test specification)
  • Implemented the source code change that satisfies the tests
  • Documented the feature by providing worked example
  • Updated the README or other documentation
  • Completed the pre-Request checklist below

Change Description

This PR contains refactoring work to (a) automate the XIOS I/O implementation to streamline the user experience and (b) remove member functions that it turns out aren't needed.

Automation

  • Separate affixModelMetadata into parseInputFiles, setupDomains, setupAxes, and setupGrids. Call parseInputFiles in the Xios constructor and the rest in the ParaGridIO constructor.
  • Automate setting nCoords for VERTEX in setupDomains.
  • Automate setting nComponents for DG in setupDomains.
  • Automate setting nComponents for DGSTRESS in setupDomains.
  • Automate enableXios by inlining it at the start of Model.configureTime.

Pruning

  • Inline enableXios in Model.configureTime as mentioned above.
  • Remove getClientMPISize and getClientMPIRank.
  • Remove setAxisValues and getAxisValues.
  • No need to call ModelMetadata.setTime because it already gets called in Model.configureTime.
  • Inline isInitialized at the end of the Xios constructor, throwing an error if not.
  • Drop getCalendarType since it's hard-coded to "Gregorian".
  • Drop getCalendarTimestep because this is given by ModelMetadata.stepLength.

Test Description

The XIOS handler tests are reworked to account for the automation. This involved some reordering of how things are done.


Documentation Impact

The XIOS docs page has been updated.


Other information

I changed the default DGCOMP value in discontinuousgalerkin/ModelArrayDetails.cpp to be consistent with the default DG degree that gets set in the root CMakeLists.txt.


Pre-Request Checklist

  • The requirements of this pull request are fully captured in an issue or design specification and are linked and summarised in the description of this PR
  • No new warnings are generated
  • The documentation has been updated (or an issue has been created to track the corresponding change)
  • Methods and Tests are commented such that they can be understood without having to obtain additional context
  • This PR/Issue is labelled as a bug/feature/enhancement/breaking change
  • This change conforms to the conventions described in the README

@joewallwork joewallwork self-assigned this Oct 24, 2025
@joewallwork joewallwork added enhancement New feature or request ICCS Tasks or reviews for the ICCS team labels Oct 24, 2025
@joewallwork joewallwork force-pushed the issue850_xios-pruning branch from c4e1664 to 40eac3f Compare October 24, 2025 15:20
@joewallwork joewallwork force-pushed the issue850_xios-pruning branch from 09d0fc0 to 282247e Compare October 24, 2025 18:34
@joewallwork joewallwork mentioned this pull request Oct 27, 2025
11 tasks
@joewallwork joewallwork marked this pull request as ready for review November 3, 2025 11:29
@joewallwork joewallwork mentioned this pull request Nov 3, 2025
Base automatically changed from issue911_xios-cg-dgs to develop November 10, 2025 10:38
model.configureTime();

// Get the Xios singleton instance and check it's initialized
// NOTE: The singleton is created during configureTime
Copy link
Collaborator

@timspainNERSC timspainNERSC Nov 10, 2025

Choose a reason for hiding this comment

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

Because Xios::getInstance() is called as part of setting the time, and this runs the code that creates the singleton? Rather than it being explicitly coded as part of Model::configureTime()? If the first is the case, then I think this comment could be better worded.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point! Done in 79c6eec.

Copy link
Collaborator

@timspainNERSC timspainNERSC left a comment

Choose a reason for hiding this comment

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

I'd like it if the repeated comment in the test were more clearly worded, but it is technically correct as it stands. It just makes it sound like creating the XIOS singleton was specifically coded as part of the function configureTime(), when (as I understand it) that just happens to be the first place that requests the singleton.

@joewallwork joewallwork merged commit fdb4fec into develop Nov 10, 2025
8 of 9 checks passed
@joewallwork joewallwork deleted the issue850_xios-pruning branch November 10, 2025 14:52
joewallwork added a commit that referenced this pull request Nov 10, 2025
Closes #861
Merges into #968 

Provides more detail on XIOS, including an introduction, info on the
required order of operations, and details on the five XIOS concepts.

This PR also makes the file splitting frequency configurable, inlines
`setFileSplitFreq`, and removes `setFileSplitFreq` and
`getFileSplitFreq` from the interface. Also fixes a related typo.
joewallwork added a commit that referenced this pull request Dec 1, 2025
# Read input file to determine dimensions

Fixes #972
Merges into #968

### Task List
- [x] Defined the tests that specify a complete and functioning change
(*It may help to create a [design specification & test
specification](../../../wiki/Specification-Template)*)
- [x] Implemented the source code change that satisfies the tests
- [x] Documented the feature by providing worked example
- [x] Updated the README or other documentation
- [x] Completed the pre-Request checklist below

---
# Change Description

Currently, there are differences in how the serial, MPI-parallel, and
XIOS configurations read dimensions. For greater consistency, this PR
implements a `setDimensionsFromFile` member function for
`ModelMetadata`. It gets called in `Model.configureRestarts`. It also
gets called in `ParaGridIO.getModelState` (for consistency with the
existing implementation).

---
# Test Description

XIOS tests are updated to account for the fact that dimensions are set
in `Model.configureRestarts`.

---
# Documentation Impact

None

---
### Pre-Request Checklist

- [x] The requirements of this pull request are fully captured in an
issue or design specification and are linked and summarised in the
description of this PR
- [x] No new warnings are generated
- [x] The documentation has been updated (or an issue has been created
to track the corresponding change)
- [x] Methods and Tests are commented such that they can be understood
without having to obtain additional context
- [x] This PR/Issue is labelled as a bug/feature/enhancement/breaking
change
- [x] This change conforms to the conventions described in the README
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request ICCS Tasks or reviews for the ICCS team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants