h5gt 0.2.0
C++ wrapper for HDF5 library (based on HighFive project)
Loading...
Searching...
No Matches
H5FileDriver_misc.hpp
1/*
2 * Copyright (c), 2017-2018, Adrien Devresse <adrien.devresse@epfl.ch>
3 * Juan Hernando <juan.hernando@epfl.ch>
4 *
5 * Distributed under the Boost Software License, Version 1.0.
6 * (See accompanying file LICENSE_1_0.txt or copy at
7 * http://www.boost.org/LICENSE_1_0.txt)
8 *
9 */
10#ifndef H5FILEDRIVER_MISC_HPP
11#define H5FILEDRIVER_MISC_HPP
12
13#include <H5Ppublic.h>
14
15namespace h5gt {
16
17#ifdef H5GT_PARALLEL
18
19inline MPIOFileDriver::MPIOFileDriver(MPI_Comm comm, MPI_Info info) {
20 if (H5Pset_fapl_mpio(_hid, comm, info) < 0) {
21 HDF5ErrMapper::ToException<FileException>(
22 "Unable to set-up MPIO Driver configuration");
23 }
24}
25
26inline void MPIOFileDriver::getFaplMPIO(MPI_Comm *comm, MPI_Info *info) {
27 if (H5Pget_fapl_mpio(_hid, comm, info) < 0) {
28 HDF5ErrMapper::ToException<FileException>(
29 "Unable to get MPIO comm and info");
30 }
31}
32
33#endif
34
35} // namespace h5gt
36
37#endif // H5FILEDRIVER_MISC_HPP