提交 1d039576 authored 作者: Frederic Bastien's avatar Frederic Bastien

Try to fix test_mpi_roundtrip tests not finising. Use Popen.communicate as it…

Try to fix test_mpi_roundtrip tests not finising. Use Popen.communicate as it can prevent OS deadlock from Python doc.
上级 4d0d68b5
......@@ -42,6 +42,7 @@ if rank == 0:
_, zz = f(xx)
same = np.linalg.norm(zz - expected) < .001
# The parent test will look for "True" in the output
stdout.write(str(same))
if rank == 1:
......
......@@ -52,8 +52,10 @@ def test_mpi_roundtrip():
stderr=subprocess.PIPE,
shell=True,
close_fds=True)
result = theano.compat.decode(p.stdout.read())
assert "True" in result, theano.compat.decode(p.stderr.read())
(stdout, stderr) = p.communicate()
result = theano.compat.decode(stdout)
assert "True" in result, theano.compat.decode(stderr)
def test_mpi_send_wait_cmp():
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论