Skip to Content.
Sympa Menu

h5part - Re: [H5part] H5PartGetNumParticles

h5part AT

Subject: H5Part development and discussion

List archive

Re: [H5part] H5PartGetNumParticles

Chronological Thread 
  • From: Achim Gsell <achim AT>
  • To: h5part AT
  • Subject: Re: [H5part] H5PartGetNumParticles
  • Date: Sat, 2 Dec 2006 00:19:12 +0100
  • List-archive: <>
  • List-id: H5Part development and discussion <>

On Friday 01 December 2006 23:23, Kurt Stockinger wrote:
> Hi,
> I just noticed that H5PartGetNumParticles() seems to return
> the wrong number of particles. It's always off by one, i.e.
> n-1 rather than n. I've tested the program H5PartTest with 4
> processes and 5 particles each.

The bug seems to be in the function H5PartSetView(), not in
H5PartGetNumParticles()! The view has

end - start

particles. If we have 5 particles:

start = 0
end = 4
end - start = 4

The "memshape" is created with

dims = end - start

i.e. 4 particles.

I found this odd behavior last summer, but forgot to ask John
whether this is intentional (which I cannot imagine) or I miss
something and to fix it if not. May be it is time to start
using a bugtracker (we can use Bugzilla



Archive powered by MHonArc 2.6.19.

Top of Page