I don't think rank has been initialized at this point, which means it could have an arbitrary value. That could then lead to a potential random reordering of rank values in the backends communicator as compared to the parent communicator.
A potential fix would be to replace rank with 0 or otherwise move the MPI_Comm_rank(comm, &rank) higher up in the function.
I'm working with @kosinovsky to debug an XOR rebuild problem. While looking through the code, this line caught my eye:
https://github.com/ECP-VeloC/VELOC/blob/a5a9b8ae64f0a099001de8af79e08f3d50f5a83b/src/lib/client.cpp#L62
I don't think
rank
has been initialized at this point, which means it could have an arbitrary value. That could then lead to a potential random reordering of rank values in thebackends
communicator as compared to the parent communicator.A potential fix would be to replace
rank
with0
or otherwise move theMPI_Comm_rank(comm, &rank)
higher up in the function.