Skip to Content.
Sympa Menu

h5part - [H5part] Fwd: H5PartSetCanonicalView

h5part AT lists.psi.ch

Subject: H5Part development and discussion

List archive

[H5part] Fwd: H5PartSetCanonicalView


Chronological Thread 
  • From: "Matthew Bettencourt" <mbetten AT sandia.gov>
  • To: h5part AT lists.psi.ch
  • Subject: [H5part] Fwd: H5PartSetCanonicalView
  • Date: Thu, 25 Oct 2012 16:32:24 -0600
  • List-archive: <https://lists.web.psi.ch/pipermail/h5part/>
  • List-id: H5Part development and discussion <h5part.lists.psi.ch>

Also, H5PartSetView doesn't work if one has less than 1 part/proc, example...

my_pid is rank, and num_procs is 3.  s = {0,0,0}, e={-1,-1,2} and nproc2 should be {0,0,2} but it is {2,2,2}


  h5part_int64_t npart = H5PartGetNumParticles(file_);  //<<<<<<<<this returns 2

  h5part_int64_t npart_per_proc = npart/num_procs;
  h5part_int64_t npart_remainder = npart%num_procs;


  h5part_int64_t s = npart_per_proc*my_pid;
  h5part_int64_t e= npart_per_proc*(my_pid+1)-1;
  if ( my_pid == num_procs-1 )
    e += npart_remainder;


  npart = e-s+1;
  if (H5PartSetView(file_, s, e) != 0 )
    error_out("Cannot set file view for h5part file\n");

  h5part_int64_t npart2 =  H5PartGetNumParticles(file_);  //<<<<<<<<<<<<<  This returns 2

  assert (npart == npart2);


-------- Original Message -------- Subject: H5PartSetCanonicalView Date: Thu, 25 Oct 2012 16:22:00 -0600 From: Matthew Bettencourt <mbetten AT sandia.gov> To: h5part AT lists.psi.ch

It appears that H5PartSetCanonicalView does not work correctly if you 
have fewer particles that you have processors.  I have 3 procs and 2 
particles.

  if (H5PartSetCanonicalView(file_) != 0 )
    error_out("Cannot set file view for h5part file\n");
  h5part_int64_t npart = H5PartGetNumParticles(file_);

returns an npart equal to 2 and doesnt trip the error.
M






Archive powered by MHonArc 2.6.19.

Top of Page