From 22be418526f529e13fc79217e563801a35ea6236 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 9 Jul 2018 09:47:19 +0100 Subject: [PATCH] Fix env passing throug mpiexec --- test/test_mpi_communication.py | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/test/test_mpi_communication.py b/test/test_mpi_communication.py index 091111ed..88609964 100644 --- a/test/test_mpi_communication.py +++ b/test/test_mpi_communication.py @@ -257,13 +257,11 @@ def test_mpi(num_ranks): from subprocess import check_call import sys - newenv = os.environ.copy() - newenv["RUN_WITHIN_MPI"] = "1" - newenv["TEST_MPI_COMMUNICATION"] = "1" check_call([ - "mpiexec", "-np", str(num_ranks), "-x", "RUN_WITHIN_MPI", - sys.executable, __file__], - env=newenv) + "mpiexec", "-np", str(num_ranks), + "-x", "RUN_WITHIN_MPI=1", + "-x", "TEST_MPI_COMMUNICATION=1", + sys.executable, __file__]) @pytest.mark.mpi @@ -274,13 +272,11 @@ def test_simple_mpi(num_ranks): from subprocess import check_call import sys - newenv = os.environ.copy() - newenv["RUN_WITHIN_MPI"] = "1" - newenv["TEST_SIMPLE_MPI_COMMUNICATION"] = "1" check_call([ - "mpiexec", "-np", str(num_ranks), "-x", "RUN_WITHIN_MPI", - sys.executable, __file__], - env=newenv) + "mpiexec", "-np", str(num_ranks), + "-x", "RUN_WITHIN_MPI=1", + "-x", "TEST_SIMPLE_MPI_COMMUNICATION=1", + sys.executable, __file__]) # }}} -- GitLab