From 6efdfce033444b09b6c46920e2851a8d297f30d8 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Fri, 16 Oct 2015 16:01:32 +0200 Subject: [PATCH] examples/H5Part/read_setnparticles{.c,f.f90} - changes in comment lines --- examples/H5Part/read_setnparticles.c | 3 ++- examples/H5Part/read_setnparticlesf.f90 | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/H5Part/read_setnparticles.c b/examples/H5Part/read_setnparticles.c index 533f821..773b4a3 100644 --- a/examples/H5Part/read_setnparticles.c +++ b/examples/H5Part/read_setnparticles.c @@ -34,7 +34,7 @@ main ( h5_file_t file = H5OpenFile (fname, H5_O_RDONLY, H5_PROP_DEFAULT); H5SetStep (file, 0); - // compute and set number of particles this process has to read + // compute number of particles this process has to read h5_ssize_t num_particles_total = H5PartGetNumParticles (file); h5_ssize_t num_particles = num_particles_total / comm_size; if (comm_rank+1 == comm_size) @@ -44,6 +44,7 @@ main ( printf ("[proc %d]: total number of particles: %lld\n", comm_rank, (long long unsigned)num_particles_total); + // set number of particles H5PartSetNumParticles (file, num_particles); // read and print data diff --git a/examples/H5Part/read_setnparticlesf.f90 b/examples/H5Part/read_setnparticlesf.f90 index 045550c..d4582ef 100644 --- a/examples/H5Part/read_setnparticlesf.f90 +++ b/examples/H5Part/read_setnparticlesf.f90 @@ -37,7 +37,7 @@ program read_setnparticles file = h5_openfile (fname, H5_O_RDONLY, H5_PROP_DEFAULT) h5_ierror = h5_setstep (file, 1_8) - ! compute and set number of particles this process has to read + ! compute number of particles this process has to read num_particles_total = h5pt_getnpoints (file) num_particles = num_particles_total / comm_size if (comm_rank+1 == comm_size) then @@ -47,6 +47,7 @@ program read_setnparticles write (*, "('Total number of particles: ', i8)") num_particles_total write (*, "('Number of particles on this core: ', i8)") num_particles + ! set number of particeles h5_ierror = h5pt_setnpoints (file, num_particles) ! read and print data