Cardioid is a cardiac multiscale simulation suite spanning from subcellular mechanisms up to simulations of organ-level clinical phenomena. The suite contains tools for simulating cardiac electrophysiology, cardiac mechanics, torso-ECGs, cardiac meshing and fiber generation tools.
Cardioid can be broken down into many separate simulators, each with their own dependencies.
-
Cardioid electrics: C99, C++, OpenMP, MPI, and Lapack. It requires a valid perl installation to build. It van also take advantage of CUDA, in which case it also depends on NVTX and NVRTC.
-
Cardioid fibers: Depends on C++ and MFEM.
-
Cardioid mechanics: Depends on C++ and MFEM.
-
Cardioid ecg: Depends on C++ and MFEM.
Some requirements are bundled into the build system, like libkdtree and simUtil.
We recommend compiling Cardioid using Spack.
To build Cardioid with spack, follow the following steps:
-
Clone Spack and set it up:
git clone https://github.com/spack/spack.git . spack/share/spack/setup-env.sh
-
Make a YAML file for your particular cluster telling the system where to find MPI, what compilers to use, where to find lapack, etc. Examples can be found in arch/*.yaml. We've created a script to automate this process and make it easier. This script will check your path for mpi, cuda, perl, and cmake. For more information on spack environments, Read here.
./setup_spack.pl YOURENV
-
Activate your environment
spack env activate YOURENV
-
Ask spack to configure your build
# to build regular cardioid: spack diy cardioid # to build cardioid with cuda support spack diy cardioid+cuda # to build cardioid and dependencies with mfem support spack diy cardioid++mfem
IMPORTANT: you must Ctrl-C spack once it starts to actually build Cardioid. This is a workaround in spack until they add a
--configure
option to the diy command. -
Once you've done this setup, typing "make" in cardioid will just work. Finish with your build
make build
-
If you close the terminal,
- Simply reload the spack environment:
spack env activate YOURENV
- Continue on building with your previous setup
make build
- Simply reload the spack environment:
Cardioid is built with CMake, using the BLT make system. A separate .cmake file is supplied for a variety of architectures. Please feel free to make your own .cmake architecture for your particular cluster if needed. Example .cmake architectures can be found in "arch/*.cmake" Each architecture can be given a separate name, allowing multiple different versions of the code to be built on the same system.
If no architecture file is supplied, BLT will try to pick sane defaults. To build everything, you will need to install MFEM manually to a directory of your choice and tell Cardioid where that installation lives (through the MFEM_DIR variable)
Builds are performed in build/<arch>
. Executables are installed in build/<arch>/bin
.
Please submit any bugfixes or feature improvements as pull requests.
Many thanks go to Cardioid's contributors.
- James P Glosli
- Tomas Oppelstrup
- Xiaohua Zhang
- David F Richards
- Robert Blake
- Erik Draeger
- Jean-Luc Fattebert
- Jamie Bramwell
- Arthur Mirin
- Sebastian Laudenschlager
- Viacheslav Gurev
- Jeremy Rice
- Changhoan Kim
- and many more...
Cardioid's history goes back a few years -- it was a finalist for the 2012 Gordon Bell Prize -- but only now is the code available as open source. Initially developed by a team of LLNL and IBM scientists, Cardioid divides the heart into a large number of manageable subdomains. This replicates the electrophysiology of the human heart, accurately simulating the activation of each heart muscle cell and cell-to-cell electric coupling.
- Video: The Cardioid Project: Simulating the Human Heart
- Science & Technology Review article: Venturing into the Heart of High-Performance Computing Simulations
- Science & Technology Review article: Reaching for New Computational Heights with Sequoia - Cardioid helped set speed records for the Sequoia supercomputer by clocking in at nearly 12 petaflops while scaling with better than 90% parallel efficiency across all 1,572,864 cores.
Cardioid is distributed under the terms of the MIT license. All new contributions must be made under this license.
See LICENSE and NOTICE for details.
SPDX-License-Identifier: MIT
LLNL-CODE-764041