Merge pull request #2265 from akva2/fix_serial_build

fix build without mpi
This commit is contained in:
Bård Skaflestad 2020-01-06 17:02:08 +01:00 committed by GitHub
commit 646e7d4eb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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