Fluidity Supporting Software

From AMCGMedia

Jump to: navigation, search

Contents

Fluidity Supporting Software

This page is intended as a resource for systems administrators at institutions whose scientists wish to run Fluidity and are not using the AMCG-supported Ubuntu workstation configuration. For each software package required a brief explanation is given of the rationale behind the software requirement, links to download the software if it is not already available through a package system, and details of how to expose the software to build and runtime environments.

Installing software from scratch is not a centrally supported method of running Fluidity; for central support options, please see the Fluidity systems support page.

Required Packages

VTK

Required for Fluidity data output, available from http://www.vtk.org/VTK/resources/software.html

Fluidity is currently tested up to VTK 5.8. When building VTK, it is recommended that shared libraries are enabled, and that VTKpython is enabled. The Fluidity configure script should be tolerant of local variations in terms of VTK libraries either being supported internally by VTK or supported with system libraries.

At runtime, the environment variables VTK_INCLUDE and VTK_LIBS will need to be set to point at your VTK install.

CGNS

Required when any CGNS-format datafiles are being read by Fluidity, and available from http://cgns.sourceforge.net/download.html

Currently tested with CGNS 2.5 built with default configure options.

BLAS

Required for efficient linear algebra methods within Fluidity, and available from http://www.netlib.org/blas/ (for netlib BLAS), http://sourceforge.net/projects/math-atlas/files/ (for ATLAS), or combined with commercially available compilers such as MKL from Intel.

Currently tested with netlib, ATLAS, and MKL - any standard BLAS implementation should be sufficient.

LAPACK

Required for efficient linear algebra methods within Fluidity, and available from http://www.netlib.org/lapack/ (for netlib LAPACK), http://sourceforge.net/projects/math-atlas/files/ (for ATLAS), or combined with commercially available compilers such as MKL from Intel.

Currently tested with netlib, ATLAS, and MKL - any standard LAPACK implementation should be sufficient.

XML2

Required for parsing Fluidity's flml parameter file format, and available from ftp://xmlsoft.org/libxml2/

Currently tested with version 2.7.8.

MPI implementation

Required for parallel Fluidity running, widely available on HPC clusters. Workstation users can download an implementation from http://www.open-mpi.org/software/ompi/v1.4/

Any full MPI implementation should be sufficient. Please note that Clustervision-supplied clusters generally ship with broken MPI C++ support and will need attention before Fluidity can be compiled.

Fluidity is no longer generally supported as non-MPI code as it is assumed that serial runs will be precursors to large parallel runs and still build with MPI enabled for later use.

PETSc

Required for efficient solver methods within Fluidity, available from http://www.mcs.anl.gov/petsc/petsc-2/download/index.html

Currently tested with PETSc 3.1. Required configure options are with shared and mpi shared enabled, with parmetis, hypre, and prometheus, and with fortran interfaces. If parmetis, hypre, and prometheus are not otherwise installed on the system they should be downloaded and installed internally within PETSc.

ParMetis

Required for mesh partitioning and sparse matrix operations, available from http://glaros.dtc.umn.edu/gkhome/metis/parmetis/download

Tested with version 3.1.1 with paths configured for the local site.

Zoltan

Required for parallel partitioning and load balancing, available from http://www.cs.sandia.gov/Zoltan/Zoltan_download.html

Tested with version 3.6 with paths configured for the local site and patched as described below.

ARPACK

Required for solving large eigenvalue problems, available from http://www.caam.rice.edu/software/ARPACK/

Tested with version 96 with paths configured for the local site.

NetCDF

Required for reading datafiles in NetCDF format, available from http://www.unidata.ucar.edu/downloads/netcdf/index.jsp

Tested with version 4.1.1, and recommended configured with f77, f90, c, cxx, and utilities enabled.

UDUnits

Required for physical unit conversions, available from http://www.unidata.ucar.edu/downloads/udunits/index.jsp

Tested with version 2.1.12-3. Note there is a common issue with hand-building this package where CPPFLAGS needs to be correctly set with a -D option for the relevant Fortran environment. This commonly leads to an error during the build when not set. See for example:

http://www.unidata.ucar.edu/support/help/MailArchives/udunits/msg00137.html

for information.

Python development environment

Widely used within Fluidity for user-defined functions and for diagnostic tools and problem setup. Available from http://www.python.org/download/

