Skip to content

Read and write the index json on one rank only - #277

Merged
adperezm merged 1 commit into
ExtremeFLOW:mainfrom
nick-morse:fix/mpi-safe-index-json
Oct 14, 2026
Merged

adperezm merged 1 commit into
ExtremeFLOW:mainfrom
nick-morse:fix/mpi-safe-index-json

Conversation

@nick-morse

Copy link
Copy Markdown
Contributor

Having Claude pull in some fixes that I needed during my postprocessing.

In this case, merge_index_files had every rank open the consolidated index file for writing (same with average_field_files for reading). Fix by write/reading on rank 0, matching what index_files_from_folder does.

`merge_index_files` had every rank open the consolidated index for writing,
and `average_field_files` had every rank open the index for reading. Both are
collective calls, so on a parallel filesystem this means N ranks writing the
same path concurrently and N ranks reading the same file.

Write on rank 0 and broadcast on read, matching what
`index_files_from_folder` already does for the per-folder indices.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@adperezm
adperezm merged commit 87430ec into ExtremeFLOW:main Oct 14, 2026
36 of 40 checks passed
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.

2 participants