mvapich2: add registration cache and file systems variants (#7948)
* mvapich2: add registration cache and file systems variants, avoid empty --with-pm= if no process manager is specified, add missing leading dash in --disable-silent-rules
This commit is contained in:
		@@ -58,6 +58,9 @@ class Mvapich2(AutotoolsPackage):
 | 
				
			|||||||
    variant('cuda', default=False,
 | 
					    variant('cuda', default=False,
 | 
				
			||||||
            description='Enable CUDA extension')
 | 
					            description='Enable CUDA extension')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    variant('regcache', default=True,
 | 
				
			||||||
 | 
					            description='Enable memory registration cache')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Accepted values are:
 | 
					    # Accepted values are:
 | 
				
			||||||
    #   single      - No threads (MPI_THREAD_SINGLE)
 | 
					    #   single      - No threads (MPI_THREAD_SINGLE)
 | 
				
			||||||
    #   funneled    - Only the main thread calls MPI (MPI_THREAD_FUNNELED)
 | 
					    #   funneled    - Only the main thread calls MPI (MPI_THREAD_FUNNELED)
 | 
				
			||||||
@@ -105,6 +108,13 @@ class Mvapich2(AutotoolsPackage):
 | 
				
			|||||||
        description='Use alloca to allocate temporary memory if available'
 | 
					        description='Use alloca to allocate temporary memory if available'
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    variant(
 | 
				
			||||||
 | 
					        'file_systems',
 | 
				
			||||||
 | 
					        description='List of the ROMIO file systems to activate',
 | 
				
			||||||
 | 
					        values=('lustre', 'gpfs', 'nfs', 'ufs'),
 | 
				
			||||||
 | 
					        multi=True
 | 
				
			||||||
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    depends_on('bison', type='build')
 | 
					    depends_on('bison', type='build')
 | 
				
			||||||
    depends_on('libpciaccess', when=(sys.platform != 'darwin'))
 | 
					    depends_on('libpciaccess', when=(sys.platform != 'darwin'))
 | 
				
			||||||
    depends_on('cuda', when='+cuda')
 | 
					    depends_on('cuda', when='+cuda')
 | 
				
			||||||
@@ -121,7 +131,10 @@ def process_manager_options(self):
 | 
				
			|||||||
        for x in ('hydra', 'gforker', 'remshell'):
 | 
					        for x in ('hydra', 'gforker', 'remshell'):
 | 
				
			||||||
            if 'process_managers={0}'.format(x) in spec:
 | 
					            if 'process_managers={0}'.format(x) in spec:
 | 
				
			||||||
                other_pms.append(x)
 | 
					                other_pms.append(x)
 | 
				
			||||||
        opts = ['--with-pm=%s' % ':'.join(other_pms)]
 | 
					
 | 
				
			||||||
 | 
					        opts = []
 | 
				
			||||||
 | 
					        if len(other_pms) > 0:
 | 
				
			||||||
 | 
					            opts = ['--with-pm=%s' % ':'.join(other_pms)]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # See: http://slurm.schedmd.com/mpi_guide.html#mvapich2
 | 
					        # See: http://slurm.schedmd.com/mpi_guide.html#mvapich2
 | 
				
			||||||
        if 'process_managers=slurm' in spec:
 | 
					        if 'process_managers=slurm' in spec:
 | 
				
			||||||
@@ -152,6 +165,21 @@ def network_options(self):
 | 
				
			|||||||
            opts = ["--with-device=ch3:mrail", "--with-rdma=gen2"]
 | 
					            opts = ["--with-device=ch3:mrail", "--with-rdma=gen2"]
 | 
				
			||||||
        return opts
 | 
					        return opts
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @property
 | 
				
			||||||
 | 
					    def file_system_options(self):
 | 
				
			||||||
 | 
					        spec = self.spec
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        fs = []
 | 
				
			||||||
 | 
					        for x in ('lustre', 'gpfs', 'nfs', 'ufs'):
 | 
				
			||||||
 | 
					            if 'file_systems={0}'.format(x) in spec:
 | 
				
			||||||
 | 
					                fs.append(x)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        opts = []
 | 
				
			||||||
 | 
					        if len(fs) > 0:
 | 
				
			||||||
 | 
					            opts.append('--with-file-system=%s' % '+'.join(fs))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return opts
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def setup_environment(self, spack_env, run_env):
 | 
					    def setup_environment(self, spack_env, run_env):
 | 
				
			||||||
        spec = self.spec
 | 
					        spec = self.spec
 | 
				
			||||||
        if 'process_managers=slurm' in spec:
 | 
					        if 'process_managers=slurm' in spec:
 | 
				
			||||||
@@ -194,7 +222,7 @@ def configure_args(self):
 | 
				
			|||||||
        args = [
 | 
					        args = [
 | 
				
			||||||
            '--enable-shared',
 | 
					            '--enable-shared',
 | 
				
			||||||
            '--enable-romio',
 | 
					            '--enable-romio',
 | 
				
			||||||
            '-disable-silent-rules',
 | 
					            '--disable-silent-rules',
 | 
				
			||||||
            '--disable-new-dtags',
 | 
					            '--disable-new-dtags',
 | 
				
			||||||
            '--enable-fortran=all',
 | 
					            '--enable-fortran=all',
 | 
				
			||||||
            "--enable-threads={0}".format(spec.variants['threads'].value),
 | 
					            "--enable-threads={0}".format(spec.variants['threads'].value),
 | 
				
			||||||
@@ -224,6 +252,12 @@ def configure_args(self):
 | 
				
			|||||||
        else:
 | 
					        else:
 | 
				
			||||||
            args.append('--disable-cuda')
 | 
					            args.append('--disable-cuda')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if '+regcache' in self.spec:
 | 
				
			||||||
 | 
					            args.append('--enable-registration-cache')
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            args.append('--disable-registration-cache')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        args.extend(self.process_manager_options)
 | 
					        args.extend(self.process_manager_options)
 | 
				
			||||||
        args.extend(self.network_options)
 | 
					        args.extend(self.network_options)
 | 
				
			||||||
 | 
					        args.extend(self.file_system_options)
 | 
				
			||||||
        return args
 | 
					        return args
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user