Tested with Python up to 2.7.3. Supporting python extensions required are setuptools for Fluidity builds, Python-4suite and Python-XML for options file parsing, and highly recommended extensions are scipy and numpy for custom function use within Fluidity.

Trang

Required for parsing Fluidity's flml schema, available from http://www.thaiopensource.com/relaxng/trang.html and tested with 20030619 but any recent version should be sufficient.

Fortran 90 compiler

Tested with gfortran 4.6.x, and Intel 11.1 for versions >11.1.073. Intel 10.1 may work but is no longer tested. Not supported for gfortran =< 4.2, Intel <10.1, Intel 11.1 <11.1.073 and Intel 12.x, all of which have broken Fortran 90 implementations for which bug reports have been submitted and implemented in later versions where applicable. Bug reports have been submitted for Intel 12.x and Portland group compilers but not yet implemented.

GCC and gfortran are freely available from http://gcc.gnu.org/ . Some testing has started with GCC 4.7 but this is not as yet formally supported for Fluidity.

C++ compiler

Tested with GCC and Intel compilers; gcc is freely available from http://gcc.gnu.org/

Bazaar (bzr)

Recommended version 2.5 or higher, available from http://bazaar.canonical.com/

Ground-up build

If you're faced with a very outdated system or a system with significant software problems which you have no control over, it's possible to build almost everything you need to run Fluidity, from the ground up.

Environment

Assuming you're building in a non-standard position for your environment you'll need to set a number of environment variables. Set WORKING to be the root of your working area, then for bash:

export WORKING="/path/to/my/data"

export PATH="$WORKING/fluidity/bin:$PATH"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$WORKING/fluidity/lib"
export CFLAGS="-L$WORKING/fluidity/lib"
export FFLAGS="-L$WORKING/fluidity/lib"
export CPPFLAGS="-I$WORKING/fluidity/include"
export LDFLAGS="-L$WORKING/fluidity/lib"

or for csh:

setenv WORKING /path/to/my/data

setenv PATH "$WORKING/fluidity/bin:$PATH"
setenv LD_LIBRARY_PATH "$LD_LIBRARY_PATH:$WORKING/fluidity/lib"
setenv CFLAGS "-L$WORKING/fluidity/lib"
setenv FFLAGS "-L$WORKING/fluidity/lib"
setenv CPPFLAGS "-I$WORKING/fluidity/include"
setenv LDFLAGS "-L$WORKING/fluidity/lib"

Compiler

Assuming you're looking for a free compiler, GCC fits the bill but needs a bit of work to build in terms of supporting software.

GMP (tested gmp-5.0.5)

GMP is needed for the GCC 4.x build. Download it from http://gmplib.org/.

Build is in the source directory:

./configure --enable-cxx --prefix=$WORKING/fluidity
make
make install

Note - if you don't have m4 installed the configure may fail; this should be widely available for most workstations and a not unreasonable request to submit for a cluster install.

MPFR (tested mpfr-3.1.0)

MPFR is needed for the GCC 4.x build. Download it from http://www.mpfr.org/mpfr-current/.

Build is in the source directory:

./configure --prefix=$WORKING/fluidity --with-gmp=$WORKING/fluidity
make
make install

MPC (tested mpc-0.8.2)

MPC is needed for the GCC 4.x build. Download it from http://www.multiprecision.org/index.php?prog=mpc&page=download.

Build is in the source directory:

./configure --prefix=$WORKING/fluidity --with-gmp=$WORKING/fluidity --with-mpfr=$WORKING/fluidity
make
make install

GCC (tested gcc-4.6.3)

GCC can be downloaded from the UK mirror at http://gcc-uk.internet.bs/

Before the build, make sure that the GMP and MPFR libraries are on LD_LIBRARY_PATH or the stage 1 configure will fail even if --with-[gmp|mpfr|mpc] is supplied (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35577).

Also note that the build needs to be in a target build directory, NOT in the source directory, or again the build will fail with definition conflicts against the system includes.

Finally, the java build appears to be buggy in 4.4 and is enabled by default, but we only need c, c++, and fortran, so just specify those.

Make a target build directory which is OUTSIDE the source tree, then build with:

/path/to/gcc/source/configure --prefix=$WORKING/fluidity --with-gmp=$WORKING/fluidity --with-mpfr=$WORKING/fluidity --enable-languages=c,c++,fortran
make
make install

