mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-15 23:01:54 -06:00
Merge pull request #2265 from akva2/fix_serial_build
fix build without mpi
This commit is contained in:
commit
646e7d4eb1
@ -611,6 +611,7 @@ public:
|
||||
SolventModule::initFromDeck(vanguard.deck(), vanguard.eclState());
|
||||
PolymerModule::initFromDeck(vanguard.deck(), vanguard.eclState());
|
||||
FoamModule::initFromDeck(vanguard.deck(), vanguard.eclState());
|
||||
#if HAVE_MPI
|
||||
if (comm.size() > 1) {
|
||||
EclMpiSerializer ser(comm);
|
||||
size_t size = SolventModule::packSize(ser) +
|
||||
@ -624,7 +625,9 @@ public:
|
||||
comm.broadcast(&position, 1, 0);
|
||||
comm.broadcast(buffer.data(), position, 0);
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
#if HAVE_MPI
|
||||
int size;
|
||||
comm.broadcast(&size, 1, 0);
|
||||
std::vector<char> buffer(size);
|
||||
@ -634,6 +637,7 @@ public:
|
||||
SolventModule::unpack(buffer, position, ser);
|
||||
PolymerModule::unpack(buffer, position, ser);
|
||||
FoamModule::unpack(buffer, position, ser);
|
||||
#endif
|
||||
}
|
||||
|
||||
// create the ECL writer
|
||||
|
Loading…
Reference in New Issue
Block a user