diff options
author | Nicolas Richart <nicolas.richart@epfl.ch> | 2016-06-01 15:58:00 +0200 |
---|---|---|
committer | Nicolas Richart <nicolas.richart@epfl.ch> | 2016-06-01 15:58:00 +0200 |
commit | 0451c8e55f35c58adef120a986e8782abb3155eb (patch) | |
tree | e127b60c7b05c71bc9307ac511e04caa178ef14d /var | |
parent | 1eed2ee985ea2dfb8bce77d437728d8d7b7ad6ef (diff) | |
download | spack-0451c8e55f35c58adef120a986e8782abb3155eb.tar.gz spack-0451c8e55f35c58adef120a986e8782abb3155eb.tar.bz2 spack-0451c8e55f35c58adef120a986e8782abb3155eb.tar.xz spack-0451c8e55f35c58adef120a986e8782abb3155eb.zip |
Addapting the mvapich2@2.1: configure options for slurm
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/mvapich2/package.py | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index f4997bdfa1..e871d0cd2b 100644 --- a/var/spack/repos/builtin/packages/mvapich2/package.py +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -124,10 +124,19 @@ class Mvapich2(Package): raise RuntimeError(" %s : 'slurm' cannot be activated together with other process managers" % self.name) process_manager_options = [] + # See: http://slurm.schedmd.com/mpi_guide.html#mvapich2 if self.enabled(Mvapich2.SLURM) in spec: - process_manager_options = [ - "--with-pm=slurm" - ] + if self.version > Version('2.0'): + process_manager_options = [ + "--with-pmi=pmi2", + "--with-pm=slurm" + ] + else: + process_manager_options = [ + "--with-pmi=slurm", + "--with-pm=no" + ] + elif has_slurm_incompatible_variants: pms = [] # The variant name is equal to the process manager name in the configuration options @@ -164,6 +173,11 @@ class Mvapich2(Package): configure_args.extend(network_options) + def setup_environment(self, spack_env, run_env): + if self.enabled(Mvapich2.SLURM) in self.spec and \ + self.version > Version('2.0'): + run_env.set('SLURM_MPI_TYPE', 'pmi2') + def setup_dependent_environment(self, spack_env, run_env, extension_spec): spack_env.set('MPICH_CC', spack_cc) spack_env.set('MPICH_CXX', spack_cxx) @@ -176,7 +190,7 @@ class Mvapich2(Package): self.spec.mpicxx = join_path(self.prefix.bin, 'mpicxx') self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') self.spec.mpif77 = join_path(self.prefix.bin, 'mpif77') - + def install(self, spec, prefix): # we'll set different configure flags depending on our environment configure_args = [ |