From 32b09d9155abad8a1d1d558b380bed2b987c334e Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 14 Oct 2024 14:39:18 -0500 Subject: [PATCH 01/16] removed the use of H5VLpeek_connector_id_by_name as it was removed in newer than 1.14 HDF5 versions --- src/H5VL_log_file.cpp | 20 +++++++++++++++++--- utils/h5ldump/h5ldump.cpp | 20 ++++++++++++++++---- utils/h5ldump/h5ldump_visit.cpp | 9 +++++++-- utils/h5lreplay/h5lreplay.cpp | 7 +++++-- 4 files changed, 45 insertions(+), 11 deletions(-) diff --git a/src/H5VL_log_file.cpp b/src/H5VL_log_file.cpp index 3882bed3..16433ad1 100644 --- a/src/H5VL_log_file.cpp +++ b/src/H5VL_log_file.cpp @@ -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; } @@ -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) { + err = H5VLclose(uvlid); + CHECK_ERR + } } H5VL_LOGI_EXP_CATCH @@ -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; @@ -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 @@ -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; } @@ -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; diff --git a/utils/h5ldump/h5ldump.cpp b/utils/h5ldump/h5ldump.cpp index b61b1e97..27349211 100644 --- a/utils/h5ldump/h5ldump.cpp +++ b/utils/h5ldump/h5ldump.cpp @@ -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 @@ -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); @@ -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); diff --git a/utils/h5ldump/h5ldump_visit.cpp b/utils/h5ldump/h5ldump_visit.cpp index c5597f77..1da578bf 100644 --- a/utils/h5ldump/h5ldump_visit.cpp +++ b/utils/h5ldump/h5ldump_visit.cpp @@ -38,9 +38,14 @@ void h5ldump_visit (std::string path, std::vector &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); diff --git a/utils/h5lreplay/h5lreplay.cpp b/utils/h5lreplay/h5lreplay.cpp index f07bc7b0..d319cdad 100644 --- a/utils/h5lreplay/h5lreplay.cpp +++ b/utils/h5lreplay/h5lreplay.cpp @@ -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); From 250be3c2a46ef3a3887173ac7536325e31741faa Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 14 Oct 2024 15:19:26 -0500 Subject: [PATCH 02/16] installed uuid-dev for ubuntu --- .github/workflows/ubuntu_mpich.yml | 2 +- .github/workflows/ubuntu_openmpi.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index b9018b1a..48b68500 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -33,7 +33,7 @@ jobs: - name: Set up dependencies run: | sudo apt-get update - sudo apt-get install automake autoconf libtool libtool-bin m4 + sudo apt-get install automake autoconf libtool libtool-bin m4 uuid-dev # The MPICH installed on github actions is too slow # sudo apt-get install mpich # mpicc -v diff --git a/.github/workflows/ubuntu_openmpi.yml b/.github/workflows/ubuntu_openmpi.yml index 7f7fea9a..436e09c6 100644 --- a/.github/workflows/ubuntu_openmpi.yml +++ b/.github/workflows/ubuntu_openmpi.yml @@ -32,7 +32,7 @@ jobs: - name: Set up dependencies run: | sudo apt-get update - sudo apt-get install automake autoconf libtool libtool-bin m4 + sudo apt-get install automake autoconf libtool libtool-bin m4 uuid-dev # zlib sudo apt-get install zlib1g-dev # mpi From 569addeafbc105bf273dce401c7d343b13acc1d4 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 14 Oct 2024 15:41:13 -0500 Subject: [PATCH 03/16] switch to testing the state of info for calling H5VLclose --- src/H5VL_log_file.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/H5VL_log_file.cpp b/src/H5VL_log_file.cpp index 16433ad1..33b03ea1 100644 --- a/src/H5VL_log_file.cpp +++ b/src/H5VL_log_file.cpp @@ -173,7 +173,7 @@ 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) { + if (!info) { err = H5VLclose(uvlid); CHECK_ERR } @@ -309,7 +309,7 @@ void *H5VL_log_file_open ( H5VL_LOGI_PROFILING_TIMER_STOP (fp, TIMER_H5VL_LOG_FILE_OPEN); - if (under_vol_info == NULL) { + if (!info) { err = H5VLclose(uvlid); CHECK_ERR } @@ -450,7 +450,7 @@ 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) { + if (!info) { err = H5VLclose(uvlid); CHECK_ERR } From cf2b1deccfbbe70318df072cdcc8e2751cd0fe7d Mon Sep 17 00:00:00 2001 From: "M. Scot Breitenfeld" Date: Tue, 15 Oct 2024 16:08:24 -0500 Subject: [PATCH 04/16] disable iotest --- .github/workflows/ubuntu_mpich.yml | 2 +- .github/workflows/ubuntu_openmpi.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index 48b68500..dad30eed 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -103,7 +103,7 @@ jobs: autoreconf -i ./configure --with-hdf5=${GITHUB_WORKSPACE}/HDF5 \ --enable-test-netcdf4=${GITHUB_WORKSPACE}/NetCDF \ - --enable-test-hdf5-iotest \ + --disable-test-hdf5-iotest \ --with-mpi=${GITHUB_WORKSPACE}/MPICH # Do NOT test QMCPACK, as it requires FFTW which fails to build - name: Print config.log if error diff --git a/.github/workflows/ubuntu_openmpi.yml b/.github/workflows/ubuntu_openmpi.yml index 436e09c6..9a469325 100644 --- a/.github/workflows/ubuntu_openmpi.yml +++ b/.github/workflows/ubuntu_openmpi.yml @@ -98,7 +98,7 @@ jobs: autoreconf -i ./configure --with-hdf5=${GITHUB_WORKSPACE}/HDF5 \ --enable-test-netcdf4=${GITHUB_WORKSPACE}/NetCDF \ - --enable-test-hdf5-iotest \ + --disable-test-hdf5-iotest \ TESTMPIRUN="mpiexec --oversubscribe -n NP" # Do NOT test QMCPACK, as it requires FFTW which fails to build - name: Print config.log if error From 0fe899b04d0004d250b996c36b7f333f681c41ab Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Fri, 1 Nov 2024 16:59:42 -0500 Subject: [PATCH 05/16] fixed warnings --- src/H5VL_log_att.cpp | 2 +- src/H5VL_log_dataset.cpp | 4 ++-- src/H5VL_log_file.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/H5VL_log_att.cpp b/src/H5VL_log_att.cpp index 560ed887..f3b12342 100644 --- a/src/H5VL_log_att.cpp +++ b/src/H5VL_log_att.cpp @@ -388,7 +388,7 @@ herr_t H5VL_log_attr_specific (void *obj, void **req) { H5VL_log_obj_t *op = (H5VL_log_obj_t *)obj; herr_t err = 0; - H5VL_log_req_t *rp; + H5VL_log_req_t *rp = NULL; void **ureqp, *ureq; char *iname = NULL; // Internal name of object const char *original_name = NULL; // Original value in loc_params before being remapped diff --git a/src/H5VL_log_dataset.cpp b/src/H5VL_log_dataset.cpp index bfc76d8d..efd37551 100644 --- a/src/H5VL_log_dataset.cpp +++ b/src/H5VL_log_dataset.cpp @@ -282,7 +282,7 @@ static herr_t H5VL_log_dataset_read_elements (void *dset, herr_t err = 0; H5VL_log_dset_t *dp = (H5VL_log_dset_t *)dset; H5VL_log_dset_info_t *dip = NULL; // Dataset info - hid_t dsid; // Dataset space id + hid_t dsid = H5I_INVALID_HID; // Dataset space id H5VL_log_selections *dsel = NULL; // Selection blocks try { @@ -325,7 +325,7 @@ static herr_t H5VL_log_dataset_write_elements (void *dset, H5VL_log_dset_t *dp = (H5VL_log_dset_t *)dset; H5VL_log_dset_info_t *dip = NULL; // Dataset info - hid_t dsid; // Dataset space id + hid_t dsid = H5I_INVALID_HID; // Dataset space id H5VL_log_selections *dsel = NULL; // Selection blocks try { diff --git a/src/H5VL_log_file.cpp b/src/H5VL_log_file.cpp index 33b03ea1..31116be4 100644 --- a/src/H5VL_log_file.cpp +++ b/src/H5VL_log_file.cpp @@ -406,7 +406,7 @@ herr_t H5VL_log_file_specific (void *file, H5VL_log_file_t *fp = (H5VL_log_file_t *)file; void *lib_state = NULL; H5VL_logi_err_finally finally ( - [&lib_state] () -> void { H5VL_logi_restore_lib_stat (lib_state); }); + [&lib_state] () -> void { H5VL_logi_restore_lib_stat (lib_state); }); try { #ifdef LOGVOL_DEBUG From ea07c0c05f93c94646d8492101497f658651a704 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 6 Nov 2024 22:58:40 -0600 Subject: [PATCH 06/16] added library context --- src/H5VL_log_dataset.cpp | 5 +++-- src/H5VL_log_dataseti.cpp | 19 +++++++++++-------- src/H5VL_log_file.cpp | 5 +++-- src/H5VL_log_filei.cpp | 17 ++++++++++------- src/H5VL_log_filei_meta.cpp | 2 +- src/H5VL_logi_util.hpp | 13 +++++++++++-- 6 files changed, 39 insertions(+), 22 deletions(-) diff --git a/src/H5VL_log_dataset.cpp b/src/H5VL_log_dataset.cpp index efd37551..eee0ec47 100644 --- a/src/H5VL_log_dataset.cpp +++ b/src/H5VL_log_dataset.cpp @@ -76,9 +76,10 @@ void *H5VL_log_dataset_create (void *obj, void **ureqp, *ureq; H5D_fill_value_t stat; void *lib_state = NULL; + void *lib_context = NULL; // char lname[1024]; H5VL_logi_err_finally finally ( - [&dcpl_id, &lib_state] () -> void { H5VL_logi_restore_lib_stat (lib_state); }); + [&dcpl_id, &lib_state, &lib_context] () -> void { H5VL_logi_restore_lib_stat (lib_state, lib_context); }); try { H5VL_LOGI_PROFILING_TIMER_START; @@ -160,7 +161,7 @@ void *H5VL_log_dataset_create (void *obj, H5VL_logi_get_filters (dcpl_id, dip->filters); // Reset hdf5 context to allow attr operations within a dataset operation - H5VL_logi_reset_lib_stat (lib_state); + H5VL_logi_reset_lib_stat (lib_state, lib_context); // Record dataset metadata as attributes H5VL_logi_add_att (dp, H5VL_LOG_DATASETI_ATTR_DIMS, H5T_STD_I64LE, H5T_NATIVE_INT64, diff --git a/src/H5VL_log_dataseti.cpp b/src/H5VL_log_dataseti.cpp index bf722e9a..98d136eb 100644 --- a/src/H5VL_log_dataseti.cpp +++ b/src/H5VL_log_dataseti.cpp @@ -695,14 +695,15 @@ void *H5VL_log_dataseti_open (void *obj, void *uo, hid_t dxpl_id) { std::unique_ptr dip; // Dataset info H5D_fill_value_t stat; void *lib_state = NULL; - H5VL_logi_err_finally finally ([&dcpl_id, &lib_state] () -> void { + void *lib_context = NULL; + H5VL_logi_err_finally finally ([&dcpl_id, &lib_state, &lib_context] () -> void { if (dcpl_id >= 0) { H5Pclose (dcpl_id); } - H5VL_logi_restore_lib_stat (lib_state); + H5VL_logi_restore_lib_stat (lib_state, lib_context); }); H5VL_LOGI_PROFILING_TIMER_START; // Reset hdf5 context to allow file operations within a dataset operation - H5VL_logi_reset_lib_stat (lib_state); + H5VL_logi_reset_lib_stat (lib_state, lib_context); dp = std::make_unique (op, H5I_DATASET, uo); @@ -806,9 +807,10 @@ void H5VL_log_dataseti_write (H5VL_log_dset_t *dp, int clen, inlen; // Compressed size; Size of data to be compressed #endif void *lib_state = NULL; - H5VL_logi_err_finally finally ([&ptype, &lib_state] () -> void { + void *lib_context = NULL; + H5VL_logi_err_finally finally ([&ptype, &lib_state, &lib_context] () -> void { H5VL_log_type_free (ptype); - H5VL_logi_restore_lib_stat (lib_state); + H5VL_logi_restore_lib_stat (lib_state, lib_context); }); H5VL_LOGI_PROFILING_TIMER_START; @@ -830,7 +832,7 @@ void H5VL_log_dataseti_write (H5VL_log_dset_t *dp, H5VL_LOGI_PROFILING_TIMER_STOP (dp->fp, TIMER_H5VL_LOG_DATASET_WRITE_INIT); // Reset hdf5 context to allow file operations within a dataset operation - H5VL_logi_reset_lib_stat (lib_state); + H5VL_logi_reset_lib_stat (lib_state, lib_context); if (dp->fp->config ^ H5VL_FILEI_CONFIG_METADATA_MERGE) { H5VL_LOGI_PROFILING_TIMER_START; @@ -1047,9 +1049,10 @@ void H5VL_log_dataseti_read (H5VL_log_dset_t *dp, hbool_t rtype; // Non-blocking? size_t num_pending_writes = 0; void *lib_state = NULL; + void *lib_context = NULL; H5FD_mpio_xfer_t xfer_mode; H5VL_logi_err_finally finally ( - [&lib_state] () -> void { H5VL_logi_restore_lib_stat (lib_state); }); + [&lib_state, &lib_context] () -> void { H5VL_logi_restore_lib_stat (lib_state, lib_context); }); H5VL_LOGI_PROFILING_TIMER_START; H5VL_LOGI_PROFILING_TIMER_START; @@ -1059,7 +1062,7 @@ void H5VL_log_dataseti_read (H5VL_log_dset_t *dp, H5VL_LOGI_PROFILING_TIMER_STOP (dp->fp, TIMER_H5VL_LOG_DATASET_READ_INIT); // Reset hdf5 context to allow file operations within a dataset operation - H5VL_logi_reset_lib_stat (lib_state); + H5VL_logi_reset_lib_stat (lib_state, lib_context); // Check mem space selection if (mem_space_id == H5S_ALL) diff --git a/src/H5VL_log_file.cpp b/src/H5VL_log_file.cpp index 31116be4..8bbc494a 100644 --- a/src/H5VL_log_file.cpp +++ b/src/H5VL_log_file.cpp @@ -405,8 +405,9 @@ herr_t H5VL_log_file_specific (void *file, herr_t err = 0; H5VL_log_file_t *fp = (H5VL_log_file_t *)file; void *lib_state = NULL; + void *lib_context = NULL; H5VL_logi_err_finally finally ( - [&lib_state] () -> void { H5VL_logi_restore_lib_stat (lib_state); }); + [&lib_state, &lib_context] () -> void { H5VL_logi_restore_lib_stat (lib_state, lib_context); }); try { #ifdef LOGVOL_DEBUG @@ -459,7 +460,7 @@ herr_t H5VL_log_file_specific (void *file, H5VL_LOGI_PROFILING_TIMER_START; if (fp->is_log_based_file) { // Reset hdf5 context to allow dataset operations within a file operation - H5VL_logi_reset_lib_stat (lib_state); + H5VL_logi_reset_lib_stat (lib_state, lib_context); H5VL_log_filei_flush(fp, dxpl_id); } else { diff --git a/src/H5VL_log_filei.cpp b/src/H5VL_log_filei.cpp index f8fa2941..75ea6fd5 100644 --- a/src/H5VL_log_filei.cpp +++ b/src/H5VL_log_filei.cpp @@ -114,8 +114,9 @@ void H5VL_log_filei_post_open (H5VL_log_file_t *fp) { hbool_t exists; int attbuf[H5VL_LOG_FILEI_NATTR]; void *lib_state = NULL; + void *lib_context = NULL; H5VL_logi_err_finally finally ( - [&lib_state] () -> void { H5VL_logi_restore_lib_stat (lib_state); }); + [&lib_state, &lib_context] () -> void { H5VL_logi_restore_lib_stat (lib_state, lib_context); }); H5VL_LOGI_PROFILING_TIMER_START; @@ -165,7 +166,7 @@ void H5VL_log_filei_post_open (H5VL_log_file_t *fp) { H5VL_LOGI_PROFILING_TIMER_STOP (fp, TIMER_H5VL_LOG_FILE_OPEN_SUBFILE); // Reset hdf5 context to allow group operations within a file operation - H5VL_logi_reset_lib_stat (lib_state); + H5VL_logi_reset_lib_stat (lib_state, lib_context); // Open the LOG group loc.obj_type = H5I_FILE; @@ -203,13 +204,14 @@ void H5VL_log_filei_post_create (H5VL_log_file_t *fp) { H5VL_loc_params_t loc; int attbuf[H5VL_LOG_FILEI_NATTR]; void *lib_state = NULL; + void *lib_context = NULL; H5VL_logi_err_finally finally ( - [&lib_state] () -> void { H5VL_logi_restore_lib_stat (lib_state); }); + [&lib_state, &lib_context] () -> void { H5VL_logi_restore_lib_stat (lib_state, lib_context); }); H5VL_LOGI_PROFILING_TIMER_START; // Reset hdf5 context to allow group and attr operations within a file operation - H5VL_logi_reset_lib_stat (lib_state); + H5VL_logi_reset_lib_stat (lib_state, lib_context); // Figure out lustre configuration H5VL_LOGI_PROFILING_TIMER_START; @@ -712,8 +714,9 @@ void H5VL_log_filei_close (H5VL_log_file_t *fp) { int mpierr; int attbuf[5]; void *lib_state = NULL; + void *lib_context = NULL; H5VL_logi_err_finally finally ( - [&lib_state] () -> void { H5VL_logi_restore_lib_stat (lib_state); }); + [&lib_state, &lib_context] () -> void { H5VL_logi_restore_lib_stat (lib_state, lib_context); }); #ifdef LOGVOL_DEBUG if (H5VL_logi_debug_verbose ()) { printf ("H5VL_log_filei_close(%p, ...)\n", fp); } @@ -734,7 +737,7 @@ void H5VL_log_filei_close (H5VL_log_file_t *fp) { H5VL_LOGI_PROFILING_TIMER_START; // Reset hdf5 context to allow file operations within other object close operations - H5VL_logi_reset_lib_stat (lib_state); + H5VL_logi_reset_lib_stat (lib_state, lib_context); if (fp->flag != H5F_ACC_RDONLY) { // Flush write requests @@ -773,7 +776,7 @@ void H5VL_log_filei_close (H5VL_log_file_t *fp) { CHECK_ERR H5VL_LOGI_PROFILING_TIMER_STOP (fp, TIMER_H5VLGROUP_CLOSE); - H5VL_logi_restore_lib_stat (lib_state); + H5VL_logi_restore_lib_stat (lib_state, lib_context); #ifdef LOGVOL_PROFILING { diff --git a/src/H5VL_log_filei_meta.cpp b/src/H5VL_log_filei_meta.cpp index 8e7e8431..ea5b12aa 100644 --- a/src/H5VL_log_filei_meta.cpp +++ b/src/H5VL_log_filei_meta.cpp @@ -54,7 +54,7 @@ void H5VL_log_filei_metaflush (H5VL_log_file_t *fp) { rbuf[2]; // [Local metadata offset within the metadata dataset, Global metadata size] MPI_Offset mdsize = 0; // Local metadata size MPI_Offset *mdoffs = NULL; - MPI_Offset *mdoffs_snd; + MPI_Offset *mdoffs_snd = NULL; MPI_Aint *offs = NULL; // Offset in MPI_Type_create_hindexed int *lens = NULL; // Lens in MPI_Type_create_hindexed int nentry = 0; // Number of metadata entries diff --git a/src/H5VL_logi_util.hpp b/src/H5VL_logi_util.hpp index 6d86a309..a84d11a1 100644 --- a/src/H5VL_logi_util.hpp +++ b/src/H5VL_logi_util.hpp @@ -121,20 +121,29 @@ inline char *H5VL_logi_name_remap (const char *name) { return ret; } -inline void H5VL_logi_reset_lib_stat (void *&stat) { +inline void H5VL_logi_reset_lib_stat (void *&stat, void *&context) { herr_t err = 0; err = H5VLretrieve_lib_state (&stat); CHECK_ERR +#if H5_VERSION_GE(2, 0, 0) + err = H5VLopen_lib_context (&context); +#else err = H5VLstart_lib_state (); +#endif CHECK_ERR err = H5VLrestore_lib_state (stat); CHECK_ERR } -inline void H5VL_logi_restore_lib_stat (void *&stat) { +inline void H5VL_logi_restore_lib_stat (void *&stat, void *&context) { herr_t err = 0; + if (stat) { +#if H5_VERSION_GE(2, 0, 0) + err = H5VLclose_lib_context (context); +#else err = H5VLfinish_lib_state (); +#endif CHECK_ERR err = H5VLrestore_lib_state (stat); CHECK_ERR From 689cc7c0a9c2939b3451007c679763d260881edf Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 12 Nov 2024 17:02:52 -0600 Subject: [PATCH 07/16] updated test to use newest HDF5 code --- examples/hdf5_examples/Makefile.am | 24 +++++----- examples/hdf5_examples/h5_attribute.patch | 45 +++++++++++++++++++ .../h5_attribute.patch.hdf5-1_13_0 | 4 -- ...atch.hdf5-1_13_0 => h5_interm_group.patch} | 0 ...ple.patch.hdf5-1_13_0 => ph5example.patch} | 33 +++++++++----- tests/external/hdf5_iotest/config.sh.in | 9 +--- tests/read_regular/Makefile.am | 16 +++---- ...ribute.patch.1_13_0 => h5_attribute.patch} | 0 ...h5_cmprss.patch.1_13_0 => h5_cmprss.patch} | 39 ++++++++-------- ...ite.patch.1_13_0 => h5_extend_write.patch} | 0 .../{h5_group.patch.1_13_0 => h5_group.patch} | 0 ...h5_subset.patch.1_13_0 => h5_subset.patch} | 10 ++--- 12 files changed, 112 insertions(+), 68 deletions(-) create mode 100644 examples/hdf5_examples/h5_attribute.patch delete mode 100644 examples/hdf5_examples/h5_attribute.patch.hdf5-1_13_0 rename examples/hdf5_examples/{h5_interm_group.patch.hdf5-1_13_0 => h5_interm_group.patch} (100%) rename examples/hdf5_examples/{ph5example.patch.hdf5-1_13_0 => ph5example.patch} (60%) rename tests/read_regular/{h5_attribute.patch.1_13_0 => h5_attribute.patch} (100%) rename tests/read_regular/{h5_cmprss.patch.1_13_0 => h5_cmprss.patch} (83%) rename tests/read_regular/{h5_extend_write.patch.1_13_0 => h5_extend_write.patch} (100%) rename tests/read_regular/{h5_group.patch.1_13_0 => h5_group.patch} (100%) rename tests/read_regular/{h5_subset.patch.1_13_0 => h5_subset.patch} (90%) diff --git a/examples/hdf5_examples/Makefile.am b/examples/hdf5_examples/Makefile.am index e0bc12e9..ea4ea7fa 100644 --- a/examples/hdf5_examples/Makefile.am +++ b/examples/hdf5_examples/Makefile.am @@ -66,31 +66,31 @@ nodist_h5_subset_SOURCES = h5_subset.c nodist_ph5example_SOURCES = ph5example.c endif -HDF5_VERSION = hdf5-1_13_0 +HDF5_VERSION = develop HDF5_URL = https://raw.githubusercontent.com/HDFGroup/hdf5/${HDF5_VERSION} .SECONDEXPANSION: -$(SEQ_SRCS): %.c : $$(wildcard %.patch.$(HDF5_VERSION)) - @DOWNLOAD_CMD@ $(HDF5_URL)/examples/$@ - if [ -f ${srcdir}/$(basename $@).patch.$(HDF5_VERSION) ]; then patch -st $@ < ${srcdir}/$(basename $@).patch.$(HDF5_VERSION); fi +$(SEQ_SRCS): %.c : $$(wildcard %.patch) + @DOWNLOAD_CMD@ $(HDF5_URL)/HDF5Examples/C/TUTR/$@ + if [ -f ${srcdir}/$(basename $@).patch ]; then patch -st $@ < ${srcdir}/$(basename $@).patch; fi $(SED_I) -e "s|main(.*|main(int argc, char **argv)|g" $@ - $(SED_I) -e "s|H5Fcreate(FILE|H5Fcreate(argv[1]|g" $@ + $(SED_I) -e "s|H5Fcreate(FILENAME|H5Fcreate(argv[1]|g" $@ $(SED_I) -e "s|H5Fcreate(H5FILE_NAME|H5Fcreate(argv[1]|g" $@ - $(SED_I) -e "s|H5Fopen(FILE|H5Fopen(argv[1]|g" $@ + $(SED_I) -e "s|H5Fopen(FILENAME|H5Fopen(argv[1]|g" $@ $(SED_I) -e "s|H5Fopen(H5FILE_NAME|H5Fopen(argv[1]|g" $@ -$(PAR_SRCS): %.c : $$(wildcard %.patch.$(HDF5_VERSION)) - @DOWNLOAD_CMD@ $(HDF5_URL)/examples/$@ - if [ -f ${srcdir}/$(basename $@).patch.$(HDF5_VERSION) ]; then patch -st $@ < ${srcdir}/$(basename $@).patch.$(HDF5_VERSION); fi +$(PAR_SRCS): %.c : $$(wildcard %.patch) + @DOWNLOAD_CMD@ $(HDF5_URL)/HDF5Examples/C/H5PAR/$@ + if [ -f ${srcdir}/$(basename $@).patch ]; then patch -st $@ < ${srcdir}/$(basename $@).patch; fi check_PROGRAMS = $(TESTPROGRAMS) EXTRA_DIST = seq_runs.sh \ parallel_run.sh \ - ph5example.patch.$(HDF5_VERSION) \ - h5_attribute.patch.$(HDF5_VERSION) \ - h5_interm_group.patch.$(HDF5_VERSION) + ph5example.patch \ + h5_attribute.patch \ + h5_interm_group.patch # autimake 1.11.3 has not yet implemented AM_TESTS_ENVIRONMENT # For newer versions, we can use AM_TESTS_ENVIRONMENT instead diff --git a/examples/hdf5_examples/h5_attribute.patch b/examples/hdf5_examples/h5_attribute.patch new file mode 100644 index 00000000..013df8a8 --- /dev/null +++ b/examples/hdf5_examples/h5_attribute.patch @@ -0,0 +1,45 @@ +--- h5_attribute.c 2024-11-12 16:49:52.466955555 -0600 ++++ h5_attribute_logvol.c 2024-11-12 16:47:13.644521620 -0600 +@@ -41,7 +41,7 @@ + /* Operator function */ + + int +-main(void) ++main(int argc, char **argv) + { + + hid_t file, dataset; /* File and dataset identifiers */ +@@ -79,7 +79,7 @@ + /* + * Create a file. + */ +- file = H5Fcreate(H5FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); ++ file = H5Fcreate(argv[1], H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + /* + * Create the dataspace for the dataset in the file. +@@ -167,7 +167,7 @@ + /* + * Reopen the file. + */ +- file = H5Fopen(H5FILE_NAME, H5F_ACC_RDONLY, H5P_DEFAULT); ++ file = H5Fopen(argv[1], H5F_ACC_RDONLY, H5P_DEFAULT); + + /* + * Open the dataset. +@@ -185,6 +185,7 @@ + + //! [H5Oget_info3_snip] + ++#if 0 + /* + * Find string attribute by iterating through all attributes + */ +@@ -203,6 +204,7 @@ + ret = H5Aclose(attr); + ret = H5Tclose(atype); + } ++#endif + + //! [H5Oget_info3_snip] + /* diff --git a/examples/hdf5_examples/h5_attribute.patch.hdf5-1_13_0 b/examples/hdf5_examples/h5_attribute.patch.hdf5-1_13_0 deleted file mode 100644 index d4019531..00000000 --- a/examples/hdf5_examples/h5_attribute.patch.hdf5-1_13_0 +++ /dev/null @@ -1,4 +0,0 @@ -188a189 -> #if 0 -206a208 -> #endif diff --git a/examples/hdf5_examples/h5_interm_group.patch.hdf5-1_13_0 b/examples/hdf5_examples/h5_interm_group.patch similarity index 100% rename from examples/hdf5_examples/h5_interm_group.patch.hdf5-1_13_0 rename to examples/hdf5_examples/h5_interm_group.patch diff --git a/examples/hdf5_examples/ph5example.patch.hdf5-1_13_0 b/examples/hdf5_examples/ph5example.patch similarity index 60% rename from examples/hdf5_examples/ph5example.patch.hdf5-1_13_0 rename to examples/hdf5_examples/ph5example.patch index 57b41ee4..9736d299 100644 --- a/examples/hdf5_examples/ph5example.patch.hdf5-1_13_0 +++ b/examples/hdf5_examples/ph5example.patch @@ -1,14 +1,22 @@ ---- ph5example.c 2022-12-24 17:10:24.423988722 -0600 -+++ ph5example_logvol.c 2022-12-24 17:14:47.240314745 -0600 -@@ -51,6 +51,7 @@ - printf("%s\n", x); +--- ph5example.c 2024-11-12 14:13:11.462119142 -0600 ++++ ph5example_logvol.c 2024-11-12 14:15:08.212012234 -0600 +@@ -52,12 +52,14 @@ + } while (0) #define MPI_BANNER(mesg) \ -+ if (0) \ - { \ ++ if (0) { \ + do { \ printf("--------------------------------\n"); \ printf("Proc %d: ", mpi_rank); \ -@@ -96,7 +97,7 @@ + printf("*** %s\n", mesg); \ + printf("--------------------------------\n"); \ +- } while (0) ++ } while (0); \ ++ } + + #define SYNC(comm) \ + do { \ +@@ -97,7 +99,7 @@ int verbose = 0; /* verbose, default as no. */ int doread = 1; /* read test */ int dowrite = 1; /* write test */ @@ -17,17 +25,18 @@ /* Prototypes */ void slab_set(hsize_t start[], hsize_t count[], hsize_t stride[], int mode); -@@ -888,6 +889,9 @@ +@@ -907,6 +909,10 @@ mrc = MPI_File_delete(filenames[color], info); assert(mrc == MPI_SUCCESS); } -+ ++ + // Prevent odd-rank to start the next test + MPI_Barrier(MPI_COMM_WORLD); ++ + MPI_Comm_free(&comm); } - /* -@@ -972,7 +976,7 @@ +@@ -992,7 +998,7 @@ } break; case 'c': @@ -36,7 +45,7 @@ break; case 'r': doread = 0; -@@ -1026,7 +1030,8 @@ +@@ -1046,7 +1052,8 @@ char mpi_name[MPI_MAX_PROCESSOR_NAME]; int i, n; diff --git a/tests/external/hdf5_iotest/config.sh.in b/tests/external/hdf5_iotest/config.sh.in index 4a7876ec..de97243d 100644 --- a/tests/external/hdf5_iotest/config.sh.in +++ b/tests/external/hdf5_iotest/config.sh.in @@ -11,11 +11,6 @@ rm -rf build mkdir build cd build ../hdf5-iotest/configure --silent \ - CC=@MPICC@ CXX=@MPICXX@ \ - CFLAGS="@CFLAGS@" \ - CPPFLAGS="-I${HDF5_ROOT}/include" \ - LDFLAGS="-L${HDF5_ROOT}/lib" \ - LIBS="-lhdf5" - - + CC=${HDF5_ROOT}/bin/h5pcc \ + CFLAGS="@CFLAGS@" diff --git a/tests/read_regular/Makefile.am b/tests/read_regular/Makefile.am index 6c5ef536..a75b9e57 100644 --- a/tests/read_regular/Makefile.am +++ b/tests/read_regular/Makefile.am @@ -30,14 +30,14 @@ SEQ_SRCS = h5_attribute.c \ TESTPROGRAMS = $(SEQ_SRCS:.c=) -HDF5_VERSION = 1_13_0 -HDF5_URL = https://raw.githubusercontent.com/HDFGroup/hdf5/hdf5-${HDF5_VERSION}/examples +HDF5_VERSION = develop +HDF5_URL = https://raw.githubusercontent.com/HDFGroup/hdf5/${HDF5_VERSION}/HDF5Examples/C/TUTR .SECONDEXPANSION: $(SEQ_SRCS): %.c : $$(wildcard %.patch) @DOWNLOAD_CMD@ $(HDF5_URL)/$@ - if [ -f ${srcdir}/$(basename $@).patch.$(HDF5_VERSION) ]; then patch -st $@ < ${srcdir}/$(basename $@).patch.$(HDF5_VERSION); fi + if [ -f ${srcdir}/$(basename $@).patch ]; then patch -st $@ < ${srcdir}/$(basename $@).patch; fi BUILT_SOURCES = $(SEQ_SRCS) $(PAR_SRCS) @@ -46,11 +46,11 @@ check_PROGRAMS = $(TESTPROGRAMS) EXTRA_DIST = README.md \ wrap_runs.sh \ parallel_run.sh \ - h5_attribute.patch.1_13_0 \ - h5_cmprss.patch.1_13_0 \ - h5_extend_write.patch.1_13_0 \ - h5_group.patch.1_13_0 \ - h5_subset.patch.1_13_0 + h5_attribute.patch \ + h5_cmprss.patch \ + h5_extend_write.patch \ + h5_group.patch \ + h5_subset.patch # autimake 1.11.3 has not yet implemented AM_TESTS_ENVIRONMENT # For newer versions, we can use AM_TESTS_ENVIRONMENT instead diff --git a/tests/read_regular/h5_attribute.patch.1_13_0 b/tests/read_regular/h5_attribute.patch similarity index 100% rename from tests/read_regular/h5_attribute.patch.1_13_0 rename to tests/read_regular/h5_attribute.patch diff --git a/tests/read_regular/h5_cmprss.patch.1_13_0 b/tests/read_regular/h5_cmprss.patch similarity index 83% rename from tests/read_regular/h5_cmprss.patch.1_13_0 rename to tests/read_regular/h5_cmprss.patch index 0d6057d1..f463ba0f 100644 --- a/tests/read_regular/h5_cmprss.patch.1_13_0 +++ b/tests/read_regular/h5_cmprss.patch @@ -1,21 +1,17 @@ ---- h5_cmprss.c 2022-11-09 16:07:15.956324190 -0600 -+++ h5_cmprss.c 2022-11-09 17:28:01.080362350 -0600 -@@ -16,16 +16,45 @@ +--- h5_cmprss.c 2024-11-12 15:56:00.975561080 -0600 ++++ h5_cmprss_logvol.c 2024-11-12 15:55:32.203342153 -0600 +@@ -16,16 +16,44 @@ */ #include "hdf5.h" +#include "H5VL_log.h" - #define FILE "cmprss.h5" - #define RANK 2 - #define DIM0 100 - #define DIM1 20 - --int --main() --{ + #define FILENAME "cmprss.h5" + #define RANK 2 + #define DIM0 100 + #define DIM1 20 +int helper(const char *file_name, bool use_log_vol); - ++ +int main(int argc, char **argv) { + herr_t err = 0; + const char *file_name_base; @@ -36,7 +32,10 @@ + file_name_base = "regular.h5"; + file_name_use_log = "log.h5"; + } -+ + +-int +-main(void) +-{ + err = helper(file_name_base, false); + if (err == 0) { + err = helper(file_name_use_log, true); @@ -44,12 +43,12 @@ + MPI_Finalize(); + return err; +} -+ + +int helper(const char *file_name, bool use_log_vol) { hid_t file_id, dataset_id, dataspace_id; /* identifiers */ hid_t plist_id; -@@ -40,6 +69,7 @@ +@@ -40,6 +68,7 @@ int i, j, numfilt; int buf[DIM0][DIM1]; int rbuf[DIM0][DIM1]; @@ -57,11 +56,11 @@ /* Uncomment these variables to use SZIP compression unsigned szip_options_mask; -@@ -47,7 +77,18 @@ +@@ -47,7 +76,18 @@ */ /* Create a file. */ -- file_id = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); +- file_id = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + file_id = H5Fcreate(file_name, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + H5Fclose(file_id); + @@ -77,16 +76,16 @@ /* Create dataset "Compressed Data" in the group using absolute name. */ dims[0] = DIM0; -@@ -87,7 +128,7 @@ +@@ -87,7 +127,7 @@ status = H5Fclose(file_id); /* Now reopen the file and dataset in the file. */ -- file_id = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT); +- file_id = H5Fopen(FILENAME, H5F_ACC_RDWR, H5P_DEFAULT); + file_id = H5Fopen(file_name, H5F_ACC_RDWR, fapl_id); dataset_id = H5Dopen2(file_id, "Compressed_Data", H5P_DEFAULT); /* Retrieve filter information. */ -@@ -117,4 +158,10 @@ +@@ -117,4 +157,10 @@ status = H5Dclose(dataset_id); status = H5Pclose(plist_id); status = H5Fclose(file_id); diff --git a/tests/read_regular/h5_extend_write.patch.1_13_0 b/tests/read_regular/h5_extend_write.patch similarity index 100% rename from tests/read_regular/h5_extend_write.patch.1_13_0 rename to tests/read_regular/h5_extend_write.patch diff --git a/tests/read_regular/h5_group.patch.1_13_0 b/tests/read_regular/h5_group.patch similarity index 100% rename from tests/read_regular/h5_group.patch.1_13_0 rename to tests/read_regular/h5_group.patch diff --git a/tests/read_regular/h5_subset.patch.1_13_0 b/tests/read_regular/h5_subset.patch similarity index 90% rename from tests/read_regular/h5_subset.patch.1_13_0 rename to tests/read_regular/h5_subset.patch index 8a4054ae..6e784835 100644 --- a/tests/read_regular/h5_subset.patch.1_13_0 +++ b/tests/read_regular/h5_subset.patch @@ -1,12 +1,12 @@ ---- h5_subset.c 2022-11-09 16:07:16.418326572 -0600 -+++ h5_subset.c 2022-11-09 17:35:28.755673612 -0600 +--- h5_subset.c 2024-11-12 15:44:34.965999016 -0600 ++++ h5_subset_logvol.c 2024-11-12 15:44:16.229740896 -0600 @@ -16,6 +16,7 @@ */ #include "hdf5.h" +#include "H5VL_log.h" - #define FILE "subset.h5" + #define FILENAME "subset.h5" #define DATASETNAME "IntArray" @@ -27,9 +28,37 @@ #define DIM0 8 /* size of dataset */ @@ -54,7 +54,7 @@ * and dataset. * *****************************************************************/ - -- file_id = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); +- file_id = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + hid_t fapl_id = H5P_DEFAULT, log_vol_id = 0; + file_id = H5Fcreate(file_name, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + H5Fclose(file_id); @@ -76,7 +76,7 @@ * values to the dataset. *****************************************************/ -- file_id = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT); +- file_id = H5Fopen(FILENAME, H5F_ACC_RDWR, H5P_DEFAULT); + file_id = H5Fopen(file_name, H5F_ACC_RDWR, fapl_id); dataset_id = H5Dopen2(file_id, DATASETNAME, H5P_DEFAULT); From 0d0554e40b8865bfb86f9210febe3bd5b18af390 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 12 Nov 2024 19:17:42 -0600 Subject: [PATCH 08/16] enable hdf5-iotest --- .github/workflows/ubuntu_mpich.yml | 2 +- .github/workflows/ubuntu_openmpi.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index dad30eed..48b68500 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -103,7 +103,7 @@ jobs: autoreconf -i ./configure --with-hdf5=${GITHUB_WORKSPACE}/HDF5 \ --enable-test-netcdf4=${GITHUB_WORKSPACE}/NetCDF \ - --disable-test-hdf5-iotest \ + --enable-test-hdf5-iotest \ --with-mpi=${GITHUB_WORKSPACE}/MPICH # Do NOT test QMCPACK, as it requires FFTW which fails to build - name: Print config.log if error diff --git a/.github/workflows/ubuntu_openmpi.yml b/.github/workflows/ubuntu_openmpi.yml index 9a469325..436e09c6 100644 --- a/.github/workflows/ubuntu_openmpi.yml +++ b/.github/workflows/ubuntu_openmpi.yml @@ -98,7 +98,7 @@ jobs: autoreconf -i ./configure --with-hdf5=${GITHUB_WORKSPACE}/HDF5 \ --enable-test-netcdf4=${GITHUB_WORKSPACE}/NetCDF \ - --disable-test-hdf5-iotest \ + --enable-test-hdf5-iotest \ TESTMPIRUN="mpiexec --oversubscribe -n NP" # Do NOT test QMCPACK, as it requires FFTW which fails to build - name: Print config.log if error From 0042b100f6321c06e81b8bd0f5e1df12d1209a3d Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 13 Nov 2024 11:27:14 -0600 Subject: [PATCH 09/16] changed when to use h5pcc for compiling hdf5-iotest --- tests/external/hdf5_iotest/config.sh.in | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/tests/external/hdf5_iotest/config.sh.in b/tests/external/hdf5_iotest/config.sh.in index de97243d..4041a378 100644 --- a/tests/external/hdf5_iotest/config.sh.in +++ b/tests/external/hdf5_iotest/config.sh.in @@ -1,7 +1,6 @@ #!/bin/bash export HDF5_ROOT=@HDF5_ROOT_PATH@ -export LD_LIBRARY_PATH="${HDF5_ROOT}/lib:${LD_LIBRARY_PATH}" cd hdf5-iotest ./autogen.sh @@ -10,7 +9,22 @@ cd .. rm -rf build mkdir build cd build +# The h5(p)cc wrapper correctly parses the hdf5-iotest compile command +# only in HDF5 versions >= 2.0.0 +if grep -q "#define H5_VERS_MAJOR 1" ${HDF5_ROOT}/include/H5public.h; then + CC_DEF=mpicc + LIB_APPEND="" + if [ -d ${HDF5_ROOT}/lib64 ]; then + LIB_APPEND="64" + fi + export LD_LIBRARY_PATH="${HDF5_ROOT}/lib${LIB_APPEND}:$LD_LIBRARY_PATH" + export LDFLAGS="-L${HDF5_ROOT}/lib${LIB_APPEND}" + export CPPFLAGS="-I${HDF5_ROOT}/include" + export LIBS="-lhdf5" +else + CC_DEF=${HDF5_ROOT}/bin/h5pcc +fi ../hdf5-iotest/configure --silent \ - CC=${HDF5_ROOT}/bin/h5pcc \ + CC=${CC_DEF} \ CFLAGS="@CFLAGS@" From 3aca8f7553081641ab6d7158e3386e5727063a72 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 13 Nov 2024 12:02:21 -0600 Subject: [PATCH 10/16] update patch --- examples/hdf5_examples/h5_interm_group.patch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/hdf5_examples/h5_interm_group.patch b/examples/hdf5_examples/h5_interm_group.patch index 9e324638..36c4dc7e 100644 --- a/examples/hdf5_examples/h5_interm_group.patch +++ b/examples/hdf5_examples/h5_interm_group.patch @@ -1,16 +1,16 @@ ---- h5_interm_group.c 2022-03-16 18:21:18.837044757 -0500 -+++ h5_interm_group_logvol.c 2022-03-16 18:21:46.457044898 -0500 -@@ -88,10 +88,13 @@ +--- h5_interm_group.c 2024-11-13 11:56:00.913059201 -0600 ++++ h5_interm_group_logvol.c 2024-11-13 11:56:54.281932771 -0600 +@@ -84,11 +84,12 @@ + g2_id = H5Gopen2(file, "/G1/G2", H5P_DEFAULT); status = H5Gget_info(g2_id, &g2_info); printf("Group /G1/G2 has %d member(s)\n", (int)g2_info.nlinks); - +- +#if 0 for (i = 0; i < (int)g2_info.nlinks; i++) { H5Lget_name_by_idx(g2_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)i, name, 3, H5P_DEFAULT); printf("Object's name is %s\n", name); } +#endif -+ H5Gclose(g2_id); } H5Fclose(file); From 368b5fd33eb0043e74189d4870bbf7ce311fa42c Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 13 Nov 2024 12:37:04 -0600 Subject: [PATCH 11/16] testing --- tests/external/hdf5_iotest/config.sh.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/external/hdf5_iotest/config.sh.in b/tests/external/hdf5_iotest/config.sh.in index 4041a378..d3811cc1 100644 --- a/tests/external/hdf5_iotest/config.sh.in +++ b/tests/external/hdf5_iotest/config.sh.in @@ -24,7 +24,10 @@ if grep -q "#define H5_VERS_MAJOR 1" ${HDF5_ROOT}/include/H5public.h; then else CC_DEF=${HDF5_ROOT}/bin/h5pcc fi -../hdf5-iotest/configure --silent \ + +../hdf5-iotest/configure \ CC=${CC_DEF} \ CFLAGS="@CFLAGS@" +ls -aolF +cat Makefile \ No newline at end of file From 0ffd842a80c6fefbcc9303b6b577ff616298a9bc Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 13 Nov 2024 13:05:34 -0600 Subject: [PATCH 12/16] testing --- tests/external/hdf5_iotest/config.sh.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/external/hdf5_iotest/config.sh.in b/tests/external/hdf5_iotest/config.sh.in index d3811cc1..bb6836f7 100644 --- a/tests/external/hdf5_iotest/config.sh.in +++ b/tests/external/hdf5_iotest/config.sh.in @@ -25,9 +25,12 @@ else CC_DEF=${HDF5_ROOT}/bin/h5pcc fi +echo "${CC_DEF}" +echo "$LD_LIBRARY_PATH" + ../hdf5-iotest/configure \ CC=${CC_DEF} \ CFLAGS="@CFLAGS@" ls -aolF -cat Makefile \ No newline at end of file +cat config.log \ No newline at end of file From a8b7940542c97b46f7ba4990cc4b257e345db37c Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 13 Nov 2024 13:55:12 -0600 Subject: [PATCH 13/16] testing --- tests/external/hdf5_iotest/config.sh.in | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/external/hdf5_iotest/config.sh.in b/tests/external/hdf5_iotest/config.sh.in index bb6836f7..ef67b717 100644 --- a/tests/external/hdf5_iotest/config.sh.in +++ b/tests/external/hdf5_iotest/config.sh.in @@ -10,9 +10,10 @@ rm -rf build mkdir build cd build # The h5(p)cc wrapper correctly parses the hdf5-iotest compile command -# only in HDF5 versions >= 2.0.0 +# only in HDF5 versions >= 2.0.0${HDF5_ROOT}/bin/h5pcc +CC_DEF=${HDF5_ROOT}/bin/h5pcc if grep -q "#define H5_VERS_MAJOR 1" ${HDF5_ROOT}/include/H5public.h; then - CC_DEF=mpicc + CC_DEF=$(${HDF5_ROOT}/bin/h5pcc -show | head -n1 | awk '{print $1;}') LIB_APPEND="" if [ -d ${HDF5_ROOT}/lib64 ]; then LIB_APPEND="64" @@ -21,8 +22,6 @@ if grep -q "#define H5_VERS_MAJOR 1" ${HDF5_ROOT}/include/H5public.h; then export LDFLAGS="-L${HDF5_ROOT}/lib${LIB_APPEND}" export CPPFLAGS="-I${HDF5_ROOT}/include" export LIBS="-lhdf5" -else - CC_DEF=${HDF5_ROOT}/bin/h5pcc fi echo "${CC_DEF}" From 936b353c2c02af5888a1cf0e88044c383a6cf307 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 13 Nov 2024 14:10:12 -0600 Subject: [PATCH 14/16] removed testing statements --- .github/workflows/ubuntu_mpich.yml | 1 + .github/workflows/ubuntu_openmpi.yml | 1 + tests/external/hdf5_iotest/config.sh.in | 10 ++-------- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ubuntu_mpich.yml b/.github/workflows/ubuntu_mpich.yml index 48b68500..b22e88a7 100644 --- a/.github/workflows/ubuntu_mpich.yml +++ b/.github/workflows/ubuntu_mpich.yml @@ -74,6 +74,7 @@ jobs: --disable-tests \ --disable-fortran \ --disable-cxx \ + --enable-shared --disable-static \ CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 make -s -j 4 distclean >> qout 2>&1 diff --git a/.github/workflows/ubuntu_openmpi.yml b/.github/workflows/ubuntu_openmpi.yml index 436e09c6..4cb75cd5 100644 --- a/.github/workflows/ubuntu_openmpi.yml +++ b/.github/workflows/ubuntu_openmpi.yml @@ -59,6 +59,7 @@ jobs: --disable-tests \ --disable-fortran \ --disable-cxx \ + --enable-shared --disable-static \ CC=mpicc make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1 make -s -j 4 distclean >> qout 2>&1 diff --git a/tests/external/hdf5_iotest/config.sh.in b/tests/external/hdf5_iotest/config.sh.in index ef67b717..b53c4e0f 100644 --- a/tests/external/hdf5_iotest/config.sh.in +++ b/tests/external/hdf5_iotest/config.sh.in @@ -10,7 +10,7 @@ rm -rf build mkdir build cd build # The h5(p)cc wrapper correctly parses the hdf5-iotest compile command -# only in HDF5 versions >= 2.0.0${HDF5_ROOT}/bin/h5pcc +# only in HDF5 versions >= 2.0.0 CC_DEF=${HDF5_ROOT}/bin/h5pcc if grep -q "#define H5_VERS_MAJOR 1" ${HDF5_ROOT}/include/H5public.h; then CC_DEF=$(${HDF5_ROOT}/bin/h5pcc -show | head -n1 | awk '{print $1;}') @@ -24,12 +24,6 @@ if grep -q "#define H5_VERS_MAJOR 1" ${HDF5_ROOT}/include/H5public.h; then export LIBS="-lhdf5" fi -echo "${CC_DEF}" -echo "$LD_LIBRARY_PATH" - ../hdf5-iotest/configure \ CC=${CC_DEF} \ - CFLAGS="@CFLAGS@" - -ls -aolF -cat config.log \ No newline at end of file + CFLAGS="@CFLAGS@" \ No newline at end of file From c077ef9cfc59113d8e107aec858e652ddfebdd96 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 13 Nov 2024 15:13:46 -0600 Subject: [PATCH 15/16] updated doc. link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fda03f2e..931672b6 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ but require the Log VOL to read them back. ### HDF5 VOL Connector ID * This Log VOL connector has been registered with the HDF group with - [Connector Identifier 514](https://portal.hdfgroup.org/display/support/Registered+VOL+Connectors). + [Connector Identifier 514](https://support.hdfgroup.org/documentation/hdf5-docs/registered_vol_connectors.html). ### Documents * [doc/userguide.md](doc/userguide.md) contains the compile and run instructions. From a50b135b36834ca67050ce01cec5479d46608ee8 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 13 Nov 2024 15:27:43 -0600 Subject: [PATCH 16/16] removed CI testing checks --- tests/external/hdf5_iotest/config.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/external/hdf5_iotest/config.sh.in b/tests/external/hdf5_iotest/config.sh.in index b53c4e0f..aa8f79c6 100644 --- a/tests/external/hdf5_iotest/config.sh.in +++ b/tests/external/hdf5_iotest/config.sh.in @@ -24,6 +24,6 @@ if grep -q "#define H5_VERS_MAJOR 1" ${HDF5_ROOT}/include/H5public.h; then export LIBS="-lhdf5" fi -../hdf5-iotest/configure \ +../hdf5-iotest/configure --silent \ CC=${CC_DEF} \ CFLAGS="@CFLAGS@" \ No newline at end of file