Get Xdmf

From XdmfWeb
Jump to: navigation, search

The old version of this page can be found here.

Xdmf depends on HDF5 and has a header only dependency on Boost. You must obtain and build those projects before you can build Xdmf. You will need CMake to build Xdmf from source code. To use Xdmf from Python or Java you will also need Swig.

Xdmf development is now being hosted at Kitware's gitlab at: See this post for additional details.

Use the following procedure and commands to download, build, and install Xdmf. These instructions assume that the environment variable XDMF_INSTALL_DIR contains the path where you want to install Xdmf.

  • Clone the Git repository:
git clone git://


git clone
  • Create and enter the directory for building the code:
cd Xdmf
mkdir build 
cd build
  • Prepare the CMake-based build. There are two options
    1. Use the following command and select options using a text-based menu system:
      ccmake ..
    2. If you are familiar with CMake, you may set various configuration options on the command line. For example, a typical command line for building Xdmf with Python bindings may look like the following:
   export XDMF_INSTALL_DIR=/opt/Xdmf/
  • Make and install Xdmf:
make install

To use xdmf from wrapped languages you will need to configure XDMF_WRAP_PYTHON, or XDMF_WRAP_JAVA on in ccmake.

Xdmf is mirrored in VTK which has reader and writer classes the call into XDMF to do file IO. To use XDMF within VTK, simply turn on Module_vtkIOXdmf2 or Module_vtkIOXdmf3 on the advanced options page of you VTK configuration.