Feel++ is distributed as a tarball once in a while. The tarballs are available at
Download the latest tarball.
tar -xzf feelpp-0.96.0.tar.gz cd feelpp-0.96.0
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 further directories such as:
applications/ # functional applications benchmarks/ # applications under test cmake/ # do not touch, used for compilation contrib/ data/ # geometric data doc/ # tutorial and examples feel/ # Feel++ library ports/ # used for Mac OS X installation quickstart/ # basic examples research/ # research projects using Feel++ scripts/ # various scripts testsuite/ # Feel++ unit tests testsuite CMakeLists.txt # the file for cmake to build, do not modify ...
In order to install Feel++ on Unix systems (other than Mac OS X, if 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++ libraries.
This is the list of all the libraries you must have installed on your computer, and the *-dev
packages for some of them.
Required packages:
Optional packages:
Note that all these packages are available under Debian GNU/Linux and Ubuntu. Once you have installed those dependencies, you can jump to Compiling Feel++.
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 encouraged to follow the Feel++ PTS page
At the moment Feel++ compiles and is available on the following Debian platforms:
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 install feel++-apps libfeel++-dev
The interested user might want to look at the following Ubuntu Launchpad Feel++ page Ubuntu Source Page for all Ubuntu versions
Feel++ has its own PPA, checkout feelpp ppa for Trusty, Saucy and Precise. It allows you to have a recent version of Feel++ on these three distributions. It allows us also to provide a recent version to compile the Feel++ projects on Travis-ci. The installation procedure is currently as follows
sudo add-apt-repository ppa:feelpp/ppa sudo add-apt-repository -y ppa:mapnik/boost-backports-1-54 sudo add-apt-repository -y ppa:kalakris/eigen sudo apt-get -qq update sudo apt-get install -qq libboost1.54-all-dev mpi-default-dev mpi-default-bin libeigen3-dev libcln-dev petsc-dev libxml2-dev gmsh bison flex doxygen doxygen-latex transfig imagemagick libtbb-dev libann-dev libglpk-dev sudo apt-get install feel++-apps libfeel++-dev
Feel++ is also supported on Mac operating systems, starting from OS X 10.9 Mavericks. The way to make it work is quite different.
In order to make Feel++ and cmake
work properly, you first have to install Xcode for Gcc/clang.
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 requires a lot of memory). You can also install Xcode through the App Store. Xcode will provide your computer all the basic tools to compile, such as gcc and clang. It's the first step, you'll see later how to easily install the necessary tools to build Feel++.
Currently, building Feel++ is only available through Homebrew. MacPorts versions are also present in the source tree of Feel++. You can find a version using gcc in <path to top feel directory>/ports/macosx/macports, and an experimental version using clang/libc++ in <path to top feel directory>/ports/macosx/macports-xc5.
Introduction: Homebrew is a free/open source software introduced to simplify the installation of other free/open source software on the MacOS X ecosystem. It is distributed under the BSD 2 Clause (NetBSD) license. For more information, visit their website.
Installation: To install the latest version of Homebrew, simply visit their website and follow the instructions. Each new package Homebrew installs is built into an intermediate place called the Cellar (usually /usr/local/Cellar) and then the packages are symlinked into /usr/local (default).
Key commands: Homebrew base command is brew
. Here is a list of useful commands to use Homebrew:
brew doctor
: Check if the system has any problem with the current installation of brew, brew install mypackage
: This action installs the package mypackage, brew install [–devel|–HEAD] mypackage
: These action respectively installs either the development version or the HEAD version of the package mypackage, if such versions are specified in the Formula file, brew uninstall mypackage
: This action uninstalls the package mypackage.Formula: A Formula is a Ruby script describing to Homebrew how to install a package. Feel++ uses specific Formulae that you can get in the Feel++ github repository: feelpp/homebrew-science.
This section is aimed at users that do not have Homebrew already installed. If it is not your case, keep in mind the repository to tap and see the next section so you do not miss any important dependency.
In order to build Feel++ from Homebrew, you have to do the following steps:
# Install Homebrew: ruby -e "$(curl -fsSL https://raw.github.com/feelpp/homebrew/go)" # Check that everything is ok or fix warnings/errors if necessary: brew doctor # Get the Formulae specific to Feel++ on the github of feelpp: brew tap feelpp/science # Install Feel++: brew install feelpp
And you should be set to use Feel++ on MacOS X.
If Homebrew is already installed on your system, you might want to customize your installation for the correct dependencies to be met for Feel++.
You can browse Feel++ dependencies using the following command:
brew deps feelpp
If you want to customize the compilation process for a dependency (Set debug mode, Remove checking steps, Remove the link with certain libraries, etc.), you can access to the building options with the info
flag. For exemple, with open-mpi:
user@server: brew info open-mpi open-mpi: stable 1.7.5 http://www.open-mpi.org/ Conflicts with: lcdf-typetools, mpich2 /usr/local/Cellar/open-mpi/1.7.5 (761 files, 23M) * Built from source From: https://github.com/Homebrew/homebrew/commits/master/Library/Formula/open-mpi.rb ==> Dependencies Required: libevent ==> Options --c++11 Build using C++11 mode --disable-fortran Do not build the Fortran bindings --enable-mpi-thread-multiple Enable MPI_THREAD_MULTIPLE
You then just have to pass the needed flags, when installing the dependency.
When you install feelpp with brew install feelpp
, the default flags for each dependency will be used. If you require specific flags, first install the dependency with the correct flags before installing Feel++.
Important: Needed dependencies for Feel++:
boost
needs to be installed with the following flags: –without-python –without-single –without-static –with-mpi –c++11
mumps
needs to be installed with the following flag: –with-scotch5
Tips: Reducing the compilation time:
scalapack
can be installed with the following flag: –without-check
Introduction: MacPorts is an open-source community projet which aims to design an easy-to-use system for compiling, installing and upgrading open-source software on Mac OS X operating system. It is distributed under BSD License and facilitate the access to thousands of ports (software) without installing or compiling open-source software. MacPorts provides a single software tree which includes the latest stable releases of approximately 17700 ports targeting the current Mac OS X release (10.9). If you want more information, please visit 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 install it with the Mac OS X Installer using the pkg
file provided on their website. 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-2.x.x.pkg
) 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.7 or later e.g /opt/local/bin/g++-mp-4.7
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 mypackage
: 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
.
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 sudo 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.
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.
There is an experimental version of ports for Feel++ in <path to top feel directory>/ports/macosx/macports-xc5. Using these ports will set up the compilation using clang and libc++. The process is similar to the one previously described for MacPorts, except for one point: Before starting to install packages, you must switch to the llvm c++ standard library by adding the following line to your macports.conf file:
cxx_stdlib libc++
This requires MacPorts to be at least on version 2.2.1 for the flag to be recognized and will normally cause all the packages you will install to be recompiled using libc++ instead of libstdc++.
Feel++ uses cmake
as its build system. Check that is using gcc4.7 (or a higher version) or clang++ as C++ compiler (you can use the option CMAKE_CXX_COMPILER=<path>/g++-4.7
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:
CMake Out Source Build (preferred): The best way is to have a directory (FEEL
for example) in which you have:
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++ # Debug build type (-g...) cmake -D CMAKE_BUILD_TYPE=Debug # Release build type (-O3...) cmake -D CMAKE_BUILD_TYPE=Release ...
Per-system specific configuration: If you need to set specific CMake variables to fit an exotic system (e.g. supercomputer), you can create a machine file fitting this system. To do so, simply create a file named feelpp.machines.<name>.cmake
in the cmake/machines
directory, where <name>
is the machine name returned by the execution of uname -n
. The file will automatically be recognized and loaded, when you will be compiling Feel++ on this system.
Once CMake has done its work, you are now able to compile the library with:
make
You can speed up the compilation process, if you have a multicore processor. To do so, you have to specify the number of parallel jobs make
will be allowed to spawn by using the -j
flag:
make -j <nbjobs>
Important: from now on, all commands should be typed in feel.opt
or its subdirectories.
Unit tests:
Feel++ comes with built-in unit tests to ensure that the library is working correctly. You can launch basic tests based on the quickstart application by typing:
make check
Or you can execute the whole testsuite, by typing the following command: (This might take a while)
make check-full