pythonPackages.meep: use mpiCheckPhaseHook

This commit is contained in:
Markus Kowalewski 2023-08-03 00:03:32 +02:00
parent 690da58dec
commit cfc44b5d41

View File

@ -4,6 +4,7 @@
, fetchFromGitHub
, autoreconfHook
, pkg-config
, mpiCheckPhaseHook
, gfortran
, mpi
, blas
@ -108,16 +109,12 @@ buildPythonPackage rec {
errors can be caught.
*/
doCheck = true;
nativeCheckInputs = [ mpiCheckPhaseHook openssh ];
checkPhase = ''
export PATH=$PATH:${openssh}/bin
runHook preCheck
export PYTHONPATH="$out/lib/${python.libPrefix}/site-packages:$PYTHONPATH"
export OMP_NUM_THREADS=1
# Fix to make mpich run in a sandbox
export HYDRA_IFACE=lo
export OMPI_MCA_rmaps_base_oversubscribe=1
# Generate a python test script
cat > test.py << EOF
import meep as mp
@ -139,6 +136,8 @@ buildPythonPackage rec {
EOF
${mpi}/bin/mpiexec -np 2 python3 test.py
runHook postCheck
'';
meta = with lib; {