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

XIOS: Add File I/O To & From XIOS Grid/Axis #291

Closed
a-smith-github opened this issue Apr 27, 2023 · 2 comments
Closed

XIOS: Add File I/O To & From XIOS Grid/Axis #291

a-smith-github opened this issue Apr 27, 2023 · 2 comments
Assignees
Labels
ICCS Tasks or reviews for the ICCS team

Comments

@a-smith-github
Copy link
Contributor

a-smith-github commented Apr 27, 2023

This is a sub-feature of issue #218 tracking adding the file I/O capability of the XIOS class

We need to be able to write restart files via XIOS using data stored within the XIOS Grid/Axis framework using XIOS Library calls.

This requires Issues #293 and #292

For the XIOS Integration, see the design spec or the master pull request

@a-smith-github a-smith-github self-assigned this Apr 27, 2023
@a-smith-github a-smith-github added the ICCS Tasks or reviews for the ICCS team label Apr 27, 2023
@mondus mondus moved this to In Progress in neXtSIM_DG overview Apr 27, 2023
@mondus mondus moved this from In Progress to Pending in neXtSIM_DG overview Apr 27, 2023
@einola einola added this to the 3 Stand-alone model milestone May 4, 2023
@einola
Copy link
Member

einola commented Sep 5, 2023

This issue should target the diagnostics files rather than restart files. Diagnostic output is the main reason for us to use XIOS because writing and reading restart files are much less frequent and always contain the same variables, so most of the "nice" features of XIOS are not needed.

So, we should prioritise diagnostic outputs for XIOS and leave restart I/O to the native functionality that already exists. We can then return to the question of XIOS vs. native I/O for restart files later.

@TomMelt TomMelt mentioned this issue Oct 4, 2023
4 tasks
@TomMelt TomMelt assigned TomMelt and unassigned a-smith-github Feb 5, 2024
@TomMelt TomMelt mentioned this issue Feb 12, 2024
9 tasks
@TomMelt TomMelt moved this from Pending to Todo in neXtSIM_DG overview Feb 12, 2024
TomMelt added a commit that referenced this issue May 2, 2024
# Nextsim XIOS Interface

The previous XIOS work has diverged from the current development branch.

This PR has a minimum working example (MWE) in the form of a test
`testXiosInit` (source `./core/test/XiosInit_test.cpp`).

The test checks most of the functionality added by the XIOS C++
interface
* `./core/src/Xios.cpp`
* `./core/src/include/Xios.hpp`

which depend on a C interface included here:
`./core/src/include/xios_c_interface.hpp`

The core functionality of XIOS is included as part of this PR as the
other two components will require it.

## XIOS functionality

Still to discuss:
- [x] we need to discuss Dockerfile because building without one will
become more complicated going forward (more dependencies, `lxios`,
`lpnetcdf` etc.
- [x] ~Also how do we want to handle mac builds going forward? I cannot
simulate mac (virt OS/docker) so it's not easy for me to "fix" CI~ we
will not support MPI/xios on mac

This PR does the following:

- [x] add `XIOS` to `cmake`
- [x] add `XIOS` to the CI workflow 
- [x] add unit tests to check core functionality of the C++ wrapper
- [x] uses mpi-aware `doctest`

I think this can be merged in relatively soon. The remaining steps are
(for a future PR):
- [ ] to actually integrate XIOS into nextsim (because `testXiosInit` is
a stand-alone binary)
- [ ] to replace the `XIOS` datetime types with `nextsim`'s
- [ ] produce diagnostic output files

## Steps required to run `testXiosInit`

* Install `XIOS` (see the github workflow for an idea how to install
`XIOS`)
* Build `nextsim` with `XIOS` support using `-DENABLE_XIOS=ON` and
`-Dxios_DIR=/path/to/xios/install`
* `cd` to  `build/core/test` and run `mpirun -n 2 ./testXiosInit`

The test should pass all tests:
```
[doctest] doctest version is "2.4.11"
[doctest] run with "--help" for options
step 0===============================================================================
[doctest] test cases:  1 |  1 passed | 0 failed | 0 skipped
[doctest] assertions: 19 | 19 passed | 0 failed |
[doctest] Status: SUCCESS!
===============================================================================
[doctest] assertions on all processes:     38 |     38 passed |      0 failed |
===============================================================================
[doctest] Status: SUCCESS!
```
And produce the following output:
```
xios_client_1.err
xios_client_0.err
diagnostic.nc
xios_client_1.out
xios_client_0.out
doctest_1.log
doctest_0.log
```

I don't currently verify the output of `diagnostic.nc` as part of
`testXiosInit` but this can be added.

This PR is to update the state of XIOS related PRs and Issues. This will
close some stale issues
closes  #218
closes #291 
closes  #293
@jwallwork23
Copy link
Contributor

Closed by #496.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ICCS Tasks or reviews for the ICCS team
Projects
Development

No branches or pull requests

4 participants