CEPS
24.01
Cardiac ElectroPhysiology Simulator
|
Latest version released:
Previous versions
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 |
You can download and compile CEPS dependencies all at once by using the build system in contrib/build_dependencies
. Once in this directory:
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. |
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:
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:
Or
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:
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. |
Once the configuration step is complete, in the same directory as configuration, you can use:
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
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.
CEPS build, as well as the build_dependencies
script are tested on the following architectures:
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:
cmake
may cause problem with paths with non-ASCII characters (French developpers may encounter this with accentuated letters!)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.
It may be needed to link some shared VTK libraries at runtime. To do so:
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:
If you encounter ressources assignment problems, try
If the VTK libraries cannot be found at runtime, try
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:
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.