Skip to content

Commit

Permalink
Merge pull request #370 from sony/feature/20190214-fix-hdf5-segfault
Browse files Browse the repository at this point in the history
[Fix] Fix Error for HDF5 version > 1.10
  • Loading branch information
TE-NaokiIde committed Mar 14, 2019
2 parents 8a603de + 9e79f9c commit 1038432
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nbla_utils/nnp_impl_dataset.cpp
Expand Up @@ -187,7 +187,7 @@ bool load_cache(const string &filename, vector<string> &data_names,
hid_t id = H5LTopen_file_image((char *)&h5data.front(), h5data.size(),
H5LT_FILE_IMAGE_DONT_RELEASE);
if (0 <= id) {
int root = H5Gopen(id, "/", H5P_DEFAULT);
hid_t root = H5Gopen(id, "/", H5P_DEFAULT);
if (0 <= root)
parse_hdf5_group(root, data_names, ndarrays);
}
Expand Down Expand Up @@ -219,7 +219,7 @@ bool create_cachefile_list(const string &path, vector<string> &filenames) {
while ((entry = readdir(dir)) != NULL) {
if (has_suffix(entry->d_name, ".h5")) {
string d_name(entry->d_name);
filenames.push_back(path + d_name);
filenames.push_back(path + '/' + d_name);
}
}
closedir(dir);
Expand Down

0 comments on commit 1038432

Please sign in to comment.