Skip to content

Commit

Permalink
Added support for writing varying local data size in each process
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushikvelusamy committed Apr 17, 2023
1 parent a6d4716 commit a98919f
Show file tree
Hide file tree
Showing 5 changed files with 1,303 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ if(WITH_ASYNC_VOL)
target_link_libraries(h5bench_util asynchdf5 h5async)
endif()

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

set(h5bench_write_var_normal_dist_src h5bench_patterns/h5bench_write_var_normal_dist.c)

add_executable(h5bench_write_var_normal_dist ${h5bench_write_var_normal_dist_src})
target_link_libraries(h5bench_write_var_normal_dist h5bench_util hdf5 z m ${CMAKE_DL_LIBS} MPI::MPI_C)

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

Expand Down Expand Up @@ -285,6 +293,7 @@ install(
TARGETS
h5bench_write
h5bench_write_unlimited
h5bench_write_var_normal_dist
h5bench_overwrite
h5bench_append
h5bench_read
Expand Down
13 changes: 13 additions & 0 deletions commons/h5bench_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,15 @@ _set_params(char *key, char *val_in, bench_params *params_in_out, int do_write)
return -1;
}
}
else if (strcmp(key, "STDEV_DIM_1") == 0) {
unsigned long long stdev_dim_1 = atoi(val);
if (stdev_dim_1 >= 0)
(*params_in_out).stdev_dim_1 = stdev_dim_1;
else {
printf("STDEV_DIM_1 must be >=0\n");
return -1;
}
}
else {
printf("Unknown Parameter: %s\n", key);
return -1;
Expand Down Expand Up @@ -986,6 +995,7 @@ bench_params_init(bench_params *params_out)
(*params_out).chunk_dim_3 = 1;
(*params_out).csv_path = NULL;
(*params_out).env_meta_path = NULL;
(*params_out).stdev_dim_1 = 1;

(*params_out).csv_path = NULL;
(*params_out).csv_fs = NULL;
Expand Down Expand Up @@ -1157,6 +1167,9 @@ print_params(const bench_params *p)
printf(" align threshold = %ld\n", p->align_threshold);
printf(" align length = %ld\n", p->align_len);
}
if (p->stdev_dim_1) {
printf("Standard deviation for varying particle size in normal distribution = %ld\n", p->stdev_dim_1);
}
printf("===========================================================\n");
printf("\n");
}
Expand Down
1 change: 1 addition & 0 deletions commons/h5bench_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ typedef struct bench_params {
int align;
unsigned long align_threshold;
unsigned long align_len;
unsigned long stdev_dim_1;
} bench_params;

typedef struct data_md {
Expand Down
Loading

0 comments on commit a98919f

Please sign in to comment.