Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: general purpose data distribution testing to support non-uniform data #129

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- 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'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clang-format-fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- 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'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/h5bench-hdf5-1.10.4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ jobs:

- name: Upload artifact
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: test
path: build/storage/**/std*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/h5bench-hdf5-1.10.7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ jobs:

- name: Upload artifact
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: test
path: build/h5bench_e3sm-prefix/src/h5bench_e3sm-stamp/*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/h5bench-hdf5-1.10.8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ jobs:

- name: Upload artifact
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: test
path: build/storage/**/std*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/h5bench-hdf5-1.12.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ jobs:

- name: Upload artifact
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: test
path: build/storage/**/std*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/h5bench-hdf5-1.14.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ jobs:

- name: Upload artifact
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: test
path: build*/storage/**/std*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/h5bench-hdf5-1.14.1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ jobs:

- name: Upload artifact
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: test
path: build*/storage/**/std*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/h5bench-hdf5-develop-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ jobs:

- name: Upload artifact
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: test
path: build*/storage/**/std*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/h5bench-hdf5-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ jobs:

- name: Upload artifact
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: test
path: build*/storage/**/std*
Expand Down
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ message(STATUS "Using HDF5 version: ${HDF5_VERSION}")

include_directories(${HDF5_HOME}/include)
link_directories(${HDF5_HOME}/lib)
link_directories(/usr/lib/x86_64-linux-gnu/hdf5/openmpi)

# Check if HDF5 has subfiling VFD
set(HAVE_subfiling 0)
Expand Down Expand Up @@ -128,6 +129,14 @@ set(h5bench_write_normal_dist_src h5bench_patterns/h5bench_write_normal_dist.c)
add_executable(h5bench_write_var_normal_dist ${h5bench_write_normal_dist_src})
target_link_libraries(h5bench_write_var_normal_dist h5bench_util hdf5 z m ${CMAKE_DL_LIBS} MPI::MPI_C)

# h5bench WRITE varying particle based on data distribution ######################
#

set(h5bench_write_data_dist_src h5bench_patterns/h5bench_write_data_dist.c)

add_executable(h5bench_write_var_data_dist ${h5bench_write_data_dist_src})
target_link_libraries(h5bench_write_var_data_dist h5bench_util hdf5 z m ${CMAKE_DL_LIBS} MPI::MPI_C)

# h5bench WRITE ###############################################################
#

Expand Down Expand Up @@ -356,6 +365,7 @@ install(
h5bench_write
h5bench_write_unlimited
h5bench_write_var_normal_dist
h5bench_write_var_data_dist
h5bench_overwrite
h5bench_append
h5bench_read
Expand Down
16 changes: 16 additions & 0 deletions commons/h5bench_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,19 @@ _set_params(char *key, char *val_in, bench_params *params_in_out, int do_write)
(*params_in_out).useCSV = 1;
(*params_in_out).csv_path = strdup(val);
}
else if (strcmp(key, "DATA_DIST_PATH") == 0) {
(*params_in_out).useDataDist = 1;
(*params_in_out).data_dist_path = strdup(val);
}
else if (strcmp(key, "DATA_DIST_SCALE") == 0) {
float num = 0.0;
char *tok;
tok = strtok(val, "/");
num = strtof(tok, NULL);
if (tok = strtok(NULL, "/"))
num = num / strtof(tok, NULL); // two terms with / delim is fraction
(*params_in_out).data_dist_scale = num;
}
else if (strcmp(key, "ENV_METADATA_FILE") == 0) {
(*params_in_out).env_meta_path = strdup(val);
}
Expand Down Expand Up @@ -1066,6 +1079,7 @@ bench_params_init(bench_params *params_out)
(*params_out).data_coll = 0;
(*params_out).asyncMode = MODE_SYNC;
(*params_out).subfiling = 0;
(*params_out).useDataDist = 0;

(*params_out).cnt_time_step = 0;
(*params_out).cnt_time_step_delay = 0;
Expand Down Expand Up @@ -1094,6 +1108,8 @@ bench_params_init(bench_params *params_out)

(*params_out).csv_path = NULL;
(*params_out).csv_fs = NULL;
(*params_out).data_dist_path = NULL;
(*params_out).data_dist_scale = 1.0;
(*params_out).env_meta_path = NULL;
(*params_out).file_per_proc = 0;
(*params_out).align = 0;
Expand Down
3 changes: 3 additions & 0 deletions commons/h5bench_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ typedef struct bench_params {
read_option read_option;
int useCompress;
int useCSV;
int useDataDist;
async_mode asyncMode;
int subfiling;
union access_pattern {
Expand Down Expand Up @@ -143,6 +144,8 @@ typedef struct bench_params {
char * csv_path;
char * env_meta_path;
FILE * csv_fs;
char * data_dist_path;
float data_dist_scale;
int file_per_proc;
int align;
unsigned long align_threshold;
Expand Down
Loading