Skip to content

Add command arguments to metadata - #88

Merged
Mikolaj-A-Kowalski merged 1 commit into
mainfrom
add-command-to-metadata
Oct 14, 2026
Merged

Mikolaj-A-Kowalski merged 1 commit into
mainfrom
add-command-to-metadata

Conversation

@TomMelt

@TomMelt TomMelt commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

Store command line args in partition metadata netCDF files

Relates to a sub-component of #86

Summary

Adds the decomp tool command line arguments, used to invoke decomp as a global command attribute in all partition metadata netCDF files. This improves reproducibility making it easier to see which args decomp used to produce a given metadata output.

Changes

  • Partitioner — Added setArgs() method and _args member to store and write the args string
  • main.cpp — Rebuilds the full argc/argv arguments string and passes it to the partitioner before saving metadata
  • Tests — Updated all 10 partition metadata reference CDL files to include the expected args attribute

Note

It is not possible to store the MPI launch part e.g., mpirun -n 8 decomp ... as is stripped by the launcher. Only the decomp arguments are received by decomp. As a result we have decided to store args only.

@TomMelt TomMelt self-assigned this Jun 23, 2026
@TomMelt TomMelt added the ICCS label Jun 23, 2026
@TomMelt TomMelt mentioned this pull request Jun 23, 2026
1 of 3 tasks
@TomMelt TomMelt moved this to Review required in neXtSIM_DG overview Jun 23, 2026
@TomMelt TomMelt changed the title Add command to metadata Add command arguments to metadata Jul 6, 2026

@Mikolaj-A-Kowalski Mikolaj-A-Kowalski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I cannot think of any reason not to include this one. Feels useful.

Comment thread Partitioner.hpp Outdated
Comment thread main.cpp Outdated
@Mikolaj-A-Kowalski

Copy link
Copy Markdown
Contributor

Ready to merge? Unless @niravshah241 you want to have another look?

@TomMelt

TomMelt commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

@Mikolaj-A-Kowalski thanks I will wait till #87 is also ready and then merge them both. I will take a look at your feedback on the former later today 👌

@Mikolaj-A-Kowalski
Mikolaj-A-Kowalski force-pushed the remove-neighbour-duplication branch from 9e62fcb to be3a627 Compare October 14, 2026 12:33
@Mikolaj-A-Kowalski
Mikolaj-A-Kowalski changed the base branch from remove-neighbour-duplication to main October 14, 2026 14:01
@Mikolaj-A-Kowalski
Mikolaj-A-Kowalski force-pushed the add-command-to-metadata branch 2 times, most recently from c4c2b61 to 667c70d Compare October 14, 2026 14:13
Record all the arguments used to generate the partitioning metadata as a
global attribute in the output netCDF file,. This aids reproducibility
by documenting the exact arguments used to invoke `decomp`.

Co-authored-by: Mikolaj Adam Kowalski <32641577+Mikolaj-A-Kowalski@users.noreply.github.com>
@Mikolaj-A-Kowalski
Mikolaj-A-Kowalski merged commit 0f56cdc into main Oct 14, 2026
3 checks passed
@github-project-automation github-project-automation Bot moved this from Review required to Done in neXtSIM_DG overview Oct 14, 2026
@jatkinson1000
jatkinson1000 deleted the add-command-to-metadata branch October 14, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Development

Successfully merging this pull request may close these issues.

2 participants