From 88f25d04d9c7b41b3beb439db0529278d04b9b39 Mon Sep 17 00:00:00 2001 From: Jean Luca Bez Date: Sat, 24 Sep 2022 22:09:57 -0700 Subject: [PATCH 01/10] This closes #65 --- configuration.json | 6 +++--- docs/source/amrex.rst | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/configuration.json b/configuration.json index 1b2f44aa..f1358952 100644 --- a/configuration.json +++ b/configuration.json @@ -45,7 +45,7 @@ "DIM_1": "16777216", "DIM_2": "1", "DIM_3": "1", - "ASYNC_MODE": "NON", + "MODE": "SYNC", "CSV_FILE": "output.csv" } }, @@ -115,7 +115,7 @@ "DIM_1": "16777216", "DIM_2": "1", "DIM_3": "1", - "ASYNC_MODE": "NON", + "MODE": "SYNC", "CSV_FILE": "output.csv" } }, @@ -135,7 +135,7 @@ "DIM_1": "16777216", "DIM_2": "1", "DIM_3": "1", - "ASYNC_MODE": "NON", + "MODE": "SYNC", "CSV_FILE": "output.csv" } }, diff --git a/docs/source/amrex.rst b/docs/source/amrex.rst index bf577360..6fff189a 100644 --- a/docs/source/amrex.rst +++ b/docs/source/amrex.rst @@ -47,7 +47,8 @@ To run an instance of AMReX HDF5 benchmark you need to include the following in "nparticlefile": "2", "sleeptime": "2", "restart_check": "1", - "hdf5compression": "ZFP_ACCURACY#0.001" + "hdf5compression": "ZFP_ACCURACY#0.001", + "mode": "SYNC" } } @@ -69,6 +70,7 @@ To read grids from file you need to set: ``grids_from_file``, ``nlevels``, and ` "sleeptime": "2", "restart_check": "1", "hdf5compression": "ZFP_ACCURACY#0.001", + "mode": "SYNC", "nlevs": "3", "grids_from_file": "1", "ref_ratio_file": "4 2" From c1b553fb7be78e83b04748a1def68014c23d7869 Mon Sep 17 00:00:00 2001 From: Jean Luca Bez Date: Mon, 26 Sep 2022 22:56:38 -0700 Subject: [PATCH 02/10] Update h5bench-hdf5-develop.yml --- .github/workflows/h5bench-hdf5-develop.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/h5bench-hdf5-develop.yml b/.github/workflows/h5bench-hdf5-develop.yml index e587782d..c5266c7d 100644 --- a/.github/workflows/h5bench-hdf5-develop.yml +++ b/.github/workflows/h5bench-hdf5-develop.yml @@ -17,6 +17,9 @@ jobs: - uses: actions/checkout@v2 with: submodules: true + + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 - name: Dependencies run: | @@ -641,4 +644,4 @@ jobs: with: name: test path: build*/storage/**/std* - retention-days: 1 \ No newline at end of file + retention-days: 1 From 5c7874eae963d4213fc01a58bb6dab052ffa7aa9 Mon Sep 17 00:00:00 2001 From: Jean Luca Bez Date: Tue, 27 Sep 2022 11:01:19 -0700 Subject: [PATCH 03/10] Update h5bench-hdf5-develop.yml --- .github/workflows/h5bench-hdf5-develop.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/h5bench-hdf5-develop.yml b/.github/workflows/h5bench-hdf5-develop.yml index c5266c7d..b7895882 100644 --- a/.github/workflows/h5bench-hdf5-develop.yml +++ b/.github/workflows/h5bench-hdf5-develop.yml @@ -17,9 +17,6 @@ jobs: - uses: actions/checkout@v2 with: submodules: true - - - name: Setup tmate session - uses: mxschmitt/action-tmate@v3 - name: Dependencies run: | @@ -155,6 +152,10 @@ jobs: cd build-sync ./h5bench --debug --abort-on-failure --validate-mode ../samples/sync-write-read-contig-1d-small.json + + - name: Setup tmate session + if: ${{ failure() }} + uses: mxschmitt/action-tmate@v3 - name: Test h5bench SYNC write 1D contiguous (memory) strided (file) run: | From dcf0efb9e45edd0ef3e30b508039a8950137e13c Mon Sep 17 00:00:00 2001 From: Jean Luca Bez Date: Tue, 27 Sep 2022 15:25:21 -0700 Subject: [PATCH 04/10] Update h5bench-hdf5-develop.yml --- .github/workflows/h5bench-hdf5-develop.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/h5bench-hdf5-develop.yml b/.github/workflows/h5bench-hdf5-develop.yml index b7895882..70f04d17 100644 --- a/.github/workflows/h5bench-hdf5-develop.yml +++ b/.github/workflows/h5bench-hdf5-develop.yml @@ -12,6 +12,7 @@ jobs: env: OMPI_ALLOW_RUN_AS_ROOT: 1 OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1 + OMPI_MCA_rmaps_base_oversubscribe: "yes" steps: - uses: actions/checkout@v2 From 533299ce89b33552f21031087369352d2eedd8c9 Mon Sep 17 00:00:00 2001 From: Jean Luca Bez Date: Tue, 27 Sep 2022 15:25:50 -0700 Subject: [PATCH 05/10] Update h5bench-hdf5-develop-test.yml --- .github/workflows/h5bench-hdf5-develop-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/h5bench-hdf5-develop-test.yml b/.github/workflows/h5bench-hdf5-develop-test.yml index 49582f46..1df8dd18 100644 --- a/.github/workflows/h5bench-hdf5-develop-test.yml +++ b/.github/workflows/h5bench-hdf5-develop-test.yml @@ -12,6 +12,7 @@ jobs: env: OMPI_ALLOW_RUN_AS_ROOT: 1 OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1 + OMPI_MCA_rmaps_base_oversubscribe: "yes" steps: - uses: actions/checkout@v2 @@ -167,4 +168,4 @@ jobs: with: name: test path: build*/storage/**/std* - retention-days: 1 \ No newline at end of file + retention-days: 1 From 0921684e42eff66b6bd42d50c540c79b008bf286 Mon Sep 17 00:00:00 2001 From: Jean Luca Bez Date: Tue, 27 Sep 2022 23:08:56 -0700 Subject: [PATCH 06/10] Update h5bench-hdf5-develop-test.yml --- .github/workflows/h5bench-hdf5-develop-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/h5bench-hdf5-develop-test.yml b/.github/workflows/h5bench-hdf5-develop-test.yml index 1df8dd18..9b5b3c56 100644 --- a/.github/workflows/h5bench-hdf5-develop-test.yml +++ b/.github/workflows/h5bench-hdf5-develop-test.yml @@ -22,7 +22,7 @@ jobs: - name: Dependencies run: | sudo apt-get update - sudo apt-get install cmake gcc libtool zlib1g-dev python3 libopenmpi-dev -y + sudo apt-get install cmake gcc gdb libtool zlib1g-dev python3 libopenmpi-dev -y # HDF5 git clone https://github.com/HDFGroup/hdf5.git From d68c1eb058d785ab3b0d286054ccd3c8f5e7e4b9 Mon Sep 17 00:00:00 2001 From: Jean Luca Bez Date: Wed, 28 Sep 2022 09:08:34 -0700 Subject: [PATCH 07/10] Update h5bench-hdf5-develop.yml --- .github/workflows/h5bench-hdf5-develop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/h5bench-hdf5-develop.yml b/.github/workflows/h5bench-hdf5-develop.yml index 70f04d17..065fdf5a 100644 --- a/.github/workflows/h5bench-hdf5-develop.yml +++ b/.github/workflows/h5bench-hdf5-develop.yml @@ -22,7 +22,7 @@ jobs: - name: Dependencies run: | sudo apt-get update - sudo apt-get install cmake gcc libtool zlib1g-dev python3 libopenmpi-dev -y + sudo apt-get install cmake gcc gdb libtool zlib1g-dev python3 libopenmpi-dev -y # HDF5 git clone https://github.com/HDFGroup/hdf5.git From 3e7e5d56599f101fda6ece1b39cd71c5cb1a0fb7 Mon Sep 17 00:00:00 2001 From: Jean Luca Bez Date: Tue, 4 Oct 2022 11:06:24 -0700 Subject: [PATCH 08/10] fixes some issues with HDF5 flags --- commons/h5bench_util.c | 9 ++++----- commons/h5bench_util.h | 2 +- h5bench_patterns/h5bench_append.c | 2 +- h5bench_patterns/h5bench_overwrite.c | 2 +- h5bench_patterns/h5bench_read.c | 2 +- h5bench_patterns/h5bench_write.c | 2 +- h5bench_patterns/h5bench_write_unlimited.c | 2 +- 7 files changed, 10 insertions(+), 11 deletions(-) diff --git a/commons/h5bench_util.c b/commons/h5bench_util.c index 5889be23..922c0775 100644 --- a/commons/h5bench_util.c +++ b/commons/h5bench_util.c @@ -67,13 +67,12 @@ h5bench_sleep(duration sleep_time) } void -async_sleep(hid_t file_id, hid_t fapl, duration sleep_time) +async_sleep(hid_t es_id, duration sleep_time) { #ifdef USE_ASYNC_VOL - unsigned cap = 0; - H5Pget_vol_cap_flags(fapl, &cap); - if (H5VL_CAP_FLAG_ASYNC & cap) - H5Fstart(file_id, fapl); + int num_in_progress, op_failed; + + H5ESwait(es_id, 0, &num_in_progress, &op_failed); #endif h5bench_sleep(sleep_time); } diff --git a/commons/h5bench_util.h b/commons/h5bench_util.h index a0faa484..042f7722 100644 --- a/commons/h5bench_util.h +++ b/commons/h5bench_util.h @@ -168,7 +168,7 @@ typedef struct mem_monitor { unsigned long long read_time_val(duration time, time_unit unit); void h5bench_sleep(duration sleep_time); -void async_sleep(hid_t file_id, hid_t fapl, duration sleep_time); +void async_sleep(hid_t es_id, duration sleep_time); void timestep_es_id_close(time_step *ts, async_mode mode); diff --git a/h5bench_patterns/h5bench_append.c b/h5bench_patterns/h5bench_append.c index e6638b03..8c11376d 100644 --- a/h5bench_patterns/h5bench_append.c +++ b/h5bench_patterns/h5bench_append.c @@ -465,7 +465,7 @@ _run_benchmark_modify(hid_t file_id, hid_t fapl, hid_t gapl, hid_t filespace, be if (params.compute_time.time_num >= 0) { if (MY_RANK == 0) printf("Computing... \n"); - async_sleep(file_id, fapl, params.compute_time); + async_sleep(ts->es_meta_close, params.compute_time); } } diff --git a/h5bench_patterns/h5bench_overwrite.c b/h5bench_patterns/h5bench_overwrite.c index b034bcc3..d67275c0 100644 --- a/h5bench_patterns/h5bench_overwrite.c +++ b/h5bench_patterns/h5bench_overwrite.c @@ -441,7 +441,7 @@ _run_benchmark_modify(hid_t file_id, hid_t fapl, hid_t gapl, hid_t filespace, be if (params.compute_time.time_num >= 0) { if (MY_RANK == 0) printf("Computing... \n"); - async_sleep(file_id, fapl, params.compute_time); + async_sleep(ts->es_meta_close, params.compute_time); } } diff --git a/h5bench_patterns/h5bench_read.c b/h5bench_patterns/h5bench_read.c index a45f25eb..0bfd9837 100644 --- a/h5bench_patterns/h5bench_read.c +++ b/h5bench_patterns/h5bench_read.c @@ -346,7 +346,7 @@ _run_benchmark_read(hid_t file_id, hid_t fapl, hid_t gapl, hid_t filespace, benc if (params.compute_time.time_num >= 0) { if (MY_RANK == 0) printf("Computing... \n"); - async_sleep(file_id, fapl, params.compute_time); + async_sleep(ts->es_meta_close, params.compute_time); } } diff --git a/h5bench_patterns/h5bench_write.c b/h5bench_patterns/h5bench_write.c index 5789dea7..04b0e5a1 100644 --- a/h5bench_patterns/h5bench_write.c +++ b/h5bench_patterns/h5bench_write.c @@ -838,7 +838,7 @@ _run_benchmark_write(bench_params params, hid_t file_id, hid_t fapl, hid_t files if (params.compute_time.time_num >= 0) { if (MY_RANK == 0) printf("Computing...\n"); - async_sleep(file_id, fapl, params.compute_time); + async_sleep(ts->es_meta_close, params.compute_time); } } diff --git a/h5bench_patterns/h5bench_write_unlimited.c b/h5bench_patterns/h5bench_write_unlimited.c index 716ed885..3026774c 100644 --- a/h5bench_patterns/h5bench_write_unlimited.c +++ b/h5bench_patterns/h5bench_write_unlimited.c @@ -808,7 +808,7 @@ _run_benchmark_write(bench_params params, hid_t file_id, hid_t fapl, hid_t files if (params.compute_time.time_num >= 0) { if (MY_RANK == 0) printf("Computing... \n"); - async_sleep(file_id, fapl, params.compute_time); + async_sleep(ts->es_meta_close, params.compute_time); } } From 4c260057ec9276e01c751aa500500aeae3df45ca Mon Sep 17 00:00:00 2001 From: Jean Luca Bez Date: Tue, 4 Oct 2022 12:22:13 -0700 Subject: [PATCH 09/10] Update h5bench_util.c --- commons/h5bench_util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commons/h5bench_util.c b/commons/h5bench_util.c index 922c0775..588fac90 100644 --- a/commons/h5bench_util.c +++ b/commons/h5bench_util.c @@ -70,7 +70,8 @@ void async_sleep(hid_t es_id, duration sleep_time) { #ifdef USE_ASYNC_VOL - int num_in_progress, op_failed; + size_t num_in_progress; + hbool_t op_failed; H5ESwait(es_id, 0, &num_in_progress, &op_failed); #endif From 9d2c2aba7283511e49a6b81b0c9f9048312ac505 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 4 Oct 2022 19:22:39 +0000 Subject: [PATCH 10/10] Committing clang-format changes --- commons/h5bench_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commons/h5bench_util.c b/commons/h5bench_util.c index 588fac90..17957448 100644 --- a/commons/h5bench_util.c +++ b/commons/h5bench_util.c @@ -70,7 +70,7 @@ void async_sleep(hid_t es_id, duration sleep_time) { #ifdef USE_ASYNC_VOL - size_t num_in_progress; + size_t num_in_progress; hbool_t op_failed; H5ESwait(es_id, 0, &num_in_progress, &op_failed);