gnu: petsc-openmpi: Fix compilation with Scotch 7.0.

* gnu/packages/maths.scm (petsc-openmpi)[inputs]: Add SCOTCH:METIS.
[arguments]: Add 'adjust-pt-scotch-library-names' phase.
This commit is contained in:
Ludovic Courtès 2022-03-18 11:58:28 +01:00 committed by Ludovic Courtès
parent 3e34b01b70
commit 5f83f95210
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -3092,6 +3092,7 @@ (define-public petsc-openmpi
("openmpi" ,openmpi)
("scalapack" ,scalapack)
("scotch" ,pt-scotch32)
("scotch" ,pt-scotch32 "metis")
,@(package-inputs petsc)))
(arguments
(substitute-keyword-arguments (package-arguments petsc)
@ -3111,6 +3112,12 @@ (define-public petsc-openmpi
,@(delete "--with-mpi=0" #$cf)))
((#:phases phases)
#~(modify-phases #$phases
(add-before 'configure 'adjust-pt-scotch-library-names
(lambda _
;; Adjust to the library name changes in Scotch 7.0.
(substitute* "config/BuildSystem/config/packages/PTScotch.py"
(("libptesmumps") "libesmumps")
(("libptscotchparmetis") "libptscotchparmetisv3"))))
(add-before 'configure 'mpi-setup
#$%openmpi-setup)))))
(synopsis "Library to solve PDEs (with MUMPS and MPI support)")))