OpenMPI (tested openmpi-1.4.5)

You'll need an MPI implementation to wrap your compiler for the Fluidity build, which lets you spawn parallel runs. OpenMPI provides this and can be downloaded from http://www.open-mpi.org/.

Build is in the source directory:

./configure --prefix=$WORKING/fluidity
make
make install

Python

Readline (tested readline-6.2)

Readline is not strictly needed for Fluidity to build but is very handy if you want to make use of things like python command history. Download it from http://ftp.gnu.org/pub/gnu/readline/ and then add -fPIC to CFLAGS and FFLAGS for the duration of this build with:

csh:

setenv CFLAGS "$CFLAGS -fPIC"
setenv FFLAGS "$FFLAGS -fPIC"

bash:

export CFLAGS="$CFLAGS -fPIC"
export FFLAGS="$FFLAGS -fPIC"

These can be returned to their default values after the readline build. Building with -fPIC shouldn't be necessary but seems to be required by the later Python build.

Build readline in the source directory with:

./configure --prefix=$WORKING/fluidity --disable-shared
make
make install

Python (tested Python-2.7.2)

Python can be downloaded from http://www.python.org/download/ and built in the source directory with:

./configure --prefix=$WORKING/fluidity --enable-shared
make
make install

Setuptools (tested setuptools-0.6c11)

Setuptools can be downloaded from http://pypi.python.org/pypi/setuptools and installed from the appropriate egg file with:

sh ./setuptools-0.6c9-py2.6.egg --prefix=$WORKING/fluidity

Use the appropriate filename for the python egg you have downloaded.

Numpy (tested numpy-1.6.1)

Before installing numpy, you will probably need to set your PYTHONPATH to point to the new python install.

For csh:

setenv PYTHONPATH "$WORKING/fluidity/lib/python2.7/site-packages"

For bash:

export PYTHONPATH="$WORKING/fluidity/lib/python2.7/site-packages"

Numpy can be installed through easy_install which was provided by setuptools, using:

easy_install numpy

Numerical Libraries

BLAS

BLAS can be downloaded from http://www.netlib.org/blas/ and built in the source directory after editing the following entries in the make.inc file:

FORTRAN  = gfortran
LOADER   = gfortran
OPTS     = -O3 -fPIC

Then run:

make
cp blas_LINUX.a $WORKING/fluidity/lib/libblas.a

LAPACK (tested lapack-3.3.1)

LAPACK can be downloaded from http://www.netlib.org/lapack/ and built in the source directory. First, make a copy of make.inc.example:

cp make.inc.example make.inc

Edit it to set:

FORTRAN  = gfortran -fimplicit-none -g -fPIC
BLASLIB  = /path/to/your/libraries/libblas.a

Then:

make
cp lapack_LINUX.a $WORKING/fluidity/lib/liblapack.a

ParMetis (tested ParMetis-3.2.0)

NOTE: Fluidity is untested with ParMETIS 4.x at present; legacy 3.2 is the current latest-tested version.

ParMetis can be downloaded from http://glaros.dtc.umn.edu/gkhome/metis/parmetis/download and built in the source directory with:

make
cp lib*.a $WORKING/fluidity/lib
cp parmetis.h $WORKING/fluidity/include

PETSc (tested petsc-3.1-p8)

PETSc can be downloaded from http://www.mcs.anl.gov/petsc/petsc-2/download/index.html and built in the source directory. First, set PETSC_DIR in the source directory:

csh:

setenv PETSC_DIR $PWD

bash:

export PETSC_DIR=$PWD

Then configure with the following all on one line:

./configure --prefix=$WORKING/fluidity --with-mpi-shared=1 --with-shared=1
   --with-debugging=0 --with-parmetis=1 --download-parmetis=1 --with-hypre=1
   --download-hypre=1 --with-prometheus=1 --download-prometheus=1
   --with-fortran-interfaces=1

When configure completes, it should supply you with a 'make all' command line, including various configuration variables. Copy and paste this into your terminal and run it. Once it completes, it will supply you with a further 'make install' command line containing other variables; do the same with this, copy and pasting it into your terminal and running it.

To use this version of PETSC you will need to set the following environment variables:

csh:

setenv PETSC_DIR $WORKING/fluidity

bash:

export PETSC_DIR=$WORKING/fluidity

