From 12361fa271c7680d55754a4ec5813759c121a071 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 13 Nov 2024 17:53:42 -0600 Subject: [PATCH 1/8] HDF5 2.0.0 API updates, renaming of H5VLstart_lib_state and H5VLfinish_lib_state, along with new context state --- src/h5_async_vol.c | 390 +++++++++++++++++++++++---------------------- 1 file changed, 202 insertions(+), 188 deletions(-) diff --git a/src/h5_async_vol.c b/src/h5_async_vol.c index 2178ff8..e2e6d96 100644 --- a/src/h5_async_vol.c +++ b/src/h5_async_vol.c @@ -98,6 +98,18 @@ works, and perform publicly and display publicly, and to permit others to do so. #define va_copy(D, S) ((D) = (S)) #endif +#if H5_VERSION_GE(2, 0, 0) +#define FUNC_H5VLOPEN_LIB_CONTEXT H5VLopen_lib_context +#define FUNC_H5VLCLOSE_LIB_CONTEXT H5VLclose_lib_context +#define H5VLOPEN_LIB_CONTEXT(CONTEXT) FUNC_H5VLOPEN_LIB_CONTEXT(CONTEXT) +#define H5VLCLOSE_LIB_CONTEXT(CONTEXT) FUNC_H5VLCLOSE_LIB_CONTEXT(CONTEXT) +#else +#define FUNC_H5VLOPEN_LIB_CONTEXT H5VLstart_lib_state +#define FUNC_H5VLCLOSE_LIB_CONTEXT H5VLfinish_lib_state +#define H5VLOPEN_LIB_CONTEXT(CONTEXT) FUNC_H5VLOPEN_LIB_CONTEXT() +#define H5VLCLOSE_LIB_CONTEXT(CONTEXT) FUNC_H5VLCLOSE_LIB_CONTEXT() +#endif + FILE *fout_g; /************/ @@ -128,6 +140,7 @@ typedef struct async_task_t { int magic; ABT_mutex task_mutex; void * h5_state; + void * h5_context; void (*func)(void *); void * args; obj_op_type_t op; @@ -5228,6 +5241,7 @@ async_attr_create_fn(void *foo) async_task_t * task = (async_task_t *)foo; async_attr_create_args_t *args = (async_attr_create_args_t *)(task->args); + #ifdef ENABLE_TIMING task->start_time = clock(); #endif @@ -5271,8 +5285,8 @@ async_attr_create_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -5319,8 +5333,8 @@ async_attr_create_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -5626,8 +5640,8 @@ async_attr_open_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -5674,8 +5688,8 @@ async_attr_open_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -5970,8 +5984,8 @@ async_attr_read_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -6014,8 +6028,8 @@ async_attr_read_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -6261,8 +6275,8 @@ async_attr_write_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -6305,8 +6319,8 @@ async_attr_write_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -6577,8 +6591,8 @@ async_attr_get_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -6620,8 +6634,8 @@ async_attr_get_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -6864,8 +6878,8 @@ async_attr_specific_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -6910,8 +6924,8 @@ async_attr_specific_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -7169,8 +7183,8 @@ async_attr_optional_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -7212,8 +7226,8 @@ async_attr_optional_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -7453,8 +7467,8 @@ async_attr_close_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -7496,8 +7510,8 @@ async_attr_close_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -7745,8 +7759,8 @@ async_dataset_create_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -7794,8 +7808,8 @@ async_dataset_create_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -8099,8 +8113,8 @@ async_dataset_open_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -8148,8 +8162,8 @@ async_dataset_open_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -8422,8 +8436,8 @@ async_dataset_read_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -8466,8 +8480,8 @@ async_dataset_read_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -8924,8 +8938,8 @@ async_dataset_read_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -8968,8 +8982,8 @@ async_dataset_read_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -9279,8 +9293,8 @@ async_dataset_write_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -9334,8 +9348,8 @@ async_dataset_write_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -9935,8 +9949,8 @@ async_dataset_write_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -9989,8 +10003,8 @@ async_dataset_write_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -10318,8 +10332,8 @@ async_dataset_get_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -10361,8 +10375,8 @@ async_dataset_get_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -10612,8 +10626,8 @@ async_dataset_specific_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -10655,8 +10669,8 @@ async_dataset_specific_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -10902,8 +10916,8 @@ async_dataset_optional_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -10945,8 +10959,8 @@ async_dataset_optional_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -11187,8 +11201,8 @@ async_dataset_close_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -11230,8 +11244,8 @@ async_dataset_close_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -11486,8 +11500,8 @@ async_datatype_commit_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -11532,8 +11546,8 @@ async_datatype_commit_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -11818,8 +11832,8 @@ async_datatype_open_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -11866,8 +11880,8 @@ async_datatype_open_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -12137,8 +12151,8 @@ async_datatype_get_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -12180,8 +12194,8 @@ async_datatype_get_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -12426,8 +12440,8 @@ async_datatype_specific_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -12469,8 +12483,8 @@ async_datatype_specific_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -12712,8 +12726,8 @@ async_datatype_optional_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -12755,8 +12769,8 @@ async_datatype_optional_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -12998,8 +13012,8 @@ async_datatype_close_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -13041,8 +13055,8 @@ async_datatype_close_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -13270,8 +13284,8 @@ async_file_create_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -13355,8 +13369,8 @@ async_file_create_fn(void *foo) }; done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -13594,8 +13608,8 @@ async_file_open_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -13682,8 +13696,8 @@ async_file_open_fn(void *foo) }; done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -13924,8 +13938,8 @@ async_file_get_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -13967,8 +13981,8 @@ async_file_get_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -14212,8 +14226,8 @@ async_file_specific_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -14255,8 +14269,8 @@ async_file_specific_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -14509,8 +14523,8 @@ async_file_optional_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -14552,8 +14566,8 @@ async_file_optional_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -14803,8 +14817,8 @@ async_file_close_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -14858,8 +14872,8 @@ async_file_close_fn(void *foo) }; done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -15133,8 +15147,8 @@ async_group_create_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -15182,8 +15196,8 @@ async_group_create_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -15470,8 +15484,8 @@ async_group_open_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -15518,8 +15532,8 @@ async_group_open_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -15789,8 +15803,8 @@ async_group_get_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -15832,8 +15846,8 @@ async_group_get_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -16082,8 +16096,8 @@ async_group_specific_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -16125,8 +16139,8 @@ async_group_specific_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -16367,8 +16381,8 @@ async_group_optional_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -16410,8 +16424,8 @@ async_group_optional_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -16652,8 +16666,8 @@ async_group_close_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -16697,8 +16711,8 @@ async_group_close_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -16959,8 +16973,8 @@ async_link_create_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -17006,8 +17020,8 @@ async_link_create_fn(void *foo) /* va_end is needed as arguments is copied previously */ va_end(args->arguments); - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -17286,8 +17300,8 @@ async_link_copy_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -17330,8 +17344,8 @@ async_link_copy_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -17607,8 +17621,8 @@ async_link_move_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -17651,8 +17665,8 @@ async_link_move_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -17928,8 +17942,8 @@ async_link_get_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -17972,8 +17986,8 @@ async_link_get_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -18225,8 +18239,8 @@ async_link_specific_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -18272,8 +18286,8 @@ async_link_specific_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -18526,8 +18540,8 @@ async_link_optional_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -18570,8 +18584,8 @@ async_link_optional_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -18824,8 +18838,8 @@ async_object_open_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -18872,8 +18886,8 @@ async_object_open_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -19142,8 +19156,8 @@ async_object_copy_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -19188,8 +19202,8 @@ async_object_copy_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -19464,8 +19478,8 @@ async_object_get_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -19511,8 +19525,8 @@ async_object_get_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -19765,8 +19779,8 @@ async_object_specific_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -19811,8 +19825,8 @@ async_object_specific_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; @@ -20071,8 +20085,8 @@ async_object_optional_fn(void *foo) // Restore previous library state assert(task->h5_state); - if (H5VLstart_lib_state() < 0) { - fprintf(fout_g, " [ ABT ERROR] %s H5VLstart_lib_state failed\n", __func__); + if (H5VLOPEN_LIB_CONTEXT(&task->h5_context) < 0) { + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLOPEN_LIB_CONTEXT); goto done; } if (H5VLrestore_lib_state(task->h5_state) < 0) { @@ -20115,8 +20129,8 @@ async_object_optional_fn(void *foo) func_log(__func__, "execute success"); done: - if (is_lib_state_restored && H5VLfinish_lib_state() < 0) - fprintf(fout_g, " [ ABT ERROR] %s H5VLfinish_lib_state failed\n", __func__); + if (is_lib_state_restored && H5VLCLOSE_LIB_CONTEXT(task->h5_context) < 0) + fprintf(fout_g, " [ ABT ERROR] %s %s failed\n", __func__, FUNC_H5VLCLOSE_LIB_CONTEXT); if (NULL != task->h5_state && H5VLfree_lib_state(task->h5_state) < 0) fprintf(fout_g, " [ ABT ERROR] %s H5VLfree_lib_state failed\n", __func__); task->h5_state = NULL; From ce8cd883467c1bf8ad3bf13b594be05eb7a5d7f7 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 13 Nov 2024 23:54:10 +0000 Subject: [PATCH 2/8] Committing clang-format changes --- src/h5_async_vol.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/h5_async_vol.c b/src/h5_async_vol.c index e2e6d96..5d8a020 100644 --- a/src/h5_async_vol.c +++ b/src/h5_async_vol.c @@ -99,14 +99,14 @@ works, and perform publicly and display publicly, and to permit others to do so. #endif #if H5_VERSION_GE(2, 0, 0) -#define FUNC_H5VLOPEN_LIB_CONTEXT H5VLopen_lib_context -#define FUNC_H5VLCLOSE_LIB_CONTEXT H5VLclose_lib_context -#define H5VLOPEN_LIB_CONTEXT(CONTEXT) FUNC_H5VLOPEN_LIB_CONTEXT(CONTEXT) +#define FUNC_H5VLOPEN_LIB_CONTEXT H5VLopen_lib_context +#define FUNC_H5VLCLOSE_LIB_CONTEXT H5VLclose_lib_context +#define H5VLOPEN_LIB_CONTEXT(CONTEXT) FUNC_H5VLOPEN_LIB_CONTEXT(CONTEXT) #define H5VLCLOSE_LIB_CONTEXT(CONTEXT) FUNC_H5VLCLOSE_LIB_CONTEXT(CONTEXT) #else -#define FUNC_H5VLOPEN_LIB_CONTEXT H5VLstart_lib_state -#define FUNC_H5VLCLOSE_LIB_CONTEXT H5VLfinish_lib_state -#define H5VLOPEN_LIB_CONTEXT(CONTEXT) FUNC_H5VLOPEN_LIB_CONTEXT() +#define FUNC_H5VLOPEN_LIB_CONTEXT H5VLstart_lib_state +#define FUNC_H5VLCLOSE_LIB_CONTEXT H5VLfinish_lib_state +#define H5VLOPEN_LIB_CONTEXT(CONTEXT) FUNC_H5VLOPEN_LIB_CONTEXT() #define H5VLCLOSE_LIB_CONTEXT(CONTEXT) FUNC_H5VLCLOSE_LIB_CONTEXT() #endif @@ -5241,7 +5241,6 @@ async_attr_create_fn(void *foo) async_task_t * task = (async_task_t *)foo; async_attr_create_args_t *args = (async_attr_create_args_t *)(task->args); - #ifdef ENABLE_TIMING task->start_time = clock(); #endif From c5293652b59949c590745c9923b2353389d90072 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 13 Nov 2024 19:01:55 -0600 Subject: [PATCH 3/8] clang format fix --- .github/workflows/clang-format-fix.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/clang-format-fix.yml b/.github/workflows/clang-format-fix.yml index bc741aa..5d3275a 100644 --- a/.github/workflows/clang-format-fix.yml +++ b/.github/workflows/clang-format-fix.yml @@ -13,6 +13,10 @@ jobs: if: "!contains(github.event.head_commit.message, 'skip-ci')" steps: - uses: actions/checkout@v4.1.1 + - name: Set up dependencies + run: | + sudo apt-get update + sudo apt-get install setuptools - name: Run clang-format style check for C programs. uses: DoozyX/clang-format-lint-action@v0.13 with: From bcd3ff13effeca5cf97a4ea126a192f7f45e22f0 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 13 Nov 2024 19:04:46 -0600 Subject: [PATCH 4/8] clang format fix --- .github/workflows/clang-format-check.yml | 4 ++++ .github/workflows/clang-format-fix.yml | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml index 09b601d..ffed4ab 100644 --- a/.github/workflows/clang-format-check.yml +++ b/.github/workflows/clang-format-check.yml @@ -8,6 +8,10 @@ jobs: if: "!contains(github.event.head_commit.message, 'skip-ci')" steps: - uses: actions/checkout@v4.1.1 + - name: Set up dependencies + run: | + sudo apt-get update + sudo apt-get install setuptools - name: Run clang-format style check for C programs. uses: DoozyX/clang-format-lint-action@v0.11 with: diff --git a/.github/workflows/clang-format-fix.yml b/.github/workflows/clang-format-fix.yml index 5d3275a..bc741aa 100644 --- a/.github/workflows/clang-format-fix.yml +++ b/.github/workflows/clang-format-fix.yml @@ -13,10 +13,6 @@ jobs: if: "!contains(github.event.head_commit.message, 'skip-ci')" steps: - uses: actions/checkout@v4.1.1 - - name: Set up dependencies - run: | - sudo apt-get update - sudo apt-get install setuptools - name: Run clang-format style check for C programs. uses: DoozyX/clang-format-lint-action@v0.13 with: From 7323c9b070aded0de645b3a5f278c536db5a15f7 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 13 Nov 2024 19:07:56 -0600 Subject: [PATCH 5/8] check format CI --- src/h5_async_vol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/h5_async_vol.c b/src/h5_async_vol.c index 5d8a020..3ecb37e 100644 --- a/src/h5_async_vol.c +++ b/src/h5_async_vol.c @@ -104,8 +104,8 @@ works, and perform publicly and display publicly, and to permit others to do so. #define H5VLOPEN_LIB_CONTEXT(CONTEXT) FUNC_H5VLOPEN_LIB_CONTEXT(CONTEXT) #define H5VLCLOSE_LIB_CONTEXT(CONTEXT) FUNC_H5VLCLOSE_LIB_CONTEXT(CONTEXT) #else -#define FUNC_H5VLOPEN_LIB_CONTEXT H5VLstart_lib_state -#define FUNC_H5VLCLOSE_LIB_CONTEXT H5VLfinish_lib_state +#define FUNC_H5VLOPEN_LIB_CONTEXT H5VLstart_lib_state +#define FUNC_H5VLCLOSE_LIB_CONTEXT H5VLfinish_lib_state #define H5VLOPEN_LIB_CONTEXT(CONTEXT) FUNC_H5VLOPEN_LIB_CONTEXT() #define H5VLCLOSE_LIB_CONTEXT(CONTEXT) FUNC_H5VLCLOSE_LIB_CONTEXT() #endif From 45e60c9f38ae1228743037f86acf216112befbdd Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 14 Nov 2024 10:26:27 -0600 Subject: [PATCH 6/8] fix yml syntax --- .github/workflows/clang-format-check.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml index ffed4ab..b561d27 100644 --- a/.github/workflows/clang-format-check.yml +++ b/.github/workflows/clang-format-check.yml @@ -7,13 +7,10 @@ jobs: runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, 'skip-ci')" steps: - - uses: actions/checkout@v4.1.1 - - name: Set up dependencies - run: | - sudo apt-get update - sudo apt-get install setuptools + - uses: actions/checkout@v4.1.7 + - name: Run clang-format style check for C programs. - uses: DoozyX/clang-format-lint-action@v0.11 + uses: DoozyX/clang-format-lint-action@v0.18.2 with: source: '.' extensions: 'c,h,cpp,hpp' From 38d17ce41c861849a357a6e0918d88ab63e6896d Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 14 Nov 2024 16:26:53 +0000 Subject: [PATCH 7/8] Committing clang-format changes --- src/h5_async_vol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/h5_async_vol.c b/src/h5_async_vol.c index 3ecb37e..5d8a020 100644 --- a/src/h5_async_vol.c +++ b/src/h5_async_vol.c @@ -104,8 +104,8 @@ works, and perform publicly and display publicly, and to permit others to do so. #define H5VLOPEN_LIB_CONTEXT(CONTEXT) FUNC_H5VLOPEN_LIB_CONTEXT(CONTEXT) #define H5VLCLOSE_LIB_CONTEXT(CONTEXT) FUNC_H5VLCLOSE_LIB_CONTEXT(CONTEXT) #else -#define FUNC_H5VLOPEN_LIB_CONTEXT H5VLstart_lib_state -#define FUNC_H5VLCLOSE_LIB_CONTEXT H5VLfinish_lib_state +#define FUNC_H5VLOPEN_LIB_CONTEXT H5VLstart_lib_state +#define FUNC_H5VLCLOSE_LIB_CONTEXT H5VLfinish_lib_state #define H5VLOPEN_LIB_CONTEXT(CONTEXT) FUNC_H5VLOPEN_LIB_CONTEXT() #define H5VLCLOSE_LIB_CONTEXT(CONTEXT) FUNC_H5VLCLOSE_LIB_CONTEXT() #endif From d620c89a7a9d85e6c6394dd769711aa2bbba8ed2 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 14 Nov 2024 11:50:50 -0600 Subject: [PATCH 8/8] updated yml to fix format errors --- .github/workflows/clang-format-fix.yml | 29 ++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/workflows/clang-format-fix.yml b/.github/workflows/clang-format-fix.yml index bc741aa..790c49e 100644 --- a/.github/workflows/clang-format-fix.yml +++ b/.github/workflows/clang-format-fix.yml @@ -1,4 +1,13 @@ -name: clang-format Fix +# NOTE: This action requires write permissions to be set in your GitHub +# repo/fork for it to be able to commit changes. +# +# This is currently enabled via: +# +# settings > Actions > General > Workflow permissions +# +# which you will need to set to "Read and write permissions" +# +name: clang-format Commit Changes on: workflow_dispatch: push: @@ -6,15 +15,22 @@ on: - '**.md' - '**.txt' - 'docs/**' + +permissions: + contents: write + jobs: formatting-check: - name: Formatting Fix + name: Commit Format Changes runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, 'skip-ci')" + permissions: + contents: write # In order to allow EndBug/add-and-commit to commit changes steps: - - uses: actions/checkout@v4.1.1 - - name: Run clang-format style check for C programs. - uses: DoozyX/clang-format-lint-action@v0.13 + - uses: actions/checkout@v4.1.7 + + - name: Fix C formatting issues detected by clang-format + uses: DoozyX/clang-format-lint-action@v0.18.2 with: source: '.' extensions: 'c,h,cpp,hpp' @@ -22,7 +38,8 @@ jobs: inplace: True style: file # exclude: './config ' - - uses: EndBug/add-and-commit@v9 + + - uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4 with: author_name: github-actions author_email: github-actions[bot]@users.noreply.github.com