Installation

Currently, FEniCS is only working properly on Linux (and maybe Mac) systems. Therefore, custEM was developed and is restricted to Linux up to now. There are two recommended and quite robust ways to install FEniCS, pyGIMLi and TetGen as requirements for custEM:

  1. Installation via conda on Linux systems

  2. Installation on Ubuntu or maybe further (not tested) Linux systems

Alternative installation procedures for FEniCS, i.e., the Docker environment, can be tested by users. However, this is not straightforward and making pyGIMLi available at the same time is tricky.

GitLab repository: https://gitlab.com/Rochlitz.R/custEM/

For installation issues and questions please contact the authors:

Important notes:

  • Depending on your computer architecture, it might be necessary to set the following environment vaiable to prevent the MUMPS internal OpenMP parallelization via running the command:

—> export OMP_NUM_THREADS=1

  • If you experience significantly more processes are used than set in the mpirun call and the computation lasts unreasonably long, not setting this flag is the reason. It might be reasnoable to use a mix of MPI and OpenMP parallelization, in that case test using more than 1 OMP_NUM_THREADS.

  • Running multiple forward simulations at the same time for inversion with the MultiFWD class only works with the library “mpich”, not with openmp! With installation option 3, this choice is ensured automatically, otherwise users might specify this dependency during the environment build manually.




Further notes

  • It is recommended to add all the export commands to your bashrc file.

  • If custEM was installed via conda, it is recommended to add the ‘-u’ flag after ‘python’ in the commmand promt calls to force all prints to appear in time and not delayed, e.g.:

    –> mpirun -n 12 python -u run_script.py

  • Pure forward modeling (not using the MultiFWD class) are generally run from the command line using the syntax “mpirun -n XX python …”

  • Modelings or inversion making use of the MultiFWD class are genereally run from the command line using the syntax “python …”. Note, that here the MPI parallelization is performed automatically across multiple frequencies which are simulated in parallel.

  • In order to use the provided jupyter notebook tutorials, jupyter needs to be installed after all other steps listed below:

    –> pip install jupyter

  • Computation times might be speed up with reducing the number of mpirun processes (e.g., 8 instead of 32) and enabling OpenMP parallelization during the solution of the system of equations via MUMPS with adjusting the flag OMP_NUM_THREADS, e.g., export OMP_NUM_THREADS=4 instead of 1.