提交 94948511 authored 作者: notoraptor's avatar notoraptor

Skip MPI test instead of just return if it cannot run.

上级 501817f8
...@@ -8,6 +8,8 @@ from theano.gof.sched import sort_schedule_fn ...@@ -8,6 +8,8 @@ from theano.gof.sched import sort_schedule_fn
from theano import change_flags from theano import change_flags
from nose.plugins.skip import SkipTest
mpi_scheduler = sort_schedule_fn(*mpi_cmps) mpi_scheduler = sort_schedule_fn(*mpi_cmps)
mpi_linker = theano.OpWiseCLinker(schedule=mpi_scheduler) mpi_linker = theano.OpWiseCLinker(schedule=mpi_scheduler)
mpi_mode = theano.Mode(linker=mpi_linker) mpi_mode = theano.Mode(linker=mpi_linker)
...@@ -41,7 +43,7 @@ def test_can_make_function(): ...@@ -41,7 +43,7 @@ def test_can_make_function():
def test_mpi_roundtrip(): def test_mpi_roundtrip():
if not mpi_enabled: if not mpi_enabled:
return raise SkipTest('MPI not enabled')
theano_root = theano.__file__.split('__init__')[0] theano_root = theano.__file__.split('__init__')[0]
p = subprocess.Popen("mpiexec -np 2 python " + theano_root + p = subprocess.Popen("mpiexec -np 2 python " + theano_root +
"tensor/tests/_test_mpi_roundtrip.py", "tensor/tests/_test_mpi_roundtrip.py",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论