fmf2
is an efficient seismic matched-filter search, with inspiration from
fast_matched_filter
. The
main difference is that FMF2 uses SYCL as
its GPU backend and a slightly updated build process based around
Cython and
scikit-build.
To build this library one needs a recent Python version, a C compiler and CMake. Building is taken care of by Python, which eventually will call out to CMake. It is recommended to create a virtual environment before installing the library. For the GPU backend hipSYCL is required, but this will be dynamically detected at compile time and enabled/disabled based on availability.
# Optional:
python3 -m venv fmf2_env
source fmf2_env/bin/activate
# Build and install the library
python3 -m pip -v install .
If you are rebuilding this library and it fails without an apparent cause, a
trick can be to remove the temporary _skbuild/
directory.
To change the build options when building with Python prepend the build command
with CMAKE_ARGS="-DOPTION=..."
to inform CMake.
CMAKE_ARGS="-DCPU_SKIP=OFF" python3 -m pip -v install .
To test the installation one can use pytest
:
# Install test dependencies
python3 -m pip install pytest pytest-benchmark
# Run tests
pytest -m "not slow"
The above test command will run the quick verification tests that finish within
a few seconds. Removing the -m "not slow"
will run the longer performance
benchmark which can be used to ensure good performance of the different
backends. Note that the performance benchmark requires additional datasets that
are too big to include in git.