Installation

This page describes how to build and install mimmo. It covers both the released and the development versions. mimmo depends mainly on two open source tools/libraries : cmake and bitpit. These are expected to be present on the machine on which mimmo is being built.

Dependencies

In order to build mimmo and bitpit library you need at least the following softwares (inside brackets the tested version):

Bitpit modules have additional dependencies, in order to have a list of the required libraries and softwares, please refer to bitpit documentation.

To take advangate of multi-processor systems, mimmo can be compiled, optionally, with parallel support. The parallel implementation of mimmo uses the Message-Passing Interface (MPI). The library was tested with OpenMPI implementation.

Download mimmo source code

If you are trying to build a mimmo release, download it from the download page. For the development version, please follow the instructions for checking it out from git.

Configure mimmo with CMake

Create a build directory where mimmo will be compiled. It is important to point out the mimmo needs to be always build in a separate build directory. Do not build in the source directory. mkdir $HOME/projects/mimmo-build cd $HOME/projects/mimmo-build

Use ccmake (Curses CMake GUI) from the CMake installed location. CCMake is a Curses based GUI for CMake. To run it go to the build directory and specify as an argument the source directory (<SOURCE_DIR>) of mimmo: ccmake <SOURCE_DIR> The ccmake configuration process is an iterative process. First select settings values and run the configuration (key c). After the configuration, new settings may appear. Select the values for the new settings and run the configration again. Repeat until all values are set and the generate option is available (g key).

Some variables (advanced variables) and mimmo additional modules are not visible right away. To see advanced variables, toggle to advanced mode (t key).

To set a variable, move the cursor to the variable and press enter. If it is a boolean (ON/OFF) it will flip the value. If it is string or file, it will allow editing of the string. For file and directories, the <tab> key can be used to complete.

mimmo settings

CMAKE_BUILD_TYPE
Sets the build type. The possible options are:
  • None, the environment compiler flags are used;
  • Release, using compiler optimization flag -O2;
  • Debug, related to compiler flags -O0 -fmessage-length=0;
  • RelWithDebInfo, that uses compilation flags -O2 -g;
  • MinSizeRel to have the smallest binary size.
ENABLE_PROFILING
Set to ON in order to add profiling flag -pg during the compilation.

BITPIT_DIR
Sets the installation directory of bitpit library (i.e. the directory where the files for findPackage utility reside).

BUILD_DOCUMENTATION
It defines if the Doxygen documentation has to be built or not. The compiled documentation can be navigated via html browser.
The compiled documentation is available at $HOME/projects/mimmo-build/doc/html.

BUILD_EXAMPLES
Controls the examples will be build (examples can be build built if all mimmo are compiled).
Note that the tests sources in mimmo/test are necessarily compiled and successively available at $HOME/projects/mimmo-build/test/ as well as the compiled examples are available at $HOME/projects/mimmo-build/examples/.

BUILD_XMLTUI
The BUILD_XMLTUI variable defines if the executable binary has to be compiled. The compiled executable mimmo++ is available at $HOME/projects/mimmo-build/binaries/.

ENABLE_MPI
Controls if mimmo will be compiled with parallel support and allow the dependency on MPI libraries.

MIMMO_MODULES
The module variables (available in the advanced mode) can be used to compile each module singularly by setting the related varible ON/OFF.
MIMMO_MODULE_CORE is always compiled, while for MIMMO_MODULE_GEOHANDLERS, MIMMO_MODULE_IOCGNS, MIMMO_MODULE_IOOFOAM, MIMMO_MODULE_PROPAGATORS and MIMMO_MODULE_UTILS the compilation can be toggled.
Possible dependencies between mimmo modules are automatically resolved. Dependencies on external libraries when possible are automatically resolved through find package command. Otherwise the setup for the new variables is required.

When possible, dependencies on external libraries are automatically resolved. Otherwise cmake will ask to specify the installation info of the missing packages. In particular:


CGNS_INCLUDE
It defines the include directory of cgns library.
CGNS_LIB
Path to the libraries directory of cgns package.
METIS_DIR
Installation path of metis library. If package is regularly found, a METIS_DIR_FOUND variable will be filled accordingly. Exposed only with ENABLE_MPI activated.
PARMETIS_DIR
Path to parmetis library. If package is regularly found, a PARMETIS_DIR_FOUND variable will be filled accordingly. Exposed with ENABLE_MPI activated.
OPENFOAM_ARCH
System architecture of OpenFOAM compilation, tipically it can be 64 or 32 (bit).
OPENFOAM_DISTRO
OpenFOAM distrivbution type. Allowed distributions: OpenFOAM Foundation and ESI-OpendCFD.
OPENFOAM_DIR
OpenFOAM installation directory, automatically filled if package is regularly found.
OPENFOAM_API
OpenFOAM API information, automatically filled when package is regularly found.

Build mimmo

After the configuration step, mimmo can be build using the command: make On multi-processor system (let's say two processor), compilation can be done in parallel typing: make -j 2 The compilation can be tested by run from the building folder: ctest

Install mimmo

mimmo can be installed typing: make install This will install all the relevant files in directories under the CMAKE_INSTALL_PREFIX. The executables are installed in ${CMAKE_INSTALL_PREFIX}/bin, the headers files are available at ${CMAKE_INSTALL_PREFIX}/include and the libraries are installed in ${CMAKE_INSTALL_PREFIX}/lib/mimmo-${major}.${minor}.${revision}.

Remember that if you choose the default installation path or another path without write permission you will need administration privileges to install mimmo in.

Use mimmo

mimmo can be used as a library in a custom cmake project. mimmo library can be included as a dependency together with its dependencies (bitpit and optionals). You can download a template C++ project that includes mimmo library at the following link.

  • mimmo-project.tar.gz