Skip to content

Commit

Permalink
Merge pull request #611 from firedrakeproject/revert-prefork
Browse files Browse the repository at this point in the history
Revert prefork
  • Loading branch information
dham committed Oct 13, 2015
2 parents d092cab + 35696fa commit f68d725
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 0 additions & 5 deletions firedrake/__init__.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 1 addition & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand All @@ -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")
Expand Down Expand Up @@ -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.
Expand All @@ -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)
Expand Down

0 comments on commit f68d725

Please sign in to comment.