Skip to content

loc_violations used uninitialized in MPI_Allreduce #1205

@sbryngelson

Description

@sbryngelson

Bug

In `src/pre_process/m_data_output.fpp`, `loc_violations` is declared but never initialized before being conditionally assigned inside a loop. If no violations are found, the variable retains an uninitialized value which is then passed to `MPI_Allreduce`.

File: `src/pre_process/m_data_output.fpp`, line 479

Impact: MPI_Allreduce sums garbage from ranks where no violations occurred, producing incorrect global violation counts.

Severity: High — uninitialized variable passed to MPI collective.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working or doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions