diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 000000000..21c76f7c7 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,13 @@ +# Commits listed here are skipped by `git blame` so that large, purely mechanical +# changes (whitespace, indentation, reformatting) do not obscure the real authorship +# of each line. GitHub honours this file automatically. Locally, run once: +# +# git config blame.ignoreRevsFile .git-blame-ignore-revs +# +# RULES: +# * Only add commits that are PURELY formatting -- no behavioural or semantic +# change, no documentation-content change. Keep such passes in their own +# isolated commit so the whole commit can be safely ignored. +# * Add the full 40-character commit SHA, with a comment naming what it did. +# +# (No revisions yet -- add the whitespace/indentation pass SHA here when it lands.) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 248a5ad8f..98e8df7bd 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -2,8 +2,14 @@ name: Build and test wheels 🐍 on: push: + # feature branches get their CI from the pull_request trigger; running the + # push event there too just produced a cancelled twin whose never-started + # jobs render as 0s "failures" with raw matrix-template names in the PR + # checks list. for a branch without an open PR, use the workflow_dispatch + # trigger defined below. branches: - - '**' + - develop + - main paths-ignore: - 'python/docs/**' - 'doc_resources/**' @@ -11,6 +17,10 @@ on: - '**/*.md' - '**/*.html' - '.github/workflows/build_docs.yml' + # A version-only bump (single source of truth) changes nothing that needs + # building/testing; the actual release reruns full CI via publish.yml's tag + # trigger (workflow_call). See CMakeLists.txt / pyproject.toml. + - 'VERSION' pull_request: paths-ignore: - 'python/docs/**' @@ -19,6 +29,7 @@ on: - '**/*.md' - '**/*.html' - '.github/workflows/build_docs.yml' + - 'VERSION' workflow_call: inputs: minimal: @@ -45,10 +56,27 @@ on: default: false concurrency: - group: build-${{ github.ref }} + group: build-${{ github.head_ref || github.ref_name }} cancel-in-progress: true +# Single source of truth for the eigenpy version built from source for the +# Linux/macOS wheels. Pin exact for reproducible builds; bump deliberately +# (eigenpy >= 3.13 requires Python >= 3.10, so the wheel matrix drops 3.9). +env: + EIGENPY_VERSION: "3.13.0" + # Opt JavaScript actions into Node 24 (Node 20 is being removed from the runners). + # Silences the conda-incubator/setup-miniconda@v3 (and other node20 action) deprecation. + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" + jobs: + # Cheap, Doxygen-only gate (no compilation). Every job that actually builds + # the C++ core `needs` this, so a documentation error fails the run in ~1 minute + # and NO expensive build/test job ever starts. Surfacing this late (e.g. only at + # docs-publish time) would waste the whole build matrix on a doc typo. + doc_lint: + name: Documentation lint + uses: ./.github/workflows/doc_lint.yml + set_matrix: name: Set OS matrix runs-on: ubuntu-latest @@ -69,17 +97,18 @@ jobs: echo 'python_versions=["3.11"]' >> $GITHUB_OUTPUT elif [[ "${{ github.ref }}" == "refs/heads/main" || "${{ github.ref }}" == "refs/heads/develop" || "${{ github.ref }}" == refs/tags/* || "${{ inputs.full_matrix }}" == "true" || "${{ github.event.pull_request.base.ref }}" == "develop" || "${{ github.event.pull_request.base.ref }}" == "main" ]]; then echo 'os=["ubuntu-latest","macos-14"]' >> $GITHUB_OUTPUT - echo 'python_versions=["3.9","3.10","3.11","3.12","3.13","3.14"]' >> $GITHUB_OUTPUT + echo 'python_versions=["3.10","3.11","3.12","3.13","3.14"]' >> $GITHUB_OUTPUT else - echo 'os=["ubuntu-latest","macos-14"]' >> $GITHUB_OUTPUT + echo 'os=["ubuntu-latest"]' >> $GITHUB_OUTPUT echo 'python_versions=["3.11"]' >> $GITHUB_OUTPUT fi test_cpp_unix: name: C++ tests on ${{ matrix.os }} if: ${{ inputs.minimal != true }} - needs: [set_matrix] + needs: [doc_lint, set_matrix] runs-on: ${{ matrix.os }} + timeout-minutes: 30 # backstop against a hang; healthy runs are ~7 min strategy: fail-fast: false matrix: @@ -91,11 +120,22 @@ jobs: if: runner.os == 'Linux' run: | sudo apt-get update - sudo apt-get install -y wget libgmp-dev libmpfr-dev libmpc-dev libeigen3-dev libtool + sudo apt-get install -y wget libgmp-dev libmpfr-dev libmpc-dev libeigen3-dev libtool openmpi-bin libopenmpi-dev ccache - name: Install system dependencies (macOS) if: runner.os == 'macOS' - run: brew install gmp mpfr libmpc eigen@3 + run: brew install gmp mpfr libmpc eigen@3 open-mpi ccache + + # compiler cache: makes recompiles of unchanged C++ near-free. the key is + # deliberately loose (always save fresh, restore newest) -- ccache does its + # own invalidation; do not key on file hashes. + - name: Cache ccache + uses: actions/cache@v5 + with: + path: .ccache + key: ccache-cpp-${{ matrix.os }}-${{ github.sha }} + restore-keys: | + ccache-cpp-${{ matrix.os }}- - name: Build Boost base (Linux) if: runner.os == 'Linux' @@ -120,6 +160,8 @@ jobs: ./b2 install -j2 hardcode-dll-paths=true dll-path=/tmp/boost-base/lib - name: Configure + env: + CCACHE_DIR: ${{ github.workspace }}/.ccache run: | cmake -B build \ -DCMAKE_PREFIX_PATH=/tmp/boost-base \ @@ -127,22 +169,78 @@ jobs: -DENABLE_UNIT_TESTING=ON \ -DINSTALL_DOCUMENTATION=OFF \ -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON \ - -DCMAKE_BUILD_TYPE=Release + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - name: Build - run: cmake --build build --parallel 2 - - - name: Test + env: + CCACHE_DIR: ${{ github.workspace }}/.ccache + CCACHE_MAXSIZE: 400M + # Linux runners are 4-core/16 GB and the heaviest TU peaks ~4 GB (ADR-0019), so the full + # 4-way build fits; the 3-core/7 GB macOS runner stays at 2. See ADR-0004. + run: cmake --build build --parallel ${{ runner.os == 'Linux' && 4 || 2 }} + + - name: ccache stats + if: always() + env: + CCACHE_DIR: ${{ github.workspace }}/.ccache + run: ccache -s || true + + # Run the suite under BOTH thread settings. OMP_NUM_THREADS overrides the requested per-solve + # thread count (parallel::EffectiveThreadCount), so the serial and threaded code paths genuinely + # differ; running both on every platform catches threading bugs (e.g. clone-per-thread) that a + # single setting would hide. `--parallel` is ctest's *process* parallelism (independent of the + # per-solve OMP count), so each leg still runs the test executables concurrently. + - name: Test (threaded + OMP_NUM_THREADS=1) working-directory: build env: LD_LIBRARY_PATH: /tmp/boost-base/lib:/tmp/boost-base/lib64 DYLD_LIBRARY_PATH: /tmp/boost-base/lib - run: ctest --output-on-failure --parallel $(nproc 2>/dev/null || sysctl -n hw.ncpu) + run: | + set -e + jobs=$(nproc 2>/dev/null || sysctl -n hw.ncpu) + echo "::group::ctest with OMP_NUM_THREADS unset (per-solve threading on)" + env -u OMP_NUM_THREADS ctest --output-on-failure --timeout 600 --parallel "$jobs" + echo "::endgroup::" + echo "::group::ctest with OMP_NUM_THREADS=1 (per-solve serial)" + OMP_NUM_THREADS=1 ctest --output-on-failure --timeout 600 --parallel "$jobs" + echo "::endgroup::" + + # The published wheels ship WITHOUT MPI (we can't know the user's MPI), but this C++ build is + # MPI-enabled (openmpi is installed above), so we verify the MPI runtime path actually works + # on each OS we support -- and, crucially, that it gives the SAME answer as the serial solve. + # The blackbox CLI reads a file named `input` from the cwd and writes the solution count as + # the first line of `main_data`. mpirun -n 2 = one manager + one worker (the minimal pool). + # + # Run BOTH start-system families, because DistributeSystems broadcasts the start system to the + # workers and a dropped serialized member is invisible until that exact start system is sent. + # small.b2 (one affine group) infers total-degree; small_mhom.b2 (two groups) infers the + # multihomogeneous start system -- whose serialize() was once incomplete, crashing every worker. + - name: MPI smoke test (CLI under mpirun) + working-directory: build/core + env: + LD_LIBRARY_PATH: /tmp/boost-base/lib:/tmp/boost-base/lib64 + DYLD_LIBRARY_PATH: /tmp/boost-base/lib + run: | + set -e + for case in small small_mhom; do + cp "$GITHUB_WORKSPACE/benchmark/inputs/${case}.b2" input + ./bertini2 >/dev/null 2>&1 + serial=$(head -n1 main_data); rm -f main_data + mpirun -n 2 --bind-to none ./bertini2 >/dev/null 2>&1 + parallel=$(head -n1 main_data); rm -f main_data + echo "${case}: solution count serial=$serial mpi(-n 2)=$parallel" + test -n "$serial" + test "$serial" = "$parallel" # MPI must match serial, not merely run + done test_cpp_windows: name: C++ tests on Windows if: ${{ inputs.minimal != true }} + needs: [doc_lint] runs-on: windows-latest + timeout-minutes: 40 # backstop against a hang; the clang-cl build+test is ~22 min env: CONDA_PKGS_DIRS: ${{ github.workspace }}\conda_pkgs steps: @@ -161,7 +259,7 @@ jobs: with: activate-environment: b2-windows environment-file: environment-win.yml - auto-activate-base: false + auto-activate: false channel-priority: strict - name: Configure and build C++ tests @@ -174,6 +272,13 @@ jobs: $env:CMAKE_GENERATOR_TOOLSET = '' $env:CMAKE_PREFIX_PATH = "$env:CONDA_PREFIX\Library" + # The GitHub Windows runner now ships Visual Studio 2026 (MSVC 14.51), whose STL + # hard-asserts (STL1000) that the compiler is Clang >= 20; the conda + # clang-cl is older. The only errors are that version gate -- the C++17 code compiles + # fine -- so we opt out of the gate. (Proper fix: ship a clang >= 20 toolchain.) + $env:CXXFLAGS = '-D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH' + $env:CFLAGS = '-D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH' + $boostHeader = "$env:CONDA_PREFIX\Library\include\boost\archive\archive_exception.hpp" (Get-Content $boostHeader).Replace('public virtual std::exception', 'public std::exception') | Set-Content $boostHeader @@ -181,19 +286,32 @@ jobs: -DCMAKE_PREFIX_PATH="$env:CONDA_PREFIX\Library" ` -DBUILD_PYTHON_BINDINGS=OFF ` -DENABLE_UNIT_TESTING=ON ` + -DUSE_CCACHE=OFF ` -DINSTALL_DOCUMENTATION=OFF ` -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON ` -DCMAKE_BUILD_TYPE=Release cmake --build build --parallel - - name: Test + # Run under both per-solve thread settings (see the unix C++ test job for the rationale). + - name: Test (threaded + OMP_NUM_THREADS=1) shell: pwsh working-directory: build - run: ctest --output-on-failure --parallel + run: | + Remove-Item Env:\OMP_NUM_THREADS -ErrorAction SilentlyContinue + Write-Host "::group::ctest with OMP_NUM_THREADS unset (per-solve threading on)" + ctest --output-on-failure --timeout 600 --parallel + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + Write-Host "::endgroup::" + $env:OMP_NUM_THREADS = '1' + Write-Host "::group::ctest with OMP_NUM_THREADS=1 (per-solve serial)" + ctest --output-on-failure --timeout 600 --parallel + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + Write-Host "::endgroup::" build_macos_ubuntu_wheels: name: ${{ matrix.os }} Python-${{ matrix.python-version }} wheels - needs: [set_matrix] + needs: [set_matrix, test_cpp_unix] + if: ${{ !failure() && !cancelled() }} runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -214,11 +332,29 @@ jobs: ~/Library/Caches/Homebrew /tmp/boost_1_90_0.tar.bz2 /tmp/eigen-3.4.0.tar.gz - /tmp/eigenpy-3.12.0.tar.gz - key: ${{ runner.os }}-cibw-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml', 'python/pyproject.toml', 'CMakeLists.txt', 'core/CMakeLists.txt', '.github/workflows/build_and_test.yml') }} + /tmp/eigenpy-${{ env.EIGENPY_VERSION }}.tar.gz + key: ${{ runner.os }}-cibw-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml', 'python/pyproject.toml', 'CMakeLists.txt', 'core/CMakeLists.txt', '.github/workflows/build_and_test.yml', 'python_bindings/include/tracker_export.hpp', 'python_bindings/include/endgame_export.hpp') }} restore-keys: | ${{ runner.os }}-cibw-${{ matrix.python-version }}- ${{ runner.os }}-cibw- + # compiler cache for the bertini2 compile itself (deps are built by their + # own build systems and are out of ccache's cmake-launcher reach). the key + # is deliberately loose -- always save fresh, restore newest; ccache does + # its own invalidation. on Linux the cache lives in the repo dir because + # that is what cibuildwheel mounts into the container (as /project). + - name: Cache ccache (bertini2 compile) + uses: actions/cache@v5 + with: + path: .ccache + key: ccache-wheels-${{ runner.os }}-${{ matrix.python-version }}-${{ github.sha }} + restore-keys: | + ccache-wheels-${{ runner.os }}-${{ matrix.python-version }}- + ccache-wheels-${{ runner.os }}- + # pre-create as the runner user so docker's volume mount doesn't create it + # root-owned on the host + - name: Ensure ccache dir exists + shell: bash + run: mkdir -p .ccache - name: Set CIBW_BUILD for this Python version shell: bash run: | @@ -233,34 +369,41 @@ jobs: echo "MACOSX_DEPLOYMENT_TARGET=${SW_VERS}.0" >> $GITHUB_ENV - uses: pypa/cibuildwheel@v3.4.1 env: - # Build cp39 through cp313 for both Linux (manylinux) and macOS. + # Build cp310 through cp314 for both Linux (manylinux) and macOS (cp39 was + # dropped when eigenpy moved to >= 3.13, whose floor is Python 3.10). # Boost.Python and eigenpy are rebuilt per target Python in BEFORE_BUILD # so each wheel bundles a matching libboost_python3X. CIBW_BUILD: ${{ env.CIBW_BUILD }} CIBW_SKIP: "*-musllinux_* *-manylinux_i686" - CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 + CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_34 + # cibuildwheel COPIES the project into the container (no bind mount), so + # a cache written under /project is discarded. mount the host ccache dir + # explicitly; ignored on macOS (host build, no container). + CIBW_CONTAINER_ENGINE: "docker; create_args: --volume=${{ github.workspace }}/.ccache:/ccache-host" # Install system deps + download (but DO NOT build) Boost & eigenpy sources # once per container. Boost.Python is ABI-locked to a single CPython version, # so it must be rebuilt per target Python in BEFORE_BUILD — building it here - # against the manylinux2014 system python3 produces a libboost_python39 that - # all five wheels would then bundle, breaking import on cp310/311/312/313. + # against the manylinux system python3 produces a single libboost_python3X that + # all wheels would then bundle, breaking import on the other CPython versions. CIBW_BEFORE_ALL_LINUX: > yum install -y wget gmp-devel mpfr-devel libmpc-devel libtool && + { yum install -y ccache || { yum install -y epel-release && yum install -y ccache; }; } && + ccache --version && cd /tmp && { [ -f eigen-3.4.0.tar.gz ] || wget -q https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz ; } && rm -rf eigen-3.4.0 && tar xzf eigen-3.4.0.tar.gz && cmake -S eigen-3.4.0 -B eigen-3.4.0/bld -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release && cmake --install eigen-3.4.0/bld && - { [ -f eigenpy-3.12.0.tar.gz ] || wget -q https://github.com/stack-of-tasks/eigenpy/releases/download/v3.12.0/eigenpy-3.12.0.tar.gz ; } + { [ -f eigenpy-${{ env.EIGENPY_VERSION }}.tar.gz ] || wget -q https://github.com/stack-of-tasks/eigenpy/releases/download/v${{ env.EIGENPY_VERSION }}/eigenpy-${{ env.EIGENPY_VERSION }}.tar.gz ; } # On macOS, Homebrew's boost-python3 / eigenpy bottles track the current # Homebrew default Python (now 3.14), so a cp313 wheel that bundles them # imports a libboost_python314.dylib into a 3.13 interpreter and segfaults. # Install only the Python-version-independent libs from brew here; download # Boost & eigenpy sources to /tmp for the per-Python build in BEFORE_BUILD. CIBW_BEFORE_ALL_MACOS: > - brew install gmp mpfr libmpc eigen@3 && + brew install gmp mpfr libmpc eigen@3 ccache && cd /tmp && - { [ -f eigenpy-3.12.0.tar.gz ] || curl -fsSL -o eigenpy-3.12.0.tar.gz https://github.com/stack-of-tasks/eigenpy/releases/download/v3.12.0/eigenpy-3.12.0.tar.gz ; } + { [ -f eigenpy-${{ env.EIGENPY_VERSION }}.tar.gz ] || curl -fsSL -o eigenpy-${{ env.EIGENPY_VERSION }}.tar.gz https://github.com/stack-of-tasks/eigenpy/releases/download/v${{ env.EIGENPY_VERSION }}/eigenpy-${{ env.EIGENPY_VERSION }}.tar.gz ; } # Build Boost and eigenpy fresh against the active per-Python interpreter # so each wheel bundles a matching libboost_python3X. @@ -276,10 +419,10 @@ jobs: cd boost_1_90_0 && ./bootstrap.sh --with-python=$(which python) --prefix=/tmp/deps-py && printf 'using python : %s : %s : %s : %s ;\n' "$PY_VER" "$(which python)" "$PY_INC" "$PY_LIB" > user-config.jam && - ./b2 install -j$(nproc) --user-config=user-config.jam python=$PY_VER && + ./b2 install -j$(nproc) --user-config=user-config.jam python=$PY_VER --without-mpi && cd /tmp && - rm -rf eigenpy-3.12.0 && tar zxf eigenpy-3.12.0.tar.gz && - cd eigenpy-3.12.0 && mkdir -p bld && cd bld && + rm -rf eigenpy-${{ env.EIGENPY_VERSION }} && tar zxf eigenpy-${{ env.EIGENPY_VERSION }}.tar.gz && + cd eigenpy-${{ env.EIGENPY_VERSION }} && mkdir -p bld && cd bld && cmake .. -DCMAKE_PREFIX_PATH=/tmp/deps-py -DCMAKE_INSTALL_PREFIX=/tmp/deps-py -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DPython3_EXECUTABLE=$(which python) -DPython3_NumPy_INCLUDE_DIR=$(python -c "import numpy; print(numpy.get_include())") -DBUILD_TESTING=OFF -DCMAKE_INSTALL_DO_STRIP=ON && make -j2 install && find /tmp/deps-py -name '*.so*' -type f | while read f; do @@ -302,13 +445,30 @@ jobs: printf 'using python : %s : %s : %s : %s ;\n' "$PY_VER" "$(which python)" "$PY_INC" "$PY_LIB" > user-config.jam && ./b2 install -j$(sysctl -n hw.ncpu) --user-config=user-config.jam python=$PY_VER hardcode-dll-paths=true dll-path=/tmp/deps-py/lib && cd /tmp && - rm -rf eigenpy-3.12.0 && tar zxf eigenpy-3.12.0.tar.gz && - cd eigenpy-3.12.0 && mkdir -p bld && cd bld && - cmake .. -DCMAKE_PREFIX_PATH="/tmp/deps-py;/opt/homebrew" -DCMAKE_INSTALL_PREFIX=/tmp/deps-py -DPython3_EXECUTABLE=$(which python) -DPython3_NumPy_INCLUDE_DIR=$(python -c "import numpy; print(numpy.get_include())") -DBUILD_TESTING=OFF && + rm -rf eigenpy-${{ env.EIGENPY_VERSION }} && tar zxf eigenpy-${{ env.EIGENPY_VERSION }}.tar.gz && + cd eigenpy-${{ env.EIGENPY_VERSION }} && mkdir -p bld && cd bld && + cmake .. -DCMAKE_PREFIX_PATH="/tmp/deps-py;/opt/homebrew" -DCMAKE_INSTALL_PREFIX=/tmp/deps-py -DCMAKE_BUILD_TYPE=Release -DPython3_EXECUTABLE=$(which python) -DPython3_NumPy_INCLUDE_DIR=$(python -c "import numpy; print(numpy.get_include())") -DBUILD_TESTING=OFF && make -j2 install CIBW_BEFORE_BUILD: "pip install scikit-build-core numpy" - CIBW_ENVIRONMENT_LINUX: "LD_LIBRARY_PATH=/tmp/deps-py/lib:/tmp/deps-py/lib64:$LD_LIBRARY_PATH CMAKE_PREFIX_PATH=/tmp/deps-py" - CIBW_ENVIRONMENT_MACOS: "MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET CMAKE_PREFIX_PATH=/tmp/deps-py:/opt/homebrew DYLD_FALLBACK_LIBRARY_PATH=/tmp/deps-py/lib:/opt/homebrew/lib" + CIBW_ENVIRONMENT_LINUX: "LD_LIBRARY_PATH=/tmp/deps-py/lib:/tmp/deps-py/lib64:$LD_LIBRARY_PATH CMAKE_PREFIX_PATH=/tmp/deps-py CXXFLAGS=-w CMAKE_BUILD_PARALLEL_LEVEL=4 CCACHE_DIR=/ccache-host CCACHE_MAXSIZE=400M CMAKE_ARGS='-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache'" + CIBW_ENVIRONMENT_MACOS: "MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET CMAKE_PREFIX_PATH=/tmp/deps-py:/opt/homebrew DYLD_FALLBACK_LIBRARY_PATH=/tmp/deps-py/lib:/opt/homebrew/lib CCACHE_DIR=$GITHUB_WORKSPACE/.ccache CCACHE_MAXSIZE=400M CMAKE_ARGS='-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache'" + # Full pytest suite, restored 2026-06-08 now that the uninitialized-numpy-slot + # crash is fixed in the bindings (see ADR-0006). The build image is + # manylinux_2_34 (AlmaLinux 9, MPFR 4.1; set via CIBW_MANYLINUX_X86_64_IMAGE + # above). The crash was NEVER MPFR-version specific - it is the all-zero + # mpfr/mpc "uninitialized sentinel" bug, which reproduces on any MPFR version + # (and locally); the older blame on "MPFR 3.1.6" was a misdiagnosis. Running + # the full suite here is the in-container proof of the fix. If it flakes or + # fails, revert to the import smoke test per ADR-0003 (kept there as fallback). + CIBW_TEST_REQUIRES_LINUX: "pytest pytest-timeout numpy sympy pandas" + CIBW_TEST_COMMAND_LINUX: "cd {project} && python -m pytest python/test/ -q" + + - name: ccache size (cold run = grows from nothing; warm run = hits) + if: always() + shell: bash + run: | + du -sh .ccache 2>/dev/null || echo "no .ccache directory was produced" + if command -v ccache >/dev/null; then CCACHE_DIR=$PWD/.ccache ccache -s || true; fi - uses: actions/upload-artifact@v5 with: @@ -318,20 +478,22 @@ jobs: build_windows_wheels: name: Windows Python-${{ matrix.python-version }} wheels - if: ${{ inputs.minimal != true }} + needs: [set_matrix, test_cpp_windows] + if: ${{ inputs.minimal != true && !failure() && !cancelled() }} runs-on: windows-latest env: CONDA_PKGS_DIRS: ${{ github.workspace }}\conda_pkgs strategy: fail-fast: false matrix: - python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] + python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] steps: - uses: actions/checkout@v5 with: persist-credentials: false - name: Cache conda packages + pip uses: actions/cache@v5 + continue-on-error: true with: path: | ${{ github.workspace }}\conda_pkgs @@ -345,7 +507,7 @@ jobs: activate-environment: b2-windows environment-file: environment-win.yml python-version: ${{ matrix.python-version }} - auto-activate-base: false + auto-activate: false channel-priority: strict - name: Build Windows @@ -361,6 +523,13 @@ jobs: $env:CMAKE_GENERATOR_TOOLSET = '' $env:CMAKE_PREFIX_PATH = "$env:CONDA_PREFIX\Library" + # The GitHub Windows runner now ships Visual Studio 2026 (MSVC 14.51), whose STL + # hard-asserts (STL1000) that the compiler is Clang >= 20; the conda + # clang-cl is older. The only errors are that version gate -- the C++17 code compiles + # fine -- so we opt out of the gate. (Proper fix: ship a clang >= 20 toolchain.) + $env:CXXFLAGS = '-D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH' + $env:CFLAGS = '-D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH' + $boostHeader = "$env:CONDA_PREFIX\Library\include\boost\archive\archive_exception.hpp" (Get-Content $boostHeader).Replace('public virtual std::exception', 'public std::exception') | Set-Content $boostHeader @@ -381,14 +550,21 @@ jobs: test_wheels_linux_macos: name: Test wheels on ${{ matrix.os }} / py${{ matrix.python-version }} + # ubuntu-latest is excluded below: Linux wheels run the full pytest suite *inside* + # the manylinux_2_34 container via CIBW_TEST_COMMAND_LINUX (see + # build_macos_ubuntu_wheels). This host-runner job therefore covers macOS only; + # Windows is covered by test_wheels_windows. if: ${{ inputs.minimal != true }} needs: [set_matrix, build_macos_ubuntu_wheels] runs-on: ${{ matrix.os }} + timeout-minutes: 25 # backstop against a hang; healthy test runs are well under a minute strategy: fail-fast: false matrix: os: ${{ fromJson(needs.set_matrix.outputs.os) }} python-version: ${{ fromJson(needs.set_matrix.outputs.python_versions) }} + exclude: + - os: ubuntu-latest steps: - uses: actions/checkout@v5 @@ -410,7 +586,7 @@ jobs: - name: Run Python tests run: | - pip install pytest + pip install pytest pytest-timeout sympy pandas python -m pytest python/test/ -v test_wheels_windows: @@ -418,10 +594,11 @@ jobs: if: ${{ inputs.minimal != true }} needs: [build_windows_wheels] runs-on: windows-latest + timeout-minutes: 25 # backstop against a hang; healthy runs are ~6 min (was 6h before the fix) strategy: fail-fast: false matrix: - python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] + python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] steps: - uses: actions/checkout@v5 @@ -431,7 +608,7 @@ jobs: activate-environment: b2-windows environment-file: environment-win.yml python-version: ${{ matrix.python-version }} - auto-activate-base: false + auto-activate: false channel-priority: strict - name: Download wheels artifact @@ -447,5 +624,5 @@ jobs: conda install -y python=${{ matrix.python-version }} --update-deps $py = "C:\Miniconda\envs\b2-windows\python.exe" & $py -m pip install --no-index --find-links dist/ bertini2 - & $py -m pip install pytest + & $py -m pip install pytest pytest-timeout sympy pandas & $py -m pytest python/test/ -v diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index 059c0746e..84693f3d5 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -79,7 +79,10 @@ jobs: - name: Install system dependencies (Doxygen) run: | sudo apt-get update - sudo apt-get install -y doxygen graphviz + # texlive-binaries provides bibtex, which Doxygen needs to number and + # render the \cite references (CITE_BIB_FILES in the Doxyfile) into a + # bibliography in the published C++ docs. + sudo apt-get install -y doxygen graphviz texlive-binaries - name: Fetch doxygen-awesome-css run: | @@ -104,7 +107,7 @@ jobs: python -m pip install --upgrade pip pip install \ sphinx sphinx-rtd-theme sphinxcontrib-bibtex gitpython \ - scikit-build-core build numpy + scikit-build-core build numpy matplotlib pandas - name: Download built wheel uses: actions/download-artifact@v5 @@ -115,6 +118,13 @@ jobs: - name: Install bertini from built wheel run: pip install --no-index --find-links dist/ bertini2 + - name: Run tutorial doctests (Sphinx) + # Execute the `.. testcode::` / `>>>` blocks in the docs against the installed wheel, so + # the tutorials are verified code, not just prose. Fails the build if any doctest fails. + working-directory: python/docs + run: | + sphinx-build -b doctest --keep-going source ../../build/docs/doctest + - name: Build Python docs (Sphinx) working-directory: python/docs env: diff --git a/.github/workflows/doc_lint.yml b/.github/workflows/doc_lint.yml new file mode 100644 index 000000000..b7820f37d --- /dev/null +++ b/.github/workflows/doc_lint.yml @@ -0,0 +1,63 @@ +name: Documentation lint 📑 + +# Cheap, fast doc-correctness gate -- runs Doxygen only (no compilation, no wheel, +# no graphviz) so it can run on every PR in well under a minute. This is the first +# foothold of a broader linting initiative; future linters (clang-format, +# clang-tidy, include-what-you-use, ...) can be added as additional jobs here. +# +# It does NOT belong in build_and_test.yml: that workflow is the expensive +# build/test matrix, and it already `paths-ignore`s Doxyfile/doc_resources/docs, so +# doc-only changes skip it and hit only this lint -- exactly the fast feedback we want. + +# Header (core/include) changes reach this lint through build_and_test.yml, which +# calls it as a prerequisite gate (see workflow_call below). The standalone +# triggers here cover only the doc-config/tooling paths that build_and_test +# deliberately `paths-ignore`s, so the lint still runs for doc-only changes without +# double-running on a typical code PR. +on: + push: + branches: + - develop + - main + paths: + - 'Doxyfile' + - 'doc_resources/**' + - 'tools/doclint.sh' + - 'tools/doc_undocumented_baseline.txt' + - '.github/workflows/doc_lint.yml' + pull_request: + paths: + - 'Doxyfile' + - 'doc_resources/**' + - 'tools/doclint.sh' + - 'tools/doc_undocumented_baseline.txt' + - '.github/workflows/doc_lint.yml' + workflow_dispatch: + # Called by build_and_test.yml as a prerequisite gate, so no C++ compilation + # starts until the docs lint is green. + workflow_call: + +# The undocumented-entity ratchet count in tools/doc_undocumented_baseline.txt is +# specific to this Doxygen version; CI must use the same one that seeded the +# baseline, not whatever the runner's apt happens to ship. Bump both together. +env: + DOXYGEN_VERSION: "1.13.2" + +jobs: + doc_lint: + name: Doxygen doc lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + + - name: Install pinned Doxygen + run: | + url="https://github.com/doxygen/doxygen/releases/download/Release_${DOXYGEN_VERSION//./_}/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz" + curl -sSL "$url" | tar -xz + echo "$PWD/doxygen-${DOXYGEN_VERSION}/bin" >> "$GITHUB_PATH" + + - name: Show Doxygen version + run: doxygen --version + + - name: Lint C++ documentation + run: bash tools/doclint.sh diff --git a/.github/workflows/github-gitlab-sync.yml b/.github/workflows/github-gitlab-sync.yml index 9af179e61..3dcefec42 100644 --- a/.github/workflows/github-gitlab-sync.yml +++ b/.github/workflows/github-gitlab-sync.yml @@ -1,12 +1,22 @@ -name: Sync to MPI GitLab -on: +name: Sync to GitLab mirror +on: push + +# Any repo (upstream or fork) that configures the three GITLAB_* secrets gets +# mirrored to its own GitLab target; repos without the secrets skip silently. +# This replaces the old hardcoded `if: github.repository == 'bertiniteam/b2'`, +# which prevented forks from syncing even when their secrets were set. +# Note: the `secrets` context is not available in job-level `if`, hence the +# env indirection. + jobs: sync: - if: github.repository == 'bertiniteam/b2' #only on official runs-on: ubuntu-latest + env: + GITLAB_CONFIGURED: ${{ secrets.GITLAB_URL != '' }} steps: - name: Sync to GitLab + if: env.GITLAB_CONFIGURED == 'true' # You may pin to the exact commit or the version. # uses: kujov/gitlab-sync@b19399d43e81ac88acb6eefd5588e6ebde3d7d88 uses: kujov/gitlab-sync@2.2.1 @@ -18,5 +28,4 @@ jobs: # Your GitLab Personal Access Token with required permissions gitlab_pat: ${{ secrets.GITLAB_PAT }} # Whether to force push to GitLab. Defaults to false. - - force_push: true # optional, default is false + force_push: true diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e4c602956..ab474106e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,7 +15,7 @@ concurrency: jobs: check_version: - name: Check pyproject.toml version matches tag + name: Check VERSION file matches tag runs-on: ubuntu-latest outputs: is_prerelease: ${{ steps.check.outputs.is_prerelease }} @@ -31,17 +31,31 @@ jobs: exit 1 fi TAG_VERSION="${TAG#v}" - PYPROJECT_VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])") - if [ "$TAG_VERSION" != "$PYPROJECT_VERSION" ]; then - echo "Error: tag '$TAG' does not match pyproject.toml version '$PYPROJECT_VERSION'" + # The version is dynamic in pyproject.toml; its single source of truth + # is the top-level VERSION file (read by scikit-build-core and CMake). + FILE_VERSION=$(tr -d '[:space:]' < VERSION) + if [ "$TAG_VERSION" != "$FILE_VERSION" ]; then + echo "Error: tag '$TAG' does not match VERSION file '$FILE_VERSION'" exit 1 fi - echo "OK: tag '$TAG' matches pyproject.toml version '$PYPROJECT_VERSION'" + echo "OK: tag '$TAG' matches VERSION file '$FILE_VERSION'" echo "$TAG" | grep -Eq '\.(dev|a|b|rc)[0-9]+$' && echo "is_prerelease=true" >> $GITHUB_OUTPUT || echo "is_prerelease=false" >> $GITHUB_OUTPUT + check_timing_freshness: + name: Check tutorial timings are fresh + # Only gate real releases -- prereleases (.dev/a/b/rc) are exactly when a timing refresh may not + # have happened yet. A skipped job counts as satisfied for downstream `needs`. + if: needs.check_version.outputs.is_prerelease == 'false' + needs: check_version + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - name: Verify the scaling-tutorial timings are not stale + run: python tools/check_timing_freshness.py + build_and_test: name: Build and test - needs: check_version + needs: [check_version, check_timing_freshness] uses: ./.github/workflows/build_and_test.yml publish-to-testpypi: diff --git a/.gitignore b/.gitignore index dbc7ef640..bf1a363f6 100644 --- a/.gitignore +++ b/.gitignore @@ -95,3 +95,31 @@ _skbuild/ build/ bld/ build_mine/ + +# Wheel / sdist output +dist/ + +# Local Claude Code config and personal working notes +.claude/ +z_notes/ +.mcp.json + +# C++ test runner logs (ctest/Boost.Test output at repo root) +bertini2_tests_*.log + +# Serialization test output files (Boost.Serialization archives) +/serialization_test_* + +# Classic Bertini CLI output files (written by bertini2_exe when run from repo root) +/main_data +/raw_data +/raw_solutions +/real_finite_solutions +/midpath_data +/finite_solutions +/nonfinite_solutions +/start +/failed_paths + +# Compiled benchmark binaries (keep the .cpp sources) +/tuning/arithmetic_cost diff --git a/CLAUDE.md b/CLAUDE.md index 2bee761e5..31aa0969b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -14,9 +14,14 @@ Bertini 2 (b2) is a C++17 numerical algebraic geometry library with Python bindi # Configure (from repo root) cmake -DENABLE_UNIT_TESTING=ON -G Ninja -B build -S . -# Build +# Build everything (core library, bindings, exe, tests) cmake --build build --target all --config Release +# For iterative C++ work, build just the core library first -- it's much faster, and +# the heavy Boost.Python/eigenpy bindings (`_pybertini`) only need rebuilding when the +# bindings themselves change: +cmake --build build --target bertini2 --config Release + # Run all C++ tests ctest --test-dir build/core ``` @@ -57,28 +62,43 @@ ctest --test-dir build/core ./build/core/test_generating ./build/core/test_nag_algorithms ./build/core/test_nag_datatypes +./build/core/test_pool ./build/core/test_tracking_basics ./build/core/test_settings ``` ### Python Tests +`pytest` is the single way to run the Python tests (the suites are plain pytest +functions + fixtures; the old `unittest` `TextTestRunner` aggregator scripts are gone): + ```bash pytest python/test/ ``` +The multiprecision default precision is **global mutable state** +(`bertini.default_precision(n)`). An **autouse fixture in `python/test/conftest.py`** +(`_reset_precision`) resets it to a known baseline (`DEFAULT_TEST_PRECISION = 30`) before +every test and restores it afterward, so no test can inherit a neighbor's precision — do +**not** re-introduce per-test `default_precision(...)` setup. To override the precision for +a specific test, use the `precision` fixture (parametrize it indirectly, e.g. +`@pytest.mark.parametrize("precision", [30, 50, 80], indirect=True)` with a +precision-derived tolerance). When adding or debugging precision-sensitive tests, run the +file on its own (`pytest python/test/classes/.py`) to confirm it does not depend on +cross-test state. + ## Architecture The project has three layers, built in order: 1. **`core/`** -- C++ shared library (`libbertini2`). Header-only-heavy design under `core/include/bertini2/`. Key subsystems: - - `function_tree/` -- Expression tree (nodes, operators, symbols) for representing polynomial systems - - `system/` -- Polynomial system construction, start systems (`start/total_degree.hpp`, `start/mhom.hpp`), patches, slices + - `function_tree/` -- Expression tree (nodes, operators, symbols) for *building and representing* polynomial systems. Nodes no longer evaluate: node-level recursive evaluation was removed -- the **SLP (`straight_line_program`) is the sole evaluator** (compile a system once, evaluate the compiled program). `Function`/`Handle` are gone; `NamedExpression` is the sole root node. See ADR-0027 (SLP: immutable Program + per-thread Memory) and ADR-0028 (named-node taxonomy). + - `system/` -- Polynomial system construction, start systems (`start/total_degree_linear_product.hpp`, `start/mhom.hpp`), patches, slices - `trackers/` -- Path tracking (fixed-precision and adaptive-precision trackers, predictors, Newton correctors) - `endgames/` -- Power series and Cauchy endgames for singular endpoint handling - - `nag_algorithms/` -- Higher-level algorithms (zero-dim solve, numerical irreducible decomposition) + - `nag_algorithms/` -- Higher-level algorithms (zero-dim solve; numerical irreducible decomposition is *framework scaffolding* -- not yet implemented, its `Solve()` throws) - `io/parsing/` -- Boost.Spirit Qi parsers for classic Bertini input format - - `blackbox/` -- CLI executable entry point (`bertini2_exe`) + - `blackbox/` -- CLI executable entry point (CMake target `bertini2_exe`, binary named `bertini2`) 2. **`python_bindings/`** -- Boost.Python + eigenpy bindings producing `_pybertini` native module. Each `*_export.cpp` wraps the corresponding C++ subsystem. Depends on `eigenpy` for NumPy/Eigen interop. @@ -87,9 +107,9 @@ The project has three layers, built in order: ## Key Dependencies - **GMP/MPFR/MPC** -- Arbitrary-precision arithmetic (found via custom CMake modules in `cmake/`) -- **Eigen 3.3** -- Linear algebra (pinned to v3.3) -- **Boost** (serialization, filesystem, log, graph, regex, timer, chrono, thread, unit_test_framework, python) -- Boost >= 1.82 required; `boost_system` is conditionally linked for Boost < 1.89 -- **eigenpy** -- Eigen/NumPy bridge for Python bindings +- **Eigen 3** -- Linear algebra. **Not** pinned in cmake (`find_package(Eigen3)`, no version floor). In practice the version is coupled to the eigenpy build: the wheel CI builds **eigen 3.4.0** and then builds eigenpy against it (a dev env may use newer, e.g. `eigen=5.0.1`). Newer Eigen is welcome -- we *want* upstream improvements -- but it must be matched by an eigenpy built against the same Eigen (they share Eigen types across the binding ABI). +- **Boost** (serialization, filesystem, log, graph, regex, timer, chrono, thread, unit_test_framework, python) -- no minimum version pinned in cmake; `boost_system` is conditionally linked for Boost < 1.89 (header-only from 1.89). Boost.Python is ABI-locked to one CPython version, so CI rebuilds it per target Python. +- **eigenpy** -- Eigen/NumPy bridge for Python bindings. Built **from source** in CI at a single pinned version (`EIGENPY_VERSION` in `build_and_test.yml`, currently `3.13.0`) against the chosen Eigen -- eigenpy and bertini must use the *same* Eigen. eigenpy >= 3.13 sets the Python floor (>= 3.10). - **jrl-cmakemodules** -- CMake helper macros (auto-fetched via FetchContent if not found) ## Build System Notes @@ -101,11 +121,44 @@ The project has three layers, built in order: ## CI/CD -- `.github/workflows/build-and-publish-to-pypi.yml` -- Builds wheels on Ubuntu/macOS/Windows, publishes to TestPyPI on `develop` push, PyPI on version tags (`v*.*.*`). -- Pushes to `develop` trigger TestPyPI publish; tagged releases go to PyPI with Sigstore signing and GitHub Releases. +- `.github/workflows/build_and_test.yml` -- Builds wheels on Ubuntu/macOS/Windows and runs tests. Triggered by pull requests and pushes to `develop`/`main`. +- `.github/workflows/doc_lint.yml` -- A cheap Doxygen doc-correctness gate that **the build matrix depends on** (it runs first; if it fails, nothing compiles). **Run `bash tools/doclint.sh` locally before pushing any C++ change**, or CI will bounce the whole build. It needs `doxygen` on PATH (`brew install doxygen`). Two passes: (1) *correctness* — `@param` names must match signatures, no doc blocks on removed signatures, no unresolved `\ref`/`\cite` (zero tolerance); (2) *undocumented ratchet* — the count of undocumented public entities in `tools/doc_undocumented_baseline.txt` may only **decrease** (currently `0`, so **every new public C++ entity — including each struct data member — needs a Doxygen comment**, e.g. `///< ...`). If you legitimately reduce the count, run `bash tools/doclint.sh --update-baseline` to lock it in. +- `.github/workflows/publish.yml` -- Publishes to TestPyPI on `develop` push, PyPI on version tags (`v*.*.*`) with Sigstore signing and GitHub Releases. + +### Linux wheel test coverage + +Linux wheels are built inside a `manylinux_2_34` container (AlmaLinux 9, MPFR 4.1; set via `CIBW_MANYLINUX_X86_64_IMAGE`). The **full pytest suite runs on all three platforms** — on Linux it runs *inside* that container via `CIBW_TEST_COMMAND_LINUX`, and on macOS/Windows via the host-runner test jobs. + +This was not always so: for a while Linux ran an import smoke test only, because the suite was SIGABRT/SIGSEGV-crashing — a crash *misattributed* to the older `manylinux_2_28` container's MPFR 3.1.6. The real cause is a **version-independent** bug (uninitialized `mpfr`/`mpc` numpy slots), now fixed in the bindings. Do **not** try to fix Linux test crashes by bumping MPFR or the manylinux image (that was tried and does not work) or by building MPFR from source (specifically out of bounds). See `docs/adr/0006-eigenpy-uninitialized-numpy-slot-guards.md` for the fix and `docs/adr/0003-manylinux-no-full-pytest.md` for the (now reversed) smoke-test stopgap and its history. + +## Python Bindings — Known Pitfalls + +### eigenpy writable Ref + adjacent scalar (ADR-0001) + +Never place a writable `Eigen::Ref>` argument **adjacent** to a `mpc_complex const&` scalar argument in a Boost.Python binding. eigenpy's from-Python converter for the writable Ref writes into a static rvalue-converter slot that overlaps with the storage for adjacent `const&` scalars, corrupting them. The corrupted `mpc_complex` then triggers `MPFR_ASSERTN` → SIGABRT. + +**Rule:** If a binding takes a writable `Eigen::Ref>` and also needs scalar `ComplexT` args, pass the scalars **by value**: + +```cpp +// WRONG — start_time/end_time get corrupted +SuccessCode wrap(Eigen::Ref> result, + ComplexT const& start_time, // ← adjacent const& scalar + ComplexT const& end_time); + +// CORRECT — by-value copy is taken before the Ref converter runs +SuccessCode wrap(Eigen::Ref> result, + ComplexT start_time, // ← by value + ComplexT end_time); +``` + +Single-argument bindings and read-only `Vec const&` bindings are unaffected. See `docs/adr/0001-eigenpy-writable-ref-scalar-by-value.md`. + +## Architecture Decision Records + +`docs/adr/` contains ADRs for load-bearing design decisions — where the *why* would not be obvious from reading the code. Check there before undoing anything that looks strange. ## Conventions - C++ standard: C++17. Headers use `.hpp` extension. - License: GPL v3 with additional terms (see `licenses/`, `core/ADDITIONAL_GPL_TERMS`). -- Version is tracked in `python/bertini/_version.py` and `pyproject.toml`. +- Version is tracked in `pyproject.toml` (the `version = "..."` line), read at runtime via `importlib.metadata.version("bertini2")`. diff --git a/CMakeLists.txt b/CMakeLists.txt index 84555f8c6..8266d9f0d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,14 +2,22 @@ cmake_minimum_required(VERSION 3.22) set(PROJECT_NAME bertini2) -file(READ "${CMAKE_SOURCE_DIR}/pyproject.toml" PYPROJECT_TOML) -string(REGEX MATCH "\nversion = \"([^\"]+)\"" _ ${PYPROJECT_TOML}) -set(PROJECT_VERSION_FULL ${CMAKE_MATCH_1}) +# The version is the single source of truth in the top-level VERSION file +# (also read by scikit-build-core; see pyproject.toml). Keep them in sync via +# that one file rather than duplicating the string here. +file(STRINGS "${CMAKE_SOURCE_DIR}/VERSION" PROJECT_VERSION_FULL LIMIT_COUNT 1) +string(STRIP "${PROJECT_VERSION_FULL}" PROJECT_VERSION_FULL) + +# Keep the complete version under a project-owned name: jrl-cmakemodules' +# project setup clobbers PROJECT_VERSION_FULL (it rewrites it to major.minor), +# so anything downstream -- e.g. the BERTINI2_VERSION_FULL compile definition in +# core/CMakeLists.txt -- must read BERTINI2_FULL_VERSION instead. +set(BERTINI2_FULL_VERSION "${PROJECT_VERSION_FULL}") # Strip PEP 440 prerelease suffix for cmake VERSION field string(REGEX REPLACE "[._]?(dev|a|b|rc)[0-9]+.*$" "" PROJECT_VERSION ${PROJECT_VERSION_FULL}) -message(STATUS "Full version: ${PROJECT_VERSION_FULL}") +message(STATUS "Full version: ${BERTINI2_FULL_VERSION}") message(STATUS "CMake version: ${PROJECT_VERSION}") @@ -105,6 +113,16 @@ include("${JRL_CMAKE_MODULES}/base.cmake") compute_project_args(PROJECT_ARGS LANGUAGES CXX) project(${PROJECT_NAME} ${PROJECT_ARGS}) +option(USE_CCACHE "Use ccache to speed up rebuilds if available" ON) +if(USE_CCACHE) + find_program(CCACHE_PROGRAM ccache) + if(CCACHE_PROGRAM) + set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}") + set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}") + message(STATUS "ccache enabled: ${CCACHE_PROGRAM}") + endif() +endif() + include("${JRL_CMAKE_MODULES}/boost.cmake") if(BUILD_PYTHON_BINDINGS) @@ -200,8 +218,6 @@ endif(WIN32) #target_link_boost_python(${PROJECT_NAME} PUBLIC) -#set_property(TARGET bertini2_exe PROPERTY OUTPUT_NAME bertini2) - add_subdirectory(core) diff --git a/Doxyfile b/Doxyfile index 964dc90a7..a09d89e12 100644 --- a/Doxyfile +++ b/Doxyfile @@ -11,6 +11,10 @@ INPUT = core/include README.md RECURSIVE = YES USE_MDFILE_AS_MAINPAGE = README.md +# Resolve \cite commands in the headers against the shared bibliography +# (Sphinx already uses this same file via bibtex_bibfiles). +CITE_BIB_FILES = doc_resources/bertini2.bib + EXTRACT_ALL = YES EXTRACT_PRIVATE = NO EXTRACT_STATIC = YES diff --git a/README.md b/README.md index 417df8f8c..52fc8543c 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,15 @@ # Quick links +- [Documentation](https://bertini2.org) +- [`bertini2` PyPI package](https://pypi.org/project/bertini2/) - [Wiki](https://github.com/bertiniteam/b2/wiki) --- # Overview -The solution of arbitrary polynomial systems is an area of active research, and has many applications in math, science and engineering. This software, Bertini 2, is a complete re-implementation of [Bertini 1](https://bertini.nd.edu) from C into C++/Python. +The solution of arbitrary polynomial systems is an area of active research, and has many applications in math, science and engineering. This software, Bertini 2, is a re-implementation of [Bertini 1](https://bertini.nd.edu) from C into C++/Python. The theoretical basis for the solution of polynomials with Bertini is a theorem which bounds the number of solutions a system may have. It sits together with the numerical computational tool of "homotopy continuation". the act of "continuing" from one system into another through a "homotopy", as depicted in the below diagram: @@ -18,29 +20,30 @@ The theoretical basis for the solution of polynomials with Bertini is a theorem # Current capabilites -Bertini 2 currently has implemented the foundations of Numerical Algebraic Geometry. Development is ongoing, and here's what we have so far: +Bertini 2 has already implemented most of the foundations of Numerical Algebraic Geometry. Development is ongoing, and here's what we have so far: -- C++ functions and types, with Python bindings. -- Through Python, runtime scriptable construction of systems and interactivity with their zero-dimensional solutions. -- Construction of multivariate polynomial and non-polynomial systems. -- Evaluation of systems and their Jacobians in double and arbitrary multiple precision, using two different methods. +- A blackbox that implements tracktype 0 (zerodim solving) for the total degree and mhom start systems. User homotopy not yet exposed +- Through Python bindings, runtime scriptable construction of systems and interactivity with their zero-dimensional solutions. +- Python construction of multivariate polynomial and non-polynomial systems, including from linear algebra operations via numpy and Bertini 2's variables and extended numeric types. +- Evaluation of systems and their Jacobians in double and arbitrary multiple precision. - Construction of the Total Degree and Multihomogeneous start systems. - Construction of homotopies (they're just systems with path variables defined). - Tracking of a start point x_0, corresponding to a particular time $t_0 \in \mathbb{C}^n$ in a homotopy $H$, from $t_0$ to $t_1$. - Running of the Power Series and Cauchy endgames, in double, multiple, and adaptive precision. -Development is ongoing, and we want your help! +See the published docs for latest the officially released documentation (which will always lag behind the doc from the dev version). --- # Missing functionality -* Parallel solving +✨ In-progress!!! + * Numerical irreducible decomposition * Membership testing * and other algorithms -Users wanting a more developed implementation are recommended to use [Bertini 1](https://bertini.nd.edu) or [homotopycontinuation.jl](https://www.juliahomotopycontinuation.org/), or one of the other packages implementing the theory. +Users wanting a more stable implementation are recommended to use [Bertini 1](https://bertini.nd.edu) or [homotopycontinuation.jl](https://www.juliahomotopycontinuation.org/), or one of the other packages implementing the theory. --- @@ -55,18 +58,41 @@ The Python package `bertini2` provides pre-built wheels for Linux, macOS, and Wi pip install bertini2 ``` -Once it's installed, you `import bertini` +Once it's installed, you `import bertini` (not `import bertini2`!) + +Installing the wheel also puts the classic blackbox command-line solver on your PATH as +`bertini2` (threads-only -- run `bertini2 --help`). For MPI / multi-rank cluster +parallelism, build the CLI from source. -* Linux: Python 3.9-3.14 -* MacOS (Apple Silicon): Python 3.9-3.14 -* MacOS (Intel): not supported -* Windows: Python 3.9-3.14 +* Linux: Python 3.10-3.14 +* MacOS (Apple Silicon): Python 3.10-3.14 +* MacOS (Intel): not currently supported +* Windows: Python 3.10-3.14 ## Building from source Please see [the Wiki compiling section](https://github.com/bertiniteam/b2/wiki/Installation) for instructions on compiling Bertini 2. +## The `bertini2` command-line solver + +The classic blackbox CLI (`bertini2 input`, with a `CONFIG`/`INPUT` file) is a **pure C++** +program -- it does not depend on Python -- and every build path delivers it: + +| You want... | Do this | You get | +| --- | --- | --- | +| The easy way (threads-only) | `pip install bertini2` | `bertini2` on PATH + the `bertini` Python package | +| From source, with Python | `pip install .` (in a clone) | same as the wheel, built locally | +| From source, with Python, editable | `pip install -e .` | `bertini2` resolves to the in-tree build | +| **Just the solver, no Python** | `cmake -B build -S . && cmake --build build --target bertini2_exe && cmake --install build --component cli --prefix ` | only `/bin/bertini2` | +| Full C++ dev install | `cmake --install build` | `bin/bertini2` + `libbertini2` + headers | + +A plain `cmake` build skips the Python bindings (`BUILD_PYTHON_BINDINGS` is off by default), so the +CLI-only path never needs a Python interpreter. The binary statically links our code but still needs +the usual shared libraries on the system (Boost, GMP, MPFR, MPC, and MPI for multi-rank runs) -- the +wheel vendors these; a from-source build expects them present (e.g. via your HPC modules or a conda +env). The wheel CLI is **threads-only**; for MPI / multi-rank cluster parallelism, build from source. + --- # Other information diff --git a/VERSION b/VERSION new file mode 100644 index 000000000..a8326e7b7 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +3.0.0.dev7 diff --git a/benchmark/README.md b/benchmark/README.md new file mode 100644 index 000000000..a9070c14f --- /dev/null +++ b/benchmark/README.md @@ -0,0 +1,190 @@ +# Bertini2 parallel benchmark + +Measure how much faster `bertini2` solves a system when you give it more compute. There are +two independent kinds of parallelism, and this benchmark can sweep either or both: + +- **Shared-memory threads** — one process, many worker threads, all on one machine. Needs **no + MPI**: it works with a plain `pip install` build or any `bertini2` compiled without MPI. This + is the everyday "use all the cores on my laptop/workstation" case. +- **MPI ranks** — multiple processes, typically spread across the nodes of a cluster, each rank + itself optionally running a pool of threads. This is the "scale across a supercomputer" case + and requires a `bertini2` built with MPI plus `mpirun`. + +The driver, `run_benchmark.py`, times each configuration, prints a speedup table, writes a CSV, +and (optionally) fails if parallelism didn't actually help. + +--- + +## 1. Run it on a single machine (no MPI, just threads) + +This is the simplest case and the one most people want. You only need a `bertini2` executable +and Python 3 (no extra packages). + +```bash +# from the repo root +python benchmark/run_benchmark.py \ + --bertini2 ./build/core/bertini2 \ + --input benchmark/inputs/medium.b2 \ + --no-mpi \ + --threads 1 2 4 8 +``` + +`--no-mpi` runs the solver directly (no `mpirun`) and sweeps the thread counts you list. The +run at `threads=1` is the serial baseline; every other run's speedup is reported relative to it. +The thread count is passed to the solver through `OMP_NUM_THREADS`, which the script sets for +you — don't set it yourself. + +Example output: + +``` + ranks threads workers time(s) solutions speedup +------------------------------------------------------------ + 1 1 1 12.6141 6 1.0000 + 1 2 2 11.9876 6 1.0523 + 1 4 4 3.4350 6 3.6722 + 1 8 8 2.5991 6 4.8533 + +Best parallel speedup: 4.85x vs serial baseline. +``` + +The `solutions` column should be identical across every row: threading is a speed feature, never +a correctness change. If it ever differs, that's a bug — please report it. + +### Make the run *fail* if threads don't help + +Handy for CI or an acceptance check on a new machine: + +```bash +python benchmark/run_benchmark.py --bertini2 ./build/core/bertini2 \ + --input benchmark/inputs/medium.b2 --no-mpi --threads 1 4 \ + --assert-speedup 1.5 +``` + +This exits non-zero unless the best multi-thread run beats serial by at least 1.5×. Pick a +threshold that suits the machine: a 2-core CI runner will not hit 4×, while a 32-core +workstation should comfortably exceed it. Leave `--assert-speedup` off to just measure. + +--- + +## 2. Run it with MPI (multiple ranks) + +If your `bertini2` was built with MPI (`cmake -DENABLE_MPI=ON ...`) and `mpirun` is on your +`PATH`, you can sweep MPI ranks as well as threads. Drop `--no-mpi` and add `--ranks`: + +```bash +python benchmark/run_benchmark.py \ + --bertini2 ./build/core/bertini2 \ + --input benchmark/inputs/large.b2 \ + --ranks 1 2 4 \ + --threads 1 2 4 +``` + +This launches each combination under `mpirun -n ` with `OMP_NUM_THREADS=` per +rank. `--bind-to none` is passed to `mpirun` automatically so threaded workers can spread across +a node's cores without affinity conflicts. The total worker count in the table is +`ranks × threads`. + +You do **not** need a cluster for this — a single multi-core machine with MPI installed runs the +rank sweep locally just fine. + +--- + +## 3. Run it on an HPC cluster + +### With SLURM (`sbatch`) + +`submit.slurm.sh` is a ready-to-edit batch script. Open it and adjust: + +- the `#SBATCH` directives — `--nodes`, `--ntasks-per-node`, `--cpus-per-task` (this is the + cores-per-rank, i.e. the max threads), `--time`; +- the **module loads / environment activation** near the top (load your MPI, your Python, and/or + activate the conda env that has `bertini2`); +- the `INPUT`, `RANKS`, and `THREADS` sweep near the bottom. + +Keep two consistency rules in mind: + +- `RANKS` should not exceed `--nodes × --ntasks-per-node`. +- the largest value in `THREADS` should not exceed `--cpus-per-task`. + +Then submit: + +```bash +sbatch benchmark/submit.slurm.sh +``` + +Results land in `benchmark/results_.csv`, and stdout/stderr in `benchmark_.log` / +`.err`. The script discovers the repo root relative to its own location, so you can submit it +from anywhere. + +### On a cluster without SLURM (or interactively) + +There's nothing SLURM-specific about the measurement — `submit.slurm.sh` just sets up an +environment and calls `run_benchmark.py`. On a cluster with a different scheduler (PBS, LSF, +...), or in an interactive allocation, load your modules / activate your environment by hand and +run the driver directly, exactly as in section 2: + +```bash +python benchmark/run_benchmark.py --bertini2 /path/to/bertini2 \ + --input benchmark/inputs/large.b2 --ranks 1 2 4 8 --threads 1 4 8 \ + --mpirun srun # if your site launches MPI jobs with srun instead of mpirun +``` + +Use `--mpirun` to point at whatever launcher your site uses (e.g. `srun`, or a full path to a +specific `mpirun`), and `--mpirun-args` to pass site-specific flags. For example, on a host +whose CPU topology `hwloc` cannot read (some VMs/containers), OpenMPI's default mapper fails +with "failed to map" / "all nodes already filled"; pass + +```bash +--mpirun-args "--map-by slot:OVERSUBSCRIBE --bind-to none" +``` + +to map by slot instead of by core. On a normal cluster the default (`--bind-to none`) is fine. + +--- + +## Sample input files + +Each system is diagonal (`xi^3 - ci = 0`) with distinct prime constants, so the answers are +known analytically and easy to check. "Paths" is the total-degree path count the solver tracks +(the work), which is what scales with parallelism. + +| File | Variables | Degree | Paths | +|------|-----------|--------|-------| +| `inputs/small.b2` | 3 | 3 | 27 | +| `inputs/medium.b2` | 5 | 3 | 243 | +| `inputs/large.b2` | 6 | 3 | 729 | +| `inputs/xlarge.b2` | 7 | 3 | 2187 | +| `inputs/huge.b2` | 9 | 3 | 19683 | + +Bigger systems show parallel scaling more clearly (more paths to spread over workers) but take +longer. Start with `small`/`medium` to sanity-check your setup, then move up. + +--- + +## All options + +``` +--bertini2 PATH Path to the bertini2 executable (default: ./build/core/bertini2) +--input FILE Bertini input file to solve (required) +--threads N ... Thread counts to sweep (default: 1) +--ranks N ... MPI rank counts to sweep (default: 1 2 4); ignored with --no-mpi +--no-mpi Run the solver directly, no mpirun: a pure thread sweep for a build + without MPI. Forces ranks=1 and sweeps --threads only. +--assert-speedup F Exit non-zero unless the best parallel run beats serial by >= F (e.g. 1.5). + Off by default. +--repeats N Timed repeats per combination; the fastest is recorded (default: 1). +--timeout SECS Per-run timeout (default: 600). +--mpirun CMD Launcher for MPI runs (default: mpirun; e.g. srun on some clusters). +--mpirun-args STR Extra flags for mpirun, one quoted string (default: '--bind-to none'). +--output FILE CSV output path (default: benchmark_results.csv). +``` + +## Notes + +- The serial baseline (`ranks=1, threads=1`) always runs first; all speedups are relative to it. +- Each run executes in its own temp directory, so concurrent files never collide. +- Timings on a busy or thermally-throttling machine are noisy. Use `--repeats 3+` (the minimum + time is kept) and a quiet machine for numbers you intend to publish. +- The `*_seeded` and `baseline_*` CSVs checked in here are reference results from past runs; your + numbers will differ by machine. +``` diff --git a/benchmark/baseline_large.csv b/benchmark/baseline_large.csv new file mode 100644 index 000000000..3e225ffc9 --- /dev/null +++ b/benchmark/baseline_large.csv @@ -0,0 +1,2 @@ +ranks,threads,total_workers,wall_time_s,solutions_found,speedup_vs_serial +1,1,1,66.8036,7,1.0000 diff --git a/benchmark/baseline_large_seeded.csv b/benchmark/baseline_large_seeded.csv new file mode 100644 index 000000000..9a2fc846b --- /dev/null +++ b/benchmark/baseline_large_seeded.csv @@ -0,0 +1,2 @@ +ranks,threads,total_workers,wall_time_s,solutions_found,speedup_vs_serial +1,1,1,143.9177,7,1.0000 diff --git a/benchmark/baseline_medium.csv b/benchmark/baseline_medium.csv new file mode 100644 index 000000000..6a6c0b03c --- /dev/null +++ b/benchmark/baseline_medium.csv @@ -0,0 +1,2 @@ +ranks,threads,total_workers,wall_time_s,solutions_found,speedup_vs_serial +1,1,1,42.7632,6,1.0000 diff --git a/benchmark/baseline_medium_seeded.csv b/benchmark/baseline_medium_seeded.csv new file mode 100644 index 000000000..d8c3ed0fe --- /dev/null +++ b/benchmark/baseline_medium_seeded.csv @@ -0,0 +1,2 @@ +ranks,threads,total_workers,wall_time_s,solutions_found,speedup_vs_serial +1,1,1,44.6928,6,1.0000 diff --git a/benchmark/baseline_small.csv b/benchmark/baseline_small.csv new file mode 100644 index 000000000..fc16f98e4 --- /dev/null +++ b/benchmark/baseline_small.csv @@ -0,0 +1,2 @@ +ranks,threads,total_workers,wall_time_s,solutions_found,speedup_vs_serial +1,1,1,3.7077,4,1.0000 diff --git a/benchmark/baseline_small_seeded.csv b/benchmark/baseline_small_seeded.csv new file mode 100644 index 000000000..a221c9cb3 --- /dev/null +++ b/benchmark/baseline_small_seeded.csv @@ -0,0 +1,2 @@ +ranks,threads,total_workers,wall_time_s,solutions_found,speedup_vs_serial +1,1,1,3.3135,4,1.0000 diff --git a/benchmark/comparison/.gitignore b/benchmark/comparison/.gitignore new file mode 100644 index 000000000..8152be37a --- /dev/null +++ b/benchmark/comparison/.gitignore @@ -0,0 +1,4 @@ +__pycache__/ +*.pyc +# default per-run snapshot CSV (history.csv IS committed; this transient one is not) +comparison_results.csv diff --git a/benchmark/comparison/README.md b/benchmark/comparison/README.md new file mode 100644 index 000000000..5fe6edc79 --- /dev/null +++ b/benchmark/comparison/README.md @@ -0,0 +1,182 @@ +# Bertini 2 vs other solvers — serial & MPI comparison benchmark + +This benchmark measures how fast the **bertini2 CLI** solves zero-dimensional polynomial systems +compared with other numerical-algebraic-geometry solvers, under **identical settings**, and at the +same time checks that the solvers **agree on the answer**. + +Today the only other solver wired up is **Bertini 1**. The design is solver-agnostic: a future +phase will add [HomotopyContinuation.jl](https://www.juliahomotopycontinuation.org/) simply by +adding one more adapter in `solvers.py` — nothing else changes. + +These numbers are intended to be reproducible and citable in a paper, so the methodology below is +spelled out in full. + +--- + +## Why this is a fair comparison + +Each test system is built once in Python with pybertini and emitted to a **single classic Bertini +input file** via `System.to_classic_input(...)`. That one file — same equations, same precision +mode, same predictor, same tolerances, same step-size cadence — is handed to *every* solver. So +"same settings in both" is not a promise we have to police; it is true by construction. (The +emitter is exercised by `python/test/classes/classic_writer_test.py` and round-trip fidelity is +pinned in C++ by `classic_parsing_test::classic_writer_round_trips_a_system`.) + +Two phases: + +1. **Serial** — one process, one thread. The MPI-built binaries are simply run directly (a single + MPI process), which is the serial baseline. +2. **MPI, single thread** — `mpirun -n N` with `OMP_NUM_THREADS=1`, sweeping `--ranks`. + +## Correctness/agreement comes for free — and is *not* part of the timing + +Because all solvers read the same input, every solver should return the **same number of +solutions**, equal to the system's known count. The driver reports this as a `matches_expected` +column and flags any disagreement. + +Both solvers are parsed with **one** parser: the Bertini 2 CLI now writes Bertini 1.7-compatible +machine-readable solution files (`finite_solutions`, `real_finite_solutions`, +`nonsingular_solutions`, `singular_solutions`, `raw_solutions` — each count-led; see ADR-0036), so +the count comes from `finite_solutions` for both. Byte-for-byte equality with Bertini 1 is *not* +expected (different implementations and RNG); only the file format and the solution *count* match. + +This check is performed **after** the timed region, by reading each solver's output files. The +stopwatch (`time.perf_counter()`) brackets **only** the solve subprocess; parsing solution counts +and comparing them adds nothing to any reported wall time. + +--- + +## Prerequisites + +- An **MPI-built `bertini2`** (`cmake -DENABLE_MPI=ON ...`; target `bertini2_exe`, binary + `./build/core/bertini2`). +- For the Bertini 1 column, an **MPI-built Bertini 1** binary (you supply it; it is not part of + this repo). Point `--bertini1` at it. +- `mpirun` on `PATH` for any `--ranks` greater than 1. +- `pybertini` importable (the `bertini` Python package, matching your built `_pybertini`). + +> Both Bertini 1 and the bertini2 CLI write their output files (`main_data`, `raw_data`, `output`, +> `failed_paths`, …) into the current directory. The driver runs **every** invocation in its own +> fresh temp directory and deletes it afterward, so runs never collide and nothing is left behind. + +--- + +## How to run + +Serial only, bertini2 vs Bertini 1, on the default system subset: + +```bash +python benchmark/comparison/run_comparison.py \ + --bertini2 ./build/core/bertini2 \ + --bertini1 /path/to/bertini \ + --output comparison_results.csv +``` + +Pick systems explicitly and add an MPI single-thread sweep: + +```bash +python benchmark/comparison/run_comparison.py \ + --bertini2 ./build/core/bertini2 \ + --bertini1 /path/to/bertini \ + --systems cyclic6 cyclic7 katsura5 \ + --ranks 1 2 4 8 +``` + +bertini2 only (no Bertini 1 installed) — still times and checks counts: + +```bash +python benchmark/comparison/run_comparison.py --bertini2 ./build/core/bertini2 --systems all +``` + +Key options: `--systems NAME ... | all`, `--ranks N ...`, `--repeats N` (keep fastest), +`--timeout SECS`, `--mptype {0,1,2}`, `--predictor {0,2,5}`, `--mpirun`, `--mpirun-args`, +`--output FILE`. Run with `-h` for the full list. + +For publishable numbers: use a quiet, non-throttling machine and `--repeats 3` or more (the fastest +time is kept). + +--- + +## Historical data (tracking b2's performance over time) + +Every run **appends** one row per measurement to a committed history file (default +`benchmark/comparison/history.csv`; `--history FILE` to redirect, `--no-history` to skip). Each row +records full provenance so results stay interpretable years later: + +``` +timestamp, host, cpu, os, b2_commit, mptype, predictor, +solver, solver_version, system, ranks, threads, +wall_time_s, solutions_found, expected_count, matches_expected, note +``` + +Commit this file. As you improve Bertini 2, new rows accumulate and you can plot wall time for a +given `(system, solver, ranks)` over `b2_commit`/`timestamp` to *see* the speedups land. Use +`--note` to tag a row (e.g. `--note "after SLP rework"`). + +**Wall-times are only comparable within the same machine.** `host`+`cpu` are recorded precisely so +you filter to one machine before comparing across time; a `b2_commit` ending in `-dirty` means the +working tree had uncommitted changes (not a clean, citable point). Bertini 1 will likely never move, +but HomotopyContinuation.jl is actively developed, so its `solver_version` matters too. + +--- + +## Test bed + +All systems are genuinely zero-dimensional, so the solution count is a fixed known value used as +the correctness ground truth. Generators live in `systems.py`; add a family by registering a +builder in the `SYSTEMS` dict. + +| Name(s) | Family | Vars | Solutions | Notes | +|--------------------|-----------|------|-----------|-------| +| `diag3/5/6` | diagonal | 3/5/6 | 27/243/729 | `xᵢ³ − cᵢ`; trivial warmup/sanity tier | +| `cyclic5` | cyclic-n | 5 | 70 | | +| `cyclic6` | cyclic-n | 6 | 156 | | +| `cyclic7` | cyclic-n | 7 | 924 | | +| `katsura3..6` | Katsura-n | 4..7 | 2ⁿ (8..64)| | + +**cyclic-n caveat:** cyclic-n is zero-dimensional only when *n* is squarefree (Backelin). The +squarefree small cases are n ∈ {5, 6, 7, 10, 11}; n ∈ {4, 8, 9, 12, …} have positive-dimensional +components and are **not** valid zero-dim test cases, so they are not registered. The `cyclic(n)` +generator accepts any n, but only register squarefree ones. + +--- + +## Results + +Fill these in from your runs (machine, date, and `bertini2`/Bertini 1 versions matter — record +them). `b1/b2` is the wall-time ratio (>1 means bertini2 was faster). + +### Serial (ranks=1, threads=1) + +| System | bertini2 (s) | bertini1 (s) | b1/b2 | counts agree | +|---------|--------------|--------------|-------|--------------| +| cyclic6 | | | | | +| cyclic7 | | | | | +| katsura5| | | | | + +### MPI, single thread (sweep ranks) + +| System | ranks | bertini2 (s) | bertini1 (s) | b1/b2 | +|---------|-------|--------------|--------------|-------| +| cyclic7 | 1 | | | | +| cyclic7 | 2 | | | | +| cyclic7 | 4 | | | | + +Environment to record alongside results: CPU model, core count, OS, `bertini2` version/commit, the +Bertini 1 version, MPI implementation, and the `--mptype`/`--predictor` used. + +--- + +## Files + +| File | Purpose | +|------|---------| +| `run_comparison.py` | Driver: emit shared input, run each solver, time, parse, tabulate, write CSV | +| `systems.py` | Python generators for the test bed (cyclic-n, Katsura-n, diagonal) | +| `solvers.py` | Solver adapters (`bertini2`, `bertini1`) behind one `run() -> RunResult` interface | + +## Future work + +Add a HomotopyContinuation.jl adapter to `solvers.py` (and an entry to `ADAPTERS`). It writes its +own problem from the same system rather than the classic input, so the "same settings" guarantee +will need an equivalent mapping of tracking knobs — note that explicitly when added. diff --git a/benchmark/comparison/run_comparison.py b/benchmark/comparison/run_comparison.py new file mode 100644 index 000000000..f01dd220e --- /dev/null +++ b/benchmark/comparison/run_comparison.py @@ -0,0 +1,304 @@ +#!/usr/bin/env python3 +"""Benchmark the bertini2 CLI against other zero-dim solvers (Bertini 1 today) on the same systems. + +Each test system is built in Python with pybertini and emitted ONCE to a classic Bertini-1 input +file (System.to_classic_input). That single file is fed to every solver, so the problem and all +tracking settings (precision mode, predictor, tolerances, step cadence) are identical across +solvers by construction. Two phases: + + * serial -- one process, one thread, every system through every solver; + * MPI single-thread -- sweep --ranks with OMP_NUM_THREADS=1, each solver under `mpirun -n N`. + +We get a correctness/agreement check for free: every solver should report the same solution count, +equal to the system's known expected count. That check is done AFTER timing, from output files, and +is NEVER part of any reported wall time. + +Usage: + python benchmark/comparison/run_comparison.py \ + --bertini2 ./build/core/bertini2 \ + --bertini1 /path/to/bertini \ + --systems cyclic6 katsura5 \ + --ranks 1 2 4 \ + --output comparison_results.csv + +Requirements: + - an MPI-built bertini2 and (for the bertini1 column) an MPI-built Bertini 1 + - mpirun on PATH for the rank sweep (--ranks beyond 1) + - pybertini importable (the `bertini` package) +""" + +import argparse +import csv +import datetime +import math +import os +import platform +import shutil +import subprocess +import sys + +HERE = os.path.dirname(os.path.abspath(__file__)) +REPO_ROOT = os.path.dirname(os.path.dirname(HERE)) # benchmark/comparison -> repo root +DEFAULT_HISTORY = os.path.join(HERE, "history.csv") # committed, append-only + +sys.path.insert(0, HERE) +import solvers # noqa: E402 +import systems # noqa: E402 + + +def parse_args(): + p = argparse.ArgumentParser(description="Compare bertini2 vs other solvers on the same systems") + p.add_argument("--bertini2", default="./build/core/bertini2", + help="Path to the bertini2 executable (default: ./build/core/bertini2)") + p.add_argument("--bertini1", default=None, + help="Path to a Bertini 1 executable. If omitted, only bertini2 is run.") + p.add_argument("--systems", nargs="+", default=systems.DEFAULT_SYSTEMS, + help=f"System names, or 'all' (default: {' '.join(systems.DEFAULT_SYSTEMS)}). " + f"Known: {', '.join(sorted(systems.SYSTEMS))}") + p.add_argument("--ranks", nargs="+", type=int, default=[1], + help="MPI rank counts (single-thread) to sweep (default: 1 = serial only)") + p.add_argument("--repeats", type=int, default=1, + help="Timed repeats per (system, solver, ranks); the fastest is kept (default: 1)") + p.add_argument("--timeout", type=float, default=600.0, help="Per-run timeout, seconds (default: 600)") + p.add_argument("--mpirun", default="mpirun", help="MPI launcher for rank sweeps (default: mpirun)") + p.add_argument("--mpirun-args", default="--bind-to none", + help="Extra flags before -n, one quoted string (default: '--bind-to none')") + p.add_argument("--output", default="comparison_results.csv", + help="Per-run snapshot CSV (overwritten each run)") + p.add_argument("--history", default=DEFAULT_HISTORY, + help=f"Append-only history CSV, committed to the repo so performance can be " + f"tracked over time (default: {os.path.relpath(DEFAULT_HISTORY, REPO_ROOT)})") + p.add_argument("--no-history", action="store_true", + help="Do not append to the history file (just write the per-run --output CSV)") + p.add_argument("--note", default="", + help="Free-text note recorded with each history row (e.g. 'after SLP rework')") + # Tracking knobs, emitted into the shared classic input (identical for every solver). + p.add_argument("--mptype", type=int, default=2, help="0 double, 1 fixed-multiple, 2 adaptive (default 2)") + p.add_argument("--predictor", type=int, default=5, help="odepredictor: 0 Euler, 2 RK4, 5 RKF45 (default 5)") + return p.parse_args() + + +def _git_commit(): + """Short b2 commit hash, with a -dirty suffix if the working tree has uncommitted changes.""" + try: + commit = subprocess.run(["git", "-C", REPO_ROOT, "rev-parse", "--short", "HEAD"], + capture_output=True, text=True).stdout.strip() + dirty = subprocess.run(["git", "-C", REPO_ROOT, "status", "--porcelain"], + capture_output=True, text=True).stdout.strip() + return (commit or "unknown") + ("-dirty" if dirty else "") + except OSError: + return "unknown" + + +def _cpu_brand(): + """Human-readable CPU model -- timings are only comparable across rows with the same CPU.""" + try: + if platform.system() == "Darwin": + return subprocess.run(["sysctl", "-n", "machdep.cpu.brand_string"], + capture_output=True, text=True).stdout.strip() or "unknown" + if platform.system() == "Linux": + with open("/proc/cpuinfo") as f: + for line in f: + if line.startswith("model name"): + return line.split(":", 1)[1].strip() + except OSError: + pass + return platform.processor() or "unknown" + + +def _solver_version(exe): + """First line of ` --version`; 'unknown' if it doesn't support the flag.""" + try: + out = subprocess.run([os.path.abspath(exe), "--version"], + capture_output=True, text=True, timeout=15) + text = (out.stdout + out.stderr).strip() + return text.splitlines()[0][:120] if text else "unknown" + except (OSError, subprocess.SubprocessError): + return "unknown" + + +def build_metadata(solver_cols, mptype, predictor, note): + """Per-invocation provenance recorded on every history row (machine, date, versions, settings).""" + return { + "timestamp": datetime.datetime.now().astimezone().isoformat(timespec="seconds"), + "host": platform.node(), + "cpu": _cpu_brand(), + "os": platform.platform(), + "b2_commit": _git_commit(), + "mptype": mptype, + "predictor": predictor, + "note": note, + "_versions": {name: _solver_version(exe) for name, exe in solver_cols}, + } + + +HISTORY_FIELDS = ["timestamp", "host", "cpu", "os", "b2_commit", "mptype", "predictor", + "solver", "solver_version", "system", "ranks", "threads", + "wall_time_s", "solutions_found", "expected_count", "matches_expected", "note"] + + +def append_history(path, rows, meta): + """Append one history row per measurement; write the header if the file is new.""" + is_new = not os.path.exists(path) + os.makedirs(os.path.dirname(path) or ".", exist_ok=True) + with open(path, "a", newline="") as f: + w = csv.DictWriter(f, fieldnames=HISTORY_FIELDS) + if is_new: + w.writeheader() + for r in rows: + w.writerow({ + "timestamp": meta["timestamp"], "host": meta["host"], "cpu": meta["cpu"], + "os": meta["os"], "b2_commit": meta["b2_commit"], + "mptype": meta["mptype"], "predictor": meta["predictor"], "note": meta["note"], + "solver": r["solver"], "solver_version": meta["_versions"].get(r["solver"], ""), + "system": r["system"], "ranks": r["ranks"], "threads": r["threads"], + "wall_time_s": r["wall_time_s"], "solutions_found": r["solutions_found"], + "expected_count": r["expected_count"], "matches_expected": r["matches_expected"], + }) + + +def emit_input(system, mptype, predictor): + """Build the single classic-Bertini input string shared by all solvers for this system.""" + return system.to_classic_input(mptype=mptype, odepredictor=predictor) + + +def timed(adapter, exe, input_text, ranks, mpirun, mpirun_args, timeout, repeats): + """Run one (solver, system, ranks) cell `repeats` times; keep the fastest valid time. + + Solution count comes from the runs (it is constant across repeats); timing is the minimum. + """ + best_time = float("nan") + solutions = -1 + detail = "" + for _ in range(repeats): + r = adapter(exe, input_text, ranks=ranks, threads=1, + mpirun=mpirun, mpirun_args=mpirun_args, timeout=timeout) + detail = r.detail + if r.ok: + solutions = r.solutions_found + if math.isnan(best_time) or r.wall_time_s < best_time: + best_time = r.wall_time_s + return best_time, solutions, detail + + +def main(): + args = parse_args() + + names = sorted(systems.SYSTEMS) if args.systems == ["all"] else args.systems + for n in names: + if n not in systems.SYSTEMS: + sys.exit(f"Error: unknown system {n!r}. Known: {', '.join(sorted(systems.SYSTEMS))}") + def resolve(exe): + """Accept either a path to an executable or a bare command resolved on PATH.""" + return exe if os.path.isfile(exe) else shutil.which(exe) + + bertini2 = resolve(args.bertini2) + if not bertini2: + sys.exit(f"Error: bertini2 not found: {args.bertini2}") + + if args.bertini1: + bertini1 = resolve(args.bertini1) + if not bertini1: + sys.exit(f"Error: bertini1 not found: {args.bertini1}") + else: + # Auto-detect Bertini 1, conventionally installed as `bertini` on PATH. + bertini1 = shutil.which("bertini") + if bertini1: + print(f"Auto-detected Bertini 1 on PATH: {bertini1} (use --bertini1 to override)") + + ranks_list = sorted(set(args.ranks) | {1}) # always include the serial baseline + needs_mpi = any(r > 1 for r in ranks_list) + if needs_mpi and shutil.which(args.mpirun) is None: + sys.exit(f"Error: {args.mpirun!r} not on PATH but --ranks includes >1") + if bertini1 is None: + print("NOTE: no Bertini 1 found; running bertini2 only (no cross-solver comparison).\n") + + solver_cols = [("bertini2", bertini2)] + if bertini1: + solver_cols.append(("bertini1", bertini1)) + + print(f"systems: {names}") + print(f"solvers: {[s for s, _ in solver_cols]}") + print(f"ranks: {ranks_list} (threads fixed at 1)") + print(f"settings: mptype={args.mptype}, odepredictor={args.predictor} (identical for all solvers)") + print(f"repeats: {args.repeats}\n") + + rows = [] + for name in names: + system, expected = systems.build(name) + input_text = emit_input(system, args.mptype, args.predictor) + + for ranks in ranks_list: + for solver_name, exe in solver_cols: + adapter = solvers.ADAPTERS[solver_name] + label = f"{name:10s} {solver_name:9s} ranks={ranks}" + print(f"Running {label} ... ", end="", flush=True) + t, found, detail = timed(adapter, exe, input_text, ranks, + args.mpirun, args.mpirun_args, args.timeout, args.repeats) + match = "yes" if (found == expected) else "NO" + if math.isnan(t): + print(f"failed ({detail})") + else: + flag = "" if match == "yes" else f" <-- count {found} != expected {expected}" + print(f"{t:8.3f}s ({found} solutions){flag}") + rows.append({ + "system": name, "solver": solver_name, "ranks": ranks, "threads": 1, + "wall_time_s": f"{t:.4f}" if not math.isnan(t) else "nan", + "solutions_found": found, "expected_count": expected, + "matches_expected": match, "detail": detail, + }) + + fieldnames = ["system", "solver", "ranks", "threads", "wall_time_s", + "solutions_found", "expected_count", "matches_expected", "detail"] + with open(args.output, "w", newline="") as f: + w = csv.DictWriter(f, fieldnames=fieldnames) + w.writeheader() + w.writerows(rows) + + if not args.no_history: + meta = build_metadata(solver_cols, args.mptype, args.predictor, args.note) + append_history(args.history, rows, meta) + + _print_summary(rows, names, ranks_list, solver_cols) + print(f"\nPer-run results written to: {args.output}") + if not args.no_history: + print(f"Appended {len(rows)} row(s) to history: {args.history} " + f"(commit this file to track performance over time)") + + # Correctness gate is reported, not timed: did everything that ran match its expected count? + bad = [r for r in rows if r["wall_time_s"] != "nan" and r["matches_expected"] != "yes"] + if bad: + print(f"\nWARNING: {len(bad)} run(s) did not match the expected solution count " + f"(see matches_expected column).") + + +def _print_summary(rows, names, ranks_list, solver_cols): + """Side-by-side timing table per system & rank, plus the bertini2/bertini1 speed ratio.""" + solver_names = [s for s, _ in solver_cols] + print() + header = f"{'system':10s} {'ranks':>5s} " + "".join(f"{s+'(s)':>13s}" for s in solver_names) + if {"bertini2", "bertini1"} <= set(solver_names): + header += f"{'b1/b2':>9s}" + print(header) + print("-" * len(header)) + by_key = {(r["system"], r["solver"], r["ranks"]): r for r in rows} + for name in names: + for ranks in ranks_list: + line = f"{name:10s} {ranks:5d} " + times = {} + for s in solver_names: + r = by_key.get((name, s, ranks)) + t = r["wall_time_s"] if r else "nan" + times[s] = t + line += f"{t:>13s}" + if {"bertini2", "bertini1"} <= set(solver_names): + try: + ratio = float(times["bertini1"]) / float(times["bertini2"]) + line += f"{ratio:>9.2f}" + except (ValueError, ZeroDivisionError): + line += f"{'-':>9s}" + print(line) + + +if __name__ == "__main__": + main() diff --git a/benchmark/comparison/solvers.py b/benchmark/comparison/solvers.py new file mode 100644 index 000000000..804e7db37 --- /dev/null +++ b/benchmark/comparison/solvers.py @@ -0,0 +1,137 @@ +"""Solver adapters for the external-solver comparison benchmark. + +Each adapter runs one CLI solver on a given classic-Bertini input *string*, in its own fresh +scratch directory (both Bertini 1 and the bertini2 CLI pollute their CWD with main_data, +raw_data, output, failed_paths, ... -- isolation keeps runs from colliding and keeps the repo +clean), times only the subprocess, and -- separately, after timing -- parses the solution count +from the files the run wrote. + +Adding HomotopyContinuation.jl later is just a new adapter with the same ``run(...) -> RunResult`` +shape; nothing else in the suite needs to change. + +IMPORTANT: timing measures ONLY the solve subprocess (perf_counter brackets subprocess.run). +Parsing the solution count and checking agreement happen afterwards, from already-written output +files, and are never included in any reported wall time. +""" + +import os +import re +import shlex +import shutil +import subprocess +import tempfile +import time +from collections import namedtuple + +# wall_time_s: float (nan on failure); solutions_found: int (-1 if unparseable); +# ok: did the process exit 0 and produce a parseable count; detail: short human note. +RunResult = namedtuple("RunResult", ["wall_time_s", "solutions_found", "ok", "detail"]) + + +def _launch(exe, ranks, mpirun, mpirun_args): + """Build the argv to launch a solver: direct for serial, under mpirun for an MPI rank sweep.""" + exe = os.path.abspath(exe) + if ranks <= 1: + # Serial: invoke the binary directly. An MPI-built binary run without mpirun is a single + # MPI process, which is exactly the serial baseline we want. + return [exe] + return [mpirun, *shlex.split(mpirun_args), "-n", str(ranks), exe] + + +def _time_run(argv, input_text, threads, timeout): + """Run argv in a fresh scratch dir with the given input; time ONLY the subprocess. + + Returns (wall_time_s, returncode, scratch_dir, stderr_tail). Caller parses output files in + scratch_dir, then removes it. wall_time_s is nan on timeout. + """ + scratch = tempfile.mkdtemp(prefix="b2_cmp_") + with open(os.path.join(scratch, "input"), "w") as f: # both solvers read a file named "input" + f.write(input_text) + + env = os.environ.copy() + env["OMP_NUM_THREADS"] = str(threads) # single-thread for this benchmark phase + + t0 = time.perf_counter() + try: + # stdin=DEVNULL is essential: the solvers read no input, but if stdin is an inherited + # pipe/tty they can block forever waiting on it (observed as a hang under capture). + proc = subprocess.run(argv, cwd=scratch, env=env, stdin=subprocess.DEVNULL, + capture_output=True, timeout=timeout) + except subprocess.TimeoutExpired: + return float("nan"), None, scratch, "timeout" + t1 = time.perf_counter() + stderr_tail = proc.stderr.decode(errors="replace")[-500:] + return t1 - t0, proc.returncode, scratch, stderr_tail + + +def _count_from_first_int_line(path): + """A classic Bertini solution file begins with an integer count on its first line.""" + try: + with open(path) as f: + return int(f.readline().strip()) + except (OSError, ValueError): + return -1 + + +# -------------------------------------------------------------------------------------------- +# Adapters +# -------------------------------------------------------------------------------------------- + +def _run_classic(exe, input_text, ranks, threads, mpirun, mpirun_args, timeout): + """Run a solver that writes Bertini 1.7 classic output files; return a RunResult. + + Both Bertini 1 and (as of the classic-output work) the Bertini 2 CLI write the count-led + `finite_solutions` file, so a single parser serves both. + """ + argv = _launch(exe, ranks, mpirun, mpirun_args) + wall, rc, scratch, err = _time_run(argv, input_text, threads, timeout) + try: + if wall != wall: # nan -> timeout + return RunResult(float("nan"), -1, False, "timeout") + if rc != 0: + return RunResult(float("nan"), -1, False, f"exit {rc}: {err}") + count = _finite_solution_count(scratch) + return RunResult(wall, count, count >= 0, "ok" if count >= 0 else "unparseable output") + finally: + shutil.rmtree(scratch, ignore_errors=True) + + +def _finite_solution_count(scratch): + """Solution count from the classic count-led solution files (first line is the count). + + `finite_solutions` is the apples-to-apples cross-solver count; fall back to the other + count-led files, then a regex scrape of main_data as a last resort. + """ + for name in ("finite_solutions", "nonsingular_solutions", "real_finite_solutions", + "raw_solutions"): + c = _count_from_first_int_line(os.path.join(scratch, name)) + if c >= 0: + return c + try: + with open(os.path.join(scratch, "main_data")) as f: + text = f.read() + m = re.search(r"(\d+)\s+(?:finite\s+)?solutions", text, re.IGNORECASE) + if m: + return int(m.group(1)) + except OSError: + pass + return -1 + + +def run_bertini2(exe, input_text, *, ranks=1, threads=1, + mpirun="mpirun", mpirun_args="--bind-to none", timeout=600.0): + """Run the bertini2 CLI (writes Bertini 1.7-compatible solution files).""" + return _run_classic(exe, input_text, ranks, threads, mpirun, mpirun_args, timeout) + + +def run_bertini1(exe, input_text, *, ranks=1, threads=1, + mpirun="mpirun", mpirun_args="--bind-to none", timeout=600.0): + """Run Bertini 1.7 (assumed MPI-built).""" + return _run_classic(exe, input_text, ranks, threads, mpirun, mpirun_args, timeout) + + +# Registry of available solver adapters, keyed by the column name used in output. +ADAPTERS = { + "bertini2": run_bertini2, + "bertini1": run_bertini1, +} diff --git a/benchmark/comparison/systems.py b/benchmark/comparison/systems.py new file mode 100644 index 000000000..5b8a2d0ae --- /dev/null +++ b/benchmark/comparison/systems.py @@ -0,0 +1,126 @@ +"""Test-bed polynomial systems for the external-solver comparison benchmark. + +Every system is built in Python with pybertini and is genuinely zero-dimensional, so the +solution count is a known constant we can use as a correctness check (see ``expected_count``). +The driver emits each system *once* to a classic Bertini-1 input file via +``System.to_classic_input(...)`` and feeds that single file to every solver, so the problem and +all tracking settings are identical across solvers by construction. + +Add a new family by writing a generator that returns a built ``bertini.System`` and registering +it in ``SYSTEMS``. Keep generators free of any solver- or timing-specific concerns. +""" + +import functools +import operator + +import bertini as pb + + +def _product(factors): + """Symbolic product of a non-empty list of nodes.""" + return functools.reduce(operator.mul, factors) + + +def _sum(terms): + """Symbolic sum of a non-empty list of nodes.""" + return functools.reduce(operator.add, terms) + + +# -------------------------------------------------------------------------------------------- +# Families +# -------------------------------------------------------------------------------------------- + +def cyclic(n): + """The cyclic-n roots system in n variables. + + Equations: for k = 1 .. n-1 the sum of all length-k cyclic products of the variables, plus + the closing relation (product of all variables) - 1. + + cyclic-n is zero-dimensional only when n is squarefree (Backelin); n in {5, 6, 7, 10, 11} + are the small squarefree cases. n in {4, 8, 9, 12, ...} have positive-dimensional + components and are NOT valid zero-dim test cases -- don't register them. + """ + x = pb.variables('x', n) # x0 .. x_{n-1} + sys = pb.System() + sys.add_variable_group(pb.VariableGroup(x)) + + for k in range(1, n): + terms = [_product([x[(i + j) % n] for j in range(k)]) for i in range(n)] + sys.add_function(_sum(terms)) + sys.add_function(_product(x) - 1) + return sys + + +def katsura(n): + """The Katsura-n system in n+1 variables (x0 .. xn), with 2**n solutions. + + Uses the symmetric-index convention: x_{-i} = x_i, and x_i = 0 for |i| > n. For + m = 0 .. n-1 the convolution sum_j x_{|j|} x_{|m-j|} - x_m = 0, plus the normalization + x0 + 2*(x1 + ... + xn) - 1 = 0. + """ + x = pb.variables('x', n + 1) # x0 .. xn + sys = pb.System() + sys.add_variable_group(pb.VariableGroup(x)) + + for m in range(n): + terms = [] + for j in range(-n, n + 1): + a, b = abs(j), abs(m - j) + if a <= n and b <= n: + terms.append(x[a] * x[b]) + sys.add_function(_sum(terms) - x[m]) + sys.add_function(x[0] + 2 * _sum(x[1:]) - 1) + return sys + + +def diagonal(n, degree=3): + """The diagonal warmup family x_i**degree - c_i, with degree**n solutions. + + Trivially zero-dimensional with analytically known roots -- a fast sanity tier mirroring the + existing benchmark/inputs/*.b2 systems. The c_i are distinct small primes. + """ + primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37] + if n > len(primes): + raise ValueError(f"diagonal: need {n} distinct constants, have {len(primes)} primes") + x = pb.variables('x', n) + sys = pb.System() + sys.add_variable_group(pb.VariableGroup(x)) + for i in range(n): + sys.add_function(x[i] ** degree - primes[i]) + return sys + + +# -------------------------------------------------------------------------------------------- +# Registry: name -> (builder, expected solution count) +# -------------------------------------------------------------------------------------------- +# expected_count is the number of isolated complex solutions of the (zero-dimensional) system; +# it is the ground truth for the correctness / agreement check, never part of any timing. + +SYSTEMS = { + # diagonal warmup tier (fast sanity) + "diag3": (lambda: diagonal(3), 27), + "diag5": (lambda: diagonal(5), 243), + "diag6": (lambda: diagonal(6), 729), + + # cyclic-n (squarefree n only: genuinely zero-dimensional) + "cyclic5": (lambda: cyclic(5), 70), + "cyclic6": (lambda: cyclic(6), 156), + "cyclic7": (lambda: cyclic(7), 924), + + # Katsura-n (2**n solutions) + "katsura3": (lambda: katsura(3), 8), + "katsura4": (lambda: katsura(4), 16), + "katsura5": (lambda: katsura(5), 32), + "katsura6": (lambda: katsura(6), 64), +} + +# Sensible default subset for a quick run: one of each family, mid-sized. +DEFAULT_SYSTEMS = ["diag5", "cyclic6", "katsura5"] + + +def build(name): + """Return (system, expected_count) for a registered name.""" + if name not in SYSTEMS: + raise KeyError(f"unknown system {name!r}; known: {', '.join(sorted(SYSTEMS))}") + builder, expected = SYSTEMS[name] + return builder(), expected diff --git a/benchmark/inputs/huge.b2 b/benchmark/inputs/huge.b2 new file mode 100644 index 000000000..1da7e6315 --- /dev/null +++ b/benchmark/inputs/huge.b2 @@ -0,0 +1,22 @@ +CONFIG + +tracktype: 0; + +END; + +INPUT + +variable_group x1, x2, x3, x4, x5, x6, x7, x8, x9; +function f1, f2, f3, f4, f5, f6, f7, f8, f9; + +f1 = x1^3 - 2; +f2 = x2^3 - 3; +f3 = x3^3 - 5; +f4 = x4^3 - 7; +f5 = x5^3 - 11; +f6 = x6^3 - 13; +f7 = x7^3 - 17; +f8 = x8^3 - 19; +f9 = x9^3 - 23; + +END; diff --git a/benchmark/inputs/huge_seeded.b2 b/benchmark/inputs/huge_seeded.b2 new file mode 100644 index 000000000..5c51fcded --- /dev/null +++ b/benchmark/inputs/huge_seeded.b2 @@ -0,0 +1,24 @@ +CONFIG + +tracktype: 0; + +randomseed: 314159; + +END; + +INPUT + +variable_group x1, x2, x3, x4, x5, x6, x7, x8, x9; +function f1, f2, f3, f4, f5, f6, f7, f8, f9; + +f1 = x1^3 - 2; +f2 = x2^3 - 3; +f3 = x3^3 - 5; +f4 = x4^3 - 7; +f5 = x5^3 - 11; +f6 = x6^3 - 13; +f7 = x7^3 - 17; +f8 = x8^3 - 19; +f9 = x9^3 - 23; + +END; diff --git a/benchmark/inputs/large.b2 b/benchmark/inputs/large.b2 new file mode 100644 index 000000000..c6f678523 --- /dev/null +++ b/benchmark/inputs/large.b2 @@ -0,0 +1,19 @@ +CONFIG + +tracktype: 0; + +END; + +INPUT + +variable_group x1, x2, x3, x4, x5, x6; +function f1, f2, f3, f4, f5, f6; + +f1 = x1^3 - 2; +f2 = x2^3 - 3; +f3 = x3^3 - 5; +f4 = x4^3 - 7; +f5 = x5^3 - 11; +f6 = x6^3 - 13; + +END; diff --git a/benchmark/inputs/large_seeded.b2 b/benchmark/inputs/large_seeded.b2 new file mode 100644 index 000000000..86c1c709f --- /dev/null +++ b/benchmark/inputs/large_seeded.b2 @@ -0,0 +1,21 @@ +CONFIG + +tracktype: 0; + +randomseed: 314159; + +END; + +INPUT + +variable_group x1, x2, x3, x4, x5, x6; +function f1, f2, f3, f4, f5, f6; + +f1 = x1^3 - 2; +f2 = x2^3 - 3; +f3 = x3^3 - 5; +f4 = x4^3 - 7; +f5 = x5^3 - 11; +f6 = x6^3 - 13; + +END; diff --git a/benchmark/inputs/medium.b2 b/benchmark/inputs/medium.b2 new file mode 100644 index 000000000..08077edb0 --- /dev/null +++ b/benchmark/inputs/medium.b2 @@ -0,0 +1,18 @@ +CONFIG + +tracktype: 0; + +END; + +INPUT + +variable_group x1, x2, x3, x4, x5; +function f1, f2, f3, f4, f5; + +f1 = x1^3 - 2; +f2 = x2^3 - 3; +f3 = x3^3 - 5; +f4 = x4^3 - 7; +f5 = x5^3 - 11; + +END; diff --git a/benchmark/inputs/medium_seeded.b2 b/benchmark/inputs/medium_seeded.b2 new file mode 100644 index 000000000..ecabf5f36 --- /dev/null +++ b/benchmark/inputs/medium_seeded.b2 @@ -0,0 +1,20 @@ +CONFIG + +tracktype: 0; + +randomseed: 314159; + +END; + +INPUT + +variable_group x1, x2, x3, x4, x5; +function f1, f2, f3, f4, f5; + +f1 = x1^3 - 2; +f2 = x2^3 - 3; +f3 = x3^3 - 5; +f4 = x4^3 - 7; +f5 = x5^3 - 11; + +END; diff --git a/benchmark/inputs/small.b2 b/benchmark/inputs/small.b2 new file mode 100644 index 000000000..16676bbcb --- /dev/null +++ b/benchmark/inputs/small.b2 @@ -0,0 +1,16 @@ +CONFIG + +tracktype: 0; + +END; + +INPUT + +variable_group x1, x2, x3; +function f1, f2, f3; + +f1 = x1^3 - 2; +f2 = x2^3 - 3; +f3 = x3^3 - 5; + +END; diff --git a/benchmark/inputs/small_mhom.b2 b/benchmark/inputs/small_mhom.b2 new file mode 100644 index 000000000..a03bf80fc --- /dev/null +++ b/benchmark/inputs/small_mhom.b2 @@ -0,0 +1,20 @@ +CONFIG + +tracktype: 0; + +END; + +INPUT + +% Two variable groups => classic Bertini infers the multihomogeneous start system +% (blackbox::InferStartType). Exercises the mhom start-system MPI broadcast path that +% the total-degree small.b2 input does not. The % comments here also keep the classic +% parser's comment-stripping (Bertini 1 compatibility) honest under mpirun in CI. +variable_group x; +variable_group y; +function f1, f2; + +f1 = x*y - 1; % a comment trailing a real declaration line +f2 = x + y - 3; + +END; diff --git a/benchmark/inputs/small_seeded.b2 b/benchmark/inputs/small_seeded.b2 new file mode 100644 index 000000000..5faa7e732 --- /dev/null +++ b/benchmark/inputs/small_seeded.b2 @@ -0,0 +1,18 @@ +CONFIG + +tracktype: 0; + +randomseed: 314159; + +END; + +INPUT + +variable_group x1, x2, x3; +function f1, f2, f3; + +f1 = x1^3 - 2; +f2 = x2^3 - 3; +f3 = x3^3 - 5; + +END; diff --git a/benchmark/inputs/xlarge.b2 b/benchmark/inputs/xlarge.b2 new file mode 100644 index 000000000..d453c30e4 --- /dev/null +++ b/benchmark/inputs/xlarge.b2 @@ -0,0 +1,20 @@ +CONFIG + +tracktype: 0; + +END; + +INPUT + +variable_group x1, x2, x3, x4, x5, x6, x7; +function f1, f2, f3, f4, f5, f6, f7; + +f1 = x1^3 - 2; +f2 = x2^3 - 3; +f3 = x3^3 - 5; +f4 = x4^3 - 7; +f5 = x5^3 - 11; +f6 = x6^3 - 13; +f7 = x7^3 - 17; + +END; diff --git a/benchmark/inputs/xlarge_seeded.b2 b/benchmark/inputs/xlarge_seeded.b2 new file mode 100644 index 000000000..40ec6f1af --- /dev/null +++ b/benchmark/inputs/xlarge_seeded.b2 @@ -0,0 +1,22 @@ +CONFIG + +tracktype: 0; + +randomseed: 314159; + +END; + +INPUT + +variable_group x1, x2, x3, x4, x5, x6, x7; +function f1, f2, f3, f4, f5, f6, f7; + +f1 = x1^3 - 2; +f2 = x2^3 - 3; +f3 = x3^3 - 5; +f4 = x4^3 - 7; +f5 = x5^3 - 11; +f6 = x6^3 - 13; +f7 = x7^3 - 17; + +END; diff --git a/benchmark/run_benchmark.py b/benchmark/run_benchmark.py new file mode 100755 index 000000000..78e20d9e0 --- /dev/null +++ b/benchmark/run_benchmark.py @@ -0,0 +1,252 @@ +#!/usr/bin/env python3 +""" +Benchmark parallel speedup of the bertini2 CLI solver. + +Sweeps MPI rank counts and OMP thread counts, times each run, and emits +a CSV showing wall time and speedup relative to the serial (1 rank, 1 thread) baseline. + +Usage: + python run_benchmark.py \ + --bertini2 ./build/core/bertini2 \ + --input benchmark/inputs/medium.b2 \ + --ranks 1 2 4 8 \ + --threads 1 2 4 \ + --output results.csv + +Requirements: + - mpirun must be on PATH + - bertini2 must be compiled with MPI support (BERTINI2_HAVE_MPI) + - OMP_NUM_THREADS controls threads per MPI rank +""" + +import argparse +import csv +import math +import os +import shlex +import shutil +import subprocess +import sys +import tempfile +import time + + +def parse_args(): + p = argparse.ArgumentParser(description="Benchmark bertini2 parallel speedup") + p.add_argument("--bertini2", default="./build/core/bertini2", + help="Path to bertini2 executable (default: ./build/core/bertini2)") + p.add_argument("--input", required=True, + help="Bertini input file to solve") + p.add_argument("--ranks", nargs="+", type=int, default=[1, 2, 4], + help="MPI rank counts to sweep (default: 1 2 4)") + p.add_argument("--threads", nargs="+", type=int, default=[1], + help="OMP thread counts to sweep (default: 1)") + p.add_argument("--output", default="benchmark_results.csv", + help="CSV output file (default: benchmark_results.csv)") + p.add_argument("--timeout", type=float, default=600.0, + help="Per-run timeout in seconds (default: 600)") + p.add_argument("--repeats", type=int, default=1, + help="Number of timed repeats per (ranks, threads) combo (default: 1)") + p.add_argument("--mpirun", default="mpirun", + help="mpirun command (default: mpirun)") + p.add_argument("--mpirun-args", default="--bind-to none", + help="Extra flags passed to mpirun before -n, as one quoted string " + "(default: '--bind-to none'). Site-specific: e.g. on a host whose CPU " + "topology hwloc can't read, use " + "'--map-by slot:OVERSUBSCRIBE --bind-to none'.") + p.add_argument("--no-mpi", action="store_true", + help="Run the solver directly (no mpirun): a pure shared-memory THREAD sweep " + "for a bertini2 built without MPI. Forces ranks=1 and sweeps --threads only.") + p.add_argument("--assert-speedup", type=float, default=None, metavar="FACTOR", + help="Fail (exit 1) unless the best multi-thread run beats the serial baseline " + "by at least FACTOR (e.g. 1.5). Off by default; use in CI / acceptance runs.") + return p.parse_args() + + +def run_once(bertini2_path, input_file, ranks, threads, mpirun_cmd, mpirun_args, timeout, use_mpi): + """ + Run bertini2 with the given parallelism settings in a fresh temp directory. + + When use_mpi is True the solver is launched under `mpirun -n ` (MPI across ranks, + OMP_NUM_THREADS threads within each rank). When use_mpi is False the binary is run directly + -- a pure shared-memory thread sweep that needs no MPI at all; ranks is ignored (always 1). + + Returns (wall_time_s, solutions_found) or (float('nan'), -1) on failure. + """ + tmpdir = tempfile.mkdtemp(prefix="b2_bench_") + try: + dest_input = os.path.join(tmpdir, "input") + shutil.copy2(input_file, dest_input) + + env = os.environ.copy() + # OMP_NUM_THREADS drives the worker-thread count in both modes: per MPI rank under mpirun, + # and the whole shared-memory solve when run directly. + env["OMP_NUM_THREADS"] = str(threads) + + if use_mpi: + cmd = [mpirun_cmd, *shlex.split(mpirun_args), "-n", str(ranks), + os.path.abspath(bertini2_path)] + else: + cmd = [os.path.abspath(bertini2_path)] + + t0 = time.perf_counter() + try: + result = subprocess.run( + cmd, + cwd=tmpdir, + env=env, + capture_output=True, + timeout=timeout, + ) + except subprocess.TimeoutExpired: + print(f" TIMEOUT after {timeout}s", flush=True) + return float("nan"), -1 + t1 = time.perf_counter() + + if result.returncode != 0: + stderr_tail = result.stderr.decode(errors="replace")[-500:] + print(f" FAILED (exit {result.returncode}): {stderr_tail}", flush=True) + return float("nan"), -1 + + wall_time = t1 - t0 + solutions = _parse_solution_count(os.path.join(tmpdir, "main_data")) + return wall_time, solutions + + finally: + shutil.rmtree(tmpdir, ignore_errors=True) + + +def _parse_solution_count(main_data_path): + """Read solution count from the first line of main_data.""" + try: + with open(main_data_path) as f: + first_line = f.readline().strip() + return int(first_line) + except (OSError, ValueError): + return -1 + + +def validate_inputs(args): + if not os.path.isfile(args.input): + sys.exit(f"Error: input file not found: {args.input}") + if not os.path.isfile(args.bertini2): + sys.exit(f"Error: bertini2 executable not found: {args.bertini2}") + # mpirun is only needed for the MPI rank sweep; the --no-mpi thread sweep runs the binary + # directly, so don't demand mpirun there. + if not args.no_mpi and shutil.which(args.mpirun) is None: + sys.exit(f"Error: {args.mpirun!r} not found on PATH " + f"(use --no-mpi for a threads-only sweep on a build without MPI)") + + +def main(): + args = parse_args() + validate_inputs(args) + + use_mpi = not args.no_mpi + + ranks_list = sorted(set(args.ranks)) + threads_list = sorted(set(args.threads)) + + # Ensure serial baseline (1, 1) is always first + if 1 not in ranks_list: + ranks_list = [1] + ranks_list + if 1 not in threads_list: + threads_list = [1] + threads_list + + # In --no-mpi mode there are no ranks: collapse to a pure thread sweep at ranks=1. + if not use_mpi: + ranks_list = [1] + + print(f"bertini2: {args.bertini2}") + print(f"input: {args.input}") + print(f"mode: {'MPI ranks x OMP threads' if use_mpi else 'shared-memory threads (no MPI)'}") + print(f"ranks: {ranks_list}") + print(f"threads: {threads_list}") + print(f"repeats: {args.repeats}") + print(f"output: {args.output}") + print() + + rows = [] + serial_time = None + + combos = [(r, t) for r in ranks_list for t in threads_list] + # Run (1,1) first regardless of order so speedup can be computed incrementally + combos = sorted(combos, key=lambda rt: (rt[0] != 1 or rt[1] != 1, rt[0], rt[1])) + + for ranks, threads in combos: + label = f"ranks={ranks}, threads={threads}" + times = [] + solutions = -1 + for rep in range(args.repeats): + rep_label = f" rep {rep+1}/{args.repeats}" if args.repeats > 1 else "" + print(f"Running {label}{rep_label} ... ", end="", flush=True) + t, sol = run_once(args.bertini2, args.input, ranks, threads, + args.mpirun, args.mpirun_args, args.timeout, use_mpi) + if math.isnan(t): + print("failed") + times.append(float("nan")) + else: + print(f"{t:.2f}s ({sol} solutions)") + times.append(t) + solutions = sol + + valid = [t for t in times if not math.isnan(t)] + wall_time = min(valid) if valid else float("nan") + + if ranks == 1 and threads == 1 and not math.isnan(wall_time): + serial_time = wall_time + + if serial_time is not None and not math.isnan(wall_time): + speedup = serial_time / wall_time + else: + speedup = float("nan") + + rows.append({ + "ranks": ranks, + "threads": threads, + "total_workers": ranks * threads, + "wall_time_s": f"{wall_time:.4f}" if not math.isnan(wall_time) else "nan", + "solutions_found": solutions, + "speedup_vs_serial": f"{speedup:.4f}" if not math.isnan(speedup) else "nan", + }) + + # Write CSV + fieldnames = ["ranks", "threads", "total_workers", "wall_time_s", + "solutions_found", "speedup_vs_serial"] + with open(args.output, "w", newline="") as f: + writer = csv.DictWriter(f, fieldnames=fieldnames) + writer.writeheader() + writer.writerows(rows) + + # Print summary table + print() + print(f"{'ranks':>6} {'threads':>7} {'workers':>7} {'time(s)':>9} {'solutions':>9} {'speedup':>8}") + print("-" * 60) + for row in rows: + print(f"{row['ranks']:>6} {row['threads']:>7} {row['total_workers']:>7} " + f"{row['wall_time_s']:>9} {row['solutions_found']:>9} {row['speedup_vs_serial']:>8}") + + print(f"\nResults written to: {args.output}") + + # Best speedup achieved by any genuinely parallel run (more than one worker). + parallel_speedups = [ + float(row["speedup_vs_serial"]) + for row in rows + if row["total_workers"] > 1 and row["speedup_vs_serial"] != "nan" + ] + best = max(parallel_speedups) if parallel_speedups else float("nan") + if parallel_speedups: + print(f"Best parallel speedup: {best:.2f}x vs serial baseline.") + + # Optional acceptance gate: did parallelism actually pay off? + if args.assert_speedup is not None: + if math.isnan(best): + sys.exit("FAIL: --assert-speedup set but no parallel run produced a valid time.") + if best < args.assert_speedup: + sys.exit(f"FAIL: best parallel speedup {best:.2f}x < required " + f"{args.assert_speedup:.2f}x.") + print(f"PASS: best parallel speedup {best:.2f}x >= required {args.assert_speedup:.2f}x.") + + +if __name__ == "__main__": + main() diff --git a/benchmark/submit.slurm.sh b/benchmark/submit.slurm.sh new file mode 100755 index 000000000..af1bf365f --- /dev/null +++ b/benchmark/submit.slurm.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# SLURM job script for bertini2 parallel benchmark. +# Customize the #SBATCH directives and paths below for your cluster. + +#SBATCH --job-name=bertini2_benchmark +#SBATCH --nodes=4 # total number of nodes +#SBATCH --ntasks-per-node=1 # one MPI rank per node +#SBATCH --cpus-per-task=8 # CPU cores per rank (= OMP_NUM_THREADS) +#SBATCH --time=02:00:00 +#SBATCH --output=benchmark_%j.log +#SBATCH --error=benchmark_%j.err + +# --- Cluster-specific setup --- +# Uncomment / adjust as needed for your environment: +# module load mpi/openmpi-x86_64 +# module load python/3.10 +# source /path/to/your/conda/etc/profile.d/conda.sh && conda activate b2-ubuntu + +# --- Paths (edit these) --- +REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)" +BERTINI2="${REPO_ROOT}/build/core/bertini2" +BENCHMARK_SCRIPT="${REPO_ROOT}/benchmark/run_benchmark.py" +INPUT="${REPO_ROOT}/benchmark/inputs/large.b2" + +# Output CSV tagged with SLURM job ID +OUTPUT="${REPO_ROOT}/benchmark/results_${SLURM_JOB_ID:-local}.csv" + +# --- Sweep configuration --- +# Ranks to test. Should not exceed (--nodes * --ntasks-per-node). +RANKS="1 2 4" + +# Threads per rank. Should not exceed --cpus-per-task. +THREADS="1 2 4 8" + +# --- Run --- +python "${BENCHMARK_SCRIPT}" \ + --bertini2 "${BERTINI2}" \ + --input "${INPUT}" \ + --ranks ${RANKS} \ + --threads ${THREADS} \ + --output "${OUTPUT}" \ + --repeats 3 + +echo "Benchmark complete. Results: ${OUTPUT}" diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index e7bc61136..ec8b83248 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -15,6 +15,14 @@ set(CMAKE_CXX_EXTENSIONS OFF) #file(GLOB SOURCES src/*.cpp) option(ENABLE_UNIT_TESTING "Turn on building and running of unit tests while compiling" OFF) +option(BMP_EXPRESSION_TEMPLATES "Enable Boost.Multiprecision expression templates for mpfr_float, mpfr_complex, mpz_int, mpq_rational" ON) +# Route GMP/MPFR/MPC limb allocation through mimalloc (static, NON-override) for a large +# multiprecision speedup. OFF = system allocator, no extra dependency, InstallFastAllocator() +# becomes a no-op -- the build-time escape hatch if a platform's CI dislikes mimalloc. +option(BERTINI2_FAST_ALLOC "Use a bundled fast allocator (mimalloc) for multiprecision limb allocation" ON) + +find_package(MPI) +option(ENABLE_MPI "Enable MPI parallelism (requires OpenMPI or MPICH; no Boost.MPI needed)" ${MPI_FOUND}) if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Release") @@ -25,14 +33,18 @@ endif(NOT CMAKE_BUILD_TYPE) message(STATUS "Build type: ${CMAKE_BUILD_TYPE}") message(STATUS "ENABLE_UNIT_TESTING: ${ENABLE_UNIT_TESTING}") +if(BMP_EXPRESSION_TEMPLATES) + add_compile_definitions(BMP_EXPRESSION_TEMPLATES=1) + message(STATUS "BMP expression templates: ON") +else() + message(STATUS "BMP expression templates: OFF") +endif() + if (WIN32) add_compile_options(/bigobj) add_compile_options(/EHsc) set(CMAKE_BUILD_TYPE Release) - set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) - set(BUILD_SHARED_LIBS TRUE) else () - # add_compile_definitions(-DBMP_EXPRESSION_TEMPLATES=1) add_compile_options( # put things for debug compile here $<$:-g> @@ -40,7 +52,9 @@ else () # and things for release here $<$:-O3> - $<$:-g> + # (debug info intentionally omitted from Release: CI strips it from + # wheels anyway, and -g bloats objects ~3-4x, exhausting disk on + # constrained build hosts.) # using O2 or O3 cuts runtime by over half. ) endif () @@ -71,6 +85,13 @@ set(_BOOST_REQUIRED_COMPONENTS thread ) +if(ENABLE_MPI AND NOT MPI_FOUND) + message(FATAL_ERROR "ENABLE_MPI=ON but no MPI installation was found.") +endif() +if(ENABLE_MPI) + message(STATUS "MPI enabled: ${MPI_CXX_COMPILER}") +endif() + find_package(Boost REQUIRED COMPONENTS ${_BOOST_REQUIRED_COMPONENTS}) # Boost 1.89.0 removed the boost_system library (it's header-only now). @@ -126,11 +147,13 @@ set(detail_headers include/bertini2/detail/is_template_parameter.hpp include/bertini2/detail/enable_permuted_arguments.hpp include/bertini2/detail/typelist.hpp + include/bertini2/detail/sha256.hpp ) set(function_tree_headers include/bertini2/function_tree.hpp include/bertini2/function_tree/node.hpp + include/bertini2/function_tree/gather.hpp include/bertini2/function_tree/forward_declares.hpp include/bertini2/function_tree/simplify.hpp include/bertini2/function_tree/operators/operator.hpp @@ -139,9 +162,7 @@ set(function_tree_headers include/bertini2/function_tree/symbols/differential.hpp include/bertini2/function_tree/symbols/special_number.hpp include/bertini2/function_tree/symbols/number.hpp - include/bertini2/function_tree/symbols/linear_product.hpp - include/bertini2/function_tree/roots/function.hpp - include/bertini2/function_tree/roots/jacobian.hpp + include/bertini2/function_tree/roots/named_expression.hpp include/bertini2/function_tree/operators/arithmetic.hpp include/bertini2/function_tree/operators/trig.hpp ) @@ -156,9 +177,13 @@ set(settings_headers set(functiontreeinclude_HEADERS include/bertini2/function_tree/node.hpp + include/bertini2/function_tree/gather.hpp include/bertini2/function_tree/factory.hpp include/bertini2/function_tree/forward_declares.hpp include/bertini2/function_tree/simplify.hpp + include/bertini2/function_tree/canonical.hpp + include/bertini2/function_tree/canonical_encoding.hpp + include/bertini2/function_tree/reintern.hpp ) set(functiontree_operators_HEADERS @@ -173,15 +198,14 @@ set(functiontree_symbols_HEADERS include/bertini2/function_tree/symbols/differential.hpp include/bertini2/function_tree/symbols/special_number.hpp include/bertini2/function_tree/symbols/number.hpp - include/bertini2/function_tree/symbols/linear_product.hpp ) set(functiontree_roots_HEADERS - include/bertini2/function_tree/roots/function.hpp - include/bertini2/function_tree/roots/jacobian.hpp + include/bertini2/function_tree/roots/named_expression.hpp ) set(io_headers + include/bertini2/io/classic_writer.hpp include/bertini2/io/file_utilities.hpp include/bertini2/io/generators.hpp include/bertini2/io/parsing.hpp @@ -220,7 +244,6 @@ set(nag_algorithms_headers set(nag_algorithms_common_headers include/bertini2/nag_algorithms/common/algorithm_base.hpp include/bertini2/nag_algorithms/common/config.hpp - include/bertini2/nag_algorithms/common/policies.hpp ) set(nag_datatypes_headers @@ -234,6 +257,9 @@ set(nag_datatypes_common_headers set(parallel_headers include/bertini2/parallel/initialize_finalize.hpp + include/bertini2/parallel/path_result.hpp + include/bertini2/parallel/manager.hpp + include/bertini2/parallel/worker.hpp ) set(parallel_rootinclude_HEADERS @@ -256,7 +282,8 @@ set(system_headers ) set(system_start_headers - include/bertini2/system/start/total_degree.hpp + include/bertini2/system/start/total_degree_linear_product.hpp + include/bertini2/system/start/total_degree_binomial.hpp include/bertini2/system/start/mhom.hpp include/bertini2/system/start/user.hpp include/bertini2/system/start/utility.hpp @@ -270,19 +297,15 @@ set(trackers_HEADERS include/bertini2/trackers/adaptive_precision_utilities.hpp include/bertini2/trackers/amp_criteria.hpp include/bertini2/trackers/amp_tracker.hpp - include/bertini2/trackers/base_predictor.hpp include/bertini2/trackers/base_tracker.hpp include/bertini2/trackers/config.hpp include/bertini2/trackers/events.hpp include/bertini2/trackers/explicit_predictors.hpp include/bertini2/trackers/fixed_precision_tracker.hpp include/bertini2/trackers/fixed_precision_utilities.hpp - include/bertini2/trackers/newton_correct.hpp include/bertini2/trackers/newton_corrector.hpp include/bertini2/trackers/observers.hpp include/bertini2/trackers/ode_predictors.hpp - include/bertini2/trackers/predict.hpp - include/bertini2/trackers/step.hpp include/bertini2/trackers/tracker.hpp ) @@ -320,22 +343,27 @@ set(BERTINI2_LIBRARY_HEADERS set(basics_sources src/basics/random.cpp src/basics/have_bertini.cpp + src/basics/fast_allocator.cpp + src/detail/sha256.cpp ) set(function_tree_sources src/function_tree/node.cpp + src/function_tree/gather.cpp + src/function_tree/find.cpp src/function_tree/simplify.cpp + src/function_tree/canonical.cpp + src/function_tree/canonical_encoding.cpp + src/function_tree/reintern.cpp src/function_tree/operators/arithmetic.cpp src/function_tree/operators/trig.cpp - src/function_tree/linear_product.cpp src/function_tree/operators/operator.cpp src/function_tree/symbols/special_number.cpp src/function_tree/symbols/differential.cpp src/function_tree/symbols/symbol.cpp src/function_tree/symbols/variable.cpp src/function_tree/symbols/number.cpp - src/function_tree/roots/jacobian.cpp - src/function_tree/roots/function.cpp + src/function_tree/roots/named_expression.cpp ) set(parallel_sources @@ -348,8 +376,10 @@ set(system_source_files src/system/slice.cpp src/system/start_base.cpp src/system/system.cpp + src/system/content_identity.cpp src/system/straight_line_program.cpp - src/system/start/total_degree.cpp + src/system/start/total_degree_linear_product.cpp + src/system/start/total_degree_binomial.cpp src/system/start/mhom.cpp src/system/start/user.cpp ) @@ -358,18 +388,29 @@ set(tracking_source_files src/tracking/explicit_predictors.cpp ) +# explicit template instantiation TUs: the one home for the heavy +# endgame/zerodim instantiations (see ADR-0014); consumers get extern +# declarations from the umbrella headers and just link. +set(eti_source_files + src/eti/endgames_eti.cpp + src/eti/zero_dim_eti.cpp + src/eti/zero_dim_blackbox_eti.cpp +) + set(BERTINI2_LIBRARY_SOURCES ${basics_sources} ${function_tree_sources} ${parallel_sources} ${system_source_files} ${tracking_source_files} + ${eti_source_files} ) set(BERTINI2_EXE_SOURCES src/blackbox/bertini.cpp src/blackbox/main_mode_switch.cpp src/blackbox/argc_argv.cpp + src/blackbox/algorithm_builder.cpp ) set(BERTINI2_EXE_HEADERS @@ -392,11 +433,25 @@ add_library(bertini2 ${BERTINI2_LIBRARY_SOURCES} ${BERTINI2_LIBRARY_HEADERS}) add_library(bertini2::bertini2 ALIAS bertini2) +# The (static) library is linked into the shared _pybertini Python module, so +# its objects must be position-independent. Previously this requirement was +# accidentally satisfied because every consumer recompiled the library sources +# itself (with -fPIC); now that the library is compiled once and linked, mark +# it PIC explicitly. +set_target_properties(bertini2 PROPERTIES POSITION_INDEPENDENT_CODE ON) + target_include_directories(bertini2 SYSTEM PUBLIC ${GMP_INCLUDES} ${MPFR_INCLUDES} ${MPC_INCLUDES} + # Treat Boost/Eigen headers as system so their (and their template + # instantiations') warnings stay out of our build output. Boost is linked + # below via raw ${Boost_LIBRARIES} (no include propagation), so its include + # dir must be added here explicitly. Eigen3::Eigen is an imported target + # (already SYSTEM by default), but we mark it explicitly to be robust. + ${Boost_INCLUDE_DIRS} + $ ) target_include_directories(bertini2 PUBLIC @@ -405,27 +460,66 @@ target_include_directories(bertini2 PUBLIC $ # /include ) - -# All library files -target_sources(bertini2 PUBLIC - ${BERTINI2_LIBRARY_SOURCES} - ${BERTINI2_LIBRARY_HEADERS} -) - if(WIN32) - set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) - set(BUILD_SHARED_LIBS TRUE) target_compile_options(bertini2 PRIVATE $<$:-bigobj -MP>) target_compile_definitions(bertini2 PUBLIC "HAVE_SNPRINTF") endif() +# The full PEP 440 version (e.g. 3.0.0.dev6), including any .devN/rc suffix. +# jrl-cmakemodules' generated config.hpp bakes in the *stripped* numeric +# BERTINI2_VERSION (for cmake/SOVERSION semantics); this carries the complete +# string so bertini::Version() can report the dev-count. See CMakeLists.txt. +target_compile_definitions(bertini2 PUBLIC "BERTINI2_VERSION_FULL=\"${BERTINI2_FULL_VERSION}\"") + target_link_libraries(bertini2 PUBLIC ${GMP_LIBRARIES}) target_link_libraries(bertini2 PUBLIC ${MPFR_LIBRARIES}) target_link_libraries(bertini2 PUBLIC ${MPC_LIBRARIES}) target_link_libraries(bertini2 PUBLIC Eigen3::Eigen) target_link_libraries(bertini2 PUBLIC ${Boost_LIBRARIES}) +# Faster multiprecision: route GMP/MPFR/MPC limb allocation through mimalloc (static, NON-override). +# We never replace the process malloc; bertini::InstallFastAllocator() installs an ownership-aware +# GMP memory hook that calls mi_*. See bertini2/fast_allocator.hpp. mimalloc is fetched + built +# from source (MIT license), so no system dependency is added and the wheel stays self-contained. +# Escape hatch: -DBERTINI2_FAST_ALLOC=OFF builds exactly as before (hook is a no-op). +if(BERTINI2_FAST_ALLOC) + include(FetchContent) + set(MI_OVERRIDE OFF CACHE BOOL "" FORCE) # do NOT hijack the process malloc; we call mi_* explicitly + set(MI_BUILD_SHARED OFF CACHE BOOL "" FORCE) + set(MI_BUILD_STATIC ON CACHE BOOL "" FORCE) + set(MI_BUILD_OBJECT OFF CACHE BOOL "" FORCE) + set(MI_BUILD_TESTS OFF CACHE BOOL "" FORCE) + # CRITICAL for the dlopen-ed Python extension on glibc Linux: mimalloc otherwise builds with + # -ftls-model=initial-exec, whose TLS must come from the limited static-TLS surplus. When + # _pybertini.so (with mimalloc statically linked) is dlopen-ed, that surplus is exhausted and + # import fails with "cannot allocate memory in static TLS block". Local-dynamic TLS is the + # dlopen-compatible model. (Windows/macOS are unaffected, but the option is harmless there.) + set(MI_LOCAL_DYNAMIC_TLS ON CACHE BOOL "" FORCE) + FetchContent_Declare(mimalloc + GIT_REPOSITORY https://github.com/microsoft/mimalloc.git + GIT_TAG v2.1.7) + FetchContent_MakeAvailable(mimalloc) + set_target_properties(mimalloc-static PROPERTIES POSITION_INDEPENDENT_CODE ON) + target_link_libraries(bertini2 PUBLIC mimalloc-static) + target_compile_definitions(bertini2 PUBLIC BERTINI2_HAVE_MIMALLOC) + message(STATUS "bertini2: multiprecision allocator = mimalloc (static, non-override)") +else() + message(STATUS "bertini2: multiprecision allocator = system (BERTINI2_FAST_ALLOC=OFF)") +endif() + +if(ENABLE_MPI) + # We use only the MPI C API. Including from C++ otherwise pulls in the deprecated + # MPI C++ bindings (the MPI:: namespace / mpicxx.h), which MPICH compiles in by default and + # which fail to build under modern C++ (clang especially) -- so the project compiled with + # OpenMPI but not MPICH. These macros tell both implementations to skip the C++ bindings. + # PUBLIC + on the compile command line, so they are defined before any include, and + # propagate to everything linking bertini2 (python bindings, blackbox). + target_compile_definitions(bertini2 PUBLIC BERTINI2_HAVE_MPI MPICH_SKIP_MPICXX OMPI_SKIP_MPICXX) + target_link_libraries(bertini2 PUBLIC MPI::MPI_CXX) + message(STATUS "bertini2 built with plain C MPI support (no Boost.MPI)") +endif() + if(SUFFIX_SO_VERSION) set_target_properties(bertini2 PROPERTIES SOVERSION ${PROJECT_VERSION}) @@ -434,10 +528,84 @@ endif(SUFFIX_SO_VERSION) add_executable(bertini2_exe) target_sources(bertini2_exe PUBLIC ${BERTINI2_EXE_SOURCES} ${BERTINI2_EXE_HEADERS}) target_link_libraries(bertini2_exe ${Boost_LIBRARIES} bertini2) +set_target_properties(bertini2_exe PROPERTIES OUTPUT_NAME bertini2) +# On MSVC/lld-link, linking an executable with OUTPUT_NAME matching the static library +# (bertini2) causes lld-link to write bertini2.lib as an import library, overwriting +# the static archive. /NOIMPLIB suppresses the import library entirely. +if(MSVC) + target_link_options(bertini2_exe PRIVATE /NOIMPLIB) +endif() + +# Precompile the four blackbox headers that collectively cover all exe source files. +# algorithm_builder.hpp is the heaviest (pulls in full tracking + NAG algorithm +# machinery); the others are lighter but still include significant Bertini subsystems. +target_precompile_headers(bertini2_exe PRIVATE + + + + + +) # todo: this should be made a devmode thing #target_compile_options(bertini2 PRIVATE -Wall -Wextra) +# auditwheel rejects the wheel ("depends on unsupported ISA extensions") because the +# *executable* -- unlike a .so -- links the manylinux/AlmaLinux 9 CRT startup objects +# (Scrt1.o etc.), which carry a GNU_PROPERTY note declaring an x86-64-v2 ISA requirement. +# Our own code is compiled to the v1 baseline (the _pybertini .so, built from the same +# sources, passes auditwheel), so that note is a spurious artifact of the distro CRT. +# Strip it from the exe so auditwheel sees the true (v1) requirement. Wheel/Linux only. +if(SKBUILD AND UNIX AND NOT APPLE AND CMAKE_OBJCOPY) + add_custom_command(TARGET bertini2_exe POST_BUILD + COMMAND ${CMAKE_OBJCOPY} --remove-section .note.gnu.property $ + COMMENT "Stripping .note.gnu.property from bertini2 CLI (drops the distro CRT's x86-64-v2 ISA marking)") +endif() + +# From-source DEV / editable builds (NOT the wheel): mirror the freshly-built CLI into the +# source-tree package at python/bertini/_bin/bertini2, so the console-script shim +# (python/bertini/_cli.py, which an editable `pip install -e .` redirects to the source tree) +# finds the binary. The wheel build (SKBUILD) instead uses the install(TARGETS ... DESTINATION +# _bin) rule below. Together these keep EVERY build path delivering the `bertini2` command: +# wheel (`pip install .`), editable (`pip install -e .`), and plain in-tree builds. Guarded on the +# package dir existing so a stand-alone `core/` build does not create a stray tree. +if(NOT SKBUILD AND EXISTS ${CMAKE_SOURCE_DIR}/python/bertini) + add_custom_command(TARGET bertini2_exe POST_BUILD + COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_SOURCE_DIR}/python/bertini/_bin + COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_SOURCE_DIR}/python/bertini/_bin/bertini2 + COMMENT "Syncing bertini2 CLI into python/bertini/_bin (editable / from-source dev installs)") +endif() + +# Ship the blackbox CLI inside the Python wheel so `pip install bertini2` puts a +# `bertini2` command on PATH (see the [project.scripts] shim in pyproject.toml and +# python/bertini/_cli.py). Under scikit-build (SKBUILD) the whole install tree is +# rooted at the `bertini` package (wheel.install-dir = "bertini"), so RUNTIME +# DESTINATION _bin lands the exe at bertini/_bin/bertini2 -- next to _pybertini and +# the libs that auditwheel/delocate vendor. We set INSTALL_RPATH so the exe finds +# those vendored shared libs even if the repair tool does not patch executables: +# - auditwheel -> vendored libs in top-level bertini2.libs/ ($ORIGIN/../../bertini2.libs) +# - delocate -> vendored libs in bertini/.dylibs (@loader_path/../.dylibs) +# - $ORIGIN/.. and ../lib cover libbertini2 installed into the package tree itself. +# A normal (non-wheel) `cmake --install` keeps the usual bin/ location. +# +# The exe install is tagged COMPONENT cli so a user who wants ONLY the solver -- no Python, no +# library/headers -- can `cmake --install build --component cli` and get just bin/bertini2. The exe +# statically links libbertini2.a, so the CLI-only install is self-contained re: our code (it still +# needs Boost/GMP/MPFR/MPC/MPI shared libs, as any from-source build does). A plain `cmake --install` +# (no --component) still installs everything. +if(SKBUILD) + install(TARGETS bertini2_exe RUNTIME DESTINATION _bin COMPONENT cli) + if(APPLE) + set_target_properties(bertini2_exe PROPERTIES + INSTALL_RPATH "@loader_path/../../bertini2.libs;@loader_path/../.dylibs;@loader_path/..;@loader_path/../lib") + elseif(UNIX) + set_target_properties(bertini2_exe PROPERTIES + INSTALL_RPATH "$ORIGIN/../../bertini2.libs;$ORIGIN/..;$ORIGIN/../lib") + endif() +else() + install(TARGETS bertini2_exe RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT cli) +endif() + install( TARGETS bertini2 EXPORT ${TARGETS_EXPORT_NAME} @@ -623,22 +791,38 @@ install( if (ENABLE_UNIT_TESTING) set(B2_CLASS_TEST_SOURCES + test/classes/sha256_test.cpp test/classes/boost_multiprecision_test.cpp test/classes/fundamentals_test.cpp + test/classes/precision_propagation_test.cpp test/classes/eigen_test.cpp test/classes/complex_test.cpp - test/classes/function_tree_test.cpp test/classes/function_tree_transform.cpp + test/classes/structural_hash_test.cpp + test/classes/canonical_encoding_test.cpp + test/classes/reintern_test.cpp + test/classes/interning_test.cpp test/classes/system_test.cpp + test/classes/system_identity_test.cpp test/classes/slp_test.cpp - test/classes/differentiate_test.cpp - test/classes/differentiate_wrt_var.cpp + test/classes/slp_intern_test.cpp + test/classes/eval_expression_test.cpp + test/classes/named_expression_test.cpp test/classes/homogenization_test.cpp test/classes/start_system_test.cpp + test/classes/start_system_interop_test.cpp test/classes/node_serialization_test.cpp test/classes/patch_test.cpp test/classes/slice_test.cpp test/classes/m_hom_start_system.cpp + test/classes/products_of_linears_block_test.cpp + test/classes/linear_forms_block_test.cpp + test/classes/blend_block_test.cpp + test/classes/randomization_block_test.cpp + test/classes/moving_homotopy_test.cpp + test/classes/system_printing_test.cpp + test/classes/system_blocks_test.cpp + test/classes/degrees_test.cpp test/classes/class_test.cpp ) @@ -707,6 +891,7 @@ if (ENABLE_UNIT_TESTING) set(B2_NAG_ALGORITHMS_TEST test/nag_algorithms/nag_algorithms_test.cpp test/nag_algorithms/zero_dim.cpp + test/nag_algorithms/threaded_solve.cpp test/nag_algorithms/numerical_irreducible_decomposition.cpp test/nag_algorithms/trace.cpp ) @@ -755,6 +940,8 @@ if (ENABLE_UNIT_TESTING) test/tracking_basics/amp_criteria_test.cpp test/tracking_basics/amp_tracker_test.cpp test/tracking_basics/path_observers.cpp + test/tracking_basics/expand_to_function_tree_test.cpp + test/tracking_basics/amp_jacobian_estimate_test.cpp ) add_executable(test_tracking_basics ${B2_TRACKING_BASICS_TEST}) @@ -765,3 +952,30 @@ if (ENABLE_UNIT_TESTING) enable_testing() endif (ENABLE_UNIT_TESTING) + +# lld-link (Windows) won't pull data-only object files (e.g. explicit_predictors.obj, +# which holds all ExplicitRKPredictor Butcher-tableau statics) unless every object in +# the archive is forced in. CMake 3.24+ LINK_LIBRARY:WHOLE_ARCHIVE places the archive +# in the linker's input list (not just options) with the appropriate /WHOLEARCHIVE: flag. +# +# We strip the normal "bertini2" link entry first to avoid having the archive appear +# twice. $ re-adds it and propagates transitive +# interface deps (gmp, mpfr, boost, MPI, etc.) automatically. +# /FORCE:MULTIPLE: Boost.Serialization void_cast_register and oserializer templates are +# instantiated in multiple TUs within bertini2 itself; /WHOLEARCHIVE exposes all copies +# and /FORCE:MULTIPLE picks the first (same as weak/COMDAT on Linux/macOS). +if(MSVC AND ENABLE_UNIT_TESTING) + foreach(_t test_classes test_blackbox test_classic test_endgames test_generating + test_nag_algorithms test_nag_datatypes test_pool test_settings + test_tracking_basics) + if(TARGET ${_t}) + get_target_property(_ll ${_t} LINK_LIBRARIES) + if(_ll) + list(REMOVE_ITEM _ll bertini2) + set_target_properties(${_t} PROPERTIES LINK_LIBRARIES "${_ll}") + endif() + target_link_options(${_t} PRIVATE /FORCE:MULTIPLE) + target_link_libraries(${_t} "$") + endif() + endforeach() +endif() diff --git a/core/doc/b2_review_CODE_NAME.tex b/core/doc/b2_review_CODE_NAME.tex deleted file mode 100644 index 33fea83a6..000000000 --- a/core/doc/b2_review_CODE_NAME.tex +++ /dev/null @@ -1,160 +0,0 @@ -\documentclass{article} - -\usepackage{amssymb,amsmath} - -\oddsidemargin 0.0in -\textwidth 6.5in -\headheight -0.5in -\topmargin 0.5in -\headsep 0.0in -\textheight 9.2in -\parskip 3mm -\pagestyle{empty} - - -%%%%%%%%%%%%%%%%%%% -%%%%% INSTRUCTIONS %%%%% -%%%%%%%%%%%%%%%%%%% - -% REVIEWER: Please fill out the following fields. The form will then be filled in automatically upon compilation. -% The goal of this review is to determine whether the code under review is adequate for inclusion into the develop branch of b2. -% If you have any hesitations on any yes/no question, mark no and explain your concerns. -% Please work with the author(s) of the code under review to resolve any issues. -% A final copy of all reviews must be submitted to Dan Bates before the pull request for the code under review is accepted. -% Copies of the final review forms will be kept in the repo for future reference. -% -% If you have questions, please contact Dan Bates. - - -\newcommand\you{ Dan Bates, bates@math.colostate.edu } %your name, email -\newcommand\class{ Example Class } %name of the class, file, or module you are reviewing -\newcommand\revdate{ 21 February 2015 } %date you are completing the review - -%SCOPE -\newcommand\goals{ a,b,c } %brief but complete list of goals for the code under review -\newcommand\goalsAppropriate{ y/n } %Are these goals appropriate for this code -- yes or no? -\newcommand\goalsMet{ y/n } %Were all goals met -- yes or no? -\newcommand\goalsComments{ asdf } %Comments about goals and scope - -%COMPILATION -\newcommand\compileSuccess{ y/n } %Does the code compile -- yes or no? -\newcommand\compileComments{ asdf } %Comments about compilation - -%TESTING -\newcommand\testSuccess{ y/n } %Does the code pass the provided tests -- yes or no? -\newcommand\testGeneral{ y/n } %Do the provided tests adequately measure general circumstances -- yes or no? -\newcommand\testEdge { y/n } %Do the provided tests adequately include edge cases -- yes or no? -\newcommand\testComments{ asdf } %Comments about tests - -%DOCUMENTATION -\newcommand\docAdequate{ y/n } %Is the code adequately commented -- yes or no? -\newcommand\docComments{ asdf } %Comments about documentation - -%STYLE -\newcommand\styleAdequate{ y/n } %Does the code conform adequately to the b2 style conventions -- yes or no? -\newcommand\styleComments{ asdf } %Comments about style - -%OTHER COMMENTS -\newcommand\otherComments{ asdf } %Other comments - -%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%% END OF REVIEWER SECTION %%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%% - - - - -\newcommand\bb{{bertini2\ }} - -\begin{document} - -\noindent -{\bf \bb review}\\ -Code: \class\\ -Reviewer: \you \\ -Date: \revdate - -\noindent\hrulefill - -\noindent -{\bf Scope} - -\noindent -\underbar{Goals}: \goals - -\noindent -\underbar{Are these goals appropriate}? \goalsAppropriate - -\noindent -\underbar{Were these goals met}? \goalsMet - -\noindent -\underbar{Comments}: \\ \goalsComments - -\noindent\hrulefill - - - -\noindent -{\bf Compilation} - -\noindent -\underbar{Does the code compile?} \compileSuccess - -\noindent -\underbar{Comments}:\\ \compileComments - -\noindent\hrulefill - - - -\noindent -{\bf Testing} - -\noindent -\underbar{Does the code pass the provided tests?} \testSuccess - -\noindent -\underbar{Do the provided tests adequately measure general circumstances?} \testGeneral - -\noindent -\underbar{Do the provided tests adequately include edge cases?} \testEdge - -\noindent -\underbar{Comments}: \\ \testComments - -\noindent\hrulefill - - - -\noindent -{\bf Documentation} - -\noindent -\underbar{Is the code adequately commented?} \docAdequate - -\noindent -\underbar{Comments}: \\ \docComments - -\noindent\hrulefill - - - -\noindent -{\bf Style} - -\noindent -\underbar{Does the code conform adequately to the b2 style conventions?} \styleAdequate - -\noindent -\underbar{Comments}:\\ \styleComments - -\noindent\hrulefill - - - -\noindent -{\bf Other comments}\\ \otherComments - - -\end{document} \ No newline at end of file diff --git a/core/doc/bertini.doxy.config b/core/doc/bertini.doxy.config deleted file mode 100644 index 3362699c7..000000000 --- a/core/doc/bertini.doxy.config +++ /dev/null @@ -1,2875 +0,0 @@ -# Doxyfile 1.13.2 - -# This file describes the settings to be used by the documentation system -# Doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). -# -# Note: -# -# Use Doxygen to compare the used configuration file with the template -# configuration file: -# doxygen -x [configFile] -# Use Doxygen to compare the used configuration file with the template -# configuration file without replacing the environment variables or CMake type -# replacement variables: -# doxygen -x_noenv [configFile] - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the configuration -# file that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# https://www.gnu.org/software/libiconv/ for the list of possible encodings. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = "Bertini 2 - C++ Core" - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - -PROJECT_NUMBER = - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewers a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = "Software for Numerical Algebraic Geometry" - -# With the PROJECT_LOGO tag one can specify a logo or an icon that is included -# in the documentation. The maximum height of the logo should not exceed 55 -# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy -# the logo to the output directory. - -PROJECT_LOGO = images_common/b2_icon.svg - -# With the PROJECT_ICON tag one can specify an icon that is included in the tabs -# when the HTML document is shown. Doxygen will copy the logo to the output -# directory. - -PROJECT_ICON = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where Doxygen was started. If -# left blank the current directory will be used. - -OUTPUT_DIRECTORY = generated_documentation - -# If the CREATE_SUBDIRS tag is set to YES then Doxygen will create up to 4096 -# sub-directories (in 2 levels) under the output directory of each output format -# and will distribute the generated files over these directories. Enabling this -# option can be useful when feeding Doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise cause -# performance problems for the file system. Adapt CREATE_SUBDIRS_LEVEL to -# control the number of sub-directories. -# The default value is: NO. - -CREATE_SUBDIRS = yes - -# Controls the number of sub-directories that will be created when -# CREATE_SUBDIRS tag is set to YES. Level 0 represents 16 directories, and every -# level increment doubles the number of directories, resulting in 4096 -# directories at level 8 which is the default and also the maximum value. The -# sub-directories are organized in 2 levels, the first level always has a fixed -# number of 16 directories. -# Minimum value: 0, maximum value: 8, default value: 8. -# This tag requires that the tag CREATE_SUBDIRS is set to YES. - -CREATE_SUBDIRS_LEVEL = 8 - -# If the ALLOW_UNICODE_NAMES tag is set to YES, Doxygen will allow non-ASCII -# characters to appear in the names of generated files. If set to NO, non-ASCII -# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode -# U+3044. -# The default value is: NO. - -ALLOW_UNICODE_NAMES = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by Doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Bulgarian, -# Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, English -# (United States), Esperanto, Farsi (Persian), Finnish, French, German, Greek, -# Hindi, Hungarian, Indonesian, Italian, Japanese, Japanese-en (Japanese with -# English messages), Korean, Korean-en (Korean with English messages), Latvian, -# Lithuanian, Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, -# Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, -# Swedish, Turkish, Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES, Doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES, Doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = YES - -# If the INLINE_INHERITED_MEMB tag is set to YES, Doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES, Doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - -FULL_PATH_NAMES = NO - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which Doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where Doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, Doxygen will generate much shorter (but -# less readable) file names. This can be useful if your file system doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen will interpret the -# first line (until the first dot, question mark or exclamation mark) of a -# Javadoc-style comment as the brief description. If set to NO, the Javadoc- -# style will behave just like regular Qt-style comments (thus requiring an -# explicit @brief command for a brief description.) -# The default value is: NO. - -JAVADOC_AUTOBRIEF = NO - -# If the JAVADOC_BANNER tag is set to YES then Doxygen will interpret a line -# such as -# /*************** -# as being the beginning of a Javadoc-style comment "banner". If set to NO, the -# Javadoc-style will behave just like regular comments and it will not be -# interpreted by Doxygen. -# The default value is: NO. - -JAVADOC_BANNER = NO - -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will interpret the first -# line (until the first dot, question mark or exclamation mark) of a Qt-style -# comment as the brief description. If set to NO, the Qt-style will behave just -# like regular Qt-style comments (thus requiring an explicit \brief command for -# a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = NO - -# By default Python docstrings are displayed as preformatted text and Doxygen's -# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the -# Doxygen's special commands can be used and the contents of the docstring -# documentation blocks is shown as Doxygen documentation. -# The default value is: YES. - -PYTHON_DOCSTRING = YES - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES then Doxygen will produce a new -# page for each member. If set to NO, the documentation of a member will be part -# of the file/class/namespace that contains it. -# The default value is: NO. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:^^" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". Note that you cannot put \n's in the value part of an alias -# to insert newlines (in the resulting output). You can put ^^ in the value part -# of an alias to insert a newline as if a physical newline was in the original -# file. When you need a literal { or } or , in the value part of an alias you -# have to escape them by means of a backslash (\), this can lead to conflicts -# with the commands \{ and \} for these it is advised to use the version @{ and -# @} or use a double escape (\\{ and \\}) - -ALIASES = "startuml{1}=\image html \1\n\image latex \1\n\if DontIgnorePlantUMLCode" \ - enduml=\endif - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice -# sources only. Doxygen will then generate output that is more tailored for that -# language. For instance, namespaces will be presented as modules, types will be -# separated into more groups, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_SLICE = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by Doxygen: IDL, Java, JavaScript, -# Csharp (C#), C, C++, Lex, D, PHP, md (Markdown), Objective-C, Python, Slice, -# VHDL, Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: -# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser -# tries to guess whether the code is fixed or free formatted code, this is the -# default for Fortran type files). For instance to make Doxygen treat .inc files -# as Fortran files (default is PHP), and .f files as C (default is Fortran), -# use: inc=Fortran f=C. -# -# Note: For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by Doxygen. When specifying no_extension you should add -# * to the FILE_PATTERNS. -# -# Note see also the list of default file extension mappings. - -EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then Doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See https://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by Doxygen, so you can -# mix Doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = YES - -# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up -# to that level are automatically included in the table of contents, even if -# they do not have an id attribute. -# Note: This feature currently applies only to Markdown headings. -# Minimum value: 0, maximum value: 99, default value: 6. -# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. - -TOC_INCLUDE_HEADINGS = 5 - -# The MARKDOWN_ID_STYLE tag can be used to specify the algorithm used to -# generate identifiers for the Markdown headings. Note: Every identifier is -# unique. -# Possible values are: DOXYGEN use a fixed 'autotoc_md' string followed by a -# sequence number starting at 0 and GITHUB use the lower case version of title -# with any whitespace replaced by '-' and punctuation characters removed. -# The default value is: DOXYGEN. -# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. - -MARKDOWN_ID_STYLE = DOXYGEN - -# When enabled Doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by putting a % sign in front of the word or -# globally by setting AUTOLINK_SUPPORT to NO. Words listed in the -# AUTOLINK_IGNORE_WORDS tag are excluded from automatic linking. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# This tag specifies a list of words that, when matching the start of a word in -# the documentation, will suppress auto links generation, if it is enabled via -# AUTOLINK_SUPPORT. This list does not affect affect links explicitly created -# using \# or the \link or commands. -# This tag requires that the tag AUTOLINK_SUPPORT is set to YES. - -AUTOLINK_IGNORE_WORDS = - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let Doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also makes the inheritance and -# collaboration diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# https://www.riverbankcomputing.com/software) sources only. Doxygen will parse -# them like normal C++ but will assume all classes use public instead of private -# inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# Doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES then Doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = YES - -# If one adds a struct or class to a group and this option is enabled, then also -# any nested class or struct is added to the same group. By default this option -# is disabled and one has to add nested compounds explicitly via \ingroup. -# The default value is: NO. - -GROUP_NESTED_COMPOUNDS = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, Doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# Doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run Doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 - -# The NUM_PROC_THREADS specifies the number of threads Doxygen is allowed to use -# during processing. When set to 0 Doxygen will based this on the number of -# cores available in the system. You can set it explicitly to a value larger -# than 0 to get more control over the balance between CPU load and processing -# speed. At this moment only the input processing can be done using multiple -# threads. Since this is still an experimental feature the default is set to 1, -# which effectively disables parallel processing. Please report any issues you -# encounter. Generating dot graphs in parallel is controlled by the -# DOT_NUM_THREADS setting. -# Minimum value: 0, maximum value: 32, default value: 1. - -NUM_PROC_THREADS = 1 - -# If the TIMESTAMP tag is set different from NO then each generated page will -# contain the date or date and time when the page was generated. Setting this to -# NO can help when comparing the output of multiple runs. -# Possible values are: YES, NO, DATETIME and DATE. -# The default value is: NO. - -TIMESTAMP = YES - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES, Doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual -# methods of a class will be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIV_VIRTUAL = NO - -# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be -# included in the documentation. -# The default value is: NO. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO, -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. If set to YES, local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO, only methods in the interface are -# included. -# The default value is: NO. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = NO - -# If this flag is set to YES, the name of an unnamed parameter in a declaration -# will be determined by the corresponding definition. By default unnamed -# parameters remain unnamed in the output. -# The default value is: YES. - -RESOLVE_UNNAMED_PARAMS = YES - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_MEMBERS = YES - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO, these classes will be included in the various overviews. This option -# will also hide undocumented C++ concepts if enabled. This option has no effect -# if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_CLASSES = YES - -# If the HIDE_UNDOC_NAMESPACES tag is set to YES, Doxygen will hide all -# undocumented namespaces that are normally visible in the namespace hierarchy. -# If set to NO, these namespaces will be included in the various overviews. This -# option has no effect if EXTRACT_ALL is enabled. -# The default value is: YES. - -HIDE_UNDOC_NAMESPACES = YES - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all friend -# declarations. If set to NO, these declarations will be included in the -# documentation. -# The default value is: NO. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO, these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - -INTERNAL_DOCS = NO - -# With the correct setting of option CASE_SENSE_NAMES Doxygen will better be -# able to match the capabilities of the underlying filesystem. In case the -# filesystem is case sensitive (i.e. it supports files in the same directory -# whose names only differ in casing), the option must be set to YES to properly -# deal with such files in case they appear in the input. For filesystems that -# are not case sensitive the option should be set to NO to properly deal with -# output files written for symbols that only differ in casing, such as for two -# classes, one named CLASS and the other named Class, and to also support -# references to files without having to specify the exact matching casing. On -# Windows (including Cygwin) and macOS, users should typically set this option -# to NO, whereas on Linux or other Unix flavors it should typically be set to -# YES. -# Possible values are: SYSTEM, NO and YES. -# The default value is: SYSTEM. - -CASE_SENSE_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO then Doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES, the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = NO - -# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then Doxygen will -# append additional text to a page's title, such as Class Reference. If set to -# YES the compound reference will be hidden. -# The default value is: NO. - -HIDE_COMPOUND_REFERENCE= NO - -# If the SHOW_HEADERFILE tag is set to YES then the documentation for a class -# will show which file needs to be included to use the class. -# The default value is: YES. - -SHOW_HEADERFILE = YES - -# If the SHOW_INCLUDE_FILES tag is set to YES then Doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = YES - -# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each -# grouped member an include statement to the documentation, telling the reader -# which file to include in order to use the member. -# The default value is: NO. - -SHOW_GROUPED_MEMB_INC = NO - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then Doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. -# The default value is: YES. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then Doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. - -SORT_BRIEF_DOCS = YES - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then Doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then Doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and Doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING Doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo -# list. This list is created by putting \todo commands in the documentation. -# The default value is: YES. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test -# list. This list is created by putting \test commands in the documentation. -# The default value is: YES. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= NO - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES, the -# list will mention the files that were used to generate the documentation. -# The default value is: YES. - -SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = NO - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# Doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by Doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by Doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents Doxygen's defaults, run Doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. See also section "Changing the -# layout of pages" for information. -# -# Note that if you run Doxygen from a directory containing a file called -# DoxygenLayout.xml, Doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. See also \cite for info how to create references. - -CITE_BIB_FILES = ../../doc_resources/bertini2.bib - -# The EXTERNAL_TOOL_PATH tag can be used to extend the search path (PATH -# environment variable) so that external tools such as latex and gs can be -# found. -# Note: Directories specified with EXTERNAL_TOOL_PATH are added in front of the -# path already specified by the PATH variable, and are added in the order -# specified. -# Note: This option is particularly useful for macOS version 14 (Sonoma) and -# higher, when running Doxygen from Doxywizard, because in this case any user- -# defined changes to the PATH are ignored. A typical example on macOS is to set -# EXTERNAL_TOOL_PATH = /Library/TeX/texbin /usr/local/bin -# together with the standard path, the full search path used by doxygen when -# launching external tools will then become -# PATH=/Library/TeX/texbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin - -EXTERNAL_TOOL_PATH = - -#--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by Doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error (stderr) by Doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = YES - -# If the WARN_IF_UNDOCUMENTED tag is set to YES then Doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = YES - -# If the WARN_IF_DOC_ERROR tag is set to YES, Doxygen will generate warnings for -# potential errors in the documentation, such as documenting some parameters in -# a documented function twice, or documenting parameters that don't exist or -# using markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# If WARN_IF_INCOMPLETE_DOC is set to YES, Doxygen will warn about incomplete -# function parameter documentation. If set to NO, Doxygen will accept that some -# parameters have no documentation without warning. -# The default value is: YES. - -WARN_IF_INCOMPLETE_DOC = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO, Doxygen will only warn about wrong parameter -# documentation, but not about the absence of documentation. If EXTRACT_ALL is -# set to YES then this flag will automatically be disabled. See also -# WARN_IF_INCOMPLETE_DOC -# The default value is: NO. - -WARN_NO_PARAMDOC = YES - -# If WARN_IF_UNDOC_ENUM_VAL option is set to YES, Doxygen will warn about -# undocumented enumeration values. If set to NO, Doxygen will accept -# undocumented enumeration values. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: NO. - -WARN_IF_UNDOC_ENUM_VAL = NO - -# If WARN_LAYOUT_FILE option is set to YES, Doxygen will warn about issues found -# while parsing the user defined layout file, such as missing or wrong elements. -# See also LAYOUT_FILE for details. If set to NO, problems with the layout file -# will be suppressed. -# The default value is: YES. - -WARN_LAYOUT_FILE = YES - -# If the WARN_AS_ERROR tag is set to YES then Doxygen will immediately stop when -# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS -# then Doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but -# at the end of the Doxygen process Doxygen will return with a non-zero status. -# If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS_PRINT then Doxygen behaves -# like FAIL_ON_WARNINGS but in case no WARN_LOGFILE is defined Doxygen will not -# write the warning messages in between other messages but write them at the end -# of a run, in case a WARN_LOGFILE is defined the warning messages will be -# besides being in the defined file also be shown at the end of a run, unless -# the WARN_LOGFILE is defined as - i.e. standard output (stdout) in that case -# the behavior will remain as with the setting FAIL_ON_WARNINGS. -# Possible values are: NO, YES, FAIL_ON_WARNINGS and FAIL_ON_WARNINGS_PRINT. -# The default value is: NO. - -WARN_AS_ERROR = NO - -# The WARN_FORMAT tag determines the format of the warning messages that Doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# See also: WARN_LINE_FORMAT -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text" - -# In the $text part of the WARN_FORMAT command it is possible that a reference -# to a more specific place is given. To make it easier to jump to this place -# (outside of Doxygen) the user can define a custom "cut" / "paste" string. -# Example: -# WARN_LINE_FORMAT = "'vi $file +$line'" -# See also: WARN_FORMAT -# The default value is: at line $line of file $file. - -WARN_LINE_FORMAT = "at line $line of file $file" - -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). In case the file specified cannot be opened for writing the -# warning and error messages are written to standard error. When as file - is -# specified the warning and error messages are written to standard output -# (stdout). - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# Configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING -# Note: If this tag is empty the current directory is searched. - -INPUT = ../include \ - ../src \ - ../README.md - -# This tag can be used to specify the character encoding of the source files -# that Doxygen parses. Internally Doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: -# https://www.gnu.org/software/libiconv/) for the list of possible encodings. -# See also: INPUT_FILE_ENCODING -# The default value is: UTF-8. - -INPUT_ENCODING = UTF-8 - -# This tag can be used to specify the character encoding of the source files -# that Doxygen parses. The INPUT_FILE_ENCODING tag can be used to specify -# character encoding on a per file pattern basis. Doxygen will compare the file -# name with each pattern and apply the encoding instead of the default -# INPUT_ENCODING if there is a match. The character encodings are a list of the -# form: pattern=encoding (like *.php=ISO-8859-1). -# See also: INPUT_ENCODING for further information on supported encodings. - -INPUT_FILE_ENCODING = - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# read by Doxygen. -# -# Note the list of default checked file patterns might differ from the list of -# default file extension mappings. -# -# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cxxm, -# *.cpp, *.cppm, *.ccm, *.c++, *.c++m, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, -# *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, *.h++, *.ixx, *.l, *.cs, *.d, -# *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to -# be provided as Doxygen C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, -# *.f18, *.f, *.for, *.vhd, *.vhdl, *.ucf, *.qsf and *.ice. - -FILE_PATTERNS = *.cpp \ - *.hpp \ - *.dox - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which Doxygen is -# run. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# ANamespace::AClass, ANamespace::*Test - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - -IMAGE_PATH = ../../doc_resources/images - -# The INPUT_FILTER tag can be used to specify a program that Doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. -# -# Note that Doxygen will use the data processed and written to standard output -# for further processing, therefore nothing else, like debug statements or used -# commands (so in case of a Windows batch file always use @echo OFF), should be -# written to standard output. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by Doxygen. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by Doxygen. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the Doxygen output. - -USE_MDFILE_AS_MAINPAGE = ../README.md - -# If the IMPLICIT_DIR_DOCS tag is set to YES, any README.md file found in sub- -# directories of the project's root, is used as the documentation for that sub- -# directory, except when the README.md starts with a \dir, \page or \mainpage -# command. If set to NO, the README.md file needs to start with an explicit \dir -# command in order to be used as directory documentation. -# The default value is: YES. - -IMPLICIT_DIR_DOCS = YES - -# The Fortran standard specifies that for fixed formatted Fortran code all -# characters from position 72 are to be considered as comment. A common -# extension is to allow longer lines before the automatic comment starts. The -# setting FORTRAN_COMMENT_AFTER will also make it possible that longer lines can -# be processed before the automatic comment starts. -# Minimum value: 7, maximum value: 10000, default value: 72. - -FORTRAN_COMMENT_AFTER = 72 - -#--------------------------------------------------------------------------- -# Configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# multi-line macros, enums or list initialized variables directly into the -# documentation. -# The default value is: NO. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct Doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# entity all documented functions referencing it will be listed. -# The default value is: NO. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of Doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see https://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by Doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then Doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - -ALPHABETICAL_INDEX = YES - -# The IGNORE_PREFIX tag can be used to specify a prefix (or a list of prefixes) -# that should be ignored while generating the index headers. The IGNORE_PREFIX -# tag works for classes, function and member names. The entity will be placed in -# the alphabetical list under the first letter of the entity name that remains -# after removing the prefix. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES, Doxygen will generate HTML output -# The default value is: YES. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = doc.bertini - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank Doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that Doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that Doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of Doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank Doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that Doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank Doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that Doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined -# cascading style sheets that are included after the standard style sheets -# created by Doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefore more robust against future updates. -# Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra style sheet files is of importance (e.g. the last -# style sheet in the list overrules the setting of the previous ones in the -# list). -# Note: Since the styling of scrollbars can currently not be overruled in -# Webkit/Chromium, the styling will be left out of the default doxygen.css if -# one or more extra stylesheets have been specified. So if scrollbar -# customization is desired it has to be added explicitly. For an example see the -# documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE tag can be used to specify if the generated HTML output -# should be rendered with a dark or light theme. -# Possible values are: LIGHT always generates light mode output, DARK always -# generates dark mode output, AUTO_LIGHT automatically sets the mode according -# to the user preference, uses light mode if no preference is set (the default), -# AUTO_DARK automatically sets the mode according to the user preference, uses -# dark mode if no preference is set and TOGGLE allows a user to switch between -# light and dark mode via a button. -# The default value is: AUTO_LIGHT. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE = AUTO_LIGHT - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the style sheet and background images according to -# this color. Hue is specified as an angle on a color-wheel, see -# https://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use gray-scales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML -# documentation will contain a main index with vertical navigation menus that -# are dynamically created via JavaScript. If disabled, the navigation index will -# consists of multiple levels of tabs that are statically embedded in every HTML -# page. Disable this option to support browsers that do not have JavaScript, -# like the Qt help browser. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_MENUS = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = NO - -# If the HTML_CODE_FOLDING tag is set to YES then classes and functions can be -# dynamically folded and expanded in the generated HTML source code. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_CODE_FOLDING = YES - -# If the HTML_COPY_CLIPBOARD tag is set to YES then Doxygen will show an icon in -# the top right corner of code and text fragments that allows the user to copy -# its content to the clipboard. Note this only works if supported by the browser -# and the web page is served via a secure context (see: -# https://www.w3.org/TR/secure-contexts/), i.e. using the https: or file: -# protocol. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COPY_CLIPBOARD = YES - -# Doxygen stores a couple of settings persistently in the browser (via e.g. -# cookies). By default these settings apply to all HTML pages generated by -# Doxygen across all projects. The HTML_PROJECT_COOKIE tag can be used to store -# the settings under a project specific key, such that the user preferences will -# be stored separately. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_PROJECT_COOKIE = - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: -# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To -# create a documentation set, Doxygen will generate a Makefile in the HTML -# output directory. Running make will produce the docset in that directory and -# running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy -# genXcode/_index.html for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = YES - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "bertini 2 generated docs" - -# This tag determines the URL of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDURL = - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = default - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = default - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = brake - -# If the GENERATE_HTMLHELP tag is set to YES then Doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# on Windows. In the beginning of 2021 Microsoft took the original page, with -# a.o. the download links, offline (the HTML help workshop was already many -# years in maintenance mode). You can download the HTML help workshop from the -# web archives at Installation executable (see: -# http://web.archive.org/web/20160201063255/http://download.microsoft.com/downlo -# ad/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe). -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by Doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = NO - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler (hhc.exe). If non-empty, -# Doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = - -# The GENERATE_CHI flag controls if a separate .chi index file is generated -# (YES) or that it should be included in the main .chm file (NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated -# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it -# enables the Previous and Next buttons. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = NO - -# The SITEMAP_URL tag is used to specify the full URL of the place where the -# generated documentation will be placed on the server by the user during the -# deployment of the documentation. The generated sitemap is called sitemap.xml -# and placed on the directory specified by HTML_OUTPUT. In case no SITEMAP_URL -# is specified no sitemap is generated. For information about the sitemap -# protocol see https://www.sitemaps.org -# This tag requires that the tag GENERATE_HTML is set to YES. - -SITEMAP_URL = - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location (absolute path -# including file name) of Qt's qhelpgenerator. If non-empty Doxygen will try to -# run qhelpgenerator on the generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can -# further fine tune the look of the index (see "Fine-tuning the output"). As an -# example, the default style sheet generated by Doxygen has an example that -# shows how to put an image at the root of the tree instead of the PROJECT_NAME. -# Since the tree basically has the same information as the tab index, you could -# consider setting DISABLE_INDEX to YES when enabling this option. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = YES - -# When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the -# FULL_SIDEBAR option determines if the side bar is limited to only the treeview -# area (value NO) or if it should extend to the full height of the window (value -# YES). Setting this to YES gives a layout similar to -# https://docs.readthedocs.io with more room for contents, but less room for the -# project logo, title, and description. If either GENERATE_TREEVIEW or -# DISABLE_INDEX is set to NO, this option has no effect. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FULL_SIDEBAR = NO - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# Doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 4 - -# When the SHOW_ENUM_VALUES tag is set doxygen will show the specified -# enumeration values besides the enumeration mnemonics. -# The default value is: NO. - -SHOW_ENUM_VALUES = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 250 - -# If the EXT_LINKS_IN_WINDOW option is set to YES, Doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# If the OBFUSCATE_EMAILS tag is set to YES, Doxygen will obfuscate email -# addresses. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -OBFUSCATE_EMAILS = YES - -# If the HTML_FORMULA_FORMAT option is set to svg, Doxygen will use the pdf2svg -# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see -# https://inkscape.org) to generate formulas as SVG images instead of PNGs for -# the HTML output. These images will generally look nicer at scaled resolutions. -# Possible values are: png (the default) and svg (looks nicer but requires the -# pdf2svg or inkscape tool). -# The default value is: png. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FORMULA_FORMAT = png - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# Doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands -# to create new LaTeX commands to be used in formulas as building blocks. See -# the section "Including formulas" for details. - -FORMULA_MACROFILE = - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# https://www.mathjax.org) which uses client side JavaScript for the rendering -# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = YES - -# With MATHJAX_VERSION it is possible to specify the MathJax version to be used. -# Note that the different versions of MathJax have different requirements with -# regards to the different settings, so it is possible that also other MathJax -# settings have to be changed when switching between the different MathJax -# versions. -# Possible values are: MathJax_2 and MathJax_3. -# The default value is: MathJax_2. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_VERSION = MathJax_2 - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. For more details about the output format see MathJax -# version 2 (see: -# http://docs.mathjax.org/en/v2.7-latest/output.html) and MathJax version 3 -# (see: -# http://docs.mathjax.org/en/latest/web/components/output.html). -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility. This is the name for Mathjax version 2, for MathJax version 3 -# this will be translated into chtml), NativeMML (i.e. MathML. Only supported -# for MathJax 2. For MathJax version 3 chtml will be used instead.), chtml (This -# is the name for Mathjax version 3, for MathJax version 2 this will be -# translated into HTML-CSS) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from https://www.mathjax.org before deployment. The default value is: -# - in case of MathJax version 2: https://cdn.jsdelivr.net/npm/mathjax@2 -# - in case of MathJax version 3: https://cdn.jsdelivr.net/npm/mathjax@3 -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# for MathJax version 2 (see -# https://docs.mathjax.org/en/v2.7-latest/tex.html#tex-and-latex-extensions): -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# For example for MathJax version 3 (see -# http://docs.mathjax.org/en/latest/input/tex/extensions/index.html): -# MATHJAX_EXTENSIONS = ams -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with JavaScript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: -# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled Doxygen will generate a search box for -# the HTML output. The underlying search engine uses JavaScript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the JavaScript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /