[Paraview-developers] Plugin using parallel HDF5

houssen houssen at ipgp.fr
Sat Oct 3 13:18:03 EDT 2015


So as explained, I tried to use the (serial) ParaView HDF5 in my writer 
by adding this to my CMakeLists.txt :
VTK_MODULE_LOAD ( vtkhdf5 )                                     # Use 
ParaView HDF5
INCLUDE_DIRECTORIES ( ${vtkhdf5_INCLUDE_DIRS} )                 # -I
LINK_DIRECTORIES ( ${vtkhdf5_LIBRARY_DIRS} )                    # -L
TARGET_LINK_LIBRARIES ( MyWriter PUBLIC ${vtkhdf5_LIBRARIES}  ) # -l
But I get : "fatal error, can not find hdf5.h" when compiling...

Can somebody help on this ?
Also, is there a way to ask Paraview to add zlib support before 
building his own (serial) HDF5 ? (looks like zlib is supported but how 
to force this ? how to be sure ?)

Franck

Le 2015-10-02 14:45, houssen a écrit :
> Thanks for the tip ! Afterwards, this looked almost obvious to me !
>
> I have tried to compile ParaView with a parallel HDF5 (+ zlib for
> compression) using VTK_USE_SYSTEM_HDF5 (I also had to add
> VTK_USE_SYSTEM_ZLIB).
> I ended up with this kind of link errors :
>   [ 22%] Building CXX object
> VTK/IO/AMR/CMakeFiles/vtkIOAMR.dir/vtkAMRFlashReaderInternal.cxx.o
>   Linking CXX shared library ../../../lib/libvtkIOAMR-pv4.4.so
>   CMakeFiles/vtkIOAMR.dir/vtkAMREnzoParticlesReader.cxx.o: in
> function « MPI::Intracomm::Intracomm() »:
>   /usr/lib/openmpi/include/openmpi/ompi/mpi/cxx/intracomm.h:25:
> undefined symbol « MPI::Comm::Comm() »
> I tried to add PARAVIEW_USE_MPI but unfortunately it does not help !
>
> Say I give up building ParaView on top of "my" parallel HDF5 : is
> there a way to use the (serial) HDF5 "of (serial) ParaView" from
> inside a writer ? If yes how ? (modify the writer CMakeLists.txt ?)
>
> Franck
>
> Note : I have a project where we need parallel HDF5. For this same
> project I would like to have a dedicated writer (the writer can 
> handle
> serial or parallel HDF5 - not so important). So I have to specify 2
> HDF5 (serial and parallel) for the same project : this looked messy 
> to
> me... That why I started to (try to) use parallel HDF5 from my
> ParaView writer (for convenience mostly).
>
> Le 2015-10-01 14:21, Biddiscombe, John A. a écrit :
>>>
>>>If so, does it means that a serial (resp. parallel) version of 
>>> ParaView
>>>can use ONLY a serial (resp. parallel) version of HDF5 from inside a
>>>writer ?
>>
>> Yes and no. If you compiled paraview without MPI, then it will have
>> compiled hdf5 (see thirparty dir in source tree) using serial HDF5, 
>> so you
>> are linking to hdf5 with no parallel support.
>>
>> If you compile paraview and set VTK_USE_SYSTEM_HDF5 to ON then you 
>> can
>> link to a parallel hdf5 that you supply and can do what you like, 
>> but
>> you’ll probably need to do mpi_init etc from inside your plugin as
>> paraview will not have done it for you.
>>
>> JB



More information about the Paraview-developers mailing list