NOTE: If you see problems with shared libraries not building correctly, make sure you have built blas and lapack with -fPIC.

Zoltan (tested zoltan-3.6)

Zoltan can be downloaded from http://www.cs.sandia.gov/Zoltan/Zoltan_download.html and built in a separate build directory outside the source tree.

For use with Fluidity, Fortran modules need to be enabled with the following patch before building:

--- Zoltan_v3.5/src/Makefile.in.orig    2011-08-02 14:14:08.535936378 +0100
+++ Zoltan_v3.5/src/Makefile.in 2011-08-02 14:07:41.000000000 +0100
@@ -4035,19 +4035,11 @@
        @echo "Trilinos package Zoltan subdirectory src built successfully."
        @echo ""

-#if F90_MODULE_LOWERCASE
-#FORTRAN_MODULES = \
-#      lb_user_const.mod \
-#      zoltan_types.mod \
-#      zoltan.mod \
-#      zoltan_user_data.mod
-#else
-#FORTRAN_MODULES = \
-#      LB_USER_CONST.mod \
-#      ZOLTAN_TYPES.mod \
-#      ZOLTAN.mod \
-#      ZOLTAN_USER_DATA.mod
-#endif
+FORTRAN_MODULES = \
+       lb_user_const.mod \
+       zoltan_types.mod \
+       zoltan.mod \
+       zoltan_user_data.mod

 include $(top_builddir)/Makefile.export.zoltan
 # Tell versions [3.59,3.63) of GNU make to not export all variables.


Now set some environment variables for the build; for bash:

export CFLAGS="-L$WORKING/fluidity/lib -g -O2"
export FFLAGS="-L$WORKING/fluidity/lib -g -O2"
export LDFLAGS="-L$WORKING/fluidity/lib -Wl,-z,defs"
export CXXFLAGS="-g -O2"
export FCFLAGS="-g -O2"

or for csh:

setenv CFLAGS "-L$WORKING/fluidity/lib -g -O2"
setenv FFLAGS "-L$WORKING/fluidity/lib -g -O2"
setenv LDFLAGS "-L$WORKING/fluidity/lib -Wl,-z,defs"
setenv CXXFLAGS "-g -O2"
setenv FCFLAGS "-g -O2"

Now, from the source directory, make and change into a build directory:

mkdir ../Zoltan-build/
cd ../Zoltan-build/

For configuration you will need to supply your system architecture. On Ubuntu this can be easily found with:

dpkg-architecture -qDEB_BUILD_GNU_TYPE 

A common return value is 'x86_64-linux-gnu' which will be used as the example for the following configure. If you are on a 32-bit system replace 'x86_64' with 'i386', and if you are on a platform other than Linux you may want to modify the architecture description to suit.

Configure Zoltan in your build directory with:

../Zoltan_v3.5/configure x86_64-linux-gnu --prefix=$WORKING/fluidity --enable-mpi --with-mpi-compilers
   --with-gnumake --enable-zoltan --with-parmetis --enable-f90interface --enable-zoltan-cppdriver
   --disable-examples --with-parmetis-libdir=$WORKING/fluidity/lib

Then compile and install:

make
make install

Lastly, return environment variables to their former state:

export CFLAGS="-L$WORKING/fluidity/lib"
export FFLAGS="-L$WORKING/fluidity/lib"
export LDFLAGS="-L$WORKING/fluidity/lib"
unset CXXFLAGS
unset FCFLAGS

or for csh:

setenv CFLAGS "-L$WORKING/fluidity/lib"
setenv FFLAGS "-L$WORKING/fluidity/lib"
setenv LDFLAGS "-L$WORKING/fluidity/lib"
unsetenv CXXFLAGS
unsetenv FCFLAGS

Supporting libraries

UDUnits (tested udunits-2.1.23)

UDUnits can be downloaded from http://www.unidata.ucar.edu/downloads/udunits/index.jsp and built in the source directory.

Note that to compile requires setting CPPFLAGS appropriately for your build environment, for example:

csh:

setenv CPPFLAGS -Df2cFortran

bash:

export CPPFLAGS=-Df2cFortran

Make a note of what the original setting of CPPFLAGS was as you will need to return it to that at the end of the UDUnits build. You may well be able to do this by just logging out and logging back in again, though don't forget to set the rest of the build environment variables for fluidity if you do.

