From 65e659f0f4a30530acd96e69c287204fcf08d9a9 Mon Sep 17 00:00:00 2001 From: Carsten Burstedde Date: Mon, 5 Jul 2021 19:59:57 +0200 Subject: [PATCH] p4est, p4est-sc: fix checks with OpenMPI Setting environment variables in preCheck to make MPI tests run. This is one commit for two packages in order not to break the dependency. --- .../libraries/science/math/p4est-sc/default.nix | 14 ++++++++++---- .../libraries/science/math/p4est/default.nix | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/science/math/p4est-sc/default.nix b/pkgs/development/libraries/science/math/p4est-sc/default.nix index 00ce1e3b17cd..338101b80b56 100644 --- a/pkgs/development/libraries/science/math/p4est-sc/default.nix +++ b/pkgs/development/libraries/science/math/p4est-sc/default.nix @@ -42,12 +42,18 @@ stdenv.mkDerivation { ++ lib.optional mpiSupport "--enable-mpi" ; - makeFlags = [ "V=0" ]; - checkFlags = lib.optional isOpenmpi "-j1"; - dontDisableStatic = true; enableParallelBuilding = true; - doCheck = !stdenv.isAarch64 && stdenv.hostPlatform == stdenv.buildPlatform; + makeFlags = [ "V=0" ]; + + preCheck = '' + export OMPI_MCA_rmaps_base_oversubscribe=1 + export HYDRA_IFACE=lo + ''; + + # disallow Darwin checks due to prototype incompatibility of qsort_r + # to be fixed in a future version of the source code + doCheck = !stdenv.isDarwin && stdenv.hostPlatform == stdenv.buildPlatform; meta = { branch = "prev3-develop"; diff --git a/pkgs/development/libraries/science/math/p4est/default.nix b/pkgs/development/libraries/science/math/p4est/default.nix index b0bb543c760b..68c71ab59be1 100644 --- a/pkgs/development/libraries/science/math/p4est/default.nix +++ b/pkgs/development/libraries/science/math/p4est/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation { ++ lib.optional withMetis "--with-metis" ; - inherit (p4est-sc) makeFlags checkFlags dontDisableStatic enableParallelBuilding doCheck; + inherit (p4est-sc) makeFlags dontDisableStatic enableParallelBuilding preCheck doCheck; meta = { branch = "prev3-develop";