Skip to content

HOWTO interface a new dependency library

Andrea Lani edited this page Oct 5, 2017 · 18 revisions

COOLFluiD already depends on a few packages, whose main ones are reviewed here. If you need to interface a new package, there are a few necessary steps that you have to follow, requiring the following modifications:

  1. prepare.pl: you need to define a set of new variables to be configured in the coolfluid.conf;
  2. cmake-based build system: the new variables have to be mapped to cmake environmental variables;
  3. if a module (kernel or plugin) depends on the new package, the corresponding CMakeLists.txt must be modified;
  4. coolfluid.conf: you have to set the new variables to the corresponding values.

There are plenty of examples one can look at, but for illustrative purposes we will look at the Mutation++ example.

1) prepare.pl modifications:

We add the new package to the list of dependency libraries:

my @libraries = (..., "mutationpp", ...).

We create some new variables (e.g. flags, library and include paths) and set default values inside my %default_options = (...):

  • 'with_mutationpp' => 0, : this flag controls whether the library is activated;
  • 'mutationpp_dir' => "",: this string gives the root path of the library;
  • 'mutationpp_librarydir' => "/usr/lib64",: this string gives the library path;
  • 'mutationpp_includedir' => "/usr/include",: this tring gives the include path.

We map library and include paths to cmake environmental variables by declaring them as:

my @dep_variables = ( ..., "mutationpp_librarydir", "mutationpp_includedir").

We directly map the activation flag to an environmental variable to be used later:

setup_option('with_mutationpp', 'CF_ENABLE_MUTATIONPP');

Contacts

Home

Gallery

HOWTO

2019 NASA Ames presentation

2014 NASA Ames presentation


parallel computations of complex problems

Parallel mesh decomposition


Scalability in large scale simulation

High-performance computing (strong scaling on NASA Pleiades for 1/2 billion-cells 3D grid)


Modeling of high-speed reacting flows and plasma

Chemically reacting flows and plasma


Numerical Schlieren of turbulent flow on wing computed with RDS-LES

Complex all-speed flow simulations

Clone this wiki locally