Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed the use of H5VLpeek_connector_id_by_name #73

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions src/H5VL_log_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void *H5VL_log_file_create (
htri_t ret;
ret = H5VLis_connector_registered_by_name ("native");
if (ret != 1) { ERR_OUT ("Native VOL not found") }
uvlid = H5VLpeek_connector_id_by_name ("native");
uvlid = H5VLget_connector_id_by_name("native");
CHECK_ID (uvlid)
under_vol_info = NULL;
}
Expand Down Expand Up @@ -173,6 +173,10 @@ void *H5VL_log_file_create (
H5VL_LOGI_PROFILING_TIMER_STOP (fp, TIMER_H5VLFILE_CREATE);
H5VL_LOGI_PROFILING_TIMER_STOP (fp, TIMER_H5VL_LOG_FILE_CREATE_FILE);
H5VL_LOGI_PROFILING_TIMER_STOP (fp, TIMER_H5VL_LOG_FILE_CREATE);
if (under_vol_info == NULL) {
brtnfld marked this conversation as resolved.
Show resolved Hide resolved
err = H5VLclose(uvlid);
CHECK_ERR
}
}
H5VL_LOGI_EXP_CATCH

Expand Down Expand Up @@ -236,7 +240,7 @@ void *H5VL_log_file_open (
htri_t ret;
ret = H5VLis_connector_registered_by_name ("native");
if (ret != 1) { ERR_OUT ("Native VOL not found") }
uvlid = H5VLpeek_connector_id_by_name ("native");
uvlid = H5VLget_connector_id_by_name("native");
CHECK_ID (uvlid)
under_vol_info = NULL;
// return NULL;
Expand Down Expand Up @@ -304,6 +308,12 @@ void *H5VL_log_file_open (
H5VL_log_filei_register (fp);

H5VL_LOGI_PROFILING_TIMER_STOP (fp, TIMER_H5VL_LOG_FILE_OPEN);

if (under_vol_info == NULL) {
err = H5VLclose(uvlid);
CHECK_ERR
}

}
H5VL_LOGI_EXP_CATCH

Expand Down Expand Up @@ -430,7 +440,7 @@ herr_t H5VL_log_file_specific (void *file,
htri_t ret;
ret = H5VLis_connector_registered_by_name ("native");
if (ret != 1) { ERR_OUT ("Native VOL not found") }
uvlid = H5VLpeek_connector_id_by_name ("native");
uvlid = H5VLget_connector_id_by_name("native");
CHECK_ID (uvlid)
under_vol_info = NULL;
}
Expand All @@ -440,6 +450,10 @@ herr_t H5VL_log_file_specific (void *file,
err = H5VLfile_specific (NULL, uvlid, args, dxpl_id, req);
CHECK_ERR
H5Pclose (under_fapl_id);
if (under_vol_info == NULL) {
err = H5VLclose(uvlid);
CHECK_ERR
}
} break;
case H5VL_FILE_FLUSH: {
H5VL_LOGI_PROFILING_TIMER_START;
Expand Down
20 changes: 16 additions & 4 deletions utils/h5ldump/h5ldump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const char *hdf5sig = "\211HDF\r\n\032\n";
const char ncsig[] = {'C', 'D', 'F'};

inline std::string get_file_signature (std::string &path) {
herr_t err = 0;
hid_t fid = -1; // File ID
hid_t faplid = -1; // File access property ID
hid_t nativevlid = -1; // Native VOL ID
Expand All @@ -50,9 +51,14 @@ inline std::string get_file_signature (std::string &path) {
fin.close ();
if (!memcmp (hdf5sig, sig, 8)) {
// Always use native VOL
nativevlid = H5VLpeek_connector_id_by_name ("native");
nativevlid = H5VLget_connector_id_by_name("native");
CHECK_ID (nativevlid)
faplid = H5Pcreate (H5P_FILE_ACCESS);
H5Pset_vol (faplid, nativevlid, NULL);
CHECK_ID (faplid)
err = H5Pset_vol (faplid, nativevlid, NULL);
CHECK_ERR
err = H5VLclose(nativevlid);
CHECK_ERR

// Open the input file
fid = H5Fopen (path.c_str (), H5F_ACC_RDONLY, faplid);
Expand Down Expand Up @@ -215,9 +221,15 @@ void h5ldump_file (std::string path,
});

// Always use native VOL
nativevlid = H5VLpeek_connector_id_by_name ("native");
nativevlid = H5VLget_connector_id_by_name("native");
CHECK_ID (nativevlid)
faplid = H5Pcreate (H5P_FILE_ACCESS);
H5Pset_vol (faplid, nativevlid, NULL);
CHECK_ID (faplid)
err = H5Pset_vol (faplid, nativevlid, NULL);
CHECK_ERR
err = H5VLclose(nativevlid);
CHECK_ERR


// Open the input file
fid = H5Fopen (path.c_str (), H5F_ACC_RDONLY, faplid);
Expand Down
9 changes: 7 additions & 2 deletions utils/h5ldump/h5ldump_visit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,14 @@ void h5ldump_visit (std::string path, std::vector<H5VL_log_dset_info_t> &dsets)
});

// Always use native VOL
nativevlid = H5VLpeek_connector_id_by_name ("native");
nativevlid = H5VLget_connector_id_by_name("native");
CHECK_ID (nativevlid)
faplid = H5Pcreate (H5P_FILE_ACCESS);
H5Pset_vol (faplid, nativevlid, NULL);
CHECK_ID (faplid)
err = H5Pset_vol (faplid, nativevlid, NULL);
CHECK_ERR
err = H5VLclose(nativevlid);
CHECK_ERR

// Open the input file
fid = H5Fopen (path.c_str (), H5F_ACC_RDONLY, faplid);
Expand Down
7 changes: 5 additions & 2 deletions utils/h5lreplay/h5lreplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,16 +176,19 @@ void h5lreplay_core (std::string &inpath, std::string &outpath, int rank, int np
});

// Open the input and output file
nativevlid = H5VLpeek_connector_id_by_name ("native");
nativevlid = H5VLget_connector_id_by_name("native");
CHECK_ID (nativevlid)
faplid = H5Pcreate (H5P_FILE_ACCESS);
CHECK_ID (faplid)
err = H5Pset_fapl_mpio (faplid, MPI_COMM_WORLD, MPI_INFO_NULL);
CHECK_ERR
err = H5Pset_vol (faplid, nativevlid, NULL);
CHECK_ERR
err = H5VLclose(nativevlid);
CHECK_ERR

finid = H5Fopen (inpath.c_str (), H5F_ACC_RDONLY, faplid);
CHECK_ID (faplid)
CHECK_ID (finid)
foutid = H5Fcreate (outpath.c_str (), H5F_ACC_TRUNC, H5P_DEFAULT, faplid);
CHECK_ID (foutid)
mpierr = MPI_File_open (MPI_COMM_WORLD, inpath.c_str (), MPI_MODE_RDONLY, MPI_INFO_NULL, &fin);
Expand Down
Loading