petsc: add ptscotch support
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
withMetis ? false,
|
||||
parmetis,
|
||||
withParmetis ? false,
|
||||
scotch,
|
||||
withPtscotch ? false,
|
||||
pkg-config,
|
||||
p4est,
|
||||
zlib, # propagated by p4est but required by petsc
|
||||
@@ -31,6 +33,8 @@ assert petsc-withp4est -> p4est.mpiSupport;
|
||||
# Package parmetis depend on metis and mpi support
|
||||
assert withParmetis -> (withMetis && mpiSupport);
|
||||
|
||||
assert withPtscotch -> mpiSupport;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "petsc";
|
||||
version = "3.21.4";
|
||||
@@ -54,7 +58,8 @@ stdenv.mkDerivation rec {
|
||||
++ lib.optional hdf5-support hdf5
|
||||
++ lib.optional petsc-withp4est p4est
|
||||
++ lib.optional withMetis metis
|
||||
++ lib.optional withParmetis parmetis;
|
||||
++ lib.optional withParmetis parmetis
|
||||
++ lib.optional withPtscotch scotch;
|
||||
|
||||
postPatch =
|
||||
''
|
||||
@@ -86,6 +91,11 @@ stdenv.mkDerivation rec {
|
||||
"--with-parmetis=1"
|
||||
"--with-parmetis-dir=${parmetis}"
|
||||
]
|
||||
++ lib.optionals withPtscotch [
|
||||
"--with-ptscotch=1"
|
||||
"--with-ptscotch-include=${scotch.dev}/include"
|
||||
"--with-ptscotch-lib=[-L${scotch}/lib,-lptscotch,-lptesmumps,-lptscotchparmetisv3,-lptscotcherr,-lesmumps,-lscotch,-lscotcherr]"
|
||||
]
|
||||
++ lib.optionals petsc-withp4est [
|
||||
"--with-p4est=1"
|
||||
"--with-zlib-include=${zlib.dev}/include"
|
||||
|
||||
Reference in New Issue
Block a user