Skip to Content.
Sympa Menu

h5part - Re: [H5part] H5PartGetNumParticles

h5part AT lists.psi.ch

Subject: H5Part development and discussion

List archive

Re: [H5part] H5PartGetNumParticles


Chronological Thread 
  • From: John Shalf <jshalf AT lbl.gov>
  • To: Kurt Stockinger <KStockinger AT lbl.gov>
  • Cc: h5part AT lists.psi.ch
  • Subject: Re: [H5part] H5PartGetNumParticles
  • Date: Fri, 1 Dec 2006 14:51:52 -0800
  • List-archive: <https://lists.web.psi.ch/pipermail/h5part/>
  • List-id: H5Part development and discussion <h5part.lists.psi.ch>

Hi Kurt,
I think SetView is inclusive of the starting particle address but exclusive of the ending address. I can't remember the rationale for that, but I think that is the case.

-john

On Dec 1, 2006, at 2:23 PM, 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.

Thanks,
Kurt

trunk/test> mpirun -np 4 ./H5PartTest
Proc[0] Writing timestep 0 file=67108864
..
Proc[3] Writing timestep 4 file=67108864
AllDone p[1]
..
After SetView(0,4): steps= 5 datasets= 7 particles= 4
After SetView(15,19): steps= 5 datasets= 7 particles= 4
nParticles: 4
nParticles: 4
After SetView(10,14): steps= 5 datasets= 7 particles= 4
nParticles: 4
After SetView(5,9): steps= 5 datasets= 7 particles= 4
nParticles: 4
proc[2]: done
proc[1]: done
proc[3]: done
proc[0]: done


trunk/test> h5dump parttest.h5
HDF5 "parttest.h5" {
GROUP "/" {
GROUP "Step#0" {
DATASET "id" {
DATATYPE H5T_STD_I64LE
DATASPACE SIMPLE { ( 20 ) / ( 20 ) }
DATA {
(0): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
(18): 18, 19
}
}
DATASET "px" {
DATATYPE H5T_IEEE_F64LE
DATASPACE SIMPLE { ( 20 ) / ( 20 ) }
DATA {
(0): 0, 1, 2, 3, 4, 10, 11, 12, 13, 14, 20, 21, 22, 23, 24, 30, 31,
(17): 32, 33, 34
}
}


--
Kurt Stockinger
Computational Research Division
Lawrence Berkeley National Laboratory
Mail Stop 50B-3238, 1 Cyclotron Road
Berkeley, California 94720, USA

Tel: +1 (510) 486 5208, Fax: +1 (510) 486 4004
email: KStockinger AT lbl.gov
http://sdm.lbl.gov/kurts/

_______________________________________________
H5Part mailing list
H5Part AT lists.psi.ch
https://lists.web.psi.ch/mailman/listinfo/h5part





Archive powered by MHonArc 2.6.19.

Top of Page