diff --git a/.travis.yml b/.travis.yml index 62b63d0a5d..756027d2cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,4 +56,4 @@ install: # command to run tests script: - make lint - - (rc=0; for t in ${PYOP2_TESTS}; do py.test --short -v tests/${t} || rc=$?; done; exit $rc) + - for t in ${PYOP2_TESTS}; do py.test --short -v tests/${t}; done diff --git a/firedrake/__init__.py b/firedrake/__init__.py index 114733b629..90490da92d 100644 --- a/firedrake/__init__.py +++ b/firedrake/__init__.py @@ -1,9 +1,4 @@ -# Must happen first, to ensure prefork server is up and running. from __future__ import absolute_import -from pyop2_utils import enable_mpi_prefork -enable_mpi_prefork() -del enable_mpi_prefork - # Ensure petsc is initialised by us before anything else gets in there. import firedrake.petsc as petsc del petsc diff --git a/tests/conftest.py b/tests/conftest.py index 3e8abe0c18..a10889ab08 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -11,6 +11,7 @@ sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))) from subprocess import check_call +from mpi4py import MPI from functools import wraps @@ -19,7 +20,6 @@ def parallel(item): :arg item: The test item to run. """ - from mpi4py import MPI if MPI.COMM_WORLD.size > 1: raise RuntimeError("parallel test can't be run within parallel environment") marker = item.get_marker("parallel") @@ -66,7 +66,6 @@ def wrapper(*args, **kwargs): def pytest_runtest_setup(item): - from mpi4py import MPI if item.get_marker("parallel"): if MPI.COMM_WORLD.size > 1: # Ensure source hash checking is enabled. @@ -78,7 +77,6 @@ def pytest_runtest_setup(item): def pytest_runtest_call(item): - from mpi4py import MPI if item.get_marker("parallel") and MPI.COMM_WORLD.size == 1: # Spawn parallel processes to run test parallel(item)