提交 f769c31d authored 作者: Frédéric Bastien's avatar Frédéric Bastien 提交者: GitHub

Merge pull request #6479 from abergeron/no_mpi_gpu

Don't initialize the GPU in MPI subprocesses.
......@@ -2,8 +2,6 @@
BUILDBOT_DIR=$WORKSPACE/nightly_build
THEANO_PARAM="theano --with-timer --timer-top-n 10"
# Exclude MPI tests that cannot complete properly
THEANO_PARAM="${THEANO_PARAM} -e test_mpi_roundtrip"
export THEANO_FLAGS=init_gpu_device=cuda
# CUDA
......
......@@ -2,8 +2,6 @@
BUILDBOT_DIR=$WORKSPACE/nightly_build
THEANO_PARAM="theano --with-timer --timer-top-n 10 -v"
# Exclude MPI tests that cannot complete properly
THEANO_PARAM="${THEANO_PARAM} -e test_mpi_roundtrip"
export THEANO_FLAGS=init_gpu_device=cuda
# CUDA
......
......@@ -2,8 +2,6 @@
BUILDBOT_DIR=$WORKSPACE/nightly_build
THEANO_PARAM="theano --with-timer --timer-top-n 10"
# Exclude MPI tests that cannot complete properly
THEANO_PARAM="${THEANO_PARAM} -e test_mpi_roundtrip"
COMPILEDIR=$HOME/.theano/buildbot_theano_python3
# Set test reports using nosetests xunit
XUNIT="--with-xunit --xunit-file="
......
......@@ -46,17 +46,18 @@ def test_mpi_roundtrip():
if not mpi_enabled:
raise SkipTest('MPI not enabled')
theano_root = theano.__file__.split('__init__')[0]
d = {}
if PY3:
# Is some not understood cases, the subprocess never finish.
d = dict(timeout=5*60)
env = os.environ.copy()
flags = env['THEANO_FLAGS']
keep_flags = ','.join((f for f in flags.split(',') if not f.startswith('init_gpu_device')))
env['THEANO_FLAGS'] = keep_flags
p = subprocess.Popen("mpiexec -np 2 python " + theano_root +
"tensor/tests/_test_mpi_roundtrip.py",
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
shell=True,
close_fds=True, **d)
close_fds=True,
env=env)
(stdout, stderr) = p.communicate()
result = theano.compat.decode(stdout)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论