Skip to content

pre_process broadcasts integer bc_*%beg/%end with the real datatype (mpi_p) #1561

Description

@sbryngelson

Symptom: none observable today — but it is undefined behavior that has been working by accident.

Mechanism: src/pre_process/m_mpi_proxy.fpp:55-65 (master) uses one combined Fypp loop that broadcasts x/y/z_domain (reals, correct) and bc_x/y/z%beg/%end — which are int_bounds_info INTEGER members — all with mpi_p: an 8-byte real transfer over a 4-byte integer that only behaves because of struct adjacency. simulation and post_process correctly use MPI_INTEGER for the same members.

Introduced: the 2022 compile-time case-dictionary squash (c9c5d922, 2022-06-02, @henryleberre, pre-PR-workflow era) changed pre's bc_x from a real bounds_info to int_bounds_info while leaving the real-typed broadcast in place; the later combined loop merely inherited it. Tagging @henryleberre for context.

Fix: #1553 splits the loop and broadcasts the BC codes with MPI_INTEGER.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions