hwloc: updated package (#7483)

This includes:

* Added latest available versions (1.11.9, 2.0.0)
* Added variants to enable graphical output from lstopo
* Enabled build of the bundled netloc package if @2.0.0:
* Added dependency from numactl if @:1.11.9
* Added a constraint to avoid using  hwloc@2.0.0 with openmpi
This commit is contained in:
Massimiliano Culpo 2018-03-15 10:16:33 +01:00 committed by GitHub
parent 30b8dfbeba
commit cf4b3f2af6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 51 additions and 25 deletions

View file

@ -28,22 +28,28 @@
class Hwloc(AutotoolsPackage):
"""The Portable Hardware Locality (hwloc) software package
provides a portable abstraction (across OS, versions,
architectures, ...) of the hierarchical topology of modern
architectures, including NUMA memory nodes, sockets, shared
caches, cores and simultaneous multithreading. It also gathers
various system attributes such as cache and memory information
as well as the locality of I/O devices such as network
interfaces, InfiniBand HCAs or GPUs. It primarily aims at
helping applications with gathering information about modern
computing hardware so as to exploit it accordingly and
efficiently."""
"""The Hardware Locality (hwloc) software project.
The Portable Hardware Locality (hwloc) software package
provides a portable abstraction (across OS, versions,
architectures, ...) of the hierarchical topology of modern
architectures, including NUMA memory nodes, sockets, shared
caches, cores and simultaneous multithreading. It also gathers
various system attributes such as cache and memory information
as well as the locality of I/O devices such as network
interfaces, InfiniBand HCAs or GPUs. It primarily aims at
helping applications with gathering information about modern
computing hardware so as to exploit it accordingly and
efficiently.
"""
homepage = "http://www.open-mpi.org/projects/hwloc/"
url = "http://www.open-mpi.org/software/hwloc/v1.9/downloads/hwloc-1.9.tar.gz"
list_url = "http://www.open-mpi.org/software/hwloc/"
list_depth = 2
version('2.0.0', '027e6928ae0b5b64c821d0a71a61cd82')
version('1.11.9', '4d5f5da8b1d09731d82e865ecf3fa399')
version('1.11.8', 'a0fa1c9109a4d8b4b6568e62cc9b6e30')
version('1.11.7', '867a5266675e5bf1ef4ab66c459653f8')
version('1.11.6', 'b4e95eadd2fbdb6d40bbd96be6f03c84')
@ -59,25 +65,37 @@ class Hwloc(AutotoolsPackage):
variant('pci', default=(sys.platform != 'darwin'),
description="Support analyzing devices on PCI bus")
variant('shared', default=True, description="Build shared libraries")
variant(
'cairo',
default=False,
description='Enable the Cairo back-end of hwloc\'s lstopo command'
)
depends_on('pkgconfig', type='build')
depends_on('cuda', when='+cuda')
depends_on('libpciaccess', when='+pci')
depends_on('libxml2', when='+libxml2')
depends_on('pkgconfig', type='build')
depends_on('cairo', when='+cairo')
depends_on('numactl', when='@:1.11.9')
def url_for_version(self, version):
return "http://www.open-mpi.org/software/hwloc/v%s/downloads/hwloc-%s.tar.gz" % (version.up_to(2), version)
def configure_args(self):
spec = self.spec
args = [
"--enable-cuda" if '+cuda' in spec else "--disable-cuda",
"--enable-libxml2" if '+libxml2' in spec else "--disable-libxml2",
"--enable-pci" if '+pci' in spec else "--disable-pci",
"--enable-shared" if '+shared' in spec else "--disable-shared",
# Disable OpenCL, since hwloc might pick up an OpenCL
# library at build time that is then not found at run time
# (Alternatively, we could require OpenCL as dependency.)
"--disable-opencl",
]
if '@2.0.0:' in self.spec:
args.append('--enable-netloc')
args.extend(self.enable_or_disable('cairo'))
args.extend(self.enable_or_disable('cuda'))
args.extend(self.enable_or_disable('libxml2'))
args.extend(self.enable_or_disable('pci'))
args.extend(self.enable_or_disable('shared'))
return args

View file

@ -65,14 +65,16 @@ def _mxm_dir():
class Openmpi(AutotoolsPackage):
"""The Open MPI Project is an open source Message Passing Interface
implementation that is developed and maintained by a consortium
of academic, research, and industry partners. Open MPI is
therefore able to combine the expertise, technologies, and
resources from all across the High Performance Computing
community in order to build the best MPI library available.
Open MPI offers advantages for system and software vendors,
application developers and computer science researchers.
"""An open source Message Passing Interface implementation.
The Open MPI Project is an open source Message Passing Interface
implementation that is developed and maintained by a consortium
of academic, research, and industry partners. Open MPI is
therefore able to combine the expertise, technologies, and
resources from all across the High Performance Computing
community in order to build the best MPI library available.
Open MPI offers advantages for system and software vendors,
application developers and computer science researchers.
"""
homepage = "http://www.open-mpi.org"
@ -204,6 +206,12 @@ class Openmpi(AutotoolsPackage):
provides('mpi@:3.1', when='@2.0.0:')
depends_on('hwloc')
# ompi@:3.0.0 doesn't support newer hwloc releases:
# "configure: error: OMPI does not currently support hwloc v2 API"
# Future ompi releases may support it, needs to be verified.
# See #7483 for context.
depends_on('hwloc@:1.999')
depends_on('hwloc +cuda', when='+cuda')
depends_on('java', when='+java')
depends_on('sqlite', when='+sqlite3@:1.11')