Logo  0.95.0-final
Finite Element Embedded Library and Language in C++
Feel++ Feel++ on Github Feel++ community
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Building Feel++
Author
Christophe Prud'homme
Baptiste Morin

Getting the source via an archive

Feel++ is distributed as a tarball once in a while. The tarballs are available at

http://code.google.com/p/feelpp/


Download the latest tarball.

  tar -xzf feelpp-0.92.0.tar.gz
  cd feel-0.92.0

top


Getting the source via Git

In order to download the sources of Feel++, you can download it directly from the source depository thanks to Git. To make it possible, you can download them anonymously or with an account in Github that you have created. As an open-source project, we strongly suggest you to create an account and take part of the project with sharing your ideas, developments or suggests. For now, if you want to get the sources without an account, open a command-line and type

  git clone https://github.com/feelpp/feelpp.git

then you can go to the Feel++ top directory with

  cd feel

You should obtain furthers directories such as :

applications/   # functional applications
benchmarks/  # applications under test
cmake/   # do not touch, used for compilation
contrib/
doc/   # tutorial and examples
feel/   # Feel++ library
ports/   # used for Mac OS X installation
research/   # research projects using Feel++
testsuite/ # Feel++ unit tests testsuite
CMakeListe.txt   # the file for cmake to build, do not modify
...

top


Unix : dependencies

