Notes on installing OpenFOAM and FEniCS from source on Fedora 14.
Both projects implement ideas similar to A Livermore Physics Applications Language (NALPAL, why ALPAL): take high-level descriptions of partial differential equations and automatically generate code to solve them with numerical approximations based on finite-volume (OpenFOAM) or finite-element (FEniCS) methods.
Useful Links
- FEniCS install from source
OpenFoam source pack
- open foam uses paraview, paraview.org
- open foam uses wmake, which is a script that comes with the installation
FEniCS uses cmake
Steps for OpenFOAM
- Install Fedora packages for paraview, cmake, flex, qt, zlib.
[root@deeds foo]$ yum -y install paraview cmake flex qt-devel libXt-devel zlib-devel zlib-static scotch scotch-devel openmpi openmpi-devel
You probably already have gnuplot and readline installed, if not, install those too. - Unpack the OpenFOAM tarball:
[jstults@deeds OpenFOAM]$ tar -zxvf OpenFOAM-2.0.1.gtgz
- Add the environment variable definitions to the bashrc file
source $HOME/OpenFOAM/OpenFOAM-2.0.1/etc/bashrc
[jstults@deeds OpenFOAM]$ source ~/.bashrc
- Run the
OpenFOAM-X.y.z/bin/foamSystemCheck
script, you should get something that says, "System check: PASS", "Continue OpenFOAM installation." - Go to the top-level directory, since you defined the proper environment variables that is something like
[jstults@deeds OpenFOAM]$ cd $WM_PROJECT_DIR
- Make it
[jstults@deeds OpenFOAM-X.y.z]$ ./Allwmake
- Various Consequences ensue...
Steps for FEniCS
Required components: Python packages FFC, FIAT, Instant, Viper and UFL, and Python/C++ packages Dolfin and UFC
- Install things packaged for Fedora
[root@deeds FEniCS]$ yum -y install python-ferari python-instant python-fiat
- Download the other components from launchpad, and install using
[jstults@deeds FEniCS]$ python setup.py install --prefix=~/FEniCS
for the Python packages, and
[jstults@deeds FEniCS]$ cmake -DCMAKE_INSTALL_PREFIX=$HOME/FEniCS ./src
[jstults@deeds FEniCS]$ make
[jstults@deeds FEniCS]$ make install
for the C++/Python packages (DOLFIN and UFC).
OR, do it automatically if you have root and internet access (I still haven't got this to work: a bit of buffoonery on my part, problems finding boost libraries).
- Download Dorsal
- Run the script
[jstults@deeds FEniCS]$ ./dorsal.sh
- Execute the yum command in the output from the script in another terminal.
[root@deeds FEniCS]$ yum install -y redhat-lsb bzr bzrtools subversion \ libxml2-devel gcc gcc-c++ openmpi-devel openmpi numpy swig wget \ boost-devel vtk-python atlas-devel suitesparse-devel blas-devel \ lapack-devel cln-devel ginac-devel python-devel cmake \ ScientificPython mpfr-devel armadillo-devel gmp-devel CGAL-devel \ cppunit-devel flex bison valgrind-devel
I also installed the boost-openmpi-devel and boost-mpich2-devel packages as well. MPI on Fedora is kind of a mess. I added these two lines to my bashrc:
module unload mpich2-i386
module load openmpi-i386
- When the packages are installed, go back to the terminal running
dorsal.sh
and hit ENTER.
I ended up downloading the development version of dorsal to get the latest third-party software built, because it's so easy:
[jstults@deeds dorsal]$ bzr branch lp:dorsal
Pretty darn slick, Yea for distributed version control systems! Boo for dependency hell!
FEniCS is currently under heavy development towards a 1.0 release, so I expect to be able to build it on Fedora 14 Real Soon Now ; - )
Update: Johannes and friends got me straightened out.