2019-01-01 14:04:23 +08:00
|
|
|
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
|
2018-10-08 04:52:23 +08:00
|
|
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
2016-05-12 12:22:25 +08:00
|
|
|
#
|
2018-10-08 04:52:23 +08:00
|
|
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
|
|
|
2014-11-07 16:20:39 +08:00
|
|
|
from spack import *
|
|
|
|
|
2016-08-10 16:50:00 +08:00
|
|
|
|
2017-05-10 06:58:44 +08:00
|
|
|
class Qthreads(AutotoolsPackage):
|
2014-11-07 16:20:39 +08:00
|
|
|
"""The qthreads API is designed to make using large numbers of
|
|
|
|
threads convenient and easy, and to allow portable access to
|
|
|
|
threading constructs used in massively parallel shared memory
|
|
|
|
environments. The API maps well to both MTA-style threading and
|
|
|
|
PIM-style threading, and we provide an implementation of this
|
|
|
|
interface in both a standard SMP context as well as the SST
|
|
|
|
context. The qthreads API provides access to full/empty-bit
|
|
|
|
(FEB) semantics, where every word of memory can be marked
|
|
|
|
either full or empty, and a thread can wait for any word to
|
|
|
|
attain either state."""
|
|
|
|
homepage = "http://www.cs.sandia.gov/qthreads/"
|
|
|
|
|
2016-09-09 21:56:11 +08:00
|
|
|
url = "https://github.com/Qthreads/qthreads/releases/download/1.10/qthread-1.10.tar.bz2"
|
2019-10-11 13:44:41 +08:00
|
|
|
version("1.14", sha256="16f15e5b2e35b6329a857d24c283a1e43cd49921ee49a1446d4f31bf9c6f5cf9")
|
|
|
|
version("1.12", sha256="2c13a5f6f45bc2f22038d272be2e748e027649d3343a9f824da9e86a88b594c9")
|
|
|
|
version("1.11", sha256="dbde6c7cb7de7e89921e47363d09cecaebf775c9d090496c2be8350355055571")
|
|
|
|
version("1.10", sha256="29fbc2e54bcbc814c1be13049790ee98c505f22f22ccee34b7c29a4295475656")
|
2014-11-07 16:20:39 +08:00
|
|
|
|
2016-09-29 03:22:02 +08:00
|
|
|
patch("restrict.patch", when="@:1.10")
|
|
|
|
patch("trap.patch", when="@:1.10")
|
2016-04-20 04:45:05 +08:00
|
|
|
|
2019-06-29 02:43:06 +08:00
|
|
|
variant(
|
|
|
|
'hwloc',
|
|
|
|
default=True,
|
|
|
|
description='hwloc support'
|
|
|
|
)
|
|
|
|
|
|
|
|
depends_on("hwloc@1.0:1.99", when="+hwloc")
|
2016-08-29 11:18:24 +08:00
|
|
|
|
2017-05-10 06:58:44 +08:00
|
|
|
def configure_args(self):
|
|
|
|
spec = self.spec
|
2019-06-29 02:43:06 +08:00
|
|
|
if "+hwloc" in self.spec:
|
|
|
|
args = [
|
|
|
|
"--enable-guard-pages",
|
|
|
|
"--with-topology=hwloc",
|
|
|
|
"--with-hwloc=%s" % spec["hwloc"].prefix]
|
|
|
|
else:
|
|
|
|
args = ["--with-topology=no"]
|
2017-05-10 06:58:44 +08:00
|
|
|
return args
|