Skip to content

Commit

Permalink
Merge pull request #67 from hpc-io/update-sample-mode
Browse files Browse the repository at this point in the history
This closes #65
  • Loading branch information
jeanbez authored Oct 4, 2022
2 parents e162afb + 9d2c2ab commit ec75a46
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 19 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/h5bench-hdf5-develop-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -21,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
Expand Down Expand Up @@ -167,4 +168,4 @@ jobs:
with:
name: test
path: build*/storage/**/std*
retention-days: 1
retention-days: 1
9 changes: 7 additions & 2 deletions .github/workflows/h5bench-hdf5-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -21,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
Expand Down Expand Up @@ -152,6 +153,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: |
Expand Down Expand Up @@ -641,4 +646,4 @@ jobs:
with:
name: test
path: build*/storage/**/std*
retention-days: 1
retention-days: 1
10 changes: 5 additions & 5 deletions commons/h5bench_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ 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);
size_t num_in_progress;
hbool_t op_failed;

H5ESwait(es_id, 0, &num_in_progress, &op_failed);
#endif
h5bench_sleep(sleep_time);
}
Expand Down
2 changes: 1 addition & 1 deletion commons/h5bench_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
6 changes: 3 additions & 3 deletions configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"DIM_1": "16777216",
"DIM_2": "1",
"DIM_3": "1",
"ASYNC_MODE": "NON",
"MODE": "SYNC",
"CSV_FILE": "output.csv"
}
},
Expand Down Expand Up @@ -115,7 +115,7 @@
"DIM_1": "16777216",
"DIM_2": "1",
"DIM_3": "1",
"ASYNC_MODE": "NON",
"MODE": "SYNC",
"CSV_FILE": "output.csv"
}
},
Expand All @@ -135,7 +135,7 @@
"DIM_1": "16777216",
"DIM_2": "1",
"DIM_3": "1",
"ASYNC_MODE": "NON",
"MODE": "SYNC",
"CSV_FILE": "output.csv"
}
},
Expand Down
4 changes: 3 additions & 1 deletion docs/source/amrex.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion h5bench_patterns/h5bench_append.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
2 changes: 1 addition & 1 deletion h5bench_patterns/h5bench_overwrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
2 changes: 1 addition & 1 deletion h5bench_patterns/h5bench_read.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
2 changes: 1 addition & 1 deletion h5bench_patterns/h5bench_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
2 changes: 1 addition & 1 deletion h5bench_patterns/h5bench_write_unlimited.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit ec75a46

Please sign in to comment.