|
|
<!-- DOCTOC SKIP -->
|
|
|
|
|
|
# Feel++ as a library
|
|
|
# Preriquisites
|
|
|
|
|
|
Feel++ is installed as a library available thanks to the module. It is recommended to take that solution if you do not need to modify the library.
|
|
|
* Read module documentation first.
|
|
|
* The up to date documentation is available at [book.feelpp.org](https://book.feelpp.org/user-manual/) and should be the reference documentation.
|
|
|
|
|
|
* After the module configuration in your shell config file, add:
|
|
|
# Feel++ module (difficulty: easy)
|
|
|
|
|
|
Feel++ is installed as a library available thanks to the module. (module av `module av 2>&1 | grep feelpp-` to list available
|
|
|
versions.)
|
|
|
|
|
|
```sh
|
|
|
module load latest.testing.profile
|
|
|
module load science/feelpp/nightly
|
|
|
export CC=/usr/bin/clang-3.7
|
|
|
export CXX=/usr/bin/clang++-3.7
|
|
|
module load feelpp/profile
|
|
|
module load libs/feelpp-0.104
|
|
|
```
|
|
|
|
|
|
* The first line is to load the meta module that contains every Feel++ dependancies.
|
|
|
* The second is to load the library
|
|
|
* The two lasts are to use the same compiler as the one the library was installed with.
|
|
|
* The first line is to load the meta module that contains every Feel++ dependancies.
|
|
|
* The second is to load the library (adapt release version)
|
|
|
* Your root `CMakeLists.txt` has to be - considering you are trying to compile `yourCode.cpp`:
|
|
|
|
|
|
```sh
|
... | ... | @@ -34,4 +35,31 @@ endif() |
|
|
feelpp_add_application(youApplication SRCS yourCode.cpp)
|
|
|
```
|
|
|
|
|
|
* The last step is to run the `cmake /where/are/your/sources/files` and `make` commands in your build directory - typically `/ssd/YOUR_NAME/build` |
|
|
# Recompile Feel++ library (difficulty: average)
|
|
|
|
|
|
Load feel++ dependency libraries
|
|
|
|
|
|
```sh
|
|
|
module load feelpp.profile
|
|
|
```
|
|
|
|
|
|
Place yourself in a directory. Then clone Feel++ sources from github, then place yourself in a build directory, execute cmake to generate the makefiles.
|
|
|
|
|
|
```sh
|
|
|
git clone git@github.com:feelpp/feelpp.git
|
|
|
mkdir build && cd build
|
|
|
../feelpp/configure -r
|
|
|
```
|
|
|
|
|
|
At this stage, you can compile the whole framework as usual (NB it takes a long time)
|
|
|
|
|
|
```sh
|
|
|
make
|
|
|
make install # You should precise the --prefix option in configure to change default path.
|
|
|
```
|
|
|
|
|
|
A faster way is to compile only the desired application (it will only compile the required libraries only), for example
|
|
|
```
|
|
|
make -j8 feelpp_qs_laplacian
|
|
|
./quickstart/feelpp_qs_laplacian
|
|
|
``` |