Skip to content

Commit

Permalink
adjusting test workflow for new mpi4py version not having a get_config
Browse files Browse the repository at this point in the history
  • Loading branch information
gbomarito committed Sep 23, 2024
1 parent 2495043 commit 96bd9f0
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions tests/.run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
#!/usr/bin/env bash

set -e
echo "importing os"
python -c "import mpi4py;"
echo "importing mpi4py"
python -c "import os;"
echo "getting mpi4py config"
which mpirun
MPI_EXEC=$(python -c "import mpi4py;import os;print(mpi4py.get_config());")
echo $MPI_EXEC
python -c "import mpi4py;import os;filename = list(mpi4py.get_config().values())[0];"

echo "Finding MPI install"
MPI_EXEC=$(python -c "import mpi4py;import os;filename = list(mpi4py.get_config().values())[0];print(os.path.dirname(filename)+'/mpiexec');")
echo $MPI_EXEC
RUN_MODE=${1-"coverage"}
echo $RUN_MODE
MPI_EXEC=`which mpiexec`
if [ $MPI_EXEC == ""]
then
MPI_EXEC=$(python -c "import mpi4py;import os;filename = list(mpi4py.get_config().values())[0];print(os.path.dirname(filename)+'/mpiexec');")
fi
echo "found $MPI_EXEC"

RUN_MODE=${1-"coverage"}
echo "Running tests in $RUN_MODE mode"

# run mpi tests
Expand Down

0 comments on commit 96bd9f0

Please sign in to comment.