mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-24 10:10:18 -06:00
Don't write out of bounds (fixes fallout from PR #4750)
While we never use the data receive, we should still not write beyond arrays as this may create problems.
This commit is contained in:
parent
2aaba39374
commit
943d84c836
@ -95,7 +95,7 @@ void checkAllMPIProcesses()
|
||||
|
||||
for(decltype(comm.size()) i = 1; i < comm.size(); ++i)
|
||||
{
|
||||
if (auto error = MPI_Irecv(data.data() + i, 1, MPI_INT, i, tag, comm, requests.data() + i - 1);
|
||||
if (auto error = MPI_Irecv(data.data() + (i - 1), 1, MPI_INT, i, tag, comm, requests.data() + (i - 1));
|
||||
error != MPI_SUCCESS) {
|
||||
OpmLog::error(fmt::format("Error: Could not set up MPI receive (error code : {})", error));
|
||||
MPI_Abort(MPI_COMM_WORLD, EXIT_FAILURE);
|
||||
|
Loading…
Reference in New Issue
Block a user