[petsc-users] Configure/make with "--download-hdf5" or "--with-hdf5-dir=" crashes
Åsmund Ervik
asmund.ervik at ntnu.no
Tue Sep 2 05:13:29 CDT 2014
On 02. sep. 2014 10:09, Åsmund Ervik wrote:
>
>
> On 01. sep. 2014 16:15, Matthew Knepley wrote:
>> On Mon, Sep 1, 2014 at 9:02 AM, Åsmund Ervik <asmund.ervik at ntnu.no> wrote:
>>
>>> On 01. sep. 2014 14:02, Matthew Knepley wrote:
>>>> On Mon, Sep 1, 2014 at 6:57 AM, Åsmund Ervik <asmund.ervik at ntnu.no>
>>> wrote:
>>>>
>>>>>
>>>>> No, I am not able to, that is why I switched to "--with-hdf5-dir=". Like
>>>>> I said in the first email, the version of HDF5 (1.8.10) that ships with
>>>>> PETSc 3.5.1 does not compile on my machine. This is apparently a known
>>>>> bug that was fixed upstream, cf.
>>>>>
>>>>> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=711777
>>>>>
>>>>> This is the reason why I asked whether I can somehow tell
>>>>> "--download-hdf5" to download a more recent version. 1.8.11 should do
>>> it.
>>>>
>>>>
>>>> People who leave commented out code in there should be tarred, feathered,
>>>> and run out of town on a rail. You can just go in and delete that line,
>>> and
>>>> then
>>>> reconfigure. It will use the source that is already downloaded.
>>>
>>> Okay, I also had to do the same for two lines in
>>> h5dump/h5dump_ddl.c:1344 and then I was able to configure with
>>> "--download-hdf5". I am now able to run vec/ex10.c using HDF5 with success!
>>>
>>> Thanks a lot :) (and double on the tar and feathers for people who use
>>> C++ comments in C code).
>>>
>>> After some tinkering I am now able to produce 3D plots of scalar fields
>>> from my code, and this looks good in Visit and in Tec360 Ex. However, it
>>> only works for scalars where only a single DOF is associated to a DMDA.
>>> Vector valued fields don't work either. But I am able to save two
>>> separate scalar fields to the same HDF5 file, as long as both are the
>>> single DOF associated to a DMDA.
>>>
>>
>> It seems like these programs expect a different organization than we use for
>> multiple DOF. Do you know what they want?
>
> The Tec360 Manual says the following:
> "The HDF5 loader add-on allows you to import general HDF5 files into
> Tecplot 360. The loader provides a mechanism for importing generic data
> from multiple HDF5 datasets or groups. The HDF5 loader will load
> datasets within user selected groups, load one or more user selected
> datasets to one zone, load multiple user selected datasets to multiple
> zones, execute macros after data has been loaded, create implicit X, Y,
> and Z grid vectors as needed, sub-sample loaded data, and reference user
> selected vectors for X, Y, and Z grids. Datasets must be ordered data.
> The HDF5 library used is version 1.8.5."
>
> This did not leave me any wiser, but perhaps it means something to you.
> FYI, the error I get when trying to import vectors or multiple scalars
> is "rank N data not supported" where N >= 4.
>
>>
>>
>>> Also, if I call PetscViewerHDF5IncrementTimestep() the resulting HDF5
>>> files can no longer be visualized even for the scalars, both Tec360 and
>>> Visit give error messages.
>>>
>>
>> HDF5 is a generic format, and programs like Visit and Tec360 assume some
>> organization inside. For time we just add an array dimension, but they
>> might do
>> something else. I recommend looking at bin/pythonscripts/petsc_ge_xdmf.py,
>> which creates .xdmf to describe our HDF5 organization.
>
> Xdmf seems handy, and I would like to use this feature, but I'm not
> really sure how to. I tried running "petsc_ge_xdmf.py Myfile.h5" but I
> get the error below. Am I using the script wrong? Or perhaps it is
> assuming that the data is from a DMplex? I'm using DMDA.
>
> Traceback (most recent call last):
> File "./petsc_gen_xdmf.py", line 220, in <module>
> generateXdmf(sys.argv[1])
> File "./petsc_gen_xdmf.py", line 194, in generateXdmf
> geom = h5['geometry']
> File "/usr/lib/python2.7/site-packages/h5py/_hl/group.py", line 153,
> in __getitem__
> oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
> File "h5o.pyx", line 183, in h5py.h5o.open (h5py/h5o.c:3844)
> KeyError: "Unable to open object (Object 'geometry' doesn't exist)"
Update: by using VecStrideGather to split the global vec from a
multicomponent DMDA into dof number of global vec's, and then using
VecView on these, I am able to visualize everything I need. But this
feels like a hacky solution, and I see that VecStrideGather is not
optimized for speed, so if you have a good alternative (e.g. using Xdmf
correctly) I'm all ears.
Åsmund
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140902/00af8eba/attachment.pgp>
More information about the petsc-users
mailing list