Skip to content

Commit

Permalink
Adapt constructors for installation without ADIOS2/HDF5
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Jul 10, 2024
1 parent 6dc4560 commit 3d5b70a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 22 deletions.
10 changes: 4 additions & 6 deletions src/IO/ADIOS/ADIOS2IOHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2106,27 +2106,25 @@ ADIOS2IOHandler::ADIOS2IOHandler(
std::string path,
Access at,
MPI_Comm comm,
// NOLINTNEXTLINE(performance-unnecessary-value-param)
json::TracingJSON,
json::TracingJSON config,
// NOLINTNEXTLINE(performance-unnecessary-value-param)
std::string,
// NOLINTNEXTLINE(performance-unnecessary-value-param)
std::string)
: AbstractIOHandler(std::move(path), at, comm)
: AbstractIOHandler(std::move(path), at, std::move(config), comm)
{}

#endif // openPMD_HAVE_MPI

ADIOS2IOHandler::ADIOS2IOHandler(
std::string path,
Access at,
// NOLINTNEXTLINE(performance-unnecessary-value-param)
json::TracingJSON,
json::TracingJSON config,
// NOLINTNEXTLINE(performance-unnecessary-value-param)
std::string,
// NOLINTNEXTLINE(performance-unnecessary-value-param)
std::string)
: AbstractIOHandler(std::move(path), at)
: AbstractIOHandler(std::move(path), at, std::move(config))
{}

std::future<void> ADIOS2IOHandler::flush(internal::ParsedFlushParams &)
Expand Down
7 changes: 2 additions & 5 deletions src/IO/HDF5/HDF5IOHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2953,11 +2953,8 @@ std::future<void> HDF5IOHandler::flush(internal::ParsedFlushParams &)
#else

HDF5IOHandler::HDF5IOHandler(
std::string path,
Access at,
// NOLINTNEXTLINE(performance-unnecessary-value-param)
[[maybe_unused]] json::TracingJSON config)
: AbstractIOHandler(std::move(path), at)
std::string path, Access at, json::TracingJSON config)
: AbstractIOHandler(std::move(path), at, std::move(config))
{
throw std::runtime_error("openPMD-api built without HDF5 support");
}
Expand Down
15 changes: 4 additions & 11 deletions src/IO/HDF5/ParallelHDF5IOHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,22 +359,15 @@ ParallelHDF5IOHandlerImpl::~ParallelHDF5IOHandlerImpl()

#if openPMD_HAVE_MPI
ParallelHDF5IOHandler::ParallelHDF5IOHandler(
std::string path,
Access at,
MPI_Comm comm,
// NOLINTNEXTLINE(performance-unnecessary-value-param)
[[maybe_unused]] json::TracingJSON config)
: AbstractIOHandler(std::move(path), at, comm)
std::string path, Access at, MPI_Comm comm, json::TracingJSON config)
: AbstractIOHandler(std::move(path), at, std::move(config), comm)
{
throw std::runtime_error("openPMD-api built without HDF5 support");
}
#else
ParallelHDF5IOHandler::ParallelHDF5IOHandler(
std::string const &path,
Access at,
// NOLINTNEXTLINE(performance-unnecessary-value-param)
[[maybe_unused]] json::TracingJSON config)
: AbstractIOHandler(path, at)
std::string const &path, Access at, json::TracingJSON config)
: AbstractIOHandler(path, at, std::move(config))
{
throw std::runtime_error(
"openPMD-api built without parallel support and without HDF5 support");
Expand Down

0 comments on commit 3d5b70a

Please sign in to comment.