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

Added support for writing varying local data size in each process #88

Merged
merged 5 commits into from
Jul 20, 2023

Conversation

kaushikvelusamy
Copy link
Contributor

@kaushikvelusamy kaushikvelusamy commented Apr 14, 2023

Enhancement

Currently, in h5bench_write, each process writes the same amount of local data.
This program h5bench_write_var_normal_dist.c demonstrates a prototype for each process writing a varying
size local data buffer which follows a normal distribution based on the given mean number of particles provided from DIM1 and standard deviation STDEV_DIM1 in the config file.

Sample output:


$mpirun -np 16 /home/kvelusamy/h5bench-PR/gitrepos/K-h5bench/h5bench/build/h5bench_write_var_normal_dist /home/kvelusamy/h5bench-PR/gitrepos/K-h5bench/h5bench/h5bench_patterns/sample_config/sample_write_cc1d_var_normal_dist.cfg test.h5 

IO_OPERATION=WRITE
MEM_PATTERN=CONTIG
FILE_PATTERN=CONTIG
TIMESTEPS=5
DELAYED_CLOSE_TIMESTEPS=2
COLLECTIVE_DATA=YES
COLLECTIVE_METADATA=YES
EMULATED_COMPUTE_TIME_PER_TIMESTEP=1 s
NUM_DIMS=1
DIM_1=524288 # Mean number of particles for h5bench_write_var_normal_dist
STDEV_DIM_1=100000 # standard deviation for h5bench_write_var_normal_dist
DIM_2=1
DIM_3=1
CSV_FILE=output.csv


Configuration file: /home/kvelusamy/h5bench-PR/gitrepos/K-h5bench/h5bench/h5bench_patterns/sample_config/sample_write_cc1d_var_normal_dist.cfg
Output data file: test.h5

================ Benchmark Configuration ==================
File: /home/kvelusamy/h5bench-PR/gitrepos/K-h5bench/h5bench/h5bench_patterns/sample_config/sample_write_cc1d_var_normal_dist.cfg
Number of particles per rank: 524288
Number of time steps: 5
Emulated compute time per timestep: 1
Mode: SYNC
Collective metadata operations: YES
Collective buffering for data operations: YES
Number of dimensions: 1
    Dim_1: 524288
Standard deviation for varying particle size in normal distribution = 100000
===========================================================

Start benchmark: h5bench_write
Given mean particles : 524288
Given standard deviation : 100000
Total ranks 16 


Number of particles in rank 12 = 334323
Number of particles in rank 0 = 381260
 
Number of particles in rank 15 = 439010
Number of particles in rank 10 = 437476
Number of particles in rank 13 = 450079
Number of particles in rank 7 = 457785
Number of particles in rank 14 = 490708
Number of particles in rank 11 = 492040
 
Number of particles in rank 1 = 567112
Number of particles in rank 5 = 583361
 
Number of particles in rank 9 = 608116
Number of particles in rank 8 = 626028
Number of particles in rank 6 = 657237
Number of particles in rank 2 = 661096
 
Number of particles in rank 4 = 729723
Number of particles in rank 3 = 859789


Total number of particles: 8M
Collective Metadata operations: ON
Opened HDF5 file... 
Writing Timestep_0 ... 
    data_write_contig_contig_MD_array: Finished writing time step 
Computing...
Writing Timestep_1 ... 
    data_write_contig_contig_MD_array: Finished writing time step 
Computing...
Writing Timestep_2 ... 
    data_write_contig_contig_MD_array: Finished writing time step 
Computing...
Writing Timestep_3 ... 
    data_write_contig_contig_MD_array: Finished writing time step 
Computing...
Writing Timestep_4 ... 
    data_write_contig_contig_MD_array: Finished writing time step 

=================== Performance Results ==================
Total number of ranks: 16
Total number of particles: 8M
Final mean particles: 548446 
Final standard deviation: 134156.966081
Total emulated compute time: 4.000 s
Total write size: 930.811 MB
Raw write time: 19.117 s
Metadata time: 0.001 s
H5Fcreate() time: 1.639 s
H5Fflush() time: 4.299 s
H5Fclose() time: 0.786 s
Observed completion time: 29.997 s
SYNC Raw write rate: 48.688 MB/s 
SYNC Observed write rate: 35.804 MB/s
===========================================================

@jeanbez
Copy link
Member

jeanbez commented May 10, 2023

@kaushikvelusamy, thanks for the contribution! Before proceeding with the merge, we need a couple of additional updates:

Other than that, my tests locally seem to be working. Once we have a .json file, the CI will test for all setups we have defined, including in Cori/Perlmutter.

@jeanbez jeanbez self-assigned this May 10, 2023
@jeanbez jeanbez added the enhancement New feature or request label May 10, 2023
Copy link
Member

@jeanbez jeanbez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to address some points in the previous comment.

@jeanbez jeanbez added this to the v.1.5 milestone May 26, 2023
@kaushikvelusamy
Copy link
Contributor Author

updated the docs, output.csv file info, sample json file and a test file. For now, lets skip DIM2 and DIM3 support.

@jeanbez jeanbez requested a review from sbyna July 20, 2023 17:59
@jeanbez
Copy link
Member

jeanbez commented Jul 20, 2023

@sbyna, in case you want to take a second look before merging. CI is passing, and tests on Perlmutter are successful as well.

@jeanbez jeanbez added the new benchmark New benchmark or kernel label Jul 20, 2023
@jeanbez jeanbez merged commit 764d154 into hpc-io:master Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new benchmark New benchmark or kernel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants