mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-24 10:10:18 -06:00
Merge pull request #4753 from blattms/fix-fallout-4750
Don't write out of bounds (fixes fallout from PR #4750)
This commit is contained in:
commit
4ad4226fdd
@ -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