summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTomoki, Karatsu <49965247+t-karatsu@users.noreply.github.com>2020-06-23 15:54:54 +0900
committerGitHub <noreply@github.com>2020-06-23 08:54:54 +0200
commit1d10c6c73091c6130b3af696d4a9309497dcdd54 (patch)
treebd3548ff8bb6720d2e26acd21f5321bd781b8e8b /var
parent55f26b0ccb6f53d2a554730c343c6d24a340cc29 (diff)
downloadspack-1d10c6c73091c6130b3af696d4a9309497dcdd54.tar.gz
spack-1d10c6c73091c6130b3af696d4a9309497dcdd54.tar.bz2
spack-1d10c6c73091c6130b3af696d4a9309497dcdd54.tar.xz
spack-1d10c6c73091c6130b3af696d4a9309497dcdd54.zip
caffe: use MPI compiler when using hdf5+mpi (#17125)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/caffe/package.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/caffe/package.py b/var/spack/repos/builtin/packages/caffe/package.py
index 7df83b1d53..187bdc5764 100644
--- a/var/spack/repos/builtin/packages/caffe/package.py
+++ b/var/spack/repos/builtin/packages/caffe/package.py
@@ -81,4 +81,10 @@ class Caffe(CMakePackage):
version = spec['python'].version.up_to(1)
args.append('-Dpython_version=%s' % version)
+ if spec['hdf5'].satisfies('+mpi'):
+ args.extend([
+ '-DCMAKE_C_COMPILER={0}'.format(self.spec['mpi'].mpicc),
+ '-DCMAKE_CXX_COMPILER={0}'.format(self.spec['mpi'].mpicxx)
+ ])
+
return args