[vtkusers] How to enable the xdmf module and read xdmf files.
David E DeMarle
dave.demarle at kitware.com
Thu Jul 21 10:14:29 EDT 2016
Please keep the discussion on the mailing list for all to contribute to and
benefit from.
Yes libXDMF depends on libHDF5, for both I tend to use the version in VTK,
especially on windows where HDF5 wasn't available until recently.
It looks like you are doing that, but still the linker isn't finding the
things it needs from libHDF5 for some unknown reason.
I see in your cache that cmake finds some parts of an installed HDF5 but
for the most part it seems it should be using VTKs version.
Two things to try:
1) a new build in a different directory in case stale information in the
build system is not getting cleared somewhere.
2) If you are using cmake 3.6.0, back off to 3.5.2 to avoid a regression
introduced with the improved cmake find_system_hdf5 that unfortunately
wasn't detected in the release candidates.
hope that helps
David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909
On Thu, Jul 21, 2016 at 2:56 AM, Magnus Elden <magnus_elden at hotmail.com>
wrote:
> HI,
>
>
>
> I am terribly sorry to bother you again, but after I followed your advice
> I checked to use XDMF3 and NOT use system xdmf. Please see this link:
> http://puu.sh/q93fT/511bf104c8.png
>
> I left the HDF5 settings set to default values as well. Please see this
> link: http://puu.sh/q93iy/774b9d6563.png
>
>
>
> It configured and generated the files with no problem, but when building I
> get linker errors saying that H5open, amongst others, are unresolved
> external symbols. Please refer to this link: http://pastebin.com/JymvyWwx
>
>
>
> I looked through the settings of the project XdmfCore and found some
> libraries that had something to do with HDF5. I tried doing a complete
> search through the VTK folders to see if I could find a library with a name
> that might refer to the HDF5 standard that was not included, but I was
> unable to do so.
>
>
>
> The libraries that were included are:
>
> kernel32.lib
>
> user32.lib
>
> gdi32.lib
>
> winspool.lib
>
> shell32.lib
>
> ole32.lib
>
> oleaut32.lib
>
> uuid.lib
>
> comdlg32.lib
>
> advapi32.lib
>
> D:\Libraries\VTK\Build\lib\Release\vtkhdf5_hl-7.1.lib
>
> D:\Libraries\VTK\Build\lib\Release\vtkhdf5-7.1.lib
>
> D:\Libraries\VTK\Build\lib\Release\vtklibxml2-7.1.lib
>
> D:\Libraries\VTK\Build\lib\Release\vtkzlib-7.1.lib
>
>
>
> The only thing I find suspicious is the lack of a CPP library. When I used
> the HDF5 library by itself I had to include the HDF5 library and
> HDF5_CPP.lib in order to get it to work. Is this a similar situation?
>
> I am not sure if it might help, but I attached the complete cache so that
> you have all the information that CMake uses.
>
>
>
> Once again, I am terribly sorry for bothering you again.
>
>
>
> Yours,
>
> Magnus Elden
>
>
>
>
>
> *From:* David E DeMarle [mailto:dave.demarle at kitware.com]
> *Sent:* Wednesday, 20 July, 2016 16:53
> *To:* Magnus Elden <magnus_elden at hotmail.com>
>
> *Subject:* Re: [vtkusers] How to enable the xdmf module and read xdmf
> files.
>
>
>
> Welcome!
>
>
> David E DeMarle
> Kitware, Inc.
> R&D Engineer
> 21 Corporate Drive
> Clifton Park, NY 12065-8662
> Phone: 518-881-4909
>
>
>
> On Wed, Jul 20, 2016 at 10:30 AM, Magnus Elden <magnus_elden at hotmail.com>
> wrote:
>
> That solved it.
>
>
>
> I have no idea why it failed the first time. That was the reason for why I
> tried compiling the XDMF library by itself and link to it.
>
>
>
> Thank you for your help.
>
>
>
> Yours,
>
> Magnus Elden
>
>
>
> *From:* David E DeMarle [mailto:dave.demarle at kitware.com]
> *Sent:* Wednesday, 20 July, 2016 14:35
> *To:* Magnus Elden <magnus_elden at hotmail.com>
> *Cc:* vtkusers at vtk.org
> *Subject:* Re: [vtkusers] How to enable the xdmf module and read xdmf
> files.
>
>
>
>
>
> On Wed, Jul 20, 2016 at 8:06 AM, Magnus Elden <magnus_elden at hotmail.com>
> wrote:
>
> HI,
>
>
>
> I downloaded and built the XDMF source from www.xdmf.org by cloning git
> clone git://xdmf.org/Xdmf.git.
>
> I then went to CMake and enabled Module_vtkxdmf2 and VTK_USE_SYSTEM_XDMF2
> and set the directory path. I tried building it and after some hassle I
> managed to get it done. However, I was unable to include any XDMF reader
> headers so I guessed that I also needed to enable the Module_vtkIOXdmf2 so
> I did that. Configured and built again, but not I was not able to build the
> IO module because XDMFArray was ambiguous and several functions and types
> were not defined.
>
>
>
>
>
> I recommend against VTK_USE_SYSTEM_XDMF* since that capability is largely
> unproven/untested. Instead, let VTK use the version of XDMF in XDMF. As of
> a month ago the version in VTK is the same as the tip of the master branch
> of xdmf with extraneous things that VTK doesn't use removed. Prior to that
> there was much more divergence.
>
>
>
> I am building this on windows 10 using Visual Studio 2015. I am using
> Cmake 3.6.0.
>
>
>
> What is the difference between XDMF, XDMF2 and XDMF3?
>
>
>
> Different revisions of the same library/format. See xdmf.org for details.
> VTK has two revisions of the same library because of technical differences
> between them the most important of which is that 3 requires boost headers
> which VTK does not provide.
>
>
>
> How can I read an .xdmf file to volume render it?
>
>
>
> You might want to just download a ParaView binary and open the xdmf file.
> But you can do the same from VTK starting with any volume rendering example
> and switching the source/reader to vtkXdmf*Reader.
>
>
>
> What version of VTK do I need?
>
>
>
> XDMF was promoted from ParaView to VTK in VTK version 5.10 as I recall.
> Anything after that should be fine.
>
>
>
> What version of XDMF do I need?
>
>
>
> I recommend xdmf3, which is as of a few months ago the tip of the one true
> xdmf repo. Xdmf2 is back in the history if you need it.
>
>
>
> Where can I get these libraries?
>
>
>
> See xdmf.org for instructions on how to get and build any of the
> versions. But as I said, just use VTK's version for simplicity.
>
>
>
> Anything else I should know?
>
>
>
> For xdmf3 you need to download and untar boost somewhere on your system
> and tell cmake where it is.
>
>
>
>
>
> I have been wrestling with this for about a week now and I must be doing
> something wrong.
>
> I was also unable to find any tutorials or guides on how to achieve this.
> If there are any, please point me in the right direction.
>
>
>
> Yours,
>
> Magnus Elden
>
>
>
>
>
> good luck
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160721/2d5e0c6d/attachment.html>
More information about the vtkusers
mailing list