Skip to content

Commit

Permalink
Merge pull request #3557 from dmitry-ganyushin/group-API-cleanup
Browse files Browse the repository at this point in the history
Refactoring and clean-up group API
  • Loading branch information
eisenhauer authored and vicentebolea committed Mar 24, 2023
2 parents 853aa1d + 126f936 commit 5cb4bf0
Show file tree
Hide file tree
Showing 10 changed files with 359 additions and 84 deletions.
19 changes: 2 additions & 17 deletions bindings/CXX11/adios2/cxx11/Group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,6 @@ Group Group::InquireGroup(std::string group_name)
auto m = m_Group->InquireGroup(group_name);
return Group(m);
}
void Group::PrintTree()
{
m_Group->PrintTree();
return;
}

void Group::BuildTree()
{
m_Group->BuildTree();
return;
}
std::vector<std::string> Group::AvailableVariables()
{
return m_Group->AvailableVariables();
Expand All @@ -45,11 +34,6 @@ std::vector<std::string> Group::AvailableGroups()
return m_Group->AvailableGroups();
}

std::map<std::string, std::set<std::string>> &Group::getTreeMap()
{
return m_Group->getTreeMap();
}

std::string Group::InquirePath() { return m_Group->InquirePath(); }

void Group::setPath(std::string path) { m_Group->setPath(path); }
Expand All @@ -64,7 +48,8 @@ DataType Group::AttributeType(const std::string &name) const
helper::CheckForNullptr(m_Group, "in call to IO::AttributeType");
return m_Group->InquireAttributeType(name);
}
Group::~Group(){};
Group::~Group() = default;
;
// Explicit declaration of the public template methods
// Limits the types
#define declare_template_instantiation(T) \
Expand Down
17 changes: 0 additions & 17 deletions bindings/CXX11/adios2/cxx11/Group.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,11 @@ class Group
{
friend class IO;

private:
Group(core::Group *group);
core::Group *m_Group = nullptr;

public:
~Group();
/**
* @brief Builds map that represents tree structure from m_Variable and
* m_Attributes from IO class
* @param
*/
void BuildTree();
/**
* @brief Prints map that represents tree structure
* @param
*/
void PrintTree();
/**
* @brief returns available groups on the path set
* @param
Expand Down Expand Up @@ -91,11 +79,6 @@ class Group
* @return new group object
*/
Group InquireGroup(std::string group_name);
/**
* @brief returns a reference to the map representing the tree stucture
* @param delimiter symbol
*/
std::map<std::string, std::set<std::string>> &getTreeMap();
/**
* @brief Gets an existing variable of primitive type by name. A wrapper for
* the corresponding function of the IO class
Expand Down
4 changes: 2 additions & 2 deletions docs/user_guide/source/ecosystem/h5vol/vol.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Disclaimer

The Virtual Object Layer (VOL) is a feature introduced in recent release of HDF5 1.12 (https://hdf5.wiki/index.php/New_Features_in_HDF5_Release_1.12).

So please do make sure your HDF5 version supports VOL.
So please do make sure your HDF5 version supports the latest VOL.

Once the ADIOS VOL is compiled, There are two ways to apply it:

Expand Down Expand Up @@ -70,4 +70,4 @@ Internal





12 changes: 12 additions & 0 deletions docs/user_guide/source/engines/hdf5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,15 @@ We can pass options to HDF5 API from ADIOS xml configuration. Currently we sup
<parameter key="H5ChunkVar" value="VarName1 VarName2"/>
We suggest to read HDF5 documentation before appling these options.

After the subfile feature is introduced in HDF5 version 1.14, the ADIOS2 HDF5 engine will use subfiles as the default h5 format as it improves I/O in general (for example, see https://escholarship.org/uc/item/6fs7s3jb)

To use the subfile feature, client needs to support MPI_Init_thread with MPI_THREAD_MULTIPLE.

Useful parameters from the HDF lirbary to tune subfiles are:
.. code-block:: xml
H5FD_SUBFILING_IOC_PER_NODE (num of subfiles per node)
set H5FD_SUBFILING_IOC_PER_NODE to 0 if the regular h5 file is prefered, before using ADIOS2 HDF5 engine.
H5FD_SUBFILING_STRIPE_SIZE
H5FD_IOC_THREAD_POOL_SIZE
7 changes: 7 additions & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,10 @@ endif()
if(ADIOS2_HAVE_CUDA OR ADIOS2_HAVE_Kokkos_CUDA)
add_subdirectory(cuda)
endif()


if(ADIOS2_HAVE_MPI AND ADIOS2_HAVE_HDF5)
if(HDF5_VERSION VERSION_GREATER_EQUAL 1.14)
add_subdirectory(h5subfile)
endif()
endif()
10 changes: 10 additions & 0 deletions examples/h5subfile/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#------------------------------------------------------------------------------#
# Distributed under the OSI-approved Apache License, Version 2.0. See
# accompanying file Copyright.txt for details.
#------------------------------------------------------------------------------#

if(ADIOS2_HAVE_MPI)
add_executable(H5EngineSubfileTest h5_subfile.cpp)
target_link_libraries(H5EngineSubfileTest adios2::cxx11_mpi MPI::MPI_C)
endif()

Loading

0 comments on commit 5cb4bf0

Please sign in to comment.