Bindings and external interfaces

gpridge is a C++ library with a C API. The pages below describe the interfaces to it: the C and Fortran APIs, the Python package, the Rust sys crate, the R and Julia packages, the Cap’n Proto configuration schema and the native ABIs. The Rust crate (Rust binding), the R package and the Julia package (R and Julia bindings) wrap the installed C API. Install them as described in Installation.

What each interface reaches

Every recent capability is either reachable from a binding or listed as driver-only. The rows below give the name in each interface. Python names that belong to a class are written Class.name.

Capability

C API

Fortran

Python

TOML / capnp

--linalg-mode

gpr_set_linalg_mode

gpr_set_linalg_mode

set_linalg_mode, GPNEBConfig.linalg_mode

[linalg] mode

--linalg-threads

gpr_set_linalg_threads

gpr_set_linalg_threads

set_linalg_threads

[linalg] threads

--kernel-threads

driver only (gprn, gprd)

driver only

driver only

not a key

--gp-atomic-environments

driver only (gprn, gprd)

driver only

driver only

not a key, no capnp field

--irc-certificate

driver only (gprn)

driver only (gprn)

driver only (gprn)

not a key

--irc-saddle-hessian

driver only (gprn)

driver only (gprn)

driver only (gprn)

[band] irc_saddle_hessian

Scheme II (scheme2:fp64/int8, CUDA)

gpr_set_training_product

gpr_set_training_product

set_training_product

[linalg] training_product

Oracle failure, rejected trials

non-finite value, GPR_ERR_ORACLE

non-finite value, stat

exception or NaN, InternalError (a RuntimeError)

not applicable

Dimer outcome and stop reason

gpr_dimer_search_report

gpr_dimer_search, DimerReport

GPDimer.termination_reason, AtomicDimer.get_termination_reason

not applicable

Weak second-mode continuation

driver only (gprd)

driver only (gprd)

AtomicDimer.restart_along_weak_mode and two siblings

gprd flags

Memory and LP64 limits

GPR_ERR_ALLOC, GPR_ERR_SIZE_LIMIT

same through stat

AllocationError (MemoryError), SizeLimitError (ValueError)

not applicable

Model package ISA check

gpr_check_model_package

gpr_check_model_package

check_model_package

checked when the oracle loads

ABI of linked native libraries

GPR_ABI_CHECK()

gpr_check_abi

abi_report, check_abi

schemaVersion

The weak-mode continuation stays in gprd because it is a loop over a complete finite-difference stencil that the driver owns (--weak-mode-continuations); the library exposes the three steps that loop calls, and Python binds them. Python bindings lists the Python names, the error classes and the termination reasons.

Installed consumers

Native packages describes the installed header, shared library, pkg-config and CMake contracts, with build and smoke-test commands for downstream programs. The C ABI version counts additions within a major version; call GPR_ABI_CHECK() before creating handles. The ABI reference covers engine and provider interfaces.