I have tracked down for out-of-range memory access in this MPI operation. In these lines, 6 memory addresses are unconditionally updated without checking the len parameter. I have verified that with OpenMPI v5.0.8, the default collective han algorithm results in a call to the function with len=3, and that causes an invalid memory write (because the 6 values are written unconditionally). The crash always occurs on the first rank on the node.
A potential fix is to not do anything when len<6 and always perform the (current) operation in units of 6 integers. I have tested this patch and fixes the crash with OpenMPI v5.0.8. Please let me know if the patch seems reasonable - happy to put through a PR with the patch
Note: The issue was debugged and patched with Claude Opus 5 (at Max effort). I have looked through the patch and seems sensible (fusing the 6 integers into a single custom MPI datatype) and the patch itself works for our simulations and produces bitwise identical results.
I have tracked down for out-of-range memory access in this MPI operation. In these lines, 6 memory addresses are unconditionally updated without checking the
lenparameter. I have verified that with OpenMPI v5.0.8, the default collectivehanalgorithm results in a call to the function withlen=3, and that causes an invalid memory write (because the 6 values are written unconditionally). The crash always occurs on the first rank on the node.A potential fix is to not do anything when
len<6and always perform the (current) operation in units of 6 integers. I have tested this patch and fixes the crash with OpenMPI v5.0.8. Please let me know if the patch seems reasonable - happy to put through a PR with the patchNote: The issue was debugged and patched with Claude Opus 5 (at Max effort). I have looked through the patch and seems sensible (fusing the 6 integers into a single custom MPI datatype) and the patch itself works for our simulations and produces bitwise identical results.