Skip to content

Add input checks to stagnant lid comparison plot - #481

Open
ss2098 wants to merge 1 commit into
underworldcode:developmentfrom
ss2098:ss2098/add-stagnant-lid-plot-input-checks
Open

Add input checks to stagnant lid comparison plot#481
ss2098 wants to merge 1 commit into
underworldcode:developmentfrom
ss2098:ss2098/add-stagnant-lid-plot-input-checks

Conversation

@ss2098

@ss2098 ss2098 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

This PR adds a preflight input check to scripts/stagnant_lid_adapt_compare_plot.py.

The script is a post-processing plot script and expects existing stagnant-lid checkpoint outputs. Previously, if the hard-coded checkpoint directories or files were missing, PETSc/HDF5 failed later with a low-level H5Fopen error.

This update checks for the required mesh and T checkpoint files before loading them and prints a clear message explaining which inputs are missing and that the user should run/copy the checkpoint outputs first or update U_DIR/A_DIR and U_STEM/A_STEM.

This does not change solver internals or checkpoint loading behavior when the required files exist.

Validation:

  • python -m py_compile scripts/stagnant_lid_adapt_compare_plot.py
  • pixi run python scripts/stagnant_lid_adapt_compare_plot.py

With missing local checkpoint files, the script now exits cleanly after listing the missing required inputs instead of failing with a PETSc/HDF5 traceback.

@ss2098
ss2098 requested a review from lmoresi as a code owner July 29, 2026 18:08
@ss2098

ss2098 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

The failing test_uw3 import-smoke check appears to fail during MPI/UCX initialization before this PR change is reached:

UCX ERROR mana_0 ... failed to create UD QP
MPI_Init_thread failed
MPIDI_UCX_init_worker Input/output error

This PR only adds preflight input checks to scripts/stagnant_lid_adapt_compare_plot.py.

Local validation passed with:

python -m py_compile scripts/stagnant_lid_adapt_compare_plot.py
pixi run python scripts/stagnant_lid_adapt_compare_plot.py

With missing local checkpoint inputs, the script now exits cleanly after listing the missing files instead of failing later with a PETSc/HDF5 traceback.

I do not have permission to rerun the upstream workflow, so a maintainer rerun may be needed.

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.

1 participant