提交 4db5662f authored 作者: Matthew Rocklin's avatar Matthew Rocklin

use theano.__file__ in mpi_test

One of the mpi tests needs to run a file in the theano file system. It is now pointed to that file through the theano.__file__ attribute.
上级 234f7460
......@@ -38,8 +38,9 @@ def test_mpi_roundtrip():
# assert p.stdout.read() == "True"
if not mpi_enabled:
return
sin, sout, serr = os.popen3("mpiexec -np 2 python "
"theano/tensor/tests/_test_mpi_roundtrip.py")
theano_root = theano.__file__.split('__init__')[0]
sin, sout, serr = os.popen3("mpiexec -np 2 python " + theano_root +
"tensor/tests/_test_mpi_roundtrip.py")
result = sout.read()
assert "True" in result
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论