Skip to content

Swarm.save: non-zero ranks return while rank 0 still appends metadata — immediate reopen hits HDF5 file locking (BlockingIOError) #330

Description

@lmoresi

Summary

Found during #329's gating: Swarm.save returns on non-zero ranks while rank 0 is still appending metadata to the HDF5 file. A caller that immediately reopens the file (e.g. read_timestep straight after write_timestep) hits HDF5 file locking — BlockingIOError errno 35.

A TODO(BUG) marker sits at the metadata append in swarm.py (added in #329); the new parallel read_timestep tests barrier after write_timestep to stay clear of it.

Suggested fix

Barrier before returning from save (or move the metadata append before the collective close). Regression: write-then-immediately-read at np2 without an explicit user barrier.

Underworld development team with AI support from Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions