提交 3fed5572 authored 作者: Matthew Rocklin's avatar Matthew Rocklin

add check in tests if mpi is not enabled

上级 7a6a2712
from theano.tensor.io import (send, recv, mpi_cmps, MPISend, MPISendWait, from theano.tensor.io import (send, recv, mpi_cmps, MPISend, MPISendWait,
mpi_send_wait_cmp, mpi_tag_cmp) mpi_send_wait_cmp, mpi_tag_cmp, mpi_enabled)
import theano import theano
import subprocess import subprocess
import os import os
...@@ -36,6 +36,8 @@ def test_mpi_roundtrip(): ...@@ -36,6 +36,8 @@ def test_mpi_roundtrip():
# "theano/tensor/tests/_test_mpi_roundtrip.py"), # "theano/tensor/tests/_test_mpi_roundtrip.py"),
# stdout=subprocess.PIPE) # stdout=subprocess.PIPE)
# assert p.stdout.read() == "True" # assert p.stdout.read() == "True"
if not mpi_enabled:
return
result = os.popen("mpiexec -np 2 python " result = os.popen("mpiexec -np 2 python "
"theano/tensor/tests/_test_mpi_roundtrip.py").read() "theano/tensor/tests/_test_mpi_roundtrip.py").read()
assert result == "True" assert result == "True"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论