sage: avoid running out of memory during tests
commit41bb3194622637aa26fe5a28880165d9ecb2f2df
authorTimo Kaufmann <timokau@zoho.com>
dateFri 16 Aug 2019, 23:50 (7 years ago)
parent69d9700
pkgs/applications/science/math/sage/sage-tests.nix+4
@@ -51,6 +51,10 @@ stdenv.mkDerivation rec {
5151 export HOME="$TMPDIR/sage-home"
5252 mkdir -p "$HOME"
5353
54+ # avoid running out of memory with many threads in subprocesses, see
55+ # https://github.com/NixOS/nixpkgs/pull/65802
56+ export GLIBC_TUNABLES=glibc.malloc.arena_max=4
57+
5458 echo "Running sage tests with arguments ${timeSpecifier} ${patienceSpecifier} ${testArgs}"
5559 "sage" -t --nthreads "$NIX_BUILD_CORES" --optional=sage ${timeSpecifier} ${patienceSpecifier} ${testArgs}
5660 '';