Get Xdmf original

From XdmfWeb
Revision as of 14:21, 19 August 2014 by Dave.demarle (talk | contribs) (Dave.demarle moved page Get Xdmf to Get Xdmf original without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Obtaining and Installing XDMF

 These instruction pertain to Xdmf version 1. 

The eXtensible Data Model and Format (XDMF) is installed and maintained, along with the rest of the Interdisciplinary Computing Environment, on the HPC systems at the ARL MSRC. If you need access on other platforms, obtain the source via CVS and follow the installation instructions. XDMF has been built and tested on a variety of UNIX platforms and on Win32 and Cygwin. CVS Access to the XDMF Source Code Repository

XDMF is obtained via CVS access to the XDMF source code repository as a user (anonymous, read-only access). One of the advantages of CVS access is that you can incrementally update your repository without having to retrieve the entire source distribution. The following assumes that you have a basic knowledge of CVS.

Anonymous User Read-Only Access

You can obtain read-only access to the CVS repository as follows.

cvs -d :pserver:anonymous@public.kitware.com:/cvsroot/Xdmf login
(respond with password xdmf)

Follow this command by checking out the source code:

cvs -d :pserver:anonymous@public.kitware.com:/cvsroot/Xdmf checkout Xdmf

This CVS tree is Xdmf. Checkout the CVS in a clean directory as it will create an Xdmf directory and possibly overwrite an existing Xdmf tree. You will also need CMake which is a new cross platform build tool.

Installation

XDMF depends on Expat and HDF5. While a version of Expat and HDF5 comes with the the XDMF source, you might want to get the latest version of these packages. Obtain Expat from here . Obtain HDF from here. You'll also want Python (version 2.5 or later). Obtain Python from Python.Org. If you want to use the scientific visualization tools, you'll need vtk ( version 5.0 or later ). Obtain vtk from Kitware.Com.


Xdmf uses CMake for installation. Pre-Built binaries of CMake are available for many platforms, or you can install from source. The advantage of CMake is that it provides a consistent build system for UNIX and Win32. For this reason, we replaced the previous autoconf (./configure --prefix...) method with CMake.


Once you�ve installed the necessary support packages, begin to build Xdmf for your platform. For example, suppose you wish to build a Linux version :


  1. mkdir MyXdmf
  2. cd MyXdmf
  3. cvs -d ... login
  4. cvs -d ... co Xdmf This creates an Xdmf directory of the source code
  5. mkdir Linux
  6. cd Linux
  7. cmake ../Xdmf


CMake comes with several different commands. The two most important are cmake (the command line version) and ccmake (a curses based gui version). Both versions create a Makefile in the current directory and a file CMakeCache.txt that contains the compile time options. Options include things like additional compiler flags, where to find various packages (like HDF and expat), and which parts to build ( shared objects, python interface, etc.). As you change the CMakeCache.txt file either by hand or via the gui, additional options may appear. For example, if you decide to build the Python interface, new options for the location of Python include files and libraries will appear in the CMakeCache.txt file after you re-run cmake.


In short, you run cmake, change CMakeCache.txt, and re-run cmake until you have the configuration you want. CMake is fairly sophisticated and can make reasonable guesses for many of the options.


Once this configuration process is complete, run make and the appropriate binaries will be built in the directory MyXdmf/Linux/bin. For each architecture, create a new directory and repeat the process. This allows you to keep all platforms synchronized to the same source code base.Depending on the configuration you will see the following files :

  • libXdmf.[a so dll] C++ class library for XDMF
  • _Xdmf.[so dll] Python interface
  • libXdmfTCL.[so dll] Tcl interface
  • XdmfFormatExample Executable to write/read XDMF file


The Python interface has been built with the shadow classes. This means that accessing XDMF via Python done in an Object Oriented manner just like in C++. To use the Object Oriented interface, you need to copy Xdmf.py ( found in .../Xdmf/libsrc/Xdmf.py) somewhere in your Python path.