Skip to content

Commit

Permalink
Merge 5bbdc0b into 7b93ceb
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrush committed May 5, 2021
2 parents 7b93ceb + 5bbdc0b commit e557271
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -33,6 +33,9 @@ and this project aspires to adhere to [Semantic Versioning](https://semver.org/s
- Fixed missing implementation of DataType::is_index_t
- Fixed issue with compiling t_h5z_zfp_smoke.cpp against an MPI-enabled HDF5.

#### Blueprint
- `conduit::relay::io::blueprint.read_mesh` now uses read only I/O handles.


## [0.7.1] - Released 2021-02-11

Expand Down
8 changes: 6 additions & 2 deletions src/libs/relay/conduit_relay_io_blueprint.cpp
Expand Up @@ -1659,7 +1659,9 @@ void read_mesh(const std::string &root_file_path,
if(data_protocol == "sidre_hdf5")
{
relay::io::IOHandle hnd;
hnd.open(root_fname,"sidre_hdf5");
Node open_opts;
open_opts["mode"] = "r";
hnd.open(root_fname, "sidre_hdf5", open_opts);
for(int i = domain_start ; i < domain_end; i++)
{
oss.str("");
Expand All @@ -1670,13 +1672,15 @@ void read_mesh(const std::string &root_file_path,
else
{
relay::io::IOHandle hnd;
Node open_opts;
open_opts["mode"] = "r";
for(int i = domain_start ; i < domain_end; i++)
{
std::string current, next;
utils::rsplit_file_path (root_fname, current, next);
std::string domain_file = utils::join_path(next, gen.GenerateFilePath(i));

hnd.open(domain_file, data_protocol);
hnd.open(domain_file, data_protocol, open_opts);

// also need the tree path
std::string tree_path = gen.GenerateTreePath(i);
Expand Down
4 changes: 2 additions & 2 deletions src/libs/relay/conduit_relay_io_hdf5.cpp
Expand Up @@ -3230,7 +3230,7 @@ hdf5_open_file_for_read(const std::string &file_path)
h5_fa_plist);

CONDUIT_CHECK_HDF5_ERROR(h5_file_id,
"Error opening HDF5 file for reading: "
"Error opening HDF5 file for read only access: "
<< file_path);

CONDUIT_CHECK_HDF5_ERROR(H5Pclose(h5_fa_plist),
Expand All @@ -3257,7 +3257,7 @@ hdf5_open_file_for_read_write(const std::string &file_path)
h5_fa_plist);

CONDUIT_CHECK_HDF5_ERROR(h5_file_id,
"Error opening HDF5 file for reading: "
"Error opening HDF5 file for read + write access: "
<< file_path);

CONDUIT_CHECK_HDF5_ERROR(H5Pclose(h5_fa_plist),
Expand Down

0 comments on commit e557271

Please sign in to comment.