-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
The following function is a hack. It opens and closes the input file every time it is called.
This is because the rest of the code uses HDF5 C++ API, but HDF5 C API is needed here.
This may cause excessive overhead.
Solutions:
(1) Use HDF5 C API for the rest of the code (lots of work!) or
(2) Wait for better HDF5 C++ API error handling.
bool SimuInterface::group_exist_HDF5(const string & filename, const string & name){
hid_t file_id = H5Fopen( filename.c_str(), H5F_ACC_RDONLY, H5P_DEFAULT );
//hbool_t check_object_valid = true;
bool r = H5LTpath_valid(file_id, name.c_str(), true);
H5Fclose(file_id);
return r;
}
Metadata
Metadata
Assignees
Labels
No labels