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

Move output.csv file open to the the main function and limit to rank 0 #132

Open
wants to merge 1 commit 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
3 changes: 0 additions & 3 deletions commons/h5bench_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1049,9 +1049,6 @@ _set_params(char *key, char *val_in, bench_params *params_in_out, int do_write)
(*params_in_out).asyncMode = MODE_SYNC;
}

if ((*params_in_out).useCSV)
(*params_in_out).csv_fs = csv_init(params_in_out->csv_path, params_in_out->env_meta_path);

if (val)
free(val);
return 1;
Expand Down
4 changes: 4 additions & 0 deletions h5bench_patterns/h5bench_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,10 @@ main(int argc, char *argv[])
return 0;
}

if (MY_RANK == 0)
if (params.useCSV)
params.csv_fs = csv_init(params.csv_path, params.env_meta_path);

if (params.io_op != IO_WRITE) {
if (MY_RANK == 0)
printf("Make sure the configuration file has IO_OPERATION=WRITE defined\n");
Expand Down
4 changes: 4 additions & 0 deletions h5bench_patterns/h5bench_write_normal_dist.c
Original file line number Diff line number Diff line change
Expand Up @@ -1050,6 +1050,10 @@ main(int argc, char *argv[])
return 0;
}

if (MY_RANK == 0)
if (params.useCSV)
params.csv_fs = csv_init(params.csv_path, params.env_meta_path);

if (params.io_op != IO_WRITE) {
if (MY_RANK == 0)
printf("Make sure the configuration file has IO_OPERATION=WRITE defined\n");
Expand Down
Loading