From 79251dde406b67ce696759a37cee6b46a410962a Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 4 Apr 2018 09:41:37 +0200 Subject: [PATCH] mvapich2: added version 2.3rc1 + variant to use alloca if available (#7595) * mvapich2: added version 2.3rc1 + variant to use alloca if available * mvapich2: removed version 1.9 + cleaned recipe --- .../ad_lustre_rwcontig_open_source.patch | 11 ----- .../builtin/packages/mvapich2/package.py | 40 ++++++++----------- 2 files changed, 16 insertions(+), 35 deletions(-) delete mode 100644 var/spack/repos/builtin/packages/mvapich2/ad_lustre_rwcontig_open_source.patch diff --git a/var/spack/repos/builtin/packages/mvapich2/ad_lustre_rwcontig_open_source.patch b/var/spack/repos/builtin/packages/mvapich2/ad_lustre_rwcontig_open_source.patch deleted file mode 100644 index ff85845cf8..0000000000 --- a/var/spack/repos/builtin/packages/mvapich2/ad_lustre_rwcontig_open_source.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/mpi/romio/adio/ad_lustre/ad_lustre_rwcontig.c 2013-12-10 12:05:44.806417000 -0800 -+++ b/src/mpi/romio/adio/ad_lustre/ad_lustre_rwcontig.c 2013-12-10 11:53:03.295622000 -0800 -@@ -8,7 +8,7 @@ - * Copyright (C) 2008 Sun Microsystems, Lustre group - */ - --#define _XOPEN_SOURCE 600 -+//#define _XOPEN_SOURCE 600 - #include - #include - #include "ad_lustre.h" diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index a141277ea4..e9864b90fc 100644 --- a/var/spack/repos/builtin/packages/mvapich2/package.py +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -41,20 +41,16 @@ class Mvapich2(AutotoolsPackage): url = "http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.2.tar.gz" list_url = "http://mvapich.cse.ohio-state.edu/downloads/" - # Newer alpha release + version('2.3rc1', '386d79ae36b2136d203826465ad8b6cc') version('2.3a', '87c3fbf8a755b53806fa9ecb21453445') # Prefer the latest stable release version('2.2', '939b65ebe5b89a5bc822cdab0f31f96e', preferred=True) version('2.1', '0095ceecb19bbb7fb262131cb9c2cdd6') version('2.0', '9fbb68a4111a8b6338e476dc657388b4') - version('1.9', '5dc58ed08fd3142c260b70fe297e127c') - - patch('ad_lustre_rwcontig_open_source.patch', when='@1.9') provides('mpi') - provides('mpi@:2.2', when='@1.9') # MVAPICH2-1.9 supports MPI 2.2 - provides('mpi@:3.0', when='@2.0:') # MVAPICH2-2.0 supports MPI 3.0 + provides('mpi@:3.0') variant('debug', default=False, description='Enable debug info and error messages at run-time') @@ -103,6 +99,12 @@ class Mvapich2(AutotoolsPackage): ) ) + variant( + 'alloca', + default=False, + description='Use alloca to allocate temporary memory if available' + ) + depends_on('bison', type='build') depends_on('libpciaccess', when=(sys.platform != 'darwin')) depends_on('cuda', when='+cuda') @@ -111,13 +113,6 @@ class Mvapich2(AutotoolsPackage): 'mpicc', 'mpicxx', 'mpif77', 'mpif90', 'mpifort', relative_root='bin' ) - def url_for_version(self, version): - base_url = "http://mvapich.cse.ohio-state.edu/download" - if version < Version('2.0'): - return "%s/mvapich2/mv2/mvapich2-%s.tar.gz" % (base_url, version) - else: - return "%s/mvapich/mv2/mvapich2-%s.tar.gz" % (base_url, version) - @property def process_manager_options(self): spec = self.spec @@ -130,16 +125,10 @@ def process_manager_options(self): # See: http://slurm.schedmd.com/mpi_guide.html#mvapich2 if 'process_managers=slurm' in spec: - if self.version > Version('2.0'): - opts = [ - '--with-pmi=pmi2', - '--with-pm=slurm' - ] - else: - opts = [ - '--with-pmi=slurm', - '--with-pm=no' - ] + opts = [ + '--with-pmi=pmi2', + '--with-pm=slurm' + ] return opts @@ -165,7 +154,7 @@ def network_options(self): def setup_environment(self, spack_env, run_env): spec = self.spec - if 'process_managers=slurm' in spec and spec.satisfies('@2.0:'): + if 'process_managers=slurm' in spec: run_env.set('SLURM_MPI_TYPE', 'pmi2') def setup_dependent_environment(self, spack_env, run_env, dependent_spec): @@ -206,12 +195,15 @@ def configure_args(self): '--enable-shared', '--enable-romio', '-disable-silent-rules', + '--disable-new-dtags', '--enable-fortran=all', "--enable-threads={0}".format(spec.variants['threads'].value), "--with-ch3-rank-bits={0}".format( spec.variants['ch3_rank_bits'].value), ] + args.extend(self.enable_or_disable('alloca')) + if '+debug' in self.spec: args.extend([ '--disable-fast',