In order to install Feel++ on Unix systems (other than Mac OS X, in you have a Macintosh, please go to Feel++ on Mac OS X), you have to install many dependencies before. Those libraries and programs are necessary for the compilation and installation of the Feel++ librairies.
This is the list of all the librairies you must have installed on your computer, and the |*-dev| packages for some of them.
Required packages :

  • g++ (4.4, 4.5, 4.6, 4.7 or higher) OR Clang (3.1 or later)
  • MPI : openmpi (preferred) or mpich
  • Boost (1.39 or later)
  • Petsc (2.3.3 or later)
  • Cmake (2.6 or later)
  • Gmsh (can be found at http://www.geuz.org/gmsh)
  • Libxml2

Optional packages :

  • Superlu
  • Suitesparse(umfpack)
  • Metis: scoth with the metis interface (preferred), metis (non-free)
  • Trilinos (8.0.8 or later)
  • Google perftools
  • Paraview, this is not stricly required to run Feel++ programs but it is somehow necessary for visualisation. (can be found at http://www.paraview.org)
  • Python (2.5 or later) for the validation tools

Note that all these packages are available under Debian/GNU/Linux and Ubuntu. They should be available. Once you have installed those dependencies, you can jump to Compiling.

top


Feel++ on Debian and Ubuntu

Debian

Debian is the platform of choice for Feel++, it was developed mainly on it. The commands to install Feel++ on Debian are

  sudo apt-get update
  sudo apt-get install feel++-apps libfeel++-dev feel++-doc

The interested user is encourage to follow the Feel++ PTS page

At the moment Feel++ compiles and is available on the following Debian plateforms:

Ubuntu

Feel++ was uploaded in the distribution Ubuntu-Natty (11.04) for the first time. The commands to install Feel++ on Ubuntu are sudo apt-get update sudo apt-get install feel++-apps libfeel-dev feel++-doc The interested user might want to follow the Ubuntu Launchpad Feel++ page in order to know what is going on with Feel++ on Ubuntu

top


Feel++ on Mac OS X

Feel++ is also working on Mac operating systems. The way to make it work is quite different.

Compilers

In order to Feel++ and cmake work properly, you have to install differents compilers :

  • Gcc
    The first step is to install the latest version of Xcode. If your computer is recent, you can install it with your DVD that came with your machine (not the OS DVD, but the applications one). You don't have to install the complete Xcode (you can uncheck iOS SDK for example, it's not necessary here and requiers a lot of memory). Xcode will provide your computer all basic tools to compile such as gcc 4.2. It's the first step, you'll see later how to easily install gcc 4.5 or later using MacPorts.
  • Fortran
    To build the Makefiles, cmake will need a Fortran compiler. To make it works, please go to SourceForge.net and download gfortran-snwleo-intel-bin.tar.gz which is the fortran compiler only (from now, don't download the complete install with gcc 4.6 because Feel needs gcc 4.5 or later). To install it, go to the directory where you have downloaded the file and type in a command-line
      sudo tar -xvf gfortran-snwleo-intel-bin.tar -C /
    

MacPorts

Introduction : MacPorts is an open-source community projet which aims to design an easy-to-use system for compiling, installing and upgrading open-source softwares on Mac OS X operating system. It is distributed under BSD License and facilitate the access to thousands of ports (softwares) without installing or compiling open-source softwares. MacPorts provides a single software tree which includes the latest stable releases of approximately 8050 ports targeting the current Mac OS X release (10.6 or 10.5). If you want more information, please visite their website.

Installation : To install the latest version of MacPorts, please go to Installing MacPorts page and follow the instructions. The simplest way is to download the dmg disk image corresponding to your version of Mac OS X. It is recommended that you install X11 (X Window System) which is normally used to display X11 applications.
If you have installed with the package installer (MacPorts-1.x.x.dmg) that means MacPorts will be installed in /opt/local. From now on we will suppose that macports has been installed in /opt/local which is the default MacPorts location. Note that from now on, all tools installed by MacPorts will be installed in /opt/local/bin or /opt/local/sbin for example (that's here you'll find gcc4.5 or later e.g /opt/local/bin/g++-mp-4.5 once being installed).

Key commands : In your command-line, the software MacPorts is called by the command port. Here is a list of key commands for using MacPorts, if you want more informations please go to MacPorts Commands.

  • sudo port -v selfupdate This action should be used regularly to update the local tree with the global MacPorts ports. The option -v enables verbose which generates verbose messages.
  • port info flowd This action is used to get information about a port (description, license, maintainer, etc.)
  • sudo port install mypackage This action install the port mypackage
  • sudo port uninstall mypackage This action uninstall the port mypackage
  • port installed This action displays all ports installed and their versions, variants and activation status. You can also use the -v option to also display the platform and CPU architecture(s) for which the ports were built, and any variants which were explicitly negated.
  • sudo port upgrade mypackage This action updgrades installed ports and their dependencies when a Portfile in the repository has been updated. To avoid the upgrade of a port's dependencies, use the option -n.

Portfile : A Portfile is a TCL script which usually contains simple keyword values and TCL expressions. Each package/port has a corresponding Portfile but it's only a part of a port description. Feel++ provides some mandatory Portfiles for its compilation which are either not available in MacPorts or are buggy but Feel++ also provides some Portfiles which are already available in MacPorts such as gmsh or petsc. They usually provide either some fixes to ensure Feel++ works properly or new version not yet available in MacPorts. These Portfiles are installed in ports/macosx/macports.

MacPorts and Feel++

To be able to install Feel++, add the following line in /opt/local/etc/macports/source.conf at the top of the file before any other sources :

file:///<path to feel top directory>/ports/macosx/macports

Once it's done, type in a command-line :

  cd <your path to feel top directory>/ports/macosx/macports
  portindex -f

You should have an output like this :

Reading port index in $<$your path to feel top directory$>$/ports/macosx/macports
Adding port science/feel++
Adding port science/gmsh
Adding port science/petsc 

Total number of ports parsed:   3
Ports successfully parsed:      3
Ports failed:                   0
Up-to-date ports skipped:       0

Your are now able to type

  sudo port install feel++

It might take some time (possibly an entire day) to compile all the requirements for Feel++ to compile properly. If you have several cores on your MacBook Pro, iMac or MacBook we suggest that you configure macports to use all or some of them. To do that uncomment the following line in the file /opt/local/etc/macports/macports.conf

buildmakejobs   0 $\#$ all the cores

At the end of the sudo port install feel++, you have all dependencies installed. To build all the Makefile, is automatically launched but can have some libraries may not be found but they are not mandatory for build Feel++, only the features related to the missing libraries will be missing.

PETSc and SLEPc on Snow Leopard and Lion

We have heard about issues with petsc and slepc with some new MacBook Pro with Snow Leopard while they are being installed with the command

  sudo port install feel++

If it's the case, that probably means there is an issue with atlas. If atlas is already installed, you have to unsinstall it (be careful with dependencies, they also have to be uninstalled). Once it's done, you should do

  cd <path to feel top directory>/ports/macosx/macports
  portindex -f

then type in the exact same order :

  sudo port uninstall slepc
  sudo port uninstall petsc
  sudo port install -d petsc
  sudo port install slepc

Then add to you shell script environment (e.g. for Bash shells .bashrc or .profile or for CSh shells .tcshrc)

  # Sh based shell
  export PETSC_DIR=/opt/local/lib/petsc
  export SLEPC_DIR=/opt/local/lib/petsc

  # CSh based shell
  setenv PETSC_DIR /opt/local/lib/petsc
  setenv SLEPC_DIR /opt/local/lib/petsc

and type once again

  sudo port install feel++

In that order, slepc and petsc will be installed before atlas, and feel will be properly installed.

Missing ports

cmake can build Makefiles even if some packages are missing (latex2html, VTK ...). It's not necessary to install them but you can complete the installation with MacPorts, cmake will find them by itself once they have been installed.

top


Compiling

Feel build system uses cmake as its build system. Check that is using gcc4.5 (or a higher version) or clang++ as C++ compiler (you can use the option CMAKE_CXX_COMPILER=<path>/g++-4.5 where the path depends on your OS, it's probably /usr/bin or /opt/local/bin but you can also change it with the command ccmake and press t for advanced options). Feel++, using cmake, can be built either in source and out of source and different build type:

  • minsizerel : minimal size release
  • release release
  • debug : debug
  • none(default)

CMake Out Source Build (preferred) : The best way is to have a directory (FEEL for example) in which you have :

feel/

where feel is the top directory where the source have been downloaded. Placed in FEEL, you can create the build directory feel.opt for example) and lauch cmake with :

  mkdir feel.opt
  cd feel.opt
  cmake <directory where the feel source are>
  # e.g cmake ../feel if feel.opt is at the same
  # directory level as feel

you can customize the build type:

  # Choose g++ release
  cmake -CMAKE_CXX_COMPILER=/usr/bin/g++-4.5
  # Debug build type (-g...)
  cmake -D CMAKE_BUILD_TYPE=Debug
  # Release build type (-O3...)
  cmake -D CMAKE_BUILD_TYPE=Release
  ...

Once Cmake has made its work, you are now able to compile the library with

  make

Important : from now, all commands should be type in feel.opt or its subdirectories.

Compiling the Feel++ manual

The manual is edited with LaTeX so you need to have installed the LaTeX distribution on your computer. LaTeX is a high-quality typesetting system, it includes features designed for the production of technical and scientific documentation. There are several ways to make it work, for example you can go on MacTeX website and follow the instructions to install the distribution. If the command make check in feel.opt/ has been run before, the tutorial should be already compiled and ready. The steps are as follows to build the Feel tutorial

  cd feel.opt/doc/manual
  make feelpp-manual_pdf

The directory doc/manual contains all examples used in the tutorial. You will see how it works in the following parts.


Generated on Sun Oct 20 2013 08:25:06 for Feel++ by doxygen 1.8.4