SkillAgentSearch skills...

Hypredrive

High-level interface for solving linear systems with hypre

Install / Use

/learn @hypre-space/Hypredrive
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

DOI Docs Coverage Analysis CI

hypredrive

High-level interface to hypre for solving sparse linear systems of equations. It can be used as:

Build

git clone --depth 1 https://github.com/hypre-space/hypredrive.git
cmake -DHYPREDRV_ENABLE_DATA=ON -S hypredrive -B build && cmake --build build -j -t check
  • hypre is fetched automatically if not found. Pass -DHYPRE_ROOT=<path> to use an existing install.
  • Check installation instructions for details, including the available library options.

Examples

Driver -- solve a system from a YAML file (see examples files in the docs).

mpirun -np 1 ./build/hypredrive-cli examples/ex2.yml -q

Library -- call the API from your own code (see example drivers in the docs).

   // 1. Setup hypredrive options from YAML input
   HYPREDRV_t hdrv = NULL;
   HYPREDRV_Initialize();
   HYPREDRV_Create(MPI_COMM_WORLD, &hdrv);
   HYPREDRV_SetLibraryMode(hdrv);
   HYPREDRV_InputArgsParse(1, yaml_text, hdrv); // Solver options are parsed here

   // 2. Setup linear system ("A" and "b" are built previously)
   HYPREDRV_LinearSystemSetMatrix(hdrv, (HYPRE_Matrix) A);
   HYPREDRV_LinearSystemSetRHS(hdrv, (HYPRE_Vector) b);

   // 3. Solve lifecycle (Solve for "x" in "A x = b")
   HYPREDRV_LinearSolverCreate(hdrv);
   HYPREDRV_LinearSolverSetup(hdrv);
   HYPREDRV_LinearSolverApply(hdrv);
   HYPREDRV_LinearSolverDestroy(hdrv);

   // 4. Cleanup
   HYPREDRV_Destroy(&hdrv);
   HYPREDRV_Finalize();

Documentation is available at hypredrive.readthedocs.io. For contribution instructions, see CONTRIBUTING.md.

Citation

Magri, V. A. P. (2024). Hypredrive: High-level interface for solving linear systems with hypre. JOSS, 9(98), 6654. https://doi.org/10.21105/joss.06654

See also CITATION.cff.

License

This project is licensed under the MIT License - see the LICENSE file for details. All new contributions must be made under this license.

SPDX-License-Identifier: MIT

LLNL-CODE-861860

View on GitHub
GitHub Stars5
CategoryDevelopment
Updated1h ago
Forks1

Languages

C

Security Score

75/100

Audited on Mar 28, 2026

No findings