Skip to Content.
Sympa Menu

h5part - Re: [EXTERNAL] Re: [H5part] H5PartSetCanonicalView

h5part AT lists.psi.ch

Subject: H5Part development and discussion

List archive

Re: [EXTERNAL] Re: [H5part] H5PartSetCanonicalView


Chronological Thread 
  • From: Achim Gsell <achim.gsell AT psi.ch>
  • To: Matthew Bettencourt <mbetten AT sandia.gov>
  • Cc: h5part AT lists.psi.ch
  • Subject: Re: [EXTERNAL] Re: [H5part] H5PartSetCanonicalView
  • Date: Mon, 5 Nov 2012 15:30:27 +0100
  • List-archive: <https://lists.web.psi.ch/pipermail/h5part/>
  • List-id: H5Part development and discussion <h5part.lists.psi.ch>

On Oct 31, 2012, at 7:28 PM, Matthew Bettencourt wrote:

> In the doc you say both start and end need to be -1,
>
> "unset" by calling \c H5PartSetView(file,-1,-1);

Yes, there are more ways to reset the view:

H5PartSetView (file, -1, -1);
H5PartSetView (file, 0, -1);
H5PartResetView (file);


> What I want is to be able to have one set of code which works in parallel
> for both if we have more particles than processors and if we have less
> particles than processor. Right now I tried both the
> H5PartSetCanonicalView and setting by hand, it is impractical to set all
> the indices that I want to read and read them in for a very large run.

My suggestion is to use

H5PartSetViewIndices (file, NULL, 0);

only in the special case where you want to select zero particles:

if (start <= end)
H5PartSetView (file, start, end);
else
H5PartSetViewIndices (file, NULL, 0);

> Ideally one should have to have both start and end to -1, (which would most
> likely fix the other bug)

Yes, but it may break some existing codes. So we shouldn't change this in
Version 1.

Achim




Archive powered by MHonArc 2.6.19.

Top of Page