OpenFOAM

From UFRC
Jump to navigation Jump to search

OpenFoam

Version 1.7.1

Needs to be built with gcc 4.4.4 or newer. Gcc 4.4.4, in turn, requires a bunch of stuff so we have the following (in the order in which they should be built).

gmp-5.0.1

./configure --prefix=/apps/openfoam/tools
make -j 4
make install

ppl-0.10.2

There is an error in the configure script due to a change in GMP fixed as below.

diff -u configure.orig configure
--- configure.orig	2011-02-11 12:29:38.000000000 -0500
+++ configure	2011-02-10 13:34:14.000000000 -0500
@@ -16473,7 +16473,7 @@
       || GMP_LIMB_BITS != mp_bits_per_limb) {
     std::cerr
       << "GMP header (gmp.h) and library (ligmp.*) bits-per-limb mismatch:\n"
-      << "header gives " << __GMP_BITS_PER_MP_LIMB << ";\n"
+      << "header gives " << GMP_LIMB_BITS << ";\n"
       << "library gives " << mp_bits_per_limb << ".\n"
       << "This probably means you are on a bi-arch system and\n"
       << "you are compiling with the wrong header or linking with\n"

./configure --prefix=/apps/openfoam/tools \
            --with-libgmp-prefix=/apps/openfoam/tools \
            --with-libgmpxx-prefix=/apps/openfoam/tools \
            --enable-cxx
make -j4
make install

mpfr-2.4.2

./configure --prefix=/apps/openfoam/tools \
            --with-gmp=/apps/openfoam/tools
make -j 4
make install

cloog-ppl (0.15.9)

./configure --prefix=/apps/openfoam/tools \
            --with-gmp=/apps/openfoam/tools \
            --with-ppl=/apps/openfoam/tools  
make -j 4
make install

gcc (4.4.4)

../configure --prefix=/apps/openfoam/tools 
             --with-gmp=/apps/openfoam/tools \
             --with-mpfr=/apps/openfoam/tools \
             --with-ppl=/apps/openfoam/tools \
             --with-cloog=/apps/openfoam/tools
make -j 8
make install

OpenFOAM: Build Notes

  1. Be wary of changing their default directory structure. Although it appears easy to do in the "etc/bashrc" file, there are places in the wmake build system that seem to be hardwired for the "$WM_PROJECT-$WM_PROJECT_VERSION" structure and parts of the build will fail.
  2. When building the support software (ppl, gmp, etc.), it is probably best to specify "--libdir=<prefix>/lib64" to the configure script. Gcc will build both 32 and 64 bit libraries so you will end up with a mix of 32 and 64-bit libraries in your <prefix>/lib dir if you aren't specific.
  3. The default OpenFOAM installation denies access to most of the files and directories to "other". If others are to use the install, the permissions on many files have to be changed from 750 -> 755, 740 -> 744, and 640 -> 644.

ParaView (3.8.0)

cmake (2.8.2)

wget  wget http://www.cmake.org/files/v2.8/cmake-2.8.2.tar.gz
tar xvf cmake-2.8.2.tar.gz 
cd cmake-2.8.2/
prefix=/apps/OpenFOAM/tools
./configure  --prefix=$prefix --libdir=$prefix/lib64
make
make install

Qt (4.6.2)