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

Minor tweaks from VFD SWMR normalization #1474

Merged
merged 1 commit into from
Mar 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -3775,8 +3775,8 @@
./tools/test/perform/CMakeTests.cmake

./utils/CMakeLists.txt
./utils/test/CMakeLists.txt
./utils/mirror_vfd/CMakeLists.txt
./utils/test/CMakeLists.txt

# CMake-specific User Scripts
./config/cmake/CTestScript.cmake
Expand Down
2 changes: 2 additions & 0 deletions src/H5C.c
Original file line number Diff line number Diff line change
Expand Up @@ -1414,6 +1414,7 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u
entry_ptr->serialization_count = 0;
#endif /* NDEBUG */

/* initialize tag list fields */
entry_ptr->tl_next = NULL;
entry_ptr->tl_prev = NULL;
entry_ptr->tag_info = NULL;
Expand Down Expand Up @@ -7416,6 +7417,7 @@ H5C__load_entry(H5F_t *f,
entry->serialization_count = 0;
#endif /* NDEBUG */

/* initialize tag list fields */
entry->tl_next = NULL;
entry->tl_prev = NULL;
entry->tag_info = NULL;
Expand Down
31 changes: 15 additions & 16 deletions src/H5Cepoch.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,22 +78,21 @@ static herr_t H5C__epoch_marker_fsf_size(const void H5_ATTR_UNUSED *thing,
/* Local Variables */
/*******************/

const H5AC_class_t H5AC_EPOCH_MARKER[1] = {{
/* id = */ H5AC_EPOCH_MARKER_ID,
/* name = */ "epoch marker",
/* mem_type = */ H5FD_MEM_DEFAULT, /* value doesn't matter */
/* flags = */ H5AC__CLASS_NO_FLAGS_SET,
/* get_initial_load_size = */ H5C__epoch_marker_get_initial_load_size,
/* get_final_load_size = */ H5C__epoch_marker_get_final_load_size,
/* verify_chksum = */ H5C__epoch_marker_verify_chksum,
/* deserialize = */ H5C__epoch_marker_deserialize,
/* image_len = */ H5C__epoch_marker_image_len,
/* pre_serialize = */ H5C__epoch_marker_pre_serialize,
/* serialize = */ H5C__epoch_marker_serialize,
/* notify = */ H5C__epoch_marker_notify,
/* free_icr = */ H5C__epoch_marker_free_icr,
/* fsf_size = */ H5C__epoch_marker_fsf_size,
}};
const H5AC_class_t H5AC_EPOCH_MARKER[1] = {
{/* id = */ H5AC_EPOCH_MARKER_ID,
/* name = */ "epoch marker",
/* mem_type = */ H5FD_MEM_DEFAULT, /* value doesn't matter */
/* flags = */ H5AC__CLASS_NO_FLAGS_SET,
/* get_initial_load_size = */ H5C__epoch_marker_get_initial_load_size,
/* get_final_load_size = */ H5C__epoch_marker_get_final_load_size,
/* verify_chksum = */ H5C__epoch_marker_verify_chksum,
/* deserialize = */ H5C__epoch_marker_deserialize,
/* image_len = */ H5C__epoch_marker_image_len,
/* pre_serialize = */ H5C__epoch_marker_pre_serialize,
/* serialize = */ H5C__epoch_marker_serialize,
/* notify = */ H5C__epoch_marker_notify,
/* free_icr = */ H5C__epoch_marker_free_icr,
/* fsf_size = */ H5C__epoch_marker_fsf_size}};

/***************************************************************************
* Class functions for H5C__EPOCH_MAKER_TYPE:
Expand Down
226 changes: 113 additions & 113 deletions src/H5Cpkg.h

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/H5ES.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ H5ESget_requests(hid_t es_id, H5_iter_order_t order, hid_t *connector_ids, void
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_API(FAIL)
H5TRACE5("e", "iIo*i**xx", es_id, order, connector_ids, requests, count);
H5TRACE6("e", "iIo*i**xzx", es_id, order, connector_ids, requests, array_len, count);

/* Check arguments */
if (NULL == (es = H5I_object_verify(es_id, H5I_EVENTSET)))
Expand Down
5 changes: 3 additions & 2 deletions src/H5FD.c
Original file line number Diff line number Diff line change
Expand Up @@ -928,9 +928,10 @@ H5FD_cmp(const H5FD_t *f1, const H5FD_t *f2)
{
int ret_value = -1; /* Return value */

FUNC_ENTER_NOAPI_NOERR /* return value is arbitrary */
FUNC_ENTER_NOAPI_NOERR; /* return value is arbitrary */
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The semicolon here prevents the formatter from botching the subsequent lines of code.


if ((!f1 || !f1->cls) && (!f2 || !f2->cls)) HGOTO_DONE(0)
if ((!f1 || !f1->cls) && (!f2 || !f2->cls))
HGOTO_DONE(0)
if (!f1 || !f1->cls)
HGOTO_DONE(-1)
if (!f2 || !f2->cls)
Expand Down
1 change: 0 additions & 1 deletion src/H5Ocopy.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include "H5Aprivate.h" /* Attributes */
#include "H5CXprivate.h" /* API Contexts */
#include "H5Eprivate.h" /* Error handling */
#include "H5ESprivate.h" /* Event Sets */
#include "H5FLprivate.h" /* Free lists */
#include "H5Iprivate.h" /* IDs */
#include "H5HGprivate.h" /* Global Heaps */
Expand Down
2 changes: 1 addition & 1 deletion src/H5Tcommit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ H5T_open(const H5G_loc_t *loc)
done:
if (ret_value == NULL) {
if (dt) {
if (shared_fo == NULL) { /* Need to free shared of */
if (shared_fo == NULL) { /* Need to free shared file object */
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

codespell changed 'fo' (file object) to 'of'

if (dt->shared->owned_vol_obj && H5VL_free_object(dt->shared->owned_vol_obj) < 0)
HDONE_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, NULL, "unable to close owned VOL object")
dt->shared = H5FL_FREE(H5T_shared_t, dt->shared);
Expand Down
2 changes: 1 addition & 1 deletion src/H5VLcallback.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5ESprivate.h" /* Event Sets */
#include "H5Fprivate.h" /* File access */
#include "H5Fprivate.h" /* File access */
#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
#include "H5Pprivate.h" /* Property lists */
Expand Down
6 changes: 3 additions & 3 deletions src/H5VLnative.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ typedef union H5VL_native_attr_optional_args_t {
#define H5VL_NATIVE_DATASET_CHUNK_WRITE 7 /* H5Dchunk_write */
#define H5VL_NATIVE_DATASET_GET_VLEN_BUF_SIZE 8 /* H5Dvlen_get_buf_size */
#define H5VL_NATIVE_DATASET_GET_OFFSET 9 /* H5Dget_offset */
#define H5VL_NATIVE_DATASET_CHUNK_ITER 10 /* H5Dget_offset */
#define H5VL_NATIVE_DATASET_CHUNK_ITER 10 /* H5Dchunk_iter */
/* NOTE: If values over 1023 are added, the H5VL_RESERVED_NATIVE_OPTIONAL macro
* must be updated.
*/
Expand Down Expand Up @@ -208,8 +208,8 @@ typedef union H5VL_native_dataset_optional_args_t {
#ifdef H5_HAVE_PARALLEL
#define H5VL_NATIVE_FILE_GET_MPI_ATOMICITY 26 /* H5Fget_mpi_atomicity */
#define H5VL_NATIVE_FILE_SET_MPI_ATOMICITY 27 /* H5Fset_mpi_atomicity */
#endif /* H5_HAVE_PARALLEL */
#define H5VL_NATIVE_FILE_POST_OPEN 28 /* Adjust file after open, with wrapping context */
#endif
#define H5VL_NATIVE_FILE_POST_OPEN 28 /* Adjust file after open, with wrapping context */
/* NOTE: If values over 1023 are added, the H5VL_RESERVED_NATIVE_OPTIONAL macro
* must be updated.
*/
Expand Down
5 changes: 2 additions & 3 deletions test/swmr_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,12 @@ generate_symbols(void)
unsigned u, v; /* Local index variables */

for (u = 0; u < NLEVELS; u++) {
symbol_info[u] = (symbol_info_t *)HDmalloc(symbol_count[u] * sizeof(symbol_info_t));
symbol_info[u] = HDmalloc(symbol_count[u] * sizeof(symbol_info_t));
for (v = 0; v < symbol_count[u]; v++) {
char name_buf[64];

generate_name(name_buf, u, v);
symbol_info[u][v].name = (char *)HDmalloc(HDstrlen(name_buf) + 1);
HDstrcpy(symbol_info[u][v].name, name_buf);
symbol_info[u][v].name = HDstrdup(name_buf);
symbol_info[u][v].dsid = -1;
symbol_info[u][v].nrecords = 0;
} /* end for */
Expand Down
2 changes: 1 addition & 1 deletion test/swmr_sparse_reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ check_dataset(hid_t fid, unsigned verbose, const symbol_info_t *symbol, symbol_t
(uintmax_t)start[0], (uintmax_t)start[1]);

/* Read record from dataset */
record->rec_id = (uint64_t)ULLONG_MAX;
record->rec_id = UINT64_MAX;
if (H5Dread(dsid, symbol_tid, rec_sid, file_sid, H5P_DEFAULT, record) < 0)
return -1;

Expand Down