Installation
PETGEM is built with make against an existing PETSc installation. It
targets Linux; a Docker image with the full dependency stack is provided.
Requirements
PETSc built with MPI and complex scalars. The configuration used by the project image is:
./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran \ --download-mpich --download-fblaslapack \ --with-scalar-type=complex --download-mumps --download-scalapack \ --download-ptscotch --download-cmake --with-debugging=1 \ --download-hdf5 --download-triangle
petsc4py(used by the Python preprocessing).Gmsh - mesh generation.
Python 3 with
numpy,h5py,meshio;matplotlibfor the example post-processing scripts,pytestfor the test suite.Extrae - optional, for performance tracing (
make USE_EXTRAE=1).doxygenplus the packages indocs/requirements.txt- optional, to build the documentation.
PETSC_DIR and PETSC_ARCH must be set; the Makefile stops with an
explicit error if PETSC_DIR does not point at a PETSc installation.
Docker
The image in docker/ provides PETSc (complex scalars), Gmsh, Extrae, and
the Python stack:
git clone https://github.com/ocastilloreyes/petgem.git
cd petgem
docker build -t petgem-env -f docker/dockerfile.release .
docker run --rm -it -v $(pwd):/workspace -w /workspace petgem-env bash
# inside the container
make
See Quickstart for a first run.
Building
make builds all three binaries into build/:
build/fm.csem- forward kernelbuild/im.csem- inverse kernelbuild/petgem- dispatcher
With USE_EXTRAE=1 the binaries are suffixed .extrae
(build/fm.csem.extrae, …). A single binary can be built on its own, e.g.
make build/fm.csem.
Makefile targets
Target |
Description |
|---|---|
|
Build |
|
Remove |
|
Build the documentation (Doxygen XML + API stubs + Sphinx HTML) |
|
Remove generated documentation artifacts |
|
List targets and build options |
Build options
Set as make <target> OPTION=1:
Option |
Description |
|---|---|
|
Build with Extrae instrumentation (requires |
|
Force Intel compiler flags. Auto-detected from PETSc’s |
|
Echo full compiler and linker command lines |
|
Disable colored build output |
Python helpers
The scripts under utils/ run directly from a clone - utils/preprocess.py
adds the in-tree package to sys.path itself, so no install step is required:
python3 utils/preprocess.py -mode fm ...
To import the package as petgem from your own scripts:
pip install -e .