Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate FileDriver(s) #622

Merged
merged 10 commits into from
Oct 28, 2022
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions include/highfive/H5FileDriver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,22 @@
#define H5FILEDRIVER_HPP

#include "H5PropertyList.hpp"
#include "bits/H5_definitions.hpp"

namespace HighFive {

///
/// \brief file driver base concept
///
class FileDriver: public FileAccessProps {};
class H5_DEPRECATED("Use FileAccessProps directly") FileDriver: public FileAccessProps {};

#ifdef H5_HAVE_PARALLEL
///
/// \brief MPIIO Driver for Parallel HDF5
///
class MPIOFileDriver: public FileAccessProps {

class H5_DEPRECATED("Add MPIOFileAccess directly to FileAccessProps") MPIOFileDriver
: public FileAccessProps {
public:
inline MPIOFileDriver(MPI_Comm mpi_comm, MPI_Info mpi_info);

Expand Down
7 changes: 4 additions & 3 deletions src/examples/parallel_hdf5_write_dataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <highfive/H5DataSet.hpp>
#include <highfive/H5DataSpace.hpp>
#include <highfive/H5File.hpp>
#include <highfive/H5PropertyList.hpp>

const std::string FILE_NAME("parallel_dataset_example.h5");
const std::string DATASET_NAME("dset");
Expand All @@ -36,9 +37,9 @@ int main(int argc, char** argv) {
using namespace HighFive;
try {
// open a new file with the MPI IO driver for parallel Read/Write
File file(FILE_NAME,
File::ReadWrite | File::Create | File::Truncate,
MPIOFileDriver(MPI_COMM_WORLD, MPI_INFO_NULL));
FileAccessProps faprops;
faprops.add(MPIOFileAccess{MPI_COMM_WORLD, MPI_INFO_NULL});
File file(FILE_NAME, File::ReadWrite | File::Create | File::Truncate, faprops);

// we define the size of our dataset to
// lines : total number of mpi_rank
Expand Down