diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/openmpi/package.py | 53 |
1 files changed, 34 insertions, 19 deletions
diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 776fb6eeaa..45cf71954b 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -26,10 +26,20 @@ class Openmpi(Package): patch('configure.patch', when="@1.10.0:1.10.1") variant('psm', default=False, description='Build support for the PSM library.') + variant('psm2', default=False, description='Build support for the Intel PSM2 library.') variant('verbs', default=False, description='Build support for OpenFabrics verbs.') + variant('mxm', default=False, description='Build Mellanox Messaging support') - # TODO : variant support for other schedulers is missing + variant('thread_multiple', default=False, description='Enable MPI_THREAD_MULTIPLE support') + + # TODO : variant support for alps, loadleveler is missing variant('tm', default=False, description='Build TM (Torque, PBSPro, and compatible) support') + variant('slurm', default=False, description='Build SLURM scheduler component') + + variant('pmi', default=False, description='Build PMI support, optionally adding DIR to the search path') + variant('sqlite3', default=False, description='Build sqlite3 support') + + # TODO : support for CUDA is missing provides('mpi@:2.2', when='@1.6.5') provides('mpi@:3.0', when='@1.7.5:') @@ -53,27 +63,35 @@ class Openmpi(Package): self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77') + @property + def verbs(self): + # Up through version 1.6, this option was previously named --with-openib + if self.spec.satisfies('@:1.6'): + return 'openib' + # In version 1.7, it was renamed to be --with-verbs + elif self.spec.satisfies('@1.7:'): + return 'verbs' def install(self, spec, prefix): config_args = ["--prefix=%s" % prefix, "--with-hwloc=%s" % spec['hwloc'].prefix, "--enable-shared", "--enable-static"] - - # Variants - if '+tm' in spec: - config_args.append("--with-tm") # necessary for Torque support - - if '+psm' in spec: - config_args.append("--with-psm") - - if '+verbs' in spec: - # Up through version 1.6, this option was previously named --with-openib - if spec.satisfies('@:1.6'): - config_args.append("--with-openib") - # In version 1.7, it was renamed to be --with-verbs - elif spec.satisfies('@1.7:'): - config_args.append("--with-verbs") + # Variant based arguments + config_args.extend([ + # Schedulers + '--with-tm' if '+tm' in spec else '--without-tm', + '--with-slurm' if '+slurm' in spec else '--without-slurm', + # Fabrics + '--with-psm' if '+psm' in spec else '--without-psm', + '--with-psm2' if '+psm2' in spec else '--without-psm2', + ('--with-%s' % self.verbs) if '+verbs' in spec else ('--without-%s' % self.verbs), + '--with-mxm' if '+mxm' in spec else '--without-mxm', + # Other options + '--enable-mpi-thread-multiple' if '+thread_multiple' in spec else '--disable-mpi-thread-multiple', + '--with-pmi' if '+pmi' in spec else '--without-pmi', + '--with-sqlite3' if '+sqlite3' in spec else '--without-sqlite3' + ]) # TODO: use variants for this, e.g. +lanl, +llnl, etc. # use this for LANL builds, but for LLNL builds, we need: @@ -81,9 +99,6 @@ class Openmpi(Package): if self.version == ver("1.6.5") and '+lanl' in spec: config_args.append("--with-platform=contrib/platform/lanl/tlcc2/optimized-nopanasas") - # TODO: Spack should make it so that you can't actually find - # these compilers if they're "disabled" for the current - # compiler configuration. if not self.compiler.f77 and not self.compiler.fc: config_args.append("--enable-mpi-fortran=no") |