From 6b27aebeb429d1f7c2bb450c49cd43270d1d007e Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 23 Feb 2023 11:18:54 -0800 Subject: [PATCH 01/11] colify.py: get rid of **kwargs (#35641) `colify` is an old module in Spack that still uses `**kwargs` liberally. We should be more explicit. Doing this eliminates the need for many checks (can't pass the wrong arg if it isn't allowed) and makes the function documentation more clear. --- lib/spack/llnl/util/tty/colify.py | 95 +++++++++++++++++++------------ 1 file changed, 60 insertions(+), 35 deletions(-) diff --git a/lib/spack/llnl/util/tty/colify.py b/lib/spack/llnl/util/tty/colify.py index 3ab7d9978a3..d22be2a2e1f 100644 --- a/lib/spack/llnl/util/tty/colify.py +++ b/lib/spack/llnl/util/tty/colify.py @@ -11,6 +11,7 @@ import io import os import sys +from typing import IO, Any, List, Optional from llnl.util.tty import terminal_size from llnl.util.tty.color import cextra, clen @@ -97,7 +98,16 @@ def config_uniform_cols(elts, console_width, padding, cols=0): return config -def colify(elts, **options): +def colify( + elts: List[Any], + cols: int = 0, + output: Optional[IO] = None, + indent: int = 0, + padding: int = 2, + tty: Optional[bool] = None, + method: str = "variable", + console_cols: Optional[int] = None, +): """Takes a list of elements as input and finds a good columnization of them, similar to how gnu ls does. This supports both uniform-width and variable-width (tighter) columns. @@ -106,31 +116,21 @@ def colify(elts, **options): using ``str()``. Keyword Arguments: - output (typing.IO): A file object to write to. Default is ``sys.stdout`` - indent (int): Optionally indent all columns by some number of spaces - padding (int): Spaces between columns. Default is 2 - width (int): Width of the output. Default is 80 if tty not detected - cols (int): Force number of columns. Default is to size to terminal, or + output: A file object to write to. Default is ``sys.stdout`` + indent: Optionally indent all columns by some number of spaces + padding: Spaces between columns. Default is 2 + width: Width of the output. Default is 80 if tty not detected + cols: Force number of columns. Default is to size to terminal, or single-column if no tty - tty (bool): Whether to attempt to write to a tty. Default is to autodetect a + tty: Whether to attempt to write to a tty. Default is to autodetect a tty. Set to False to force single-column output - method (str): Method to use to fit columns. Options are variable or uniform. + method: Method to use to fit columns. Options are variable or uniform. Variable-width columns are tighter, uniform columns are all the same width and fit less data on the screen + console_cols: number of columns on this console (default: autodetect) """ - # Get keyword arguments or set defaults - cols = options.pop("cols", 0) - output = options.pop("output", sys.stdout) - indent = options.pop("indent", 0) - padding = options.pop("padding", 2) - tty = options.pop("tty", None) - method = options.pop("method", "variable") - console_cols = options.pop("width", None) - - if options: - raise TypeError( - "'%s' is an invalid keyword argument for this function." % next(options.iterkeys()) - ) + if output is None: + output = sys.stdout # elts needs to be an array of strings so we can count the elements elts = [str(elt) for elt in elts] @@ -153,10 +153,11 @@ def colify(elts, **options): cols = 1 # Specify the number of character columns to use. - if not console_cols: + if console_cols is None: console_rows, console_cols = terminal_size() - elif type(console_cols) != int: + elif not isinstance(console_cols, int): raise ValueError("Number of columns must be an int") + console_cols = max(1, console_cols - indent) # Choose a method. Variable-width colums vs uniform-width. @@ -192,7 +193,13 @@ def colify(elts, **options): return (config.cols, tuple(config.widths)) -def colify_table(table, **options): +def colify_table( + table: List[List[Any]], + output: Optional[IO] = None, + indent: int = 0, + padding: int = 2, + console_cols: Optional[int] = None, +): """Version of ``colify()`` for data expressed in rows, (list of lists). Same as regular colify but: @@ -218,20 +225,38 @@ def transpose(): for row in table: yield row[i] - if "cols" in options: - raise ValueError("Cannot override columsn in colify_table.") - options["cols"] = columns - - # don't reduce to 1 column for non-tty - options["tty"] = True - - colify(transpose(), **options) + colify( + transpose(), + cols=columns, # this is always the number of cols in the table + tty=True, # don't reduce to 1 column for non-tty + output=output, + indent=indent, + padding=padding, + console_cols=console_cols, + ) -def colified(elts, **options): +def colified( + elts: List[Any], + cols: int = 0, + output: Optional[IO] = None, + indent: int = 0, + padding: int = 2, + tty: Optional[bool] = None, + method: str = "variable", + console_cols: Optional[int] = None, +): """Invokes the ``colify()`` function but returns the result as a string instead of writing it to an output string.""" sio = io.StringIO() - options["output"] = sio - colify(elts, **options) + colify( + elts, + cols=cols, + output=sio, + indent=indent, + padding=padding, + tty=tty, + method=method, + console_cols=console_cols, + ) return sio.getvalue() From d286146c641ce826eeb67089bd3e24912406e51b Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Thu, 23 Feb 2023 17:09:28 -0800 Subject: [PATCH 02/11] WarpX 23.02 (#35633) Update `warpx` & `py-warpx` to the latest release. --- var/spack/repos/builtin/packages/py-warpx/package.py | 4 +++- var/spack/repos/builtin/packages/warpx/package.py | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-warpx/package.py b/var/spack/repos/builtin/packages/py-warpx/package.py index fefdf2355e6..bb4782bbe59 100644 --- a/var/spack/repos/builtin/packages/py-warpx/package.py +++ b/var/spack/repos/builtin/packages/py-warpx/package.py @@ -18,7 +18,7 @@ class PyWarpx(PythonPackage): """ homepage = "https://ecp-warpx.github.io" - url = "https://github.com/ECP-WarpX/WarpX/archive/refs/tags/23.01.tar.gz" + url = "https://github.com/ECP-WarpX/WarpX/archive/refs/tags/23.02.tar.gz" git = "https://github.com/ECP-WarpX/WarpX.git" maintainers("ax3l", "dpgrote", "RemiLehe") @@ -27,6 +27,7 @@ class PyWarpx(PythonPackage): # NOTE: if you update the versions here, also see warpx version("develop", branch="development") + version("23.02", sha256="a6c63ebc38cbd224422259a814be501ac79a3b734dab7f59500b6957cddaaac1") version("23.01", sha256="e853d01c20ea00c8ddedfa82a31a11d9d91a7f418d37d7f064cf8a241ea4da0c") version("22.12", sha256="96019902cd6ea444a1ae515e8853048e9074822c168021e4ec1687adc72ef062") version("22.11", sha256="528f65958f2f9e60a094e54eede698e871ccefc89fa103fe2a6f22e4a059515e") @@ -53,6 +54,7 @@ class PyWarpx(PythonPackage): variant("mpi", default=True, description="Enable MPI support") for v in [ + "23.02", "23.01", "22.12", "22.11", diff --git a/var/spack/repos/builtin/packages/warpx/package.py b/var/spack/repos/builtin/packages/warpx/package.py index ae954da9bb7..850a37495ae 100644 --- a/var/spack/repos/builtin/packages/warpx/package.py +++ b/var/spack/repos/builtin/packages/warpx/package.py @@ -17,7 +17,7 @@ class Warpx(CMakePackage): """ homepage = "https://ecp-warpx.github.io" - url = "https://github.com/ECP-WarpX/WarpX/archive/refs/tags/23.01.tar.gz" + url = "https://github.com/ECP-WarpX/WarpX/archive/refs/tags/23.02.tar.gz" git = "https://github.com/ECP-WarpX/WarpX.git" maintainers("ax3l", "dpgrote", "MaxThevenet", "RemiLehe") @@ -25,6 +25,7 @@ class Warpx(CMakePackage): # NOTE: if you update the versions here, also see py-warpx version("develop", branch="development") + version("23.02", sha256="a6c63ebc38cbd224422259a814be501ac79a3b734dab7f59500b6957cddaaac1") version("23.01", sha256="e853d01c20ea00c8ddedfa82a31a11d9d91a7f418d37d7f064cf8a241ea4da0c") version("22.12", sha256="96019902cd6ea444a1ae515e8853048e9074822c168021e4ec1687adc72ef062") version("22.11", sha256="528f65958f2f9e60a094e54eede698e871ccefc89fa103fe2a6f22e4a059515e") From 07897900ebb1278113a696675a158ae6d5b3e41b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius?= Date: Sat, 25 Feb 2023 02:22:17 -0300 Subject: [PATCH 03/11] ompss-2 dependencies (#35642) --- var/spack/repos/builtin/packages/ompss-2/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/ompss-2/package.py b/var/spack/repos/builtin/packages/ompss-2/package.py index a786288b76e..55efe7633a4 100644 --- a/var/spack/repos/builtin/packages/ompss-2/package.py +++ b/var/spack/repos/builtin/packages/ompss-2/package.py @@ -31,6 +31,8 @@ class Ompss2(Package): depends_on("python", type="build") depends_on("cmake", type="build") depends_on("extrae", when="+extrae") + depends_on("boost@1.59.0:") + depends_on("numactl") resource( name="jemalloc", @@ -105,6 +107,8 @@ def install_nanos6(self, spec, prefix): "--prefix=%s" % prefix, "--with-jemalloc=%s" % prefix, "--with-hwloc=%s" % spec["hwloc"].prefix, + "--with-boost=%s" % spec["boost"].prefix, + "--with-libnuma=%s" % spec["numactl"].prefix, "--disable-stats-instrumentation", "--disable-verbose-instrumentation", "--disable-lint-instrumentation", From 4e13b5374fc48685dbe9ad6cac1d28839d83d8a2 Mon Sep 17 00:00:00 2001 From: Alberto Invernizzi <9337627+albestro@users.noreply.github.com> Date: Sat, 25 Feb 2023 06:32:33 +0100 Subject: [PATCH 04/11] fix dump problem (#35673) if dump file existed it was not truncating the file, resulting in a file with unaltered filesize, with the new content at the beginning, "padded" with the tail of the old content, since the new content was not enough to overwrite it. --- lib/spack/spack/util/environment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/util/environment.py b/lib/spack/spack/util/environment.py index c85b8822531..cad8552f7bd 100644 --- a/lib/spack/spack/util/environment.py +++ b/lib/spack/spack/util/environment.py @@ -138,7 +138,7 @@ def dump_environment(path, environment=None): use_env = environment or os.environ hidden_vars = set(["PS1", "PWD", "OLDPWD", "TERM_SESSION_ID"]) - fd = os.open(path, os.O_WRONLY | os.O_CREAT, 0o600) + fd = os.open(path, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o600) with os.fdopen(fd, "w") as env_file: for var, val in sorted(use_env.items()): env_file.write( From b0b4a05d44883260b82c0978a01494fdb968b7d3 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sun, 26 Feb 2023 23:22:48 -0700 Subject: [PATCH 05/11] py-nbqa: add new package (#35707) --- .../repos/builtin/packages/py-nbqa/package.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-nbqa/package.py diff --git a/var/spack/repos/builtin/packages/py-nbqa/package.py b/var/spack/repos/builtin/packages/py-nbqa/package.py new file mode 100644 index 00000000000..0d9683b45b8 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-nbqa/package.py @@ -0,0 +1,21 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class PyNbqa(PythonPackage): + """Run any standard Python code quality tool on a Jupyter Notebook.""" + + homepage = "https://github.com/nbQA-dev/nbQA" + pypi = "nbqa/nbqa-1.6.3.tar.gz" + + version("1.6.3", sha256="5394a29fc6d27b9a950c0a36d2d9de25de980be9acfe2a3f3aea0d27b5f7fec1") + + depends_on("python@3.8:", type=("build", "run")) + depends_on("py-setuptools", type="build") + depends_on("py-ipython@7.8:", type=("build", "run")) + depends_on("py-tokenize-rt@3.2:", type=("build", "run")) + depends_on("py-tomli", type=("build", "run")) From 313c7386c4ede8a3df7f698df49fde81367731a0 Mon Sep 17 00:00:00 2001 From: Alex Richert <82525672+AlexanderRichert-NOAA@users.noreply.github.com> Date: Sun, 26 Feb 2023 22:26:50 -0800 Subject: [PATCH 06/11] go: set GOMAXPROCS to limit number of build processes (#35703) --- var/spack/repos/builtin/packages/go/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py index 8f3647c06fa..9d798a7d8c7 100644 --- a/var/spack/repos/builtin/packages/go/package.py +++ b/var/spack/repos/builtin/packages/go/package.py @@ -116,6 +116,7 @@ def setup_build_environment(self, env): # internal Spack wrappers and fail. env.set("CC_FOR_TARGET", self.compiler.cc) env.set("CXX_FOR_TARGET", self.compiler.cxx) + env.set("GOMAXPROCS", make_jobs) def setup_dependent_package(self, module, dependent_spec): """Called before go modules' install() methods. From 6ab792fb03226eb6d26a090de89573866c98b245 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Mon, 27 Feb 2023 00:35:30 -0600 Subject: [PATCH 07/11] hdf5-vol-cache: add v1.1 (#35685) --- var/spack/repos/builtin/packages/hdf5-vol-cache/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/hdf5-vol-cache/package.py b/var/spack/repos/builtin/packages/hdf5-vol-cache/package.py index 62616e4de20..1010d540b1d 100644 --- a/var/spack/repos/builtin/packages/hdf5-vol-cache/package.py +++ b/var/spack/repos/builtin/packages/hdf5-vol-cache/package.py @@ -14,6 +14,7 @@ class Hdf5VolCache(CMakePackage): maintainers("hyoklee", "lrknox") version("default", branch="develop") + version("v1.1", tag="v1.1") version("v1.0", tag="v1.0") depends_on("hdf5-vol-async") From a4b949492b09199a14424ed439c5105b8b8c9975 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 27 Feb 2023 00:38:27 -0600 Subject: [PATCH 08/11] r-twosamplemr: add new package and dependencies (#35683) --- .../packages/r-arrangements/package.py | 27 ++++++++++ .../builtin/packages/r-googleauthr/package.py | 28 ++++++++++ .../builtin/packages/r-ieugwasr/package.py | 26 ++++++++++ .../builtin/packages/r-iterpc/package.py | 29 +++++++++++ .../r-mendelianrandomization/package.py | 32 ++++++++++++ .../repos/builtin/packages/r-meta/package.py | 33 ++++++++++++ .../builtin/packages/r-metadat/package.py | 21 ++++++++ .../builtin/packages/r-metafor/package.py | 39 ++++++++++++++ .../builtin/packages/r-mr-raps/package.py | 24 +++++++++ .../packages/r-mrinstruments/package.py | 19 +++++++ .../repos/builtin/packages/r-mrmix/package.py | 18 +++++++ .../builtin/packages/r-mrpresso/package.py | 21 ++++++++ .../builtin/packages/r-radialmr/package.py | 23 +++++++++ .../builtin/packages/r-twosamplemr/package.py | 51 +++++++++++++++++++ 14 files changed, 391 insertions(+) create mode 100644 var/spack/repos/builtin/packages/r-arrangements/package.py create mode 100644 var/spack/repos/builtin/packages/r-googleauthr/package.py create mode 100644 var/spack/repos/builtin/packages/r-ieugwasr/package.py create mode 100644 var/spack/repos/builtin/packages/r-iterpc/package.py create mode 100644 var/spack/repos/builtin/packages/r-mendelianrandomization/package.py create mode 100644 var/spack/repos/builtin/packages/r-meta/package.py create mode 100644 var/spack/repos/builtin/packages/r-metadat/package.py create mode 100644 var/spack/repos/builtin/packages/r-metafor/package.py create mode 100644 var/spack/repos/builtin/packages/r-mr-raps/package.py create mode 100644 var/spack/repos/builtin/packages/r-mrinstruments/package.py create mode 100644 var/spack/repos/builtin/packages/r-mrmix/package.py create mode 100644 var/spack/repos/builtin/packages/r-mrpresso/package.py create mode 100644 var/spack/repos/builtin/packages/r-radialmr/package.py create mode 100644 var/spack/repos/builtin/packages/r-twosamplemr/package.py diff --git a/var/spack/repos/builtin/packages/r-arrangements/package.py b/var/spack/repos/builtin/packages/r-arrangements/package.py new file mode 100644 index 00000000000..d8138743722 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-arrangements/package.py @@ -0,0 +1,27 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RArrangements(RPackage): + """Fast Generators and Iterators for Permutations, Combinations, Integer + Partitions and Compositions. + + Fast generators and iterators for permutations, combinations, integer + partitions and compositions. The arrangements are in lexicographical order + and generated iteratively in a memory efficient manner. It has been + demonstrated that 'arrangements' outperforms most existing packages of + similar kind. Benchmarks could be found at + .""" + + cran = "arrangements" + + version("1.1.9", sha256="e9b5dcb185ec9b28201b196384b04a8d5a15f4ddb9e0b0b2a0c718635ff7345b") + + depends_on("r@3.4.0:", type=("build", "run")) + depends_on("r-gmp", type=("build", "run")) + depends_on("r-r6", type=("build", "run")) + depends_on("gmp@4.2.3:") diff --git a/var/spack/repos/builtin/packages/r-googleauthr/package.py b/var/spack/repos/builtin/packages/r-googleauthr/package.py new file mode 100644 index 00000000000..d31fd7f0c19 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-googleauthr/package.py @@ -0,0 +1,28 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RGoogleauthr(RPackage): + """Authenticate and Create Google APIs. + + Create R functions that interact with OAuth2 Google APIs + easily, with auto-refresh + and Shiny compatibility.""" + + cran = "googleAuthR" + + version("2.0.0", sha256="ba504baf3bde2e1b3e988bee7602df5765cc6ca542cf0ab76a782c4e60966feb") + + depends_on("r@3.3.0:", type=("build", "run")) + depends_on("r-assertthat", type=("build", "run")) + depends_on("r-cli", type=("build", "run")) + depends_on("r-digest", type=("build", "run")) + depends_on("r-gargle@1.2.0:", type=("build", "run")) + depends_on("r-httr@1.4.0:", type=("build", "run")) + depends_on("r-jsonlite@1.6:", type=("build", "run")) + depends_on("r-memoise@1.1.0:", type=("build", "run")) + depends_on("r-rlang", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/r-ieugwasr/package.py b/var/spack/repos/builtin/packages/r-ieugwasr/package.py new file mode 100644 index 00000000000..bce36046bba --- /dev/null +++ b/var/spack/repos/builtin/packages/r-ieugwasr/package.py @@ -0,0 +1,26 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RIeugwasr(RPackage): + """R Interface to the OpenGWAS Database API. + + R interface to the OpenGWAS database API. Includes a wrapper + to make generic calls to the API, plus convenience functions for + specific queries.""" + + homepage = "https://github.com/MRCIEU/ieugwasr" + url = "https://github.com/MRCIEU/ieugwasr/archive/refs/tags/0.1.5.tar.gz" + + version("0.1.5", sha256="8d900d5a780f23836c80191f9635fbf48a0ca94f828452948c0f445e3217f422") + + depends_on("r@3.6.0:", type=("build", "run")) + depends_on("r-magrittr", type=("build", "run")) + depends_on("r-googleauthr", type=("build", "run")) + depends_on("r-dplyr", type=("build", "run")) + depends_on("r-httr", type=("build", "run")) + depends_on("r-jsonlite", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/r-iterpc/package.py b/var/spack/repos/builtin/packages/r-iterpc/package.py new file mode 100644 index 00000000000..f038fe32492 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-iterpc/package.py @@ -0,0 +1,29 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RIterpc(RPackage): + """Efficient Iterator for Permutations and Combinations. + + Iterator for generating permutations and combinations. They can be either + drawn with or without replacement, or with distinct/ non-distinct items + (multiset). The generated sequences are in lexicographical order + (dictionary order). The algorithms to generate permutations and + combinations are memory efficient. These iterative algorithms enable users + to process all sequences without putting all results in the memory at the + same time. The algorithms are written in C/C++ for faster performance. + Note: 'iterpc' is no longer being maintained. Users are recommended to + switch to 'arrangements'.""" + + cran = "iterpc" + + version("0.4.2", sha256="38bd464042a27536f676e889263eb2c257a431b59083f58cb54473f42ba2071b") + + depends_on("r@3.0.0:", type=("build", "run")) + depends_on("r-iterators", type=("build", "run")) + depends_on("r-gmp@0.5-12:", type=("build", "run")) + depends_on("r-arrangements@1.0.0:", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/r-mendelianrandomization/package.py b/var/spack/repos/builtin/packages/r-mendelianrandomization/package.py new file mode 100644 index 00000000000..ed7b9a905b3 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-mendelianrandomization/package.py @@ -0,0 +1,32 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RMendelianrandomization(RPackage): + """Mendelian Randomization Package. + + Encodes several methods for performing Mendelian randomization analyses + with summarized data. Summarized data on genetic associations with the + exposure and with the outcome can be obtained from large consortia. These + data can be used for obtaining causal estimates using instrumental variable + methods.""" + + cran = "MendelianRandomization" + + version("0.7.0", sha256="cad7cc1b6964fc7d299864378694c5fd947caa83796a1958e581299796b854c7") + + depends_on("r@3.0.1:", type=("build", "run")) + depends_on("r-knitr", type=("build", "run")) + depends_on("r-rmarkdown", type=("build", "run")) + depends_on("r-plotly@3.6.0:", type=("build", "run")) + depends_on("r-ggplot2@1.0.1:", type=("build", "run")) + depends_on("r-robustbase@0.92-6:", type=("build", "run")) + depends_on("r-matrix@1.2:", type=("build", "run")) + depends_on("r-iterpc@0.3:", type=("build", "run")) + depends_on("r-quantreg@5.01:", type=("build", "run")) + depends_on("r-rjson", type=("build", "run")) + depends_on("r-glmnet", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/r-meta/package.py b/var/spack/repos/builtin/packages/r-meta/package.py new file mode 100644 index 00000000000..b82dce10896 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-meta/package.py @@ -0,0 +1,33 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RMeta(RPackage): + """General Package for Meta-Analysis. + + User-friendly general package providing standard methods for meta-analysis + and supporting Schwarzer, Carpenter, and Rücker + , "Meta-Analysis with R" (2015): - common + effect and random effects meta-analysis; - several plots (forest, funnel, + Galbraith / radial, L'Abbe, Baujat, bubble); - three-level meta-analysis + model; - generalised linear mixed model; - Hartung-Knapp method for random + effects model; - Kenward-Roger method for random effects model; - + prediction interval; - statistical tests for funnel plot asymmetry; - + trim-and-fill method to evaluate bias in meta-analysis; - meta-regression; + - cumulative meta-analysis and leave-one-out meta-analysis; - import data + from 'RevMan 5'; - produce forest plot summarising several (subgroup) + meta-analyses.""" + + cran = "meta" + + version("6.2-0", sha256="8ec8fb412996bbe17d3ca073f15c191a77bad486b08f39d7b8c2d07360ad5781") + + depends_on("r@4.0.0:", type=("build", "run")) + depends_on("r-metafor@3.0-0:", type=("build", "run")) + depends_on("r-lme4", type=("build", "run")) + depends_on("r-compquadform", type=("build", "run")) + depends_on("r-xml2", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/r-metadat/package.py b/var/spack/repos/builtin/packages/r-metadat/package.py new file mode 100644 index 00000000000..71e24954181 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-metadat/package.py @@ -0,0 +1,21 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RMetadat(RPackage): + """Meta-Analysis Datasets. + + A collection of meta-analysis datasets for teaching purposes, + illustrating/testing meta-analytic methods, and validating published + analyses.""" + + cran = "metadat" + + version("1.2-0", sha256="f0cce5e30c3d256eaf5a41e4f52ffc7108e195016a4b99409e0ab4c2ef58f5b8") + + depends_on("r@4.0.0:", type=("build", "run")) + depends_on("r-mathjaxr", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/r-metafor/package.py b/var/spack/repos/builtin/packages/r-metafor/package.py new file mode 100644 index 00000000000..534c80fa478 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-metafor/package.py @@ -0,0 +1,39 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RMetafor(RPackage): + """Meta-Analysis Package for R. + + A comprehensive collection of functions for conducting meta-analyses in R. + The package includes functions to calculate various effect sizes or outcome + measures, fit equal-, fixed-, random-, and mixed-effects models to such + data, carry out moderator and meta-regression analyses, and create various + types of meta-analytical plots (e.g., forest, funnel, radial, L'Abbe, + Baujat, bubble, and GOSH plots). For meta-analyses of binomial and + person-time data, the package also provides functions that implement + specialized methods, including the Mantel-Haenszel method, Peto's method, + and a variety of suitable generalized linear (mixed-effects) models (i.e., + mixed-effects logistic and Poisson regression models). Finally, the package + provides functionality for fitting meta-analytic multivariate/multilevel + models that account for non-independent sampling errors and/or true effects + (e.g., due to the inclusion of multiple treatment studies, multiple + endpoints, or other forms of clustering). Network meta-analyses and + meta-analyses accounting for known correlation structures (e.g., due to + phylogenetic relatedness) can also be conducted. An introduction to the + package can be found in Viechtbauer (2010) .""" + + cran = "metafor" + + version("3.8-1", sha256="d694577f954144d8a5eeab6521fe1c87e68ddf9ecfd7ccc915d01533371b0514") + + depends_on("r@4.0.0:", type=("build", "run")) + depends_on("r-matrix", type=("build", "run")) + depends_on("r-metadat", type=("build", "run")) + depends_on("r-nlme", type=("build", "run")) + depends_on("r-mathjaxr", type=("build", "run")) + depends_on("r-pbapply", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/r-mr-raps/package.py b/var/spack/repos/builtin/packages/r-mr-raps/package.py new file mode 100644 index 00000000000..496756f9164 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-mr-raps/package.py @@ -0,0 +1,24 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RMrRaps(RPackage): + """Two Sample Mendelian Randomization using Robust Adjusted Profile Score. + + Mendelian randomization is a method of identifying and estimating a + confounded causal effect using genetic instrumental variables. This + packages implements methods for two-sample Mendelian randomization with + summary statistics by using Robust Adjusted Profile Score (RAPS). + References: Qingyuan Zhao, Jingshu Wang, Jack Bowden, Dylan S. Small. + Statistical inference in two-sample summary-data Mendelian randomization + using robust adjusted profile score. .""" + + cran = "mr.raps" + + version("0.2", sha256="c899f6143dac99e1232ff0a8d9f5fe099d4f69960782e6843db5b0d7f4f63b19") + + depends_on("r-nortest", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/r-mrinstruments/package.py b/var/spack/repos/builtin/packages/r-mrinstruments/package.py new file mode 100644 index 00000000000..d80922c1cab --- /dev/null +++ b/var/spack/repos/builtin/packages/r-mrinstruments/package.py @@ -0,0 +1,19 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RMrinstruments(RPackage): + """Data sources for genetic instruments to be used in MR. + + Datasets of eQTLs, GWAS catalogs, etc.""" + + homepage = "https://github.com/MRCIEU/MRInstruments" + url = "https://github.com/MRCIEU/MRInstruments/archive/refs/tags/0.3.3.tar.gz" + + version("0.3.3", sha256="4ddbaf6335133e8f7baef469d6bc1f89212462b9f4062c9e4ddda37b12eb3486") + + depends_on("r@2.10:", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/r-mrmix/package.py b/var/spack/repos/builtin/packages/r-mrmix/package.py new file mode 100644 index 00000000000..d6c51a75416 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-mrmix/package.py @@ -0,0 +1,18 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RMrmix(RPackage): + """Mendelian Randomization Analysis Using Mixture Models (MRMix). + + This package gives robust estimation of causal effects by conducting + Mendelian randomization analysis using a mixture model approach.""" + + homepage = "https://github.com/gqi/MRMix" + git = "https://github.com/gqi/MRMix" + + version("0.1.0", commit="56afdb2bc96760842405396f5d3f02e60e305039") diff --git a/var/spack/repos/builtin/packages/r-mrpresso/package.py b/var/spack/repos/builtin/packages/r-mrpresso/package.py new file mode 100644 index 00000000000..7d4ab68341d --- /dev/null +++ b/var/spack/repos/builtin/packages/r-mrpresso/package.py @@ -0,0 +1,21 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RMrpresso(RPackage): + """Performs the Mendelian Randomization Pleiotropy RESidual Sum and Outlier + (MR-PRESSO) test. + + MR-PRESSO (Mendelian Randomization Pleiotropy RESidual Sum and Outlier) is + a framework that allows for the evaluation of pleiotropy in + multi-instrument Mendelian Randomization utilizing genome-wide summary + association statistics.""" + + homepage = "https://github.com/rondolab/MR-PRESSO" + git = "https://github.com/rondolab/MR-PRESSO" + + version("1.0", commit="cece763b47e59763a7916974de43c7cb93843e41") diff --git a/var/spack/repos/builtin/packages/r-radialmr/package.py b/var/spack/repos/builtin/packages/r-radialmr/package.py new file mode 100644 index 00000000000..301bd60fc17 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-radialmr/package.py @@ -0,0 +1,23 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RRadialmr(RPackage): + """RadialMR. + + A package for implementing radial inverse variance weighted and MR-Egger + methods.""" + + homepage = "https://github.com/WSpiller/RadialMR" + git = "https://github.com/WSpiller/RadialMR" + + version("1.0", commit="d63d3fc8270836ab441b9e14a5ba3eeb2795d7cb") + + depends_on("r@3.5.0:", type=("build", "run")) + depends_on("r-ggplot2", type=("build", "run")) + depends_on("r-magrittr", type=("build", "run")) + depends_on("r-plotly", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/r-twosamplemr/package.py b/var/spack/repos/builtin/packages/r-twosamplemr/package.py new file mode 100644 index 00000000000..7ca1bc9a221 --- /dev/null +++ b/var/spack/repos/builtin/packages/r-twosamplemr/package.py @@ -0,0 +1,51 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RTwosamplemr(RPackage): + """Two Sample MR functions and interface to MR Base database. + + A package for performing Mendelian randomization using GWAS summary data. + It uses the IEU GWAS database to obtain data automatically, and a wide + range of methods to run the analysis. You can use the MR-Base web app to + try out a limited range of the functionality in this package, but for any + serious work we strongly recommend using this R package.""" + + homepage = "https://mrcieu.github.io/TwoSampleMR/" + url = "https://github.com/MRCIEU/TwoSampleMR/archive/refs/tags/v0.5.6.tar.gz" + + version("0.5.6", sha256="c63eb008ab7ed08a6f30ccbf0c299beb31b2f5835e5e2aa1b59c5e4fe284a30c") + + depends_on("r@3.6.0:", type=("build", "run")) + depends_on("r-ieugwasr@0.1.5:", type=("build", "run")) + depends_on("r-ggplot2", type=("build", "run")) + depends_on("r-gridextra", type=("build", "run")) + depends_on("r-cowplot", type=("build", "run")) + depends_on("r-plyr", type=("build", "run")) + depends_on("r-reshape2", type=("build", "run")) + depends_on("r-stringr", type=("build", "run")) + depends_on("r-knitr", type=("build", "run")) + depends_on("r-markdown", type=("build", "run")) + depends_on("r-gtable", type=("build", "run")) + depends_on("r-rmarkdown", type=("build", "run")) + depends_on("r-mendelianrandomization", type=("build", "run")) + depends_on("r-dplyr", type=("build", "run")) + depends_on("r-mr-raps", type=("build", "run")) + depends_on("r-psych", type=("build", "run")) + depends_on("r-magrittr", type=("build", "run")) + depends_on("r-car", type=("build", "run")) + depends_on("r-randomforest", type=("build", "run")) + depends_on("r-meta", type=("build", "run")) + depends_on("r-data-table", type=("build", "run")) + depends_on("r-mrpresso", type=("build", "run")) + depends_on("r-mrinstruments", type=("build", "run")) + depends_on("r-radialmr", type=("build", "run")) + depends_on("r-mrmix", type=("build", "run")) + depends_on("r-glmnet", type=("build", "run")) + depends_on("r-lattice", type=("build", "run")) + depends_on("r-pbapply", type=("build", "run")) + depends_on("r-mass", type=("build", "run")) From f00431161131757bf69b992660a552bf38531907 Mon Sep 17 00:00:00 2001 From: Howard Pritchard Date: Mon, 27 Feb 2023 01:57:36 -0700 Subject: [PATCH 09/11] OpenMPI: add the 4.1.5 release (#35677) Signed-off-by: Howard Pritchard --- var/spack/repos/builtin/packages/openmpi/package.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index d9112884c32..f2d4640742b 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -42,10 +42,13 @@ class Openmpi(AutotoolsPackage, CudaPackage): # Current version( - "4.1.4", sha256="92912e175fd1234368c8730c03f4996fe5942e7479bb1d10059405e7f2b3930d" - ) # libmpi.so.40.30.4 + "4.1.5", sha256="a640986bc257389dd379886fdae6264c8cfa56bc98b71ce3ae3dfbd8ce61dbe3" + ) # libmpi.so.40.30.5 # Still supported + version( + "4.1.4", sha256="92912e175fd1234368c8730c03f4996fe5942e7479bb1d10059405e7f2b3930d" + ) # libmpi.so.40.30.4 version( "4.1.3", sha256="3d81d04c54efb55d3871a465ffb098d8d72c1f48ff1cbaf2580eb058567c0a3b" ) # libmpi.so.40.30.3 From 9b46e92e13f94f5a165adc1abd4a7e6fffe3d650 Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Mon, 27 Feb 2023 04:36:28 -0500 Subject: [PATCH 10/11] Celeritas: new versions 0.2.1 and 0.1.5 (#35704) * celeritas: new versions 0.1.5 and 0.2.1 * celeritas: deprecate old versions --- .../builtin/packages/celeritas/package.py | 42 +++++++++++++++---- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/celeritas/package.py b/var/spack/repos/builtin/packages/celeritas/package.py index 188cf554ff2..8ca11349e61 100644 --- a/var/spack/repos/builtin/packages/celeritas/package.py +++ b/var/spack/repos/builtin/packages/celeritas/package.py @@ -17,12 +17,38 @@ class Celeritas(CMakePackage, CudaPackage, ROCmPackage): maintainers("sethrj") - version("0.2.0", sha256="12af28fda0e482a9eba89781b4ead445cf6f170bc1b8d88cc814e49b1ec09e9f") - version("0.1.4", sha256="ea82a03fc750a2a805f87afd9ac944109dd7537edb5c0c370f93d332d4cd47db") - version("0.1.3", sha256="992c49a48adba884fe3933c9624da5bf480ef0694809430ae98903f2c28cc881") - version("0.1.2", sha256="d123ea2e34267adba387d46bae8c9a1146a2e047f87f2ea5f823878c1684678d") - version("0.1.1", sha256="a1d58e29226e89a2330d69c40049d61e7c885cf991824e60ff8c9ccc95fc5ec6") - version("0.1.0", sha256="46692977b9b31d73662252cc122d7f016f94139475788bca7fdcb97279b93af8") + version("0.2.1", sha256="b3717b43f70dd0da848139da4171ca7a887bb6777908845b6d953d47b1f4db41") + version( + "0.2.0", + sha256="12af28fda0e482a9eba89781b4ead445cf6f170bc1b8d88cc814e49b1ec09e9f", + deprecated=True, + ) + version("0.1.5", sha256="5e63b9ce7fcfe34a8938565b84453bce51fa6639d1ede13bb59d41de6431cef4") + version( + "0.1.4", + sha256="ea82a03fc750a2a805f87afd9ac944109dd7537edb5c0c370f93d332d4cd47db", + deprecated=True, + ) + version( + "0.1.3", + sha256="992c49a48adba884fe3933c9624da5bf480ef0694809430ae98903f2c28cc881", + deprecated=True, + ) + version( + "0.1.2", + sha256="d123ea2e34267adba387d46bae8c9a1146a2e047f87f2ea5f823878c1684678d", + deprecated=True, + ) + version( + "0.1.1", + sha256="a1d58e29226e89a2330d69c40049d61e7c885cf991824e60ff8c9ccc95fc5ec6", + deprecated=True, + ) + version( + "0.1.0", + sha256="46692977b9b31d73662252cc122d7f016f94139475788bca7fdcb97279b93af8", + deprecated=True, + ) _cxxstd_values = ("14", "17") @@ -49,7 +75,8 @@ class Celeritas(CMakePackage, CudaPackage, ROCmPackage): depends_on("cmake@3.22:", type="build", when="+rocm") depends_on("nlohmann-json") - depends_on("geant4@10.6:", when="+geant4") + depends_on("geant4@10.7:11.0", when="@:0.2.0 +geant4") + depends_on("geant4@10.6:11.0", when="@0.2.1: +geant4") depends_on("hepmc3", when="+hepmc3") depends_on("root", when="+root") depends_on("swig", when="+swig") @@ -68,6 +95,7 @@ class Celeritas(CMakePackage, CudaPackage, ROCmPackage): depends_on("vecgeom +gdml@1.1.17:", when="+vecgeom") depends_on("vecgeom +cuda", when="+vecgeom +cuda") + conflicts("cxxstd=14", when="@0.3:") conflicts("+rocm", when="+cuda", msg="AMD and NVIDIA accelerators are incompatible") conflicts("+rocm", when="+vecgeom", msg="HIP support is only available with ORANGE") conflicts("^vecgeom+shared@1.2.0", when="+vecgeom +cuda") From 773fd5ad849f90620508a34dc9eab52ddf55ca6d Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 27 Feb 2023 10:50:48 +0100 Subject: [PATCH 11/11] hpctoolkit: fix broken patches (#35711) The patches don't have a stable checksum. --- ...62544717873432c49ef45c7cb99cc5de2fb8.patch | 91 ++++++++++++ ...fd95b01d743edc5940c84e0079f462b2c23e.patch | 130 ++++++++++++++++++ .../builtin/packages/hpctoolkit/package.py | 10 +- 3 files changed, 223 insertions(+), 8 deletions(-) create mode 100644 var/spack/repos/builtin/packages/hpctoolkit/411d62544717873432c49ef45c7cb99cc5de2fb8.patch create mode 100644 var/spack/repos/builtin/packages/hpctoolkit/511afd95b01d743edc5940c84e0079f462b2c23e.patch diff --git a/var/spack/repos/builtin/packages/hpctoolkit/411d62544717873432c49ef45c7cb99cc5de2fb8.patch b/var/spack/repos/builtin/packages/hpctoolkit/411d62544717873432c49ef45c7cb99cc5de2fb8.patch new file mode 100644 index 00000000000..7cc956ac6b1 --- /dev/null +++ b/var/spack/repos/builtin/packages/hpctoolkit/411d62544717873432c49ef45c7cb99cc5de2fb8.patch @@ -0,0 +1,91 @@ +From 411d62544717873432c49ef45c7cb99cc5de2fb8 Mon Sep 17 00:00:00 2001 +From: "Mark W. Krentel" +Date: Thu, 15 Dec 2022 16:43:43 -0600 +Subject: [PATCH] Add a temporary hack to allow both ROCM 5.2/5.3 to build + cleanly. + +There were some corner cases (build 5.3 pieces from spack and feed +into autotools) that didn't work. After the next release, I will want +to rework ROCM configure more extensively. +--- + configure | 21 +++++++++++++-------- + configure.ac | 17 +++++++++++------ + 2 files changed, 24 insertions(+), 14 deletions(-) + +diff --git a/configure b/configure +index 1760e678e8..814376b3bd 100755 +--- a/configure ++++ b/configure +@@ -23891,10 +23891,13 @@ $as_echo "$as_me: found $ROCM/rocprofiler/lib/librocprofiler64.so" >&6;} + fi + + # HSA +- if test -f "$ROCM/include/hsa/hsa.h" ; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: found $ROCM/include/hsa/hsa.h" >&5 +-$as_echo "$as_me: found $ROCM/include/hsa/hsa.h" >&6;} +- ROCM_HSA_IFLAGS="-I$ROCM/include/hsa" ++ # FIXME: as of rocm 5.2/5.3, this was not fully switched over, ++ # so temporarily use both paths. ++ if test -f "$ROCM/include/hsa/hsa.h" || test -f "$ROCM/include/hsa.h" ++ then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: found $ROCM: hsa.h" >&5 ++$as_echo "$as_me: found $ROCM: hsa.h" >&6;} ++ ROCM_HSA_IFLAGS="-I$ROCM/include -I$ROCM/include/hsa" + ROCM_HSA_INC_MESG="$ROCM/hsa" + found=yes + fi +@@ -24020,10 +24023,12 @@ case "$ROCM_HSA" in + require_rocm=yes + found=no + +- if test -f "$ROCM_HSA/include/hsa/hsa.h" ; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: found $ROCM_HSA/include/hsa/hsa.h" >&5 +-$as_echo "$as_me: found $ROCM_HSA/include/hsa/hsa.h" >&6;} +- ROCM_HSA_IFLAGS="-I$ROCM_HSA/include/hsa" ++ # FIXME: again, temporarily use both paths ++ if test -f "$ROCM_HSA/include/hsa/hsa.h" || test -f "$ROCM_HSA/include/hsa.h" ++ then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: found $ROCM_HSA: hsa.h" >&5 ++$as_echo "$as_me: found $ROCM_HSA: hsa.h" >&6;} ++ ROCM_HSA_IFLAGS="-I$ROCM_HSA/include -I$ROCM_HSA/include/hsa" + ROCM_HSA_INC_MESG="$ROCM_HSA" + found=yes + fi +diff --git a/configure.ac b/configure.ac +index a14b15835f..9d5ed46134 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4885,9 +4885,12 @@ case "$ROCM" in + fi + + # HSA +- if test -f "$ROCM/include/hsa/hsa.h" ; then +- AC_MSG_NOTICE([found $ROCM/include/hsa/hsa.h]) +- ROCM_HSA_IFLAGS="-I$ROCM/include/hsa" ++ # FIXME: as of rocm 5.2/5.3, this was not fully switched over, ++ # so temporarily use both paths. ++ if test -f "$ROCM/include/hsa/hsa.h" || test -f "$ROCM/include/hsa.h" ++ then ++ AC_MSG_NOTICE([found $ROCM: hsa.h]) ++ ROCM_HSA_IFLAGS="-I$ROCM/include -I$ROCM/include/hsa" + ROCM_HSA_INC_MESG="$ROCM/hsa" + found=yes + fi +@@ -5002,9 +5005,11 @@ case "$ROCM_HSA" in + require_rocm=yes + found=no + +- if test -f "$ROCM_HSA/include/hsa/hsa.h" ; then +- AC_MSG_NOTICE([found $ROCM_HSA/include/hsa/hsa.h]) +- ROCM_HSA_IFLAGS="-I$ROCM_HSA/include/hsa" ++ # FIXME: again, temporarily use both paths ++ if test -f "$ROCM_HSA/include/hsa/hsa.h" || test -f "$ROCM_HSA/include/hsa.h" ++ then ++ AC_MSG_NOTICE([found $ROCM_HSA: hsa.h]) ++ ROCM_HSA_IFLAGS="-I$ROCM_HSA/include -I$ROCM_HSA/include/hsa" + ROCM_HSA_INC_MESG="$ROCM_HSA" + found=yes + fi +-- +GitLab + diff --git a/var/spack/repos/builtin/packages/hpctoolkit/511afd95b01d743edc5940c84e0079f462b2c23e.patch b/var/spack/repos/builtin/packages/hpctoolkit/511afd95b01d743edc5940c84e0079f462b2c23e.patch new file mode 100644 index 00000000000..03bdd0aedf1 --- /dev/null +++ b/var/spack/repos/builtin/packages/hpctoolkit/511afd95b01d743edc5940c84e0079f462b2c23e.patch @@ -0,0 +1,130 @@ +From 511afd95b01d743edc5940c84e0079f462b2c23e Mon Sep 17 00:00:00 2001 +From: "Mark W. Krentel" +Date: Tue, 18 May 2021 14:54:41 -0500 +Subject: [PATCH] Cleanup some usage for gcc/g++ 11.x (#413) + +1. Change epsilon to hpc_epsilon in prof/Metric header files. This + conflicted with using epsilon in some STL template libraries. + + 2. Add const to some comparison operators that are used in some STL + maps. +--- + src/lib/banal/Struct-Inline.hpp | 6 +++--- + src/lib/prof/Metric-AExpr.cpp | 4 ++-- + src/lib/prof/Metric-AExpr.hpp | 2 +- + src/lib/prof/Metric-AExprIncr.hpp | 6 +++--- + src/lib/support/StringTable.hpp | 2 +- + 5 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/src/lib/banal/Struct-Inline.hpp b/src/lib/banal/Struct-Inline.hpp +index ffb93355fd..0099ad112d 100644 +--- a/src/lib/banal/Struct-Inline.hpp ++++ b/src/lib/banal/Struct-Inline.hpp +@@ -150,14 +150,14 @@ public: + pretty_index = strTab.str2index(node.getPrettyName()); + } + +- bool operator == (const FLPIndex rhs) ++ bool operator == (const FLPIndex rhs) const + { + return file_index == rhs.file_index + && line_num == rhs.line_num + && pretty_index == rhs.pretty_index; + } + +- bool operator != (const FLPIndex rhs) ++ bool operator != (const FLPIndex rhs) const + { + return ! (*this == rhs); + } +@@ -167,7 +167,7 @@ public: + // Compare (file, line, proc) indices lexigraphically. + class FLPCompare { + public: +- bool operator() (const FLPIndex t1, const FLPIndex t2) ++ bool operator() (const FLPIndex t1, const FLPIndex t2) const + { + if (t1.file_index < t2.file_index) { return true; } + if (t1.file_index > t2.file_index) { return false; } +diff --git a/src/lib/prof/Metric-AExpr.cpp b/src/lib/prof/Metric-AExpr.cpp +index 2ce43e6d39..5b32ff67d1 100644 +--- a/src/lib/prof/Metric-AExpr.cpp ++++ b/src/lib/prof/Metric-AExpr.cpp +@@ -483,7 +483,7 @@ CoefVar::eval(const Metric::IData& mdata) const + double sdev = sqrt(v_m.first); // always non-negative + double mean = v_m.second; + double z = 0.0; +- if (mean > epsilon) { ++ if (mean > hpc_epsilon) { + z = sdev / mean; + } + +@@ -522,7 +522,7 @@ RStdDev::eval(const Metric::IData& mdata) const + double sdev = sqrt(v_m.first); // always non-negative + double mean = v_m.second; + double z = 0.0; +- if (mean > epsilon) { ++ if (mean > hpc_epsilon) { + z = (sdev / mean) * 100; + } + +diff --git a/src/lib/prof/Metric-AExpr.hpp b/src/lib/prof/Metric-AExpr.hpp +index 56359cc9df..d75189f763 100644 +--- a/src/lib/prof/Metric-AExpr.hpp ++++ b/src/lib/prof/Metric-AExpr.hpp +@@ -97,7 +97,7 @@ + + //**************************************************************************** + +-#define epsilon (0.000001) ++#define hpc_epsilon (0.000001) + + namespace Prof { + +diff --git a/src/lib/prof/Metric-AExprIncr.hpp b/src/lib/prof/Metric-AExprIncr.hpp +index f1b38d7f74..d0c0feb7e6 100644 +--- a/src/lib/prof/Metric-AExprIncr.hpp ++++ b/src/lib/prof/Metric-AExprIncr.hpp +@@ -97,7 +97,7 @@ + + //**************************************************************************** + +-#define epsilon (0.000001) ++#define hpc_epsilon (0.000001) + + namespace Prof { + +@@ -841,7 +841,7 @@ public: + double sdev = finalizeStdDev(mdata); + double mean = accumVar(1, mdata); + double z = 0.0; +- if (mean > epsilon) { ++ if (mean > hpc_epsilon) { + z = sdev / mean; + } + accumVar(0, mdata) = z; +@@ -927,7 +927,7 @@ public: + double sdev = finalizeStdDev(mdata); + double mean = accumVar(1, mdata); + double z = 0.0; +- if (mean > epsilon) { ++ if (mean > hpc_epsilon) { + z = (sdev / mean) * 100; + } + accumVar(0, mdata) = z; +diff --git a/src/lib/support/StringTable.hpp b/src/lib/support/StringTable.hpp +index 9930bc5649..36ce5b7fa9 100644 +--- a/src/lib/support/StringTable.hpp ++++ b/src/lib/support/StringTable.hpp +@@ -75,7 +75,7 @@ namespace HPC { + // compare the strings, not the pointers + class StringCompare { + public: +- bool operator() (const std::string *s1, const std::string *s2) ++ bool operator() (const std::string *s1, const std::string *s2) const + { + return *s1 < *s2; + } +-- +GitLab + diff --git a/var/spack/repos/builtin/packages/hpctoolkit/package.py b/var/spack/repos/builtin/packages/hpctoolkit/package.py index bb87c841af8..66972f39388 100644 --- a/var/spack/repos/builtin/packages/hpctoolkit/package.py +++ b/var/spack/repos/builtin/packages/hpctoolkit/package.py @@ -162,17 +162,11 @@ class Hpctoolkit(AutotoolsPackage): # Fix the build for old revs with gcc 10.x. patch("gcc10-enum.patch", when="@2020.01.01:2020.08 %gcc@10.0:") - patch( - "https://gitlab.com/hpctoolkit/hpctoolkit/-/commit/511afd95b01d743edc5940c84e0079f462b2c23e.patch", - sha256="8da18df88a80847c092da8d0892de51ea2bf2523124148b6305ab8717707d897", - when="@2019.08.01:2021.03 %gcc@11.0:", - ) + patch("511afd95b01d743edc5940c84e0079f462b2c23e.patch", when="@2019.08.01:2021.03 %gcc@11.0:") # Update configure for rocm 5.3.0 patch( - "https://gitlab.com/hpctoolkit/hpctoolkit/-/commit/411d62544717873432c49ef45c7cb99cc5de2fb8.patch", - sha256="484045891a665cdba3b0f141540c89f0d691ed32c5912ef62a93670d44c2786c", - when="@2022.04:2022.10 +rocm ^hip@5.3.0:", + "411d62544717873432c49ef45c7cb99cc5de2fb8.patch", when="@2022.04:2022.10 +rocm ^hip@5.3.0:" ) # Change python to python3 for some old revs that use a script