Skip to content

Race condition in stat mech examples #38

Description

@tkphd

The statistical mechanics examples (Heisenberg, Ising, Potts) will only call ghostswap() when index % sqrt(nodes(grid)) is zero. This is meant to trigger ghostswap when a boundary cell has changed state, in order to maintain coherency across parallel boundaries. Depending on the number of ranks requested of mpirun, the grids may have uneven sizes, which produces a race condition when one rank has already passed over the conditional (leaving all the rest to wait, forever). This could be addressed by collectively reducing index % sqrt(nodes(grid)) to its minimal value, effectively asking if any rank has changed a boundary cell, instead of checking only the local rank.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    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