mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
fixed: add missing HAVE_MPI ifs
This commit is contained in:
parent
e9d1bbc355
commit
5f08897247
@ -199,10 +199,14 @@ void HDF5File::writeSplit(hid_t grp,
|
|||||||
std::vector<hsize_t> proc_sizes(comm_.size());
|
std::vector<hsize_t> proc_sizes(comm_.size());
|
||||||
hid_t dxpl = H5P_DEFAULT;
|
hid_t dxpl = H5P_DEFAULT;
|
||||||
if (comm_.size() > 1) {
|
if (comm_.size() > 1) {
|
||||||
|
#if HAVE_MPI
|
||||||
hsize_t lsize = buffer.size();
|
hsize_t lsize = buffer.size();
|
||||||
comm_.allgather(&lsize, 1, proc_sizes.data());
|
comm_.allgather(&lsize, 1, proc_sizes.data());
|
||||||
dxpl = H5Pcreate(H5P_DATASET_XFER);
|
dxpl = H5Pcreate(H5P_DATASET_XFER);
|
||||||
H5Pset_dxpl_mpio(dxpl, H5FD_MPIO_COLLECTIVE);
|
H5Pset_dxpl_mpio(dxpl, H5FD_MPIO_COLLECTIVE);
|
||||||
|
#else
|
||||||
|
assert(false); // should be unreachable
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
proc_sizes[0] = buffer.size();
|
proc_sizes[0] = buffer.size();
|
||||||
}
|
}
|
||||||
@ -246,8 +250,12 @@ void HDF5File::writeRootOnly(hid_t grp,
|
|||||||
hid_t dcpl = this->getCompression(size);
|
hid_t dcpl = this->getCompression(size);
|
||||||
hid_t dxpl = H5P_DEFAULT;
|
hid_t dxpl = H5P_DEFAULT;
|
||||||
if (comm_.size() > 1) {
|
if (comm_.size() > 1) {
|
||||||
|
#if HAVE_MPI
|
||||||
dxpl = H5Pcreate(H5P_DATASET_XFER);
|
dxpl = H5Pcreate(H5P_DATASET_XFER);
|
||||||
H5Pset_dxpl_mpio(dxpl, H5FD_MPIO_COLLECTIVE);
|
H5Pset_dxpl_mpio(dxpl, H5FD_MPIO_COLLECTIVE);
|
||||||
|
#else
|
||||||
|
assert(false); // should be unreachable
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
hid_t dataset_id = H5Dcreate2(grp,
|
hid_t dataset_id = H5Dcreate2(grp,
|
||||||
dset.c_str(),
|
dset.c_str(),
|
||||||
|
Loading…
Reference in New Issue
Block a user