option('use_mkl', type: 'boolean', value: false, description: 'Enable Intel MKL support')
option('allocator', type: 'combo', choices: ['system', 'mimalloc'], value: 'system', description: 'Global allocator; mimalloc also enables shared scoped heaps')
option('use_hdf5', type: 'boolean', value: true, description: 'Use HDF5 for logs')
option('use_capnp', type: 'boolean', value: false, description: 'Use CapnProto for parameters')
option('use_highs', type: 'boolean', value: false, description: 'Use HiGHs for EMD cost matrices')
option('use_ceres', type: 'boolean', value: false, description: 'Enable Ceres-Opt for hyperparameters')
option('use_chemfiles', type: 'boolean', value: false, description: 'Removed. true is a configure error; readcon-core reads the non-CON formats when built with -Dreadcon-core:cargo_features=chemfiles.')
option('do_install', type: 'boolean', value: true, description: 'Installs the built library')
option('sbom', type: 'combo', choices: ['auto', 'enabled', 'disabled'], value: 'auto', description: 'Build-time SBOM. auto and enabled use the in-tree generator without requiring eb-stack; auto is disabled without the license-expression Python package, which enabled requires; disabled writes an empty digest header.')
option('with_tests', type: 'boolean', value: false, description: 'Builds testsuite')
option('with_fuzzers', type: 'boolean', value: false, description: 'Build libFuzzer targets for the C API, checked C API entry points, environment-type text, seed-kernel records, readcon frames/.con structures, and (when use_capnp is true) the TOML and binary configuration parsers. Requires Clang and with_tests=true. Default off.')
option('with_drivers', type: 'feature', value: 'auto', description: 'Build and install the gprd and gprn command-line drivers. auto: on for a top-level build, off when gpridge is a subproject. with_tests=true needs them and rejects disabled.')
option('with_python', type: 'boolean', value: false, description: 'Build Python bindings')
option('use_openblas', type: 'boolean', value: false, description: 'Link Eigen against OpenBLAS for accelerated dense LA. With use_rgpot_uma or use_rgpot_metatomic, static-includes libopenblas.a and hides cblas_* so torch AOTI keeps its own cblas_sgemm_batch (shared libopenblas.so interposes and SIGSEGVs at 0x160 in inner_small_matrix_thread). Campaign libira.so DT_NEEDs that DSO; configure copies it and drops the NEEDED. Needs libopenblas.a; missing archive or an unstrippable IRA is a configure error.')
option('linalg_backend', type: 'combo', choices: ['eigen', 'cholmod', 'cusolver', 'kokkos', 'stdpar', 'scalapack', 'slate'], value: 'eigen', description: 'Linear algebra backend for GPR hot-path operations')
option('use_highway', type: 'feature', value: 'auto', description: 'Google Highway SIMD distance/covariance kernels. auto: enable when libhwy is found via pkg-config, silently skip otherwise. enabled: hard-require (error if not found). disabled: never link Highway, fall back to scalar kernels.')
option('use_openmp', type: 'boolean', value: false, description: 'Use OpenMP for thread-level parallelism in distance/covariance loops')
option('use_stdpar', type: 'feature', value: 'auto', description: 'Bounded parallel STL execution of independent kernel blocks through TBB, compatible with every linear algebra backend')
option('use_stdpar_gpu', type: 'feature', value: 'disabled', description: 'Build the NVIDIA stdpar environment kernel with nvc++ alongside the host library')
option('stdpar_gpu_arch', type: 'string', value: 'cc80', description: 'NVIDIA target architecture for the environment kernel, such as cc80 for A100')
option('use_openmp_local_oracle', type: 'boolean', value: false, description: 'Carve-out: enable OpenMP only for the per-rank local-oracle gradient regions (serial_per_rank=true). Compatible with linalg_backend=scalapack: those regions never enter MPI/ScaLAPACK collectives, so the OMP team does not contend with pdpotrf/pdtrsm or oversubscribe MPI ranks.')
option('use_readcon', type: 'boolean', value: true, description: 'readcon-core structure I/O is required. false is a configure error.')
option('use_readcon_db', type: 'feature', value: 'auto', description: 'readcon-db observation archive: every oracle evaluation is persisted as a spec-v3 CON frame (positions, forces, energy) in an LMDB-backed corpus beside the run, so adaptive pruning of the active GP training sets never destroys sampled data and per-image models can re-select archived rows. auto: on when the readcon-db wrap resolves; requires use_readcon.')
option('use_anneal', type: 'feature', value: 'auto', description: 'Anneal box-ensemble stage before the local GP hyperparameter fit (anneal-core subproject; needs rgmin, which is required). auto follows rgmin. enabled without rgmin is a configure error. The stage still runs only when requested.')
option('use_rgmin', type: 'feature', value: 'enabled', description: '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.')
option('with_ira', type: 'boolean', value: true, description: 'Build the vendored IRA (Iterative Rotations and Assignments) Fortran library for gprn endpoint assignment (rotation + permutation + translation matching of product onto reactant). Requires cmake, a Fortran compiler, and LAPACK at configure time. Only consulted when the gprn driver builds (see with_drivers); library-only consumers never trigger the IRA build.')
option('ira_libdir', type: 'string', value: '', description: 'Path to a prebuilt libira.so directory (skips the cmake subproject build)')
option('ira_includedir', type: 'string', value: '', description: 'Path to the iralib_interf.h directory for a prebuilt libira')
option('use_rgpot_xtb', type: 'boolean', value: false, description: 'Enable rgpot xTB/GFN potential support')
option('use_rgpot_metatomic', type: 'boolean', value: false, description: 'Enable rgpot metatomic/PET-MAD potential support')
option('use_rgpot_uma', type: 'boolean', value: false, description: 'Enable rgpot UmaPot for gprd/gprn --potential uma|omol (AOTI .pt2 via AOTIModelPackageLoader). potlib emits -DRGPOT_HAS_UMA from its metatomic branch, so this turns on with_metatomic as well; the two share a build but not a model format (metatomic takes TorchScript .pt, UMA takes AOTI .pt2).')
option('use_rgpot_mopac', type: 'boolean', value: false, description: 'Enable gprn/gprd --potential mopac through rgpot::MOPACPot (dlopen OmniPotentRPC/mopacc libmopacc.so). Runtime needs MOPACC_LIBRARY or RGPOT_MOPACC_ENGINE. --mopac-model selects the Hamiltonian (default AM1).')
option('use_rgpot_nwchem', type: 'boolean', value: false, description: 'Enable rgpot NWChemPot (libnwchemc dlopen) for gprd/gprn --potential nwchem. Turns on rgpot with_rpc so Cap\'n Proto NWChemParams and NWChemPot are built. Runtime still needs NWCHEMC_LIBRARY or RGPOT_NWCHEMC_ENGINE pointing at libnwchemc.so.')
option('use_lammps', type: 'feature', value: 'auto', description: 'LAMMPS oracle. auto builds liblammps_engine.so when use_capnp is true and installs it only when that build produced the library. enabled also registers the saddle and force-agreement tests and requires use_capnp, use_readcon and with_tests. At run time the plugin dlopens liblammpc.so (LAMMPC_LIBRARY or RGPOT_LAMMPC_ENGINE).')
option('use_cp2k', type: 'feature', value: 'auto', description: 'CP2K oracle test. libcp2k_engine.so builds whenever use_capnp is true. enabled also registers test_cp2k_engine, a diamond Si8 single point through the cp2k engine arm, and requires use_capnp and with_tests. At run time the plugin dlopens libcp2kc_rgpot.so (CP2KC_LIBRARY or RGPOT_CP2K_ENGINE) and CP2K reads its basis files from CP2K_DATA_DIR.')
option('use_rgpot_skala', type: 'boolean', value: false, description: 'Enable rgpot SkalaPot (NWChem DFT, dft.xc=skala-1.1). Implies with_rpc / NWChemPot. Runtime still needs libnwchemc.')
option('use_mpi', type: 'boolean', value: false, description: 'Link MPI for distributed code paths. Activated automatically when linalg_backend=scalapack or slate; non-distributed multi-rank RFF builds are rejected.')
option('use_cutlass', type: 'boolean', value: false, description: 'Compile optional CUDA/CUTLASS GEMM kernels for rank-local dense products.')
option('cutlass_include_dir', type: 'string', value: '', description: 'Optional absolute path to CUTLASS headers. Empty means the CUDA compiler include path must already provide cutlass/gemm/device/gemm.h.')
option('cutlass_cuda_arch', type: 'string', value: '80', description: 'nvcc SM architecture suffix for CUTLASS kernels, e.g. 80, 89, 90a, 100a.')
option('deterministic_reductions', type: 'boolean', value: true, description: 'Use rank-ordered Gather + long-double sum + Bcast for linalg::ordered_sum_bcast. Rank contributions are combined in rank order, but their locally rounded values can change with rank partition or thread scheduling; this option does not guarantee rank-count-invariant results. One-owner-per-block assemblies remain exact under MPI_Allreduce because their support is disjoint. Full-trajectory bit identity also depends on distributed Cholesky panel order and local kernels; different BLACS grids can differ by ulps and an ill-conditioned kernel can amplify that into another acquisition. When false, ordered_sum_bcast uses MPI_Allreduce and leaves the reduction tree to MPI.')
option('gp_predict_via_pcg', type: 'boolean', value: false, description: 'Replace the cholesky + forward_solve + back_solve chain in the GP predict-mean path with the Wenger 2022 preconditioned conjugate gradient solver (gpr/linalg/IterativeSolver.h). The block-Jacobi preconditioner reduce uses ordered_sum_bcast for cross-rank determinism, and the K assembly replicates the use_correction_ shift used by cholesky_distributed. At N <= 200 PCG is comparable to cholesky; at N >= 500 the matvec-free O(k N^2) crosses the cubic Cholesky.')
option('simd_baseline', type: 'string', value: 'auto', description: 'Instruction-set baseline passed as -march to the library. auto is x86-64-v3 (AVX2 + FMA, Haswell/Zen1 and later) on x86-64 hosts and the compiler default on other CPU families; the empty string is the compiler default everywhere. The default scalar_eigen build keeps Eigen unvectorized, so the level does not change results. -Dscalar_eigen=false lets the packet width follow the level. -ffp-contract=off is always required. A level the compiler rejects stops the configure step. Set x86-64-v2 or the empty string for x86-64 hardware older than 2013.')
option('scalar_eigen', type: 'boolean', value: true, description: '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 so class layout does not change. false opts into vectorized Eigen.')
option('use_featomic', type: 'feature', value: 'auto', description: 'Native SOAP descriptors using featomic 0.6.5 and metatensor-core 0.1')
option('mkl_libdir', type: 'string', value: '', description: 'Directory with the MKL shared libraries (libmkl_intel_lp64, libmkl_sequential, libmkl_core). When set, builds libgpr_scheme2_mkl.so, the shim through which the CPU Scheme II INT8 engine reaches cblas_gemm_s8u8s32 without exporting MKL BLAS symbols to the rest of the process, and runs the engine tests against it.')
option('onednn_library', type: 'string', value: '', description: 'Path to libdnnl.so for the CPU Scheme II INT8 engine tests. The engine loads oneDNN at run time; this option only adds it to the test runs.')
option('scheme2_cuda', type: 'boolean', value: false, description: 'Build libgpr_scheme2_cuda.so, the device half of the INT8 Scheme II engine (scheme2:int8:provider=cuda): residue products on INT8 tensor cores and the CRT reconstruction on the device, with the bits of the CPU engines. Needs nvcc and cuBLAS; the engine tests then also run on the first visible GPU.')
option('scheme2_cuda_arch', type: 'string', value: '80,90,120', description: 'Comma-separated SM architectures for libgpr_scheme2_cuda.so; PTX of the last one is embedded as well.')
option('enzyme', type: 'combo', choices: ['disabled', 'auto'], value: 'disabled', description: 'Probe for an Enzyme toolchain for derivative-provider AD; the provider bridge remains a documented stub')