Then build in the source directory:

./configure --prefix=$WORKING/fluidity
make
make install
ln -s $WORKING/fluidity/lib/libudunits2.a $WORKING/fluidity/lib/libudunits.a
ln -s $WORKING/fluidity/lib/libudunits2.so $WORKING/fluidity/lib/libudunits.so

Then return CPPFLAGS to the initial value or the NetCDF build will break!

NetCDF (tested netcdf-4.1.3)

NetCDF can be downloaded from http://www.unidata.ucar.edu/software/netcdf/ and built in the source directory with:

./configure --enable-shared --disable-netcdf-4 --prefix=$WORKING/fluidity
make
make install

VTK and supporting software

The following build is for a non-graphical install of Fluidity - ie, one for a cluster, not one for a workstation expected to run diamond. In the situation that diamond is required, VTK_USE_RENDERING must be enabled and dependencies on GTK+ satisfied which are provided on the vast majority of modern Linux systems. A description of how to satisfy these dependencies from scratch is beyond the scope of this page.

Cmake (tested cmake-2.8.5)

Cmake can be downloaded from http://www.cmake.org/cmake/resources/software.html and built in the source directory with:

./configure --prefix=$WORKING/fluidity
make
make install

Tcl (tested tcl8.5.10)

Tcl can be downloaded from http://www.tcl.tk/software/tcltk/download.html and built in the source directory with:

cd unix
./configure --prefix=$WORKING/fluidity
make
make install

Tk (tested tk8.5.10)

Tk can be downloaded from http://www.tcl.tk/software/tcltk/download.html and built in the source directory with:

cd unix
./configure --prefix=$WORKING/fluidity
make
make install

VTK (tested vtk-5.10.0)

VTK can be downloaded from http://www.vtk.org/VTK/resources/software.html and should be built in a separate build directory which is not inside the source heierarchy. In the source directory run:

mkdir ../VTK-build
cd ../VTK-build
ccmake ../VTK/

Thenn type 'c' and edit the resulting rules screen to:

BUILD_EXAMPLES                  *OFF                                          
BUILD_SHARED_LIBS               *ON                                           
BUILD_TESTING                   *ON                                           
CMAKE_BACKWARDS_COMPATIBILITY   *2.4                                          
CMAKE_BUILD_TYPE                *Debug                                        
CMAKE_INSTALL_PREFIX             /path/to/WORKING/fluidity          
VTK_DATA_ROOT                   *VTK_DATA_ROOT-NOTFOUND                       
VTK_EXTRA_COMPILER_WARNINGS     *OFF                                          
VTK_LARGE_DATA_ROOT             *VTK_LARGE_DATA_ROOT-NOTFOUND                 
VTK_USE_CHARTS                  *OFF                                          
VTK_USE_CHEMISTRY               *OFF                                          
VTK_USE_GEOVIS                  *OFF                                          
VTK_USE_INFOVIS                 *OFF                                          
VTK_USE_N_WAY_ARRAYS            *OFF                                          
VTK_USE_PARALLEL                *OFF                                          
VTK_USE_QT                      *OFF                                          
VTK_USE_RENDERING               *OFF
VTK_USE_TEXT_ANALYSIS           *OFF                                          
VTK_USE_VIEWS                   *OFF                                          
VTK_WRAP_JAVA                   *OFF                                          
VTK_WRAP_PYTHON                 *ON                                           
VTK_WRAP_PYTHON_SIP             *OFF                                          
VTK_WRAP_TCL                    *OFF

Then:

Type 'c' a first time to configure
Type 'c' a second time to configure
Type 'g' to generate and quit

Finally, run:

make install

To use this install with Fluidity, set the following environment variables:

For csh:

setenv VTK_INCLUDE "$WORKING/fluidity/include/vtk-5.10"
setenv VTK_LIBS "$WORKING/fluidity/lib/vtk-5.10"
setenv LD_LIBRARY_PATH "$LD_LIBRARY_PATH:$WORKING/fluidity/lib/vtk-5.10"

For bash:

export VTK_INCLUDE="$WORKING/fluidity/include/vtk-5.10"
export VTK_LIBS="$WORKING/fluidity/lib/vtk-5.10"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$WORKING/fluidity/lib/vtk-5.10"
This page was last modified on 1 March 2013, at 16:08. This page has been accessed 15,696 times.