Skip to content

s_mpi_allreduce_integer_sum integer overflow #1601

@danieljvickers

Description

@danieljvickers

Describe the bug
Sometimes the subroutine s_mpi_allreduce_integer_sum can hjave integer overflows on large enough cases, causing issues such as array instantiation in m_ibm for the ghost_points array. We need to do the all-reduce sum in 8-byte integers instead of 4-byte.

To Reproduce
I found this while running with about 4 Million spherical IBs, which overflows the number of ghost points

Expected behavior
The integer overflows to a negative number, creating a negative array size and therefor a crash.

Screenshots
Not relevant

Environment

  • OS: Linux
  • Compiler Cray

Metadata

Metadata

Labels

No labels
No labels

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions