CEPS  24.01
Cardiac ElectroPhysiology Simulator
Installation

Download sources

Latest version released:

Previous versions

Dependencies

First, on top of a C++ compiler, the compilation of CEPS and its dependencies requires the following packages to be installed.

Distribution Package names
Ubuntu pkgconf, libgl1-mesa-dev, libxt-dev, zlib1g-dev, flex, bison
CentOS pkgconfig, mesa-libGL-devel, libXt-devel, zlib-devel, flex, bison

In addition, the following libraries must be installed on your system.

Dependency Download link of tested version Remarks
CMake >3.12 Should be available as package or module for your OS
openMpi 4.1.5 Other MPI implementations should work
Eigen 3.4.0
PETSc 3.18.5 We plan to change the linear algebra library in some time
Blas Lapack 3.4.2 Required (and automatically downloaded) by PETSc
PTScotch 6.0.6 We plan to upgrade to scotch >=7 soon
VTK 9.2.6 Should work with version >=8
CxxTest 4.4 Required if you wish to run unit tests

Automated download and build of all dependencies

You can download and compile CEPS dependencies all at once by using the build system in contrib/build_dependencies. Once in this directory:

mkdir build && cd build
cmake <options> ..
make

Here is the list of cmake options that can be given using the -DOPTION:TYPE=VALUE syntax.

Cmake option Type Default value Description
PREFIX STRING Mandatory. Specifies where libraries will be installed.
THREADS_COMPIL INTEGER 1 Number of CPUS used for compilation.
WITH_64_BITS_INTEGERS BOOL False Use 64 bits integers for indices.
USE_OPTIM BOOL False Compile libraries without debug symbols. Use it if CEPS will be compiled for production runs.
NO_DOWNLOAD BOOL False Set it to true if your machine has download restrictions. You will have to place manually the archives listed in the table above (including BlasLapack) into a directory called downloads that must be placed in the build_dependencies directory.

Configuration of CEPS

CEPS uses CMake to configure the code and the build for your system. In order to generate the Makefiles properly, the following environment variables must be set to the absolute paths of your libraries locations:

EIGEN_DIR
PETSC_DIR
PETSC_ARCH (if relevent, cf your PETSc installation)
SCOTCH_DIR
VTK_DIR
CXXTEST_DIR

This can be done either through export commands, which can be put in your .bashrc or .bash_profile, or using a preload file to give to CMake using the option -C (see below). The automated build of dependencies generates such a file in your installation directory.

To configure:

mkdir build && cd build
cmake ..

Or

mkdir build && cd build
cmake -C /path/to/the/preload/file ..

It is highly recommended to compile CEPS with the same MPI compiler you used to build PETSc. To do this, use the following cmake command line:

cmake -DCMAKE_CXX_COMPILER=/path/to/mpi/compiler -C /path/to/the/preload/file ..

Here are the structuring options which are specific to CEPS and can be set during configuration, by using the -DOPTION:TYPE=VALUE syntax.

Cmake option Type Default value Description
BUILD_TYPE STRING Debug Can be either "Debug" or "Release. "Debug" option activates the debug symbols and disables any optimization (-g -O0 flags). "Release" discards debug symbols and uses optimization (-O3). The build type should match the build type of the libraries you link CEPS with.
WITH_64_BIT_INTEGERS BOOL OFF Set to "ON" to compile with 64 bits integers. This setting *must* match the build options of the libraries.
WITH_DOUBLE_PRECISION BOOL ON Use single (float) or double precision floating point numbers. This setting *must* match the build options of the libraries.
CXXTEST_MPI_FLAGS STRING "" Options with which unit tests will be run. See troubleshooting section.

Compilation of CEPS

Once the configuration step is complete, in the same directory as configuration, you can use:

make : build ceps executable (will be located in same directory)
make tests : build only unit tests
A namespace for all utility methods.

Unit tests

Note that the unit tests are not compiled when running make, you have to explicit compile them with make tests (plural). Once built, the tests can be run by using make test (singular) or just ctest. Some non-regression tests require a longer time to run (>15 seconds). You can select the type of tests to run with

ctest : run all tests
ctest -E ^LongTest : run only short unit tests
ctest -R LongTest : run only non-regression tests

Short unit tests are sufficient for coverage of code. Longer tests usually check that we can reproduce a solution to a complex cardiac PDE. Note that many tests are run on 4 CPUs. Use the -j option of ctest in accordance.

Tested platforms

CEPS build, as well as the build_dependencies script are tested on the following architectures:

  • Through continuous integration:
    • Ubuntu latest
  • Developpers machines:
    • Ubuntu 22.04
    • CentOS 7.6.1810

Troubleshooting

  • cmake not found or cmake version not compatible.

Some distributions provide old versions of CMake in their package repositories. You can download CMake and compile it on your own. Then, instead of just typing cmake at configuration step, provide the full path to your newly installed cmake binary. For example:

/home/me/mySofts/myCmakeInstallDir/bin/cmake ..
  • Be aware that cmake may cause problem with paths with non-ASCII characters (French developpers may encounter this with accentuated letters!)
  • At compilation, there is an error message about integer size incompatibility

This is usually the case when ceps includes petsc.h from a wrong directory. This error arose when either not compiling in a clean directory, or, weirdly enough when LD_LIBRARY_PATH is set. So you should clear that environment variable before compilation.

  • Missing runtime libraries when trying to use ceps executable:

It may be needed to link some shared VTK libraries at runtime. To do so:

export LD_LIBRARY_PATH="/path/to/the/VTK/lib:$LD_LIBRARY_PATH"
  • MPI troubles when running ctest

Note : all the following flags can be cumulated. Some of these flags may already be set at configuration after PETSc's options.

If you are running ctest as root, then you must add this option at configuration step, on top of all other options:

cmake -DCXXTEST_MPI_FLAGS="--allow-run-as-root" <other options> ..

If you encounter ressources assignment problems, try

cmake -DCXXTEST_MPI_FLAGS="--oversubscribe" <other options> ..

If the VTK libraries cannot be found at runtime, try

cmake -DCXXTEST_MPI_FLAGS="-x LD_LIBRARY_PATH" <other options> ..

Test your installation by running examples.

Several examples of input files are located in the directory called examples (!). The commands that must be executed to run the examples are given in the header of each input file. For example, in order to run the monodomain simulation on 4 cores, assuming you have compiled CEPS in a build directory, against a MPI implementation located in /path/to/my/ceps/libs, and that you have not moved the executables:

cd examples
/path/to/my/ceps/libs/bin/mpiexec -n 4 ../build/ceps monodomain.in -v

If all goes well, you will now have a results directory which contains the output of the simulation. You can visualize the results by opening the .pvtu.series file in this directory with Paraview. An activation map is written in the *_APD.pvtu.series file.