Add cuda variant for mvapich2. (#4800)
* Add cuda variant for mvapich2. * Disable cuda for mvapich2 by default.
This commit is contained in:
parent
1cdb3c61ca
commit
8a06e3d867
@ -59,6 +59,9 @@ class Mvapich2(AutotoolsPackage):
|
|||||||
variant('debug', default=False,
|
variant('debug', default=False,
|
||||||
description='Enable debug info and error messages at run-time')
|
description='Enable debug info and error messages at run-time')
|
||||||
|
|
||||||
|
variant('cuda', default=False,
|
||||||
|
description='Enable CUDA extension')
|
||||||
|
|
||||||
# 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)
|
||||||
@ -100,9 +103,9 @@ class Mvapich2(AutotoolsPackage):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
# FIXME : CUDA support is missing
|
depends_on('bison', type='build')
|
||||||
depends_on('bison')
|
|
||||||
depends_on('libpciaccess', when=(sys.platform != 'darwin'))
|
depends_on('libpciaccess', when=(sys.platform != 'darwin'))
|
||||||
|
depends_on('cuda', when='+cuda')
|
||||||
|
|
||||||
def url_for_version(self, version):
|
def url_for_version(self, version):
|
||||||
base_url = "http://mvapich.cse.ohio-state.edu/download"
|
base_url = "http://mvapich.cse.ohio-state.edu/download"
|
||||||
@ -217,6 +220,14 @@ def configure_args(self):
|
|||||||
else:
|
else:
|
||||||
args.append('--enable-fast=all')
|
args.append('--enable-fast=all')
|
||||||
|
|
||||||
|
if '+cuda' in self.spec:
|
||||||
|
args.extend([
|
||||||
|
'--enable-cuda',
|
||||||
|
'--with-cuda={0}'.format(spec['cuda'].prefix)
|
||||||
|
])
|
||||||
|
else:
|
||||||
|
args.append('--disable-cuda')
|
||||||
|
|
||||||
args.extend(self.process_manager_options)
|
args.extend(self.process_manager_options)
|
||||||
args.extend(self.network_options)
|
args.extend(self.network_options)
|
||||||
return args
|
return args
|
||||||
|
Loading…
Reference in New Issue
Block a user