diff options
-rw-r--r-- | src/H5Fint.c | 28 | ||||
-rw-r--r-- | test/vfd_swmr_common.c | 4 | ||||
-rw-r--r-- | test/vfd_swmr_common.h | 2 | ||||
-rw-r--r-- | test/vfd_swmr_log_writer.c | 2 |
4 files changed, 4 insertions, 32 deletions
diff --git a/src/H5Fint.c b/src/H5Fint.c index 49c8561..e650878 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -108,8 +108,6 @@ htri_t use_locks_env_g = FAIL; /*******************/ /* Local Variables */ /*******************/ -hbool_t vfd_swmr_log_on; -FILE *vfd_swmr_log_file_ptr; /* Declare a free list to manage the H5F_t struct */ H5FL_DEFINE(H5F_t); @@ -1855,15 +1853,8 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) hbool_t ci_write = FALSE; /* Whether MDC CI write requested */ hbool_t file_create = FALSE; /* Creating a new file or not */ H5F_vfd_swmr_config_t *vfd_swmr_config_ptr = NULL; /* Points to VFD SMWR config info */ - //FILE * vfd_swmr_log_file_ptr = NULL; - //hbool_t vfd_swmr_log_on = FALSE; - struct timespec start_time, end_time; - double temp_time; - unsigned int elap_min,elap_sec,elap_msec; - H5F_t * ret_value = NULL; /* Actual return value */ - FUNC_ENTER_NOAPI(NULL) /* Get the file access property list, for future queries */ @@ -1878,17 +1869,8 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) if (H5P_get(a_plist, H5F_ACS_VFD_SWMR_CONFIG_NAME, vfd_swmr_config_ptr) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get VFD SWMR config info") - vfd_swmr_log_on = FALSE; /* When configured with VFD SWMR */ if (vfd_swmr_config_ptr->version) { - - if(HDstrlen(vfd_swmr_config_ptr->log_file_path) >0) - vfd_swmr_log_on = TRUE; - if( TRUE == vfd_swmr_log_on) { - clock_gettime(CLOCK_MONOTONIC,&start_time); - if((vfd_swmr_log_file_ptr=HDfopen(vfd_swmr_config_ptr->log_file_path,"w"))==NULL) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to create the metadata file") - } /* Verify that file access flags are consistent with VFD SWMR configuartion */ if ((flags & H5F_ACC_RDWR) && !vfd_swmr_config_ptr->writer) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "file access is writer but VFD SWMR config is reader") @@ -2239,16 +2221,6 @@ done: if (H5F__dest(file, FALSE) < 0) HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, NULL, "problems closing file") } - - if (TRUE == vfd_swmr_log_on) { - clock_gettime(CLOCK_MONOTONIC,&end_time); - temp_time = TOTAL_TIME_PASSED(start_time,end_time); - elap_min = TIME_PASSED_MIN(temp_time); - elap_sec = TIME_PASSED_SEC(temp_time,elap_min); - elap_msec = TIME_PASSED_MSEC(temp_time,elap_min,elap_sec); - HDfprintf(vfd_swmr_log_file_ptr,"FILE OPEN: %u m %u s %u ms, time - %lf seconds\n",elap_min,elap_sec,elap_msec,temp_time/1000); - HDfclose(vfd_swmr_log_file_ptr); - } if (vfd_swmr_config_ptr) H5MM_free(vfd_swmr_config_ptr); diff --git a/test/vfd_swmr_common.c b/test/vfd_swmr_common.c index f20f01e..d6750e0 100644 --- a/test/vfd_swmr_common.c +++ b/test/vfd_swmr_common.c @@ -370,7 +370,7 @@ init_vfd_swmr_config(H5F_vfd_swmr_config_t *config, uint32_t tick_len, uint32_t } /* init_vfd_swmr_config() */ void -init_vfd_swmr_config_log(H5F_vfd_swmr_config_t *config, const char *log_file_fmtstr,...) +init_vfd_swmr_log(H5F_vfd_swmr_config_t *config, const char *log_file_fmtstr,...) { va_list ap; @@ -379,7 +379,7 @@ init_vfd_swmr_config_log(H5F_vfd_swmr_config_t *config, const char *log_file_fmt evsnprintf(config->log_file_path, sizeof(config->log_file_path), log_file_fmtstr, ap); HDva_end(ap); -} /* init_vfd_swmr_config() */ +} /* init_vfd_swmr_log() */ /* Perform common VFD SWMR configuration on the file-access property list: diff --git a/test/vfd_swmr_common.h b/test/vfd_swmr_common.h index 8c51e0b..c011142 100644 --- a/test/vfd_swmr_common.h +++ b/test/vfd_swmr_common.h @@ -77,7 +77,7 @@ H5TEST_DLL void init_vfd_swmr_config(H5F_vfd_swmr_config_t *config, uint32_t tic hbool_t writer, hbool_t flush_raw_data, uint32_t md_pages_reserved, const char *md_file_fmtstr, ...) H5_ATTR_FORMAT(printf, 7, 8); -H5TEST_DLL void init_vfd_swmr_config_log(H5F_vfd_swmr_config_t *config, const char * log_file_fmtstr, ...) H5_ATTR_FORMAT(printf, 2, 3); +H5TEST_DLL void init_vfd_swmr_log(H5F_vfd_swmr_config_t *config, const char * log_file_fmtstr, ...) H5_ATTR_FORMAT(printf, 2, 3); H5TEST_DLL hid_t vfd_swmr_create_fcpl(H5F_fspace_strategy_t fs_strategy, hsize_t fs_page_size); diff --git a/test/vfd_swmr_log_writer.c b/test/vfd_swmr_log_writer.c index 1834d44..9ab50bd 100644 --- a/test/vfd_swmr_log_writer.c +++ b/test/vfd_swmr_log_writer.c @@ -2763,7 +2763,7 @@ main(int argc, char **argv) /* config, tick_len, max_lag, writer, flush_raw_data, md_pages_reserved, md_file_path */ init_vfd_swmr_config(&config, s.tick_len, s.max_lag, writer, FALSE, 128, "./group-shadow"); - init_vfd_swmr_config_log(&config, "./log-test"); + init_vfd_swmr_log(&config, "./log-test"); /* If old-style option is chosen, use the earliest file format(H5F_LIBVER_EARLIEST) * as the second parameter of H5Pset_libver_bound() that is called by |