p4est: 0-unstable-2021-06-22 -> 2.8.7 (#415439)

Nick Cao b5a820d8 8732e1e1

Changed files
+168 -191
pkgs
by-name
p4
p4est
p4est-sc
development
libraries
science
top-level
+78
pkgs/by-name/p4/p4est-sc/package.nix
···
+
{
+
lib,
+
stdenv,
+
fetchFromGitHub,
+
autoreconfHook,
+
pkg-config,
+
mpi,
+
zlib,
+
jansson,
+
mpiCheckPhaseHook,
+
debug ? false,
+
mpiSupport ? true,
+
+
# passthru.tests
+
testers,
+
}:
+
+
stdenv.mkDerivation (finalAttrs: {
+
pname = "p4est-sc";
+
version = "2.8.7";
+
+
src = fetchFromGitHub {
+
owner = "cburstedde";
+
repo = "libsc";
+
tag = "v${finalAttrs.version}";
+
hash = "sha256-oeEYNaYx1IdEWefctgUZVUa6wnb8K3z5Il2Y9MtQwBc=";
+
};
+
+
strictDeps = true;
+
+
postPatch = ''
+
echo $version > .tarball-version
+
'';
+
+
nativeBuildInputs = [
+
autoreconfHook
+
pkg-config
+
] ++ lib.optional mpiSupport mpi;
+
+
propagatedBuildInputs = [
+
zlib
+
jansson
+
];
+
+
configureFlags =
+
[
+
"LDFLAGS=-lm"
+
]
+
++ lib.optionals mpiSupport [
+
"--enable-mpi"
+
"CC=mpicc"
+
]
+
++ lib.optional debug "--enable-debug";
+
+
__darwinAllowLocalNetworking = mpiSupport;
+
+
nativeCheckInputs = lib.optionals mpiSupport [
+
mpiCheckPhaseHook
+
];
+
+
doCheck = true;
+
+
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+
meta = {
+
description = "Support for parallel scientific applications";
+
longDescription = ''
+
The SC library provides support for parallel scientific applications.
+
Its main purpose is to support the p4est software library, hence
+
this package is called p4est-sc, but it works standalone, too.
+
'';
+
homepage = "https://www.p4est.org/";
+
downloadPage = "https://github.com/cburstedde/libsc.git";
+
pkgConfigModules = [ "libsc" ];
+
license = lib.licenses.lgpl21Plus;
+
maintainers = with lib.maintainers; [ qbisi ];
+
};
+
})
+88
pkgs/by-name/p4/p4est/package.nix
···
+
{
+
lib,
+
stdenv,
+
fetchFromGitHub,
+
autoreconfHook,
+
pkg-config,
+
metis,
+
p4est-sc,
+
mpi,
+
mpiCheckPhaseHook,
+
debug ? false,
+
withMetis ? true,
+
mpiSupport ? true,
+
+
# passthru.tests
+
testers,
+
}:
+
let
+
p4est-sc' = p4est-sc.override { inherit mpi mpiSupport debug; };
+
in
+
stdenv.mkDerivation (finalAttrs: {
+
pname = "p4est";
+
version = "2.8.7";
+
+
src = fetchFromGitHub {
+
owner = "cburstedde";
+
repo = "p4est";
+
tag = "v${finalAttrs.version}";
+
hash = "sha256-8JvKaYOP4IO1Xmim74KNHvMLOV3y9VRoT76RBCaRyhI=";
+
};
+
+
strictDeps = true;
+
+
postPatch = ''
+
echo $version > .tarball-version
+
+
substituteInPlace Makefile.am \
+
--replace-fail "@P4EST_SC_AMFLAGS@" "-I ${p4est-sc}/share/aclocal"
+
'';
+
+
nativeBuildInputs = [
+
autoreconfHook
+
pkg-config
+
] ++ lib.optional mpiSupport mpi;
+
+
buildInputs = [
+
metis
+
];
+
+
propagatedBuildInputs = [ p4est-sc' ];
+
+
configureFlags =
+
[
+
"--with-sc=${p4est-sc'}"
+
"--with-metis"
+
"--enable-p6est"
+
"LDFLAGS=-lm"
+
]
+
++ lib.optionals mpiSupport [
+
"--enable-mpi"
+
"CC=mpicc"
+
]
+
++ lib.optional debug "--enable-debug";
+
+
doCheck = true;
+
+
__darwinAllowLocalNetworking = mpiSupport;
+
+
nativeCheckInputs = lib.optionals mpiSupport [
+
mpiCheckPhaseHook
+
];
+
+
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+
meta = {
+
description = "Parallel AMR on Forests of Octrees";
+
longDescription = ''
+
The p4est software library provides algorithms for parallel AMR.
+
AMR refers to Adaptive Mesh Refinement, a technique in scientific
+
computing to cover the domain of a simulation with an adaptive mesh.
+
'';
+
homepage = "https://www.p4est.org/";
+
downloadPage = "https://github.com/cburstedde/p4est.git";
+
pkgConfigModules = [ "p4est" ];
+
license = lib.licenses.gpl2Plus;
+
maintainers = with lib.maintainers; [ qbisi ];
+
};
+
})
-78
pkgs/development/libraries/science/math/p4est-sc/default.nix
···
-
{
-
lib,
-
stdenv,
-
fetchFromGitHub,
-
mpiCheckPhaseHook,
-
autoreconfHook,
-
pkg-config,
-
p4est-sc-debugEnable ? true,
-
p4est-sc-mpiSupport ? true,
-
mpi,
-
zlib,
-
}:
-
-
let
-
dbg = lib.optionalString debugEnable "-dbg";
-
debugEnable = p4est-sc-debugEnable;
-
mpiSupport = p4est-sc-mpiSupport;
-
in
-
stdenv.mkDerivation {
-
pname = "p4est-sc${dbg}";
-
version = "unstable-2021-06-14";
-
-
# fetch an untagged snapshot of the prev3-develop branch
-
src = fetchFromGitHub {
-
owner = "cburstedde";
-
repo = "libsc";
-
rev = "1ae814e3fb1cc5456652e0d77550386842cb9bfb";
-
sha256 = "14vm0b162jh8399pgpsikbwq4z5lkrw9vfzy3drqykw09n6nc53z";
-
};
-
-
strictDeps = true;
-
nativeBuildInputs = [
-
autoreconfHook
-
pkg-config
-
];
-
propagatedNativeBuildInputs = lib.optional mpiSupport mpi;
-
propagatedBuildInputs = [ zlib ];
-
inherit debugEnable mpiSupport;
-
-
postPatch = ''
-
echo "dist_scaclocal_DATA += config/sc_v4l2.m4" >> Makefile.am
-
'';
-
preConfigure = ''
-
echo "2.8.0" > .tarball-version
-
${lib.optionalString mpiSupport "unset CC"}
-
'';
-
-
configureFlags =
-
[ "--enable-pthread=-pthread" ]
-
++ lib.optional debugEnable "--enable-debug"
-
++ lib.optional mpiSupport "--enable-mpi";
-
-
dontDisableStatic = true;
-
enableParallelBuilding = true;
-
makeFlags = [ "V=0" ];
-
-
nativeCheckInputs = lib.optionals mpiSupport [
-
mpiCheckPhaseHook
-
];
-
-
# disallow Darwin checks due to prototype incompatibility of qsort_r
-
# to be fixed in a future version of the source code
-
doCheck = !stdenv.hostPlatform.isDarwin && stdenv.hostPlatform == stdenv.buildPlatform;
-
-
meta = {
-
branch = "prev3-develop";
-
description = "Support for parallel scientific applications";
-
longDescription = ''
-
The SC library provides support for parallel scientific applications.
-
Its main purpose is to support the p4est software library, hence
-
this package is called p4est-sc, but it works standalone, too.
-
'';
-
homepage = "https://www.p4est.org/";
-
downloadPage = "https://github.com/cburstedde/libsc.git";
-
license = lib.licenses.lgpl21Plus;
-
maintainers = [ ];
-
};
-
}
-77
pkgs/development/libraries/science/math/p4est/default.nix
···
-
{
-
lib,
-
stdenv,
-
fetchFromGitHub,
-
autoreconfHook,
-
pkg-config,
-
p4est-withMetis ? true,
-
metis,
-
p4est-sc,
-
mpiCheckPhaseHook,
-
}:
-
-
let
-
inherit (p4est-sc) debugEnable mpiSupport;
-
dbg = lib.optionalString debugEnable "-dbg";
-
withMetis = p4est-withMetis;
-
in
-
stdenv.mkDerivation {
-
pname = "p4est${dbg}";
-
version = "unstable-2021-06-22";
-
-
# fetch an untagged snapshot of the prev3-develop branch
-
src = fetchFromGitHub {
-
owner = "cburstedde";
-
repo = "p4est";
-
rev = "7423ac5f2b2b64490a7a92e5ddcbd251053c4dee";
-
sha256 = "0vffnf48rzw6d0as4c3x1f31b4kapmdzr1hfj5rz5ngah72gqrph";
-
};
-
-
strictDeps = true;
-
nativeBuildInputs = [
-
autoreconfHook
-
pkg-config
-
];
-
propagatedBuildInputs = [ p4est-sc ];
-
buildInputs = lib.optional withMetis metis;
-
inherit debugEnable mpiSupport withMetis;
-
-
patches = [ ./p4est-metis.patch ];
-
postPatch = ''
-
sed -i -e "s:\(^\s*ACLOCAL_AMFLAGS.*\)\s@P4EST_SC_AMFLAGS@\s*$:\1 -I ${p4est-sc}/share/aclocal:" Makefile.am
-
'';
-
preAutoreconf = ''
-
echo "2.8.0" > .tarball-version
-
'';
-
preConfigure = lib.optionalString mpiSupport ''
-
unset CC
-
'';
-
-
configureFlags =
-
p4est-sc.configureFlags ++ [ "--with-sc=${p4est-sc}" ] ++ lib.optional withMetis "--with-metis";
-
-
inherit (p4est-sc)
-
makeFlags
-
dontDisableStatic
-
enableParallelBuilding
-
doCheck
-
;
-
-
nativeCheckInputs = lib.optionals mpiSupport [
-
mpiCheckPhaseHook
-
];
-
-
meta = {
-
branch = "prev3-develop";
-
description = "Parallel AMR on Forests of Octrees";
-
longDescription = ''
-
The p4est software library provides algorithms for parallel AMR.
-
AMR refers to Adaptive Mesh Refinement, a technique in scientific
-
computing to cover the domain of a simulation with an adaptive mesh.
-
'';
-
homepage = "https://www.p4est.org/";
-
downloadPage = "https://github.com/cburstedde/p4est.git";
-
license = lib.licenses.gpl2Plus;
-
maintainers = [ ];
-
};
-
}
-26
pkgs/development/libraries/science/math/p4est/p4est-metis.patch
···
-
diff --git a/src/p4est_connectivity.c b/src/p4est_connectivity.c
-
index 95339136..c93528f2 100644
-
--- a/src/p4est_connectivity.c
-
+++ b/src/p4est_connectivity.c
-
@@ -3715,6 +3715,7 @@ p4est_connectivity_reorder_newid (sc_MPI_Comm comm, int k,
-
sc_array_t * newid)
-
{
-
const int n = (int) conn->num_trees;
-
+ int metis_n;
-
int *xadj;
-
int *adjncy;
-
int *part;
-
@@ -3862,10 +3863,12 @@ p4est_connectivity_reorder_newid (sc_MPI_Comm comm, int k,
-
-
P4EST_GLOBAL_INFO ("Entering metis\n");
-
/* now call metis */
-
+ metis_n = n;
-
P4EST_EXECUTE_ASSERT_INT
-
- (METIS_PartGraphRecursive (&n, &ncon, xadj, adjncy, NULL, NULL,
-
+ (METIS_PartGraphRecursive (&metis_n, &ncon, xadj, adjncy, NULL, NULL,
-
NULL, &k, NULL, NULL, NULL, &volume, part),
-
METIS_OK);
-
+ P4EST_ASSERT (metis_n == n);
-
P4EST_GLOBAL_INFO ("Done metis\n");
-
-
P4EST_GLOBAL_STATISTICSF ("metis volume %d\n", volume);
+2 -10
pkgs/top-level/all-packages.nix
···
nodejs = nodejs_20;
-
p4est-sc = callPackage ../development/libraries/science/math/p4est-sc {
-
p4est-sc-debugEnable = false;
-
};
-
-
p4est-sc-dbg = callPackage ../development/libraries/science/math/p4est-sc { };
-
-
p4est = callPackage ../development/libraries/science/math/p4est { };
+
p4est-sc-dbg = p4est-sc.override { debug = true; };
-
p4est-dbg = callPackage ../development/libraries/science/math/p4est {
-
p4est-sc = p4est-sc-dbg;
-
};
+
p4est-dbg = p4est.override { debug = true; };
sageWithDoc = sage.override { withDoc = true; };