diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/py-chainer/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/py-chainer/package.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/py-chainer/package.py b/var/spack/repos/builtin/packages/py-chainer/package.py index 1f78c76a30..538a5604f7 100644 --- a/var/spack/repos/builtin/packages/py-chainer/package.py +++ b/var/spack/repos/builtin/packages/py-chainer/package.py @@ -31,6 +31,8 @@ class PyChainer(PythonPackage): version("7.2.0", sha256="6e2fba648cc5b8a5421e494385b76fe5ec154f1028a1c5908557f5d16c04f0b3") version("6.7.0", sha256="87cb3378a35e7c5c695028ec91d58dc062356bc91412384ea939d71374610389") + depends_on("cxx", type="build") # generated + variant("mn", default=False, description="run with ChainerMN") depends_on("python@3.5.1:", when="@7:", type=("build", "run")) @@ -50,16 +52,16 @@ class PyChainer(PythonPackage): @run_after("install") def cache_test_sources(self): if "+mn" in self.spec: - self.cache_extra_test_sources("examples") + cache_extra_test_sources(self, "examples") def test_chainermn(self): """run the ChainerMN test""" if "+mn" not in self.spec: raise SkipTest("Test only supported when built with +mn") - mnist_file = join_path(self.install_test_root.examples.chainermn.mnist, "train_mnist.py") + mnist_file = join_path(install_test_root(self).examples.chainermn.mnist, "train_mnist.py") mpirun = which(self.spec["mpi"].prefix.bin.mpirun) - opts = ["-n", "4", self.spec["python"].command.path, mnist_file, "-o", "."] + opts = ["-n", "4", python.path, mnist_file, "-o", "."] env["OMP_NUM_THREADS"] = "4" mpirun(*opts) |