============= Build options ============= **Status:** reference. Every name, type and default below is read from ``meson_options.txt``. Where the two disagree, that file is correct. Build options choose the linear algebra backend, the parallel runtimes, the optional libraries and the potentials that are compiled into ``libgpridge``, ``gprd`` and ``gprn``. They are fixed when the build tree is configured. Setting an option ----------------- Pass ``-D=`` to ``meson setup`` for a new build tree, or to ``meson configure`` for an existing one. A ``feature`` option takes ``enabled``, ``disabled`` or ``auto``. The build recipes for each environment are on the :doc:`installation page <../getting-started/installation>`. .. code:: bash meson setup builddir -Dlinalg_backend=scalapack -Dwith_tests=true meson configure builddir -Duse_openmp=true Linear algebra and parallelism ------------------------------ .. table:: +------------------------------+---------+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Option | Type | Default | Effect | +==============================+=========+==============+==================================================================================================================================================================================================================================================================================================================================+ | ``linalg_backend`` | combo | ``eigen`` | Backend for the dense hot-path operations. Choices: ``eigen``, ``cholmod``, ``cusolver``, ``kokkos``, ``stdpar``, ``scalapack``, ``slate``. Distributed runs need ``scalapack`` or ``slate``. | +------------------------------+---------+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``use_mpi`` | boolean | ``false`` | Link MPI. Turned on automatically by ``linalg_backend=scalapack`` or ``slate``. A multi-rank build of the random-Fourier-feature code without a distributed backend is rejected. | +------------------------------+---------+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``use_openblas`` | boolean | ``false`` | Link Eigen against OpenBLAS. Together with ``use_rgpot_uma`` or ``use_rgpot_metatomic`` it needs ``libopenblas.a``, which is linked statically; a missing archive is a configure error. | +------------------------------+---------+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``use_mkl`` | boolean | ``false`` | Define ``EIGEN_USE_MKL_ALL`` and link MKL, found through the ``mkl-dynamic-ilp64-iomp`` pkg-config module. ``meson.build`` warns that MKL builds are not tested extensively. | +------------------------------+---------+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``use_openmp`` | boolean | ``false`` | OpenMP threads in the distance and covariance loops. | +------------------------------+---------+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``use_openmp_local_oracle`` | boolean | ``false`` | OpenMP only inside the per-rank local-oracle gradient regions. Those regions never enter MPI or ScaLAPACK collectives, so the option is compatible with ``linalg_backend=scalapack``. | +------------------------------+---------+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``use_stdpar`` | feature | ``auto`` | Bounded parallel-STL execution of independent kernel blocks through TBB. Works with every linear algebra backend. | +------------------------------+---------+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``use_stdpar_gpu`` | feature | ``disabled`` | Build the NVIDIA stdpar environment kernel with ``nvc++`` next to the host library. | +------------------------------+---------+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``stdpar_gpu_arch`` | string | ``cc80`` | NVIDIA target architecture of that kernel, for example ``cc80`` for an A100. | +------------------------------+---------+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``use_highway`` | feature | ``auto`` | Google Highway SIMD kernels for distance and covariance. ``auto`` enables them when ``libhwy`` is found through pkg-config. ``enabled`` fails if it is not found. ``disabled`` uses scalar kernels. | +------------------------------+---------+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``simd_baseline`` | string | ``auto`` | Instruction-set baseline passed as ``-march``. ``auto`` is ``x86-64-v3`` on x86-64 and the compiler default elsewhere. The empty string leaves the compiler default. With the default scalar Eigen policy, nothing contracts into FMA and every level gives the same results. A level the compiler rejects is a configure error. | +------------------------------+---------+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``scalar_eigen`` | boolean | ``true`` | Default, matching develop. Compile Eigen with ``EIGEN_DONT_VECTORIZE`` and force ``gpr/linalg/ScalarGebpKernel.h`` so dense products round from the matrix sizes alone at every ``simd_baseline``. Alignment stays at the vectorized build. ``false`` opts into vectorized Eigen, whose packet order follows ``simd_baseline``. | +------------------------------+---------+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``allocator`` | combo | ``system`` | Global allocator. Choices: ``system``, ``mimalloc``. ``mimalloc`` also enables shared scoped heaps. | +------------------------------+---------+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``deterministic_reductions`` | boolean | ``true`` | ``ordered_sum_bcast`` gathers rank contributions, sums them in rank order in ``long double`` and broadcasts. Rounded partial sums can still change with the rank partition. ``false`` uses ``MPI_Allreduce``. | +------------------------------+---------+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``gp_predict_via_pcg`` | boolean | ``false`` | Replace the Cholesky and triangular-solve chain in the predict-mean path with a preconditioned conjugate-gradient solver (``gpr/linalg/IterativeSolver.h``). | +------------------------------+---------+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ The effect of ``deterministic_reductions`` on repeatability is described in :doc:`Check run-to-run determinism <../howto/determinism>`. The arithmetic behind the reproducible distributed kernels is in :doc:`Where the time goes <../explanation/performance>`. GPU and Scheme II product engines --------------------------------- .. table:: +-------------------------+---------+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Option | Type | Default | Effect | +=========================+=========+===============+===========================================================================================================================================================================+ | ``use_cutlass`` | boolean | ``false`` | Compile CUDA/CUTLASS GEMM kernels for rank-local dense products. | +-------------------------+---------+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``cutlass_include_dir`` | string | empty | Absolute path to the CUTLASS headers. Empty means the CUDA compiler include path already provides ``cutlass/gemm/device/gemm.h``. | +-------------------------+---------+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``cutlass_cuda_arch`` | string | ``80`` | ``nvcc`` SM architecture suffix for the CUTLASS kernels, for example ``80``, ``89``, ``90a`` or ``100a``. | +-------------------------+---------+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``scheme2_cuda`` | boolean | ``false`` | Build ``libgpr_scheme2_cuda.so``, the device half of the INT8 Scheme II engine. Needs ``nvcc`` and cuBLAS. | +-------------------------+---------+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``scheme2_cuda_arch`` | string | ``80,90,120`` | Comma-separated SM architectures for that library. PTX of the last one is embedded as well. | +-------------------------+---------+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``mkl_libdir`` | string | empty | Directory with the MKL shared libraries. When set, builds ``libgpr_scheme2_mkl.so``, the shim through which the CPU INT8 Scheme II engine reaches ``cblas_gemm_s8u8s32``. | +-------------------------+---------+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``onednn_library`` | string | empty | Path to ``libdnnl.so``. The INT8 engine tests load it at run time; the option only adds it to the test runs. | +-------------------------+---------+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ The design of the CUDA path is in :doc:`CUTLASS backend design for RFF and KernelInverse <../development/design/cutlass_rff_kernelinverse>`. The Scheme II engines are selected at run time with ``--training-product-library``. Optimisation libraries and descriptors -------------------------------------- .. table:: +------------------+---------+--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Option | Type | Default | Effect | +==================+=========+==============+=============================================================================================================================================================================================================================================================================================================================================================================+ | ``use_rgmin`` | feature | ``enabled`` | Required. GP parameter fitting, dimer steps and the L-BFGS two-loop go through ``rgmin``. ``-Duse_rgmin=disabled`` is a configure error. The option remains so ``-Duse_rgmin=enabled`` keeps working. ``use_anneal=auto`` follows it. | +------------------+---------+--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``use_anneal`` | feature | ``auto`` | Build the box-ensemble anneal stage that can run before the local GP hyperparameter fit. Needs ``rgmin``, which is required. auto follows ``rgmin``. The stage still runs only when requested. | +------------------+---------+--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``use_ceres`` | boolean | ``false`` | Enable Ceres for hyperparameter optimisation. A system Ceres is tried first, then the subproject. | +------------------+---------+--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``use_highs`` | boolean | ``false`` | Use HiGHs for the earth-mover's-distance cost matrices. | +------------------+---------+--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``use_featomic`` | feature | ``auto`` | Native SOAP descriptors from featomic 0.6.5 and metatensor-core 0.1. | +------------------+---------+--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``enzyme`` | combo | ``disabled`` | Probe for an Enzyme toolchain for derivative-provider automatic differentiation. Choices: ``disabled``, ``auto``. ``auto`` looks up the ``enzyme`` dependency and defines ``GPR_ENZYME_TOOLCHAIN_DETECTED`` when it is found. The provider bridge is still a stub, so no derivative path changes; see :doc:`Use the derivative providers <../howto/derivative_providers>` . | +------------------+---------+--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Input, output and structure matching ------------------------------------ .. table:: +--------------------+---------+-----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Option | Type | Default | Effect | +====================+=========+===========+============================================================================================================================================================================+ | ``use_hdf5`` | boolean | ``true`` | HDF5 for logs. | +--------------------+---------+-----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``use_capnp`` | boolean | ``false`` | Cap'n Proto for parameters. ``use_rgpot_nwchem``, ``use_rgpot_skala`` and ``with_fuzzers`` require it. The LAMMPS and CP2K engines are built only when it is true. | +--------------------+---------+-----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``use_chemfiles`` | boolean | ``false`` | Removed. ``true`` is a configure error; readcon-core reads the non-CON formats; gpridge builds it with its ``chemfiles`` cargo feature by default. | +--------------------+---------+-----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``use_readcon`` | boolean | ``true`` | readcon-core structure I/O is required; ``false`` is a configure error. | +--------------------+---------+-----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``use_readcon_db`` | feature | ``auto`` | readcon-db observation archive. Each oracle evaluation is stored as a CON frame in an LMDB-backed corpus next to the run. | +--------------------+---------+-----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``with_ira`` | boolean | ``true`` | Build the vendored IRA Fortran library that ``gprn`` uses to match product to reactant. Needs cmake, a Fortran compiler and LAPACK. Only consulted when ``gprn`` is built. | +--------------------+---------+-----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``ira_libdir`` | string | empty | Directory of a prebuilt ``libira.so``. Skips the cmake subproject build. | +--------------------+---------+-----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``ira_includedir`` | string | empty | Directory with ``iralib_interf.h`` for a prebuilt ``libira``. | +--------------------+---------+-----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Potentials ---------- Each potential option compiles the interface to an external engine. Most engines are loaded at run time and need a library path in an environment variable; the variable is named in the option description in ``meson_options.txt``. .. table:: +-------------------------+---------+-----------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | Option | Type | Default | Effect | +=========================+=========+===========+======================================================================================================================================================+ | ``use_rgpot_xtb`` | boolean | ``false`` | rgpot xTB/GFN potential support. | +-------------------------+---------+-----------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``use_rgpot_metatomic`` | boolean | ``false`` | rgpot metatomic potential support, which runs TorchScript ``.pt`` models such as PET-MAD. | +-------------------------+---------+-----------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``use_rgpot_uma`` | boolean | ``false`` | rgpot ``UmaPot`` for ``--potential uma`` and ``omol``, loading AOTI ``.pt2`` models. Also turns on the metatomic build. | +-------------------------+---------+-----------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``use_rgpot_mopac`` | boolean | ``false`` | ``--potential mopac`` through ``rgpot::MOPACPot``. The run needs ``MOPACC_LIBRARY`` or ``RGPOT_MOPACC_ENGINE``. | +-------------------------+---------+-----------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``use_rgpot_nwchem`` | boolean | ``false`` | rgpot ``NWChemPot`` for ``--potential nwchem``. Needs ``use_capnp``. The run needs ``NWCHEMC_LIBRARY`` or ``RGPOT_NWCHEMC_ENGINE``. | +-------------------------+---------+-----------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``use_rgpot_skala`` | boolean | ``false`` | rgpot ``SkalaPot`` (NWChem DFT with ``dft.xc=skala-1.1``). Implies the NWChem interface and needs ``use_capnp``. The run still needs ``libnwchemc``. | +-------------------------+---------+-----------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``use_lammps`` | feature | ``auto`` | LAMMPS oracle. ``auto`` builds ``liblammps_engine.so`` when ``use_capnp`` is true. ``enabled`` also registers the saddle and force-agreement tests. | +-------------------------+---------+-----------+------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``use_cp2k`` | feature | ``auto`` | CP2K oracle. ``libcp2k_engine.so`` builds whenever ``use_capnp`` is true. ``enabled`` also registers ``test_cp2k_engine`` and needs ``with_tests``. | +-------------------------+---------+-----------+------------------------------------------------------------------------------------------------------------------------------------------------------+ Run-time parameters tied to these options ----------------------------------------- These parameters are set in the configuration or through the Python parameter dictionary, not at build time. Defaults are those of ``schema/params.capnp`` and ``python/gpridge/_api.py``. The flags ``--scalapack-block-size``, ``--scalapack-nprow``, ``--linalg-mode`` and ``--linalg-threads`` are listed in the :doc:`command-line reference ` and in :doc:`configuration keys `. .. table:: +----------------------------------------------------------+-----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Default | Effect | +==========================================================+===========+=========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================+ | ``cutlassPluginPath`` (``cutlass_plugin_path``) | empty | Path to the CUDA/CUTLASS plugin library. The GP passes it to ``linalg::cutlass::setPluginPath`` when it is configured. | +----------------------------------------------------------+-----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``useAlphaKPredictMean`` (``use_alpha_k_predict_mean``) | ``true`` | Alpha-K contraction in the MAP mean prediction. | +----------------------------------------------------------+-----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``useAlphaKLaplaceMean`` (``use_alpha_k_laplace_mean``) | ``true`` | Alpha-K contraction in the Laplace-mixture mean prediction. | +----------------------------------------------------------+-----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``useRigidNullDeflation`` (``use_rigid_null_deflation``) | ``false`` | Opt-in projection of free-system rigid-motion nullspace modes before factorization. Enabling removes ~4e-11 null-mode rounding drift at step 0, which shifts free 2-atom LJ marginal-likelihood iteration counts (28 -> 33; 38 -> 49 on max\_iter=15 restarts) and lets sub-floor (sigma2=1e-28, jitter=0) 2-atom LJ training certify. Incompatible with ``principled_nugget=true`` (set ``principled_nugget=false`` / ``--principled-nugget false``) and rejected on ScaLAPACK builds. | +----------------------------------------------------------+-----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Build products and tests ------------------------ .. table:: +------------------+---------+-----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Option | Type | Default | Effect | +==================+=========+===========+========================================================================================================================================================================================================================================================================================================+ | ``with_drivers`` | feature | ``auto`` | Build and install ``gprd`` and ``gprn``. ``auto`` is on for a top-level build and off when gpridge is a subproject. ``with_tests=true`` needs the drivers and rejects ``disabled``. | +------------------+---------+-----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``with_python`` | boolean | ``false`` | Build the Python bindings. | +------------------+---------+-----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``with_tests`` | boolean | ``false`` | Build the test suite. | +------------------+---------+-----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``with_fuzzers`` | boolean | ``false`` | Build the libFuzzer targets for configuration parsing (``fuzz_toml_config``, ``fuzz_binary_config``), checked C API entry points (``fuzz_capi_*_checked``) and ``.con`` structure parsing (``fuzz_structure_con`` when ``use_readcon=true``). Needs Clang, ``use_capnp=true`` and ``with_tests=true``. | +------------------+---------+-----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``do_install`` | boolean | ``true`` | Install the built library. | +------------------+---------+-----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``sbom`` | combo | ``auto`` | Build SBOM. ``auto`` and ``enabled`` write the CycloneDX and SPDX documents and compile their digest into ``libgpridge``; neither needs ``eb-stack``. ``disabled`` compiles an empty digest. See :doc:`the SBOM how-to <../howto/sbom>` . | +------------------+---------+-----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+