mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #2730 from akva2/fix_broadcast_summarystate
fixed: have to broadcast summarystate on restart
This commit is contained in:
commit
e8bf79d774
@ -839,6 +839,10 @@ RestartValue loadParallelRestart(const EclipseIO* eclIO, Action::State& actionSt
|
|||||||
Mpi::pack(restartValues, buffer, position, comm);
|
Mpi::pack(restartValues, buffer, position, comm);
|
||||||
comm.broadcast(&position, 1, 0);
|
comm.broadcast(&position, 1, 0);
|
||||||
comm.broadcast(buffer.data(), position, 0);
|
comm.broadcast(buffer.data(), position, 0);
|
||||||
|
std::vector<char> buf2 = summaryState.serialize();
|
||||||
|
int size = buf2.size();
|
||||||
|
comm.broadcast(&size, 1, 0);
|
||||||
|
comm.broadcast(buf2.data(), size, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -848,6 +852,10 @@ RestartValue loadParallelRestart(const EclipseIO* eclIO, Action::State& actionSt
|
|||||||
comm.broadcast(buffer.data(), bufferSize, 0);
|
comm.broadcast(buffer.data(), bufferSize, 0);
|
||||||
int position{};
|
int position{};
|
||||||
Mpi::unpack(restartValues, buffer, position, comm);
|
Mpi::unpack(restartValues, buffer, position, comm);
|
||||||
|
comm.broadcast(&bufferSize, 1, 0);
|
||||||
|
buffer.resize(bufferSize);
|
||||||
|
comm.broadcast(buffer.data(), bufferSize, 0);
|
||||||
|
summaryState.deserialize(buffer);
|
||||||
}
|
}
|
||||||
return restartValues;
|
return restartValues;
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user