guix_mirror_bot pushed a commit to branch master
in repository guix.

commit cc0f3ff18b38bfb3c49a8d2c7fb9634e2e62610b
Author: Lars Bilke <[email protected]>
AuthorDate: Thu Aug 14 12:36:39 2025 +0200

    gnu: Add ogs-petsc
    
    * gnu/packages/geo.scm (ogs-petsc): New variable.
    
    Change-Id: Idc3d426f14ed3e5ecc141ac2956f3dbcb34dd88a
    Modified-by: Sharlatan Hellseher <[email protected]>
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/geo.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 0d939e2d02..c38c8f30e0 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -126,6 +126,7 @@
   #:use-module (gnu packages lua)
   #:use-module (gnu packages machine-learning)
   #:use-module (gnu packages maths)
+  #:use-module (gnu packages mpi)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages ninja)
@@ -970,6 +971,25 @@ currently CO2 sequestration, geothermal energy, water 
resources management,
 hydrology and waste deposition.")
     (properties '((tunable? . #t)))
     (license license:bsd-3)))
+
+(define-public ogs-petsc
+  (package
+    (inherit ogs-serial)
+    (name "ogs-petsc")
+    (inputs (modify-inputs (package-inputs ogs-serial)
+              (prepend openmpi petsc-openmpi)
+              (replace "hdf5" hdf5-parallel-openmpi)
+              (replace "netcdf-cxx4" netcdf-cxx4-parallel-openmpi)))
+    (native-inputs (modify-inputs (package-native-inputs ogs-serial)
+                     (prepend pkg-config)))
+    (arguments
+     (substitute-keyword-arguments (package-arguments ogs-serial)
+       ((#:configure-flags flags)
+        `(cons* "-DOGS_USE_PETSC=ON" "-DCMAKE_C_COMPILER=mpicc"
+                "-DCMAKE_CXX_COMPILER=mpic++"
+                ,flags))))
+    (synopsis "OpenGeoSys with PETSc (parallel processing) support")))
+
 (define-public proj
   (package
     (name "proj")

Reply via email to