A C++ package for low-frequency bio-electromagnetism solving forward problems in the field of EEG and MEG.
C++ CMake C Python Makefile Matlab Other
Clone or download
Failed to load latest commit information.
OpenMEEG group the header files into OpenMEEG folder (#326) Jun 27, 2018
OpenMEEGMaths group the header files into OpenMEEG folder (#326) Jun 27, 2018
apps clean-up Jun 6, 2018
build_tools fixup! Add gforge deploy in windows Mar 21, 2018
cmake [BUG-fix] don't use fancy c++ with /Za option in MSVC (#317) Jun 20, 2018
cmake_old [MRG] Enable to uninstall the package using: make uninstall (#301) May 1, 2018
data [MRG] new build system (#268) Mar 19, 2018
documentation remove tutorial latex Jun 5, 2018
examples @ 307a80f [MRG] new build system (#268) Mar 19, 2018
tests [MRG] new build system (#268) Mar 19, 2018
wrapping Add documentation with python binding docstrings (#289) Mar 30, 2018
.appveyor.yml [MRG+1] fix missing windows libraries (#311) Jun 12, 2018
.gitignore [MRG] new build system (#268) Mar 19, 2018
.gitmodules [MRG] new build system (#268) Mar 19, 2018
.mailmap Revert "remove useless adresses" Jul 31, 2017
.travis.yml Do not use coverage in shipping builds (#330) Jul 13, 2018
AUTHORS [MRG] new build system (#268) Mar 19, 2018
CMakeLists.txt [MRG+1] fix missing windows libraries (#311) Jun 12, 2018
ChangeLog changelog update [ci skip] (#288) Mar 28, 2018
Copyright.txt [MRG] new build system (#268) Mar 19, 2018
LICENSE.txt add forgotten LICENSE file (moved from OpenMEEG -> SP). May 15, 2017
NEWS [MRG] new build system (#268) Mar 19, 2018
OpenMEEGConfigure.h.in [MRG] add OpenMEEG versions to the executables (#275) Mar 21, 2018
README.rst fix EPEL link format (#328) Jul 11, 2018
coding_guidelines.txt [MRG] new build system (#268) Mar 19, 2018
file_header.txt [MRG] new build system (#268) Mar 19, 2018


Travis AppVeyor CodeCov condaVersion

OpenMEEG: forward problems solver in the field of EEG and MEG

The OpenMEEG software is a C++ package for solving the forward problems of electroencephalography (EEG) and magnetoencephalography (MEG).

OpenMEEG is distributed under the French opensource license CeCILL-B. It is intended to give users the freedom to modify and redistribute the software. It is therefore compatible with popular opensource licenses such as the GPL and BSD licenses. The CeCILL-B license imposes to anybody distributing a software incorporating OpenMEEG the obligation to give credits (by citing the appropriate publications), in order for all contributions to be properly identified and acknowledged.

Cite this software

The references to be acknowledged are

Gramfort A, Papadopoulo T, Olivi E, Clerc M. OpenMEEG: opensource software for quasistatic
bioelectromagnetics. Biomedical engineering online (2010) vol. 9 (1) pp. 45

Kybic J, Clerc M, Abboud T, Faugeras O, Keriven R, Papadopoulo T. Generalized head models for MEG/EEG: boundary element method
beyond nested volumes. Phys. Med. Biol. (2006) vol. 51 pp. 1333-1346


Install precompiled binaries

Binaries for Linux/Mac/Windows are available at Download precompiled binaries.

To install OpenMEEG via anaconda you can just do:

$ conda install -c conda-forge openmeeg

On Ubuntu/Debian GNU Linux you may be able use the http://neuro.debian.net package repository.

On Fedora:

$ dnf install openmeeg openmeeg-devel python2-openmeeg

On RHEL/CentOS 7, enable EPEL repositories and install:

$ yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
$ yum install openmeeg openmeeg-devel python2-openmeeg

Additional repositories recommended on RHEL 7:

$ subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms"

Build OpenMEEG from source

Unix (Linux & Mac OS X)

On Debian/Ubuntu you will need to install the dependencies with:

sudo apt-get install gcc g++ make cmake libopenblas-dev liblapacke-dev libhdf5-serial-dev libmatio-dev


sudo apt-get install python-dev python-numpy swig libvtk6-dev doxygen graphviz libcgal-dev

On Fedora and Centos:

sudo yum install gcc make cmake openblas-devel hdf5-devel matio-devel


sudo yum install python-devel python2-numpy swig vtk-devel doxygen cgal-devel

On Mac OS X, you'll need CMake. We recommend you install it with Homebrew using:

$ brew install cmake

To configure your environment with Homebrew install the following packages with the brew command:

$ brew install hdf5 libmatio
$ brew install openblas && brew link openblas --force


$ brew install vtk  # to have support for VTK file format
$ brew install Doxygen  # to build the documentation
$ brew install --with-qt5 cgal  # to use CGAL meshing tools

Then from a terminal:

$ git clone https://github.com/openmeeg/openmeeg.git


$ cd openmeeg
$ mkdir build
$ cd build
$ make

You will need to define more CMake variables if you want the support for:

  • Python wrapping, add "-DENABLE_PYTHON=ON".
  • VTK file format, add "-DUSE_VTK=ON".
  • CGAL meshing tools, add "-DUSE_CGAL=ON".
  • Reference documentation, add "-DBUILD_DOCUMENTATION=ON". Make sure to have doxygen with dot support.

Then you can run the full test suite with:

$ make

or if you just want to run the tests for OpenMEEG:

$ make test

If no test is failing you can install with:

$ make install

You should now be able to run the om_assemble command and see something like this:

$ om_assemble
om_assemble version 2.4.0 compiled at Mar 21 2018 18:17:12

om_assemble [-option] [filepaths...]

option :
   -HeadMat, -HM, -hm :
       Compute Head Matrix for Symmetric BEM (left-hand side of linear system).

In some Linux distributions (AMD64/X86_64) you may see some errors like this:

Error while loading shared libraries: libOpenMEEG.so.1: cannot open shared object file: No such file or directory

OpenMEEG puts its libraries in "/usr/local/lib64", which is not included in your loader's search path. If so, run this command as root:

# echo '/usr/local/lib64/' >> /etc/ld.so.conf && ldconfig

Now you can try to run the om_assemble again.

You can now give a try to OpenMEEG on the sample dataset.


You will need to install visual studio, CMake. Then download the source from github, load the CMake.exe GUI, set the proper option and generate the visual studio project. You can then open it and build the project. Note that on Windows we currently recommend to use Intel MKL library. See how we build OpenMEEG on AppVeyor: .appveyor.yml

Supported Blas-Lapack Implementations

Using OpenMEEG

Have a look into the tutorial for more info and for defining your geometry.

CeCILL-B full license

This software is governed by the CeCILL-B license under French law and abiding by the rules of distribution of free software. You can use, modify and/ or redistribute the software under the terms of the CeCILL-B license as circulated by CEA, CNRS and INRIA at the following URL "http://www.cecill.info".

As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, users are provided only with a limited warranty and the software's authors, the holders of the economic rights, and the successive licensors have only limited liability.

In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or developing or reproducing the software by the user in light of its specific status of free software, that may mean that it is complicated to manipulate, and that also therefore means that it is reserved for developers and experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the software's suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured and, more generally, to use and operate it in the same conditions as regards security.

The fact that you are presently reading this means that you have had knowledge of the CeCILL-B license and that you accept its terms.