examples/H5Part/read_setnparticles{.c,f.f90}

- changes in comment lines
This commit is contained in:
2015-10-16 16:01:32 +02:00
parent 55cc6bb7d0
commit 6efdfce033
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -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
+2 -1
View File
@@ -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