From fbd401c68d35cd98187d1396815536c6aabad4b0 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Thu, 14 Nov 2024 13:25:55 -0600 Subject: [PATCH] HDF5 2.0.0 updates (#44) * HDF5 2.0.0 API VOL updates * renaming of H5VLstart_lib_state and H5VLfinish_lib_state, along with new context state * updated CI yml to fix clang-format errors --- .github/workflows/clang-format-check.yml | 5 +- .github/workflows/clang-format-fix.yml | 29 +- src/h5_async_vol.c | 389 ++++++++++++----------- 3 files changed, 227 insertions(+), 196 deletions(-) diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml index 09b601d..b561d27 100644 --- a/.github/workflows/clang-format-check.yml +++ b/.github/workflows/clang-format-check.yml @@ -7,9 +7,10 @@ jobs: runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, 'skip-ci')" steps: - - uses: actions/checkout@v4.1.1 + - 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' 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 diff --git a/src/h5_async_vol.c b/src/h5_async_vol.c index 2178ff8..5d8a020 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; @@ -5271,8 +5284,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 +5332,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 +5639,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 +5687,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 +5983,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 +6027,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 +6274,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 +6318,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 +6590,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 +6633,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 +6877,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 +6923,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 +7182,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 +7225,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 +7466,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 +7509,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 +7758,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 +7807,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 +8112,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 +8161,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 +8435,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 +8479,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 +8937,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 +8981,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 +9292,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 +9347,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 +9948,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 +10002,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 +10331,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 +10374,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 +10625,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 +10668,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 +10915,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 +10958,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 +11200,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 +11243,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 +11499,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 +11545,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 +11831,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 +11879,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 +12150,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 +12193,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 +12439,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 +12482,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 +12725,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 +12768,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 +13011,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 +13054,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 +13283,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 +13368,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 +13607,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 +13695,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 +13937,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 +13980,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 +14225,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 +14268,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 +14522,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 +14565,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 +14816,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 +14871,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 +15146,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 +15195,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 +15483,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 +15531,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 +15802,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 +15845,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 +16095,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 +16138,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 +16380,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 +16423,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 +16665,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 +16710,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 +16972,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 +17019,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 +17299,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 +17343,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 +17620,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 +17664,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 +17941,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 +17985,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 +18238,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 +18285,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 +18539,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 +18583,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 +18837,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 +18885,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 +19155,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 +19201,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 +19477,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 +19524,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 +19778,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 +19824,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 +20084,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 +20128,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;