Compare commits

...

33 Commits

Author SHA1 Message Date
Peter Scheibel
72deb53832 Make spack clean env-aware (#44227)
`spack clean <spec>` will now resolve specs based on the active environment if one is active.

If an env is active but no matching spec is found, this will fall back on fully concretizing.
2024-05-24 15:00:50 -07:00
Massimiliano Culpo
7c87253fd8 Make strong preferences even stronger (#44373)
Before this PR, if Spack could see a possibility to reuse a spec that
doesn't match a strong preference, it would do so. After the PR, a
strong preference would take precedence.
2024-05-24 10:06:28 -07:00
Carsten Uphoff
1136aedd08 Add Khronos official OpenCL ICD loader (#44351)
* Add Khronos official OpenCL ICD loader

Signed-off-by: Carsten Uphoff <carsten.uphoff@intel.com>

* Formatting; add missing opencl-c-headers version

Signed-off-by: Carsten Uphoff <carsten.uphoff@intel.com>

* opencl-icd-loader: use define instead of f-string

Signed-off-by: Carsten Uphoff <carsten.uphoff@intel.com>

---------

Signed-off-by: Carsten Uphoff <carsten.uphoff@intel.com>
2024-05-24 09:57:39 -07:00
AMD Toolchain Support
24e1b56268 uprof: update recipe, add missing dependency (#44293) 2024-05-24 16:19:18 +02:00
Harmen Stoppels
eef6a79b35 Prefer libiconv for iconv (#44335)
`glibc` and `musl` provide a basic implementation of `iconv` (`iconv`,
`iconv_open`, `iconv_close`), but in practice the installation may be
missing the character encoding methods to make them usable. On Fedora
for example, users need to

```yum install glibc-gconv-extra```

to get the character encodings that `gettext` requires during configure,
namely EUC-JP. Users may not have permissions to install the missing
parts of glibc.

Since Spack can install `libiconv`, it is simpler to use that by
default.
2024-05-24 13:25:59 +02:00
Adam J. Stewart
556a36cbd7 py-scikit-learn: add v1.5.0 (#44303)
* py-scikit-learn: add v1.5.0

* Add maintainers

* py-scikit-learn-extra: latest py-scikit-learn not supported
2024-05-24 12:41:59 +02:00
Rocco Meli
8aa490d6b7 DLA-Future-Fortran: new package (#44314)
* Spglib: add version 2.4.0

* dla-future-fortran: new package version 0.1.0

* [@spackbot] updating style on behalf of RMeli

* apply suggestion and add maintainer

---------

Co-authored-by: RMeli <RMeli@users.noreply.github.com>
2024-05-24 09:53:33 +02:00
Chris Marsh
d9d085da10 Fix patch being applied @7 which causes an error (#44367) 2024-05-24 09:45:20 +02:00
Samuel Khuvis
d88d720577 add mvapich support for intel scalapack_libs (#44246)
* add mvapich support for intel scalapack_libs

* Add mvapich support for oneapi scalapack_libs
2024-05-24 02:51:53 +00:00
Harry Sharma
1d670ae744 feat: add metacarpa@1.0.1 to spack (#44339)
* feat: add metacarpa@1.0.1 to spack
* fix: style issue
* Update copyright year
2024-05-23 20:43:13 -06:00
Veselin Dobrev
35ad6f52c1 Better Emacs build on Mac OS (#37294)
* [emacs] When installing on Mac OS, build and install the native
        Emacs.app along with the standard executables.

* [emacs] Make the GUI build on Mac optional by adding "gui" variant

* Apply reviewer suggestion

Co-authored-by: Alec Scott <hi@alecbcs.com>

* Add emacs version 29.3

---------

Co-authored-by: Alec Scott <hi@alecbcs.com>
2024-05-23 18:17:38 -07:00
Greg Becker
b61bae7640 bugfix: external detection for compilers with os but not target (#44156)
avoid calling `spec.target` when None.

When an external compiler package has an `os` set but no `target` set, Spack
currently falls into a codepath that calls `spec.target` (which itself calls
`spec.architecture.target.Microarchitecture`) when `spec.architecture.target`
is None, throwing an error.

e.g.

```
packages:
  gcc:
    externals:
    - spec: gcc@12.3.1 os=rhel7
      prefix: /usr
```

---------

Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2024-05-24 00:13:36 +00:00
Massimiliano Culpo
8b7abace8b Enforce consistency of gl providers (#44307)
* glew: rework dependency on gl

This simplifies the package and ensures a single gl implementation is
pulled in. Before we were adding direct dependencies, and those are
not unified through the virtual.

* mesa-demos: rework dependency on gl

This simplifies the package and ensures a single gl implementation is
pulled in. Before we were adding direct dependencies, and those are
not unified through the virtual.

* mesa-glu: rework dependency on gl

This simplifies the package and ensures a single gl implementation is
pulled in. Before we were adding direct dependencies, and those are
not unified through the virtual.

* paraview: fix dependency on glew

* mesa: group dependency on when("+glx")

* Add missing dependency on libxml2

* paraview: remove the "osmesa" and "egl" variant

Instead, enforce consistency using the "gl" virtual that allows
only one provider.

* visit: remove osmesa variant

* Disable paraview in the aws-isc stacks

* data-vis-sdk: rework constrains to enforce front-ends

* e4s-power: remove redundant paraview

* Pipelines: update osmesa variants

* trilinos-catalyst-ioss-adapter: make gl a run dependency
2024-05-23 20:17:51 +00:00
pauleonix
5cf98d9564 asio: Add 1.30.0:1.30.2 (#44346) 2024-05-23 13:15:02 -07:00
Diego Alvarez S
973a961cb5 Add opendjk 11.0.23+9, 17.0.11+9, 21.0.3+9 (#44340) 2024-05-23 12:48:57 -05:00
Adam J. Stewart
868d0cb957 py-scipy: add v1.13.1 (#44337) 2024-05-23 10:45:51 -07:00
Diego Alvarez S
497f3a3832 nextflow: add 24.04.1 (#44338)
* Add nextflow 24.04.1
* Install java 17 in this version
2024-05-23 10:44:36 -07:00
Wouter Deconinck
9843f41bce libxkbcommon: add v1.6.0, v1.7.0 (#44344) 2024-05-23 10:37:07 -07:00
Carsten Uphoff
e54fefc2b7 Add double-batched-fft-library@0.5.1 (#44345)
Signed-off-by: Carsten Uphoff <carsten.uphoff@intel.com>
2024-05-23 10:34:57 -07:00
pauleonix
90c0889533 benchmark: Add 1.8.4 (#44347) 2024-05-23 10:31:29 -07:00
Matt Thompson
6696e82ce7 mapl: add conflicts for intel 2021.7 (#44350) 2024-05-23 10:20:53 -07:00
Carsten Uphoff
dcc55d53db Add level zero loader versions (#44349)
Signed-off-by: Carsten Uphoff <carsten.uphoff@intel.com>
2024-05-23 10:56:31 -06:00
Harmen Stoppels
92000e81b8 absolutify_elf_sonames.py: fix _patchelf (#44343) 2024-05-23 14:05:10 +00:00
Mikael Simberg
125175ae25 gperftools: Don't build benchmarks or tests (#44336) 2024-05-23 06:55:52 -06:00
Massimiliano Culpo
f60e548a0d ASP-based solver: fix reusing externals on linux (#44316)
We need to tell clingo the libc compatibility of external nodes
in buildcaches or stores, to allow reuse.
2024-05-23 14:37:48 +02:00
John W. Parent
04dc16a6b1 cmake: add v3.28 (#43723) 2024-05-23 07:58:05 +02:00
Wouter Deconinck
27b90e38db py-cloudpickle: new version 3.0.0 (switch to flit-core) (#44324) 2024-05-23 07:40:16 +02:00
Wouter Deconinck
7e5ce3ba48 py-ordered-set: new version 4.1.0 (flit-core) (#44325) 2024-05-23 07:38:53 +02:00
Paolo
f5f7cfdc8f armpl-gcc: add v24.04 (#43553)
Starting from 24.04, armpl-gcc will only have three packages files: dev, rpm, and macOS. 

Only one version for gcc is provided, so the changes in the code reflect that the tar provided
for gcc is only one rather than many.
2024-05-23 06:37:23 +02:00
Alex Richert
3e1a562312 Update package.py (#44322) 2024-05-22 21:13:35 -06:00
Todd Gamblin
ce4d962faa README.md: add windows 2024-05-22 18:12:12 -07:00
mSamiolo
b9816a97fc docs: update chain.rst to improve discussion of upstreams (#43918)
* Update chain.rst

* Update lib/spack/docs/chain.rst

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>

* Update lib/spack/docs/chain.rst

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>

* docs: rm leading spaces to avoid indent

---------

Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
2024-05-22 22:04:53 +00:00
Alex Richert
f7b9c30456 Add develop version to ufs-weather-model (major updates) (#39265)
* Add develop version to ufs-weather-model (major updates)

* Update ufs-weather-model maintainers

* Update package.py

* Update package.py

* Update package.py

* Update package.py

* Update ufs-weather-model defaults and fms dep

* Update package.py

* Update package.py

* Update package.py
2024-05-22 11:33:17 -06:00
60 changed files with 829 additions and 325 deletions

View File

@@ -32,7 +32,7 @@
Spack is a multi-platform package manager that builds and installs
multiple versions and configurations of software. It works on Linux,
macOS, and many supercomputers. Spack is non-destructive: installing a
macOS, Windows, and many supercomputers. Spack is non-destructive: installing a
new version of a package does not break existing installations, so many
configurations of the same package can coexist.

View File

@@ -1,19 +0,0 @@
# -------------------------------------------------------------------------
# This file controls default concretization preferences for Spack.
#
# Settings here are versioned with Spack and are intended to provide
# sensible defaults out of the box. Spack maintainers should edit this
# file to keep it current.
#
# Users can override these settings by editing the following files.
#
# Per-spack-instance settings (overrides defaults):
# $SPACK_ROOT/etc/spack/packages.yaml
#
# Per-user settings (overrides default and site settings):
# ~/.spack/packages.yaml
# -------------------------------------------------------------------------
packages:
all:
providers:
iconv: [glibc, musl, libiconv]

View File

@@ -1,19 +0,0 @@
# -------------------------------------------------------------------------
# This file controls default concretization preferences for Spack.
#
# Settings here are versioned with Spack and are intended to provide
# sensible defaults out of the box. Spack maintainers should edit this
# file to keep it current.
#
# Users can override these settings by editing the following files.
#
# Per-spack-instance settings (overrides defaults):
# $SPACK_ROOT/etc/spack/packages.yaml
#
# Per-user settings (overrides default and site settings):
# ~/.spack/packages.yaml
# -------------------------------------------------------------------------
packages:
all:
providers:
iconv: [glibc, musl, libiconv]

View File

@@ -11,7 +11,8 @@ Chaining Spack Installations
You can point your Spack installation to another installation to use any
packages that are installed there. To register the other Spack instance,
you can add it as an entry to ``upstreams.yaml``:
you can add it as an entry to ``upstreams.yaml`` at any of the
:ref:`configuration-scopes`:
.. code-block:: yaml
@@ -22,7 +23,8 @@ you can add it as an entry to ``upstreams.yaml``:
install_tree: /path/to/another/spack/opt/spack
``install_tree`` must point to the ``opt/spack`` directory inside of the
Spack base directory.
Spack base directory, or the location of the ``install_tree`` defined
in :ref:`config.yaml <config-yaml>`.
Once the upstream Spack instance has been added, ``spack find`` will
automatically check the upstream instance when querying installed packages,

View File

@@ -846,6 +846,7 @@ def scalapack_libs(self):
"^mpich@2:" in spec_root
or "^cray-mpich" in spec_root
or "^mvapich2" in spec_root
or "^mvapich" in spec_root
or "^intel-mpi" in spec_root
or "^intel-oneapi-mpi" in spec_root
or "^intel-parallel-studio" in spec_root

View File

@@ -106,7 +106,8 @@ def clean(parser, args):
# Then do the cleaning falling through the cases
if args.specs:
specs = spack.cmd.parse_specs(args.specs, concretize=True)
specs = spack.cmd.parse_specs(args.specs, concretize=False)
specs = list(spack.cmd.matching_spec_from_env(x) for x in specs)
for spec in specs:
msg = "Cleaning build stage [{0}]"
tty.msg(msg.format(spec.short_spec))

View File

@@ -220,10 +220,10 @@ def _compiler_config_from_external(config):
operating_system = host_platform.operating_system("default_os")
target = host_platform.target("default_target").microarchitecture
else:
target = spec.target
target = spec.architecture.target
if not target:
host_platform = spack.platforms.host()
target = host_platform.target("default_target").microarchitecture
target = spack.platforms.host().target("default_target")
target = target.microarchitecture
operating_system = spec.os
if not operating_system:

View File

@@ -13,7 +13,6 @@
import spack.config
import spack.relocate
from spack.util.elf import ElfParsingError, parse_elf
from spack.util.executable import Executable
def is_shared_library_elf(filepath):
@@ -149,10 +148,9 @@ def post_install(spec, explicit=None):
return
# Should failing to locate patchelf be a hard error?
patchelf_path = spack.relocate._patchelf()
if not patchelf_path:
patchelf = spack.relocate._patchelf()
if not patchelf:
return
patchelf = Executable(patchelf_path)
fixes = find_and_patch_sonames(spec.prefix, spec.package.non_bindable_shared_objects, patchelf)

View File

@@ -1939,6 +1939,11 @@ def _spec_clauses(
for virtual in virtuals:
clauses.append(fn.attr("virtual_on_incoming_edges", spec.name, virtual))
# If the spec is external and concrete, we allow all the libcs on the system
if spec.external and spec.concrete and using_libc_compatibility():
for libc in self.libcs:
clauses.append(fn.attr("compatible_libc", spec.name, libc.name, libc.version))
# add all clauses from dependencies
if transitive:
# TODO: Eventually distinguish 2 deps on the same pkg (build and link)

View File

@@ -1345,8 +1345,10 @@ build(PackageNode) :- not attr("hash", PackageNode, _), attr("node", PackageNode
% topmost-priority criterion to reuse what is installed.
%
% The priority ranges are:
% 200+ Shifted priorities for build nodes; correspond to priorities 0 - 99.
% 100 - 199 Unshifted priorities. Currently only includes minimizing #builds.
% 1000+ Optimizations for concretization errors
% 300 - 1000 Highest priority optimizations for valid solutions
% 200 - 299 Shifted priorities for build nodes; correspond to priorities 0 - 99.
% 100 - 199 Unshifted priorities. Currently only includes minimizing #builds and minimizing dupes.
% 0 - 99 Priorities for non-built nodes.
build_priority(PackageNode, 200) :- build(PackageNode), attr("node", PackageNode).
build_priority(PackageNode, 0) :- not build(PackageNode), attr("node", PackageNode).
@@ -1394,6 +1396,16 @@ build_priority(PackageNode, 0) :- not build(PackageNode), attr("node", Package
% 2. a `#minimize{ 0@2 : #true }.` statement that ensures the criterion
% is displayed (clingo doesn't display sums over empty sets by default)
% A condition group specifies one or more specs that must be satisfied.
% Specs declared first are preferred, so we assign increasing weights and
% minimize the weights.
opt_criterion(310, "requirement weight").
#minimize{ 0@310: #true }.
#minimize {
Weight@310,PackageNode,Group
: requirement_weight(PackageNode, Group, Weight)
}.
% Try hard to reuse installed packages (i.e., minimize the number built)
opt_criterion(110, "number of packages to build (vs. reuse)").
#minimize { 0@110: #true }.
@@ -1405,18 +1417,6 @@ opt_criterion(100, "number of nodes from the same package").
#minimize { ID@100,Package : attr("virtual_node", node(ID, Package)) }.
#defined optimize_for_reuse/0.
% A condition group specifies one or more specs that must be satisfied.
% Specs declared first are preferred, so we assign increasing weights and
% minimize the weights.
opt_criterion(75, "requirement weight").
#minimize{ 0@275: #true }.
#minimize{ 0@75: #true }.
#minimize {
Weight@75+Priority,PackageNode,Group
: requirement_weight(PackageNode, Group, Weight),
build_priority(PackageNode, Priority)
}.
% Minimize the number of deprecated versions being used
opt_criterion(73, "deprecated versions used").
#minimize{ 0@273: #true }.

View File

@@ -10,12 +10,13 @@
%=============================================================================
% A package cannot be reused if the libc is not compatible with it
:- provider(node(X, LibcPackage), node(0, "libc")),
attr("version", node(X, LibcPackage), LibcVersion),
attr("hash", node(R, ReusedPackage), Hash),
% Libc packages can be reused without the "compatible_libc" attribute
ReusedPackage != LibcPackage,
not attr("compatible_libc", node(R, ReusedPackage), LibcPackage, LibcVersion).
error(100, "Cannot reuse {0} since we cannot determine libc compatibility", ReusedPackage)
:- provider(node(X, LibcPackage), node(0, "libc")),
attr("version", node(X, LibcPackage), LibcVersion),
attr("hash", node(R, ReusedPackage), Hash),
% Libc packages can be reused without the "compatible_libc" attribute
ReusedPackage != LibcPackage,
not attr("compatible_libc", node(R, ReusedPackage), LibcPackage, LibcVersion).
% Check whether the DAG has any built package
has_built_packages() :- build(X), not external(X).

View File

@@ -11,6 +11,7 @@
import spack.caches
import spack.cmd.clean
import spack.environment as ev
import spack.main
import spack.package_base
import spack.stage
@@ -68,6 +69,20 @@ def test_function_calls(command_line, effects, mock_calls_for_clean):
assert mock_calls_for_clean[name] == (1 if name in effects else 0)
def test_env_aware_clean(mock_stage, install_mockery, mutable_mock_env_path, monkeypatch):
e = ev.create("test", with_view=False)
e.add("mpileaks")
e.concretize()
def fail(*args, **kwargs):
raise Exception("This should not have been called")
monkeypatch.setattr(spack.spec.Spec, "concretize", fail)
with e:
clean("mpileaks")
def test_remove_python_cache(tmpdir, monkeypatch):
cache_files = ["file1.pyo", "file2.pyc"]
source_file = "file1.py"

View File

@@ -2546,6 +2546,30 @@ def test_include_specs_from_externals_and_libcs(
assert result["deprecated-versions"].satisfies("@1.0.0")
@pytest.mark.regression("44085")
@pytest.mark.only_clingo("Use case not supported by the original concretizer")
def test_can_reuse_concrete_externals_for_dependents(self, mutable_config, tmp_path):
"""Test that external specs that are in the DB can be reused. This means they are
preferred to concretizing another external from packages.yaml
"""
packages_yaml = {
"externaltool": {"externals": [{"spec": "externaltool@2.0", "prefix": "/fake/path"}]}
}
mutable_config.set("packages", packages_yaml)
# Concretize with gcc@9 to get a suboptimal spec, since we have gcc@10 available
external_spec = Spec("externaltool@2 %gcc@9").concretized()
assert external_spec.external
root_specs = [Spec("sombrero")]
with spack.config.override("concretizer:reuse", True):
solver = spack.solver.asp.Solver()
setup = spack.solver.asp.SpackSolverSetup()
result, _, _ = solver.driver.solve(setup, root_specs, reuse=[external_spec])
assert len(result.specs) == 1
sombrero = result.specs[0]
assert sombrero["externaltool"].dag_hash() == external_spec.dag_hash()
@pytest.fixture()
def duplicates_test_repository():

View File

@@ -1176,3 +1176,46 @@ def test_forward_multi_valued_variant_using_requires(
for constraint in not_expected:
assert not s.satisfies(constraint)
def test_strong_preferences_higher_priority_than_reuse(concretize_scope, mock_packages):
"""Tests that strong preferences have a higher priority than reusing specs."""
reused_spec = Spec("adios2~bzip2").concretized()
reuse_nodes = list(reused_spec.traverse())
root_specs = [Spec("ascent+adios2")]
# Check that without further configuration adios2 is reused
with spack.config.override("concretizer:reuse", True):
solver = spack.solver.asp.Solver()
setup = spack.solver.asp.SpackSolverSetup()
result, _, _ = solver.driver.solve(setup, root_specs, reuse=reuse_nodes)
ascent = result.specs[0]
assert ascent["adios2"].dag_hash() == reused_spec.dag_hash(), ascent
# If we stick a preference, adios2 is not reused
update_packages_config(
"""
packages:
adios2:
prefer:
- "+bzip2"
"""
)
with spack.config.override("concretizer:reuse", True):
solver = spack.solver.asp.Solver()
setup = spack.solver.asp.SpackSolverSetup()
result, _, _ = solver.driver.solve(setup, root_specs, reuse=reuse_nodes)
ascent = result.specs[0]
assert ascent["adios2"].dag_hash() != reused_spec.dag_hash()
assert ascent["adios2"].satisfies("+bzip2")
# A preference is still preference, so we can override from input
with spack.config.override("concretizer:reuse", True):
solver = spack.solver.asp.Solver()
setup = spack.solver.asp.SpackSolverSetup()
result, _, _ = solver.driver.solve(
setup, [Spec("ascent+adios2 ^adios2~bzip2")], reuse=reuse_nodes
)
ascent = result.specs[0]
assert ascent["adios2"].dag_hash() == reused_spec.dag_hash(), ascent

View File

@@ -79,7 +79,7 @@ spack:
- openfoam
- osu-micro-benchmarks
- parallel
- paraview
# - paraview
- picard
- quantum-espresso
- raja

View File

@@ -85,7 +85,7 @@ spack:
- openfoam
- osu-micro-benchmarks
- parallel
- paraview
# - paraview
- picard
- quantum-espresso
# Build broken for gcc@7.3.1 x86_64_v4 (error: '_mm512_loadu_epi32' was not declared in this scope)

View File

@@ -25,16 +25,16 @@ spack:
- paraview_specs:
- matrix:
- - paraview +raytracing
- - +qt~osmesa # GUI Support w/ GLX Rendering
- ~qt~osmesa # GLX Rendering
- ~qt+osmesa # OSMesa Rendering
- - +qt ^[virtuals=gl] glx # GUI Support w/ GLX Rendering
- ~qt ^[virtuals=gl] glx # GLX Rendering
- ^[virtuals=gl] osmesa # OSMesa Rendering
- visit_specs:
- matrix:
- - visit
- - ~gui~osmesa # GLX Rendering
- ~gui+osmesa # OSMesa Rendering
- - visit~gui
- - ^[virtuals=gl] glx # GLX Rendering
- ^[virtuals=gl] osmesa # OSMesa Rendering
# VisIt GUI does not work with Qt 5.14.2
# - +gui~osmesa # GUI Support w/ GLX Rendering
# - +gui ^[virtuals=gl] glx # GUI Support w/ GLX Rendering
- sdk_base_spec:
- matrix:
- - ecp-data-vis-sdk +ascent +adios2 +cinema +darshan +faodel +hdf5 +pnetcdf

View File

@@ -50,7 +50,7 @@ spack:
variants: +termlib
paraview:
# Don't build GUI support or GLX rendering for HPC/container deployments
require: "@5.11 ~qt+osmesa"
require: "@5.11 ~qt ^[virtuals=gl] osmesa"
python:
version: [3.8.13]
trilinos:

View File

@@ -43,7 +43,7 @@ spack:
variants: +termlib
paraview:
# Don't build GUI support or GLX rendering for HPC/container deployments
require: "@5.11 ~qt+osmesa"
require: "@5.11 ~qt ^[virtuals=gl] osmesa"
python:
version: [3.8.13]
trilinos:

View File

@@ -168,7 +168,6 @@ spack:
- hdf5
- libcatalyst
- parallel-netcdf
- paraview
- py-cinemasci
- sz
- unifyfs

View File

@@ -21,7 +21,7 @@ spack:
variants: threads=openmp
paraview:
# Don't build GUI support or GLX rendering for HPC/container deployments
require: "@5.11 ~qt+osmesa"
require: "@5.11 ~qt ^[virtuals=gl] osmesa"
# ROCm 5.4.3
comgr:

View File

@@ -52,7 +52,7 @@ spack:
version: [11.8.0]
paraview:
# Don't build GUI support or GLX rendering for HPC/container deployments
require: "@5.11 ~qt+osmesa"
require: "@5.11 ~qt ^[virtuals=gl] osmesa"
specs:
# CPU

View File

@@ -31,7 +31,7 @@ spack:
variants: threads=openmp
paraview:
# Don't build GUI support or GLX rendering for HPC/container deployments
require: "@5.11 ~qt+osmesa"
require: "@5.11 ~qt ^[virtuals=gl] osmesa"
trilinos:
require: +amesos +amesos2 +anasazi +aztec +boost +epetra +epetraext
+ifpack +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu

View File

@@ -0,0 +1,16 @@
# Copyright 2013-2024 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 Sombrero(Package):
"""Simple package with a dependency on an external spec."""
homepage = "http://www.example.com"
url = "http://www.example.com/b-1.0.tar.gz"
version("1.0", md5="0123456789abcdef0123456789abcdef")
depends_on("externaltool")

View File

@@ -36,6 +36,40 @@
}
_versions = {
"24.04": {
"RHEL-7": (
"064c3ecfd71cba3d8bf639448e899388f58eb7faef4b38f3c1aace625ace8b1e",
"https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/24-04/arm-compiler-for-linux_24.04_RHEL-7_aarch64.tar",
),
"RHEL-8": (
"38f46a3549667d0fbccd947653d3a1a56b630d3bbb1251888c674c463f00dac3",
"https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/24-04/arm-compiler-for-linux_24.04_RHEL-8_aarch64.tar",
),
"RHEL-9": (
"d335db82c8310e1d79c96dc09a19e4d509c5ab17eb6027214bb79cfc75d8229e",
"https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/24-04/arm-compiler-for-linux_24.04_RHEL-9_aarch64.tar",
),
"SLES-15": (
"6f2e090efcd8da2cbeaf63272fac5917f637713f1e86d73cde2ad7268e3a05a2",
"https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/24-04/arm-compiler-for-linux_24.04_SLES-15_aarch64.tar",
),
"Ubuntu-20.04": (
"0d782e6a69a11f90bf3b392313c885a2376c5761f227bf2f68e34e9848ec8e97",
"https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/24-04/arm-compiler-for-linux_24.04_Ubuntu-20.04_aarch64.tar",
),
"Ubuntu-22.04": (
"0bab2e89f0a2359746f89a01251dca763305c5b0dee95cf47b0968dd1cb5f6f6",
"https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/24-04/arm-compiler-for-linux_24.04_Ubuntu-22.04_aarch64.tar",
),
"AmazonLinux-2": (
"cf0bebe2d7123749c919a5f4e36100ad21f08ffbad3b53e477205c08ae973a2d",
"https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/24-04/arm-compiler-for-linux_24.04_AmazonLinux-2_aarch64.tar",
),
"AmazonLinux-2023": (
"035dae8c41a1ac86c8885837978cb712306aa75dc5d26d17aca843b84eaee9f4",
"https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/24-04/arm-compiler-for-linux_24.04_AmazonLinux-2023_aarch64.tar",
),
},
"23.10": {
"RHEL-7": (
"c3bd4df3e5f6c97369237b0067e0a421dceb9c167d73f22f3da87f5025258314",
@@ -192,34 +226,22 @@ def get_armpl_version_to_3(spec):
def get_armpl_prefix(spec):
ver = get_armpl_version_to_3(spec)
os = get_os(spec.version.string)
if spec.version.string.startswith("22."):
return join_path(
spec.prefix,
"armpl-{}_AArch64_{}_arm-linux-compiler_aarch64-linux".format(
get_armpl_version_to_3(spec), get_os(spec.version.string)
),
)
return join_path(spec.prefix, f"armpl-{ver}_AArch64_{os}_arm-linux-compiler_aarch64-linux")
else:
return join_path(
spec.prefix,
"armpl-{}_{}_arm-linux-compiler".format(
get_armpl_version_to_3(spec), get_os(spec.version.string)
),
)
return join_path(spec.prefix, f"armpl-{ver}_{os}_arm-linux-compiler")
def get_acfl_prefix(spec):
os = get_os(spec.version.string)
if spec.version.string.startswith("22."):
return join_path(
spec.prefix,
"arm-linux-compiler-{0}_Generic-AArch64_{1}_aarch64-linux".format(
spec.version, get_os(spec.version.string)
),
spec.prefix, f"arm-linux-compiler-{spec.version}_Generic-AArch64_{os}_aarch64-linux"
)
else:
return join_path(
spec.prefix, f"arm-linux-compiler-{spec.version}_{get_os(spec.version.string)}"
)
return join_path(spec.prefix, f"arm-linux-compiler-{spec.version}_{os}")
def get_gcc_prefix(spec):
@@ -227,6 +249,16 @@ def get_gcc_prefix(spec):
return join_path(spec.prefix, next(dir for dir in dirlist if dir.startswith("gcc")))
def get_armpl_suffix(spec):
suffix = ""
if spec.satisfies("@24:"):
suffix += "_ilp64" if spec.satisfies("+ilp64") else "_lp64"
else:
suffix += "_ilp64" if spec.satisfies("+ilp64") else ""
suffix += "_mp" if spec.satisfies("threads=openmp") else ""
return suffix
class Acfl(Package, CompilerPackage):
"""Arm Compiler combines the optimized tools and libraries from Arm
with a modern LLVM-based compiler framework.
@@ -235,7 +267,7 @@ class Acfl(Package, CompilerPackage):
homepage = "https://developer.arm.com/Tools%20and%20Software/Arm%20Compiler%20for%20Linux"
url = "https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/23-10/arm-compiler-for-linux_23.10_Ubuntu-22.04_aarch64.tar"
maintainers("annop-w")
maintainers("paolotricerri")
# Build Versions
for ver, packages in _versions.items():
@@ -310,10 +342,7 @@ def fortran(self):
@property
def lib_suffix(self):
suffix = ""
suffix += "_ilp64" if self.spec.satisfies("+ilp64") else ""
suffix += "_mp" if self.spec.satisfies("threads=openmp") else ""
return suffix
return get_armpl_suffix(self.spec)
@property
def blas_libs(self):
@@ -389,8 +418,9 @@ def setup_run_environment(self, env):
def check_install(self):
arm_dir = get_acfl_prefix(self.spec)
armpl_dir = get_armpl_prefix(self.spec)
suffix = get_armpl_suffix(self.spec)
gcc_dir = get_gcc_prefix(self.spec)
armpl_example_dir = join_path(armpl_dir, "examples")
armpl_example_dir = join_path(armpl_dir, f"examples{suffix}")
# run example makefile
make(
"-C",
@@ -399,6 +429,7 @@ def check_install(self):
"F90=" + self.fortran,
"CPATH=" + join_path(arm_dir, "include"),
"COMPILER_PATH=" + gcc_dir,
"ARMPL_DIR=" + armpl_dir,
)
# clean up
make("-C", armpl_example_dir, "clean")

View File

@@ -3,28 +3,31 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
from spack.package import *
class Amduprof(Package):
"""AMD uProf ("MICRO-prof") is a software profiling analysis tool for
x86 applications running on Windows, Linux and FreeBSD operating systems
and provides event information unique to the AMD "Zen"-based processors
and AMD Instinct(tm) MI Series accelerators.
"""
"""AMD uProf ("MICRO-prof") is a software profiling analysis tool for x86
applications running on Windows, Linux and FreeBSD operating systems and
provides event information unique to the AMD "Zen"-based processors and AMD
Instinct(tm) MI Series accelerators. AMD uProf enables the developer to better
understand the limiters of application performance and evaluate
improvements."""
homepage = "https://developer.amd.com/amd-uprof/"
url = "https://download.amd.com/developer/eula/uprof/AMDuProf_Linux_x64_4.2.850.tar.bz2"
url = f"file://{os.getcwd()}/AMDuProf_Linux_x64_4.2.850.tar.bz2"
manual_download = True
maintainers("zzzoom")
maintainers("amd-toolchain-support")
version("4.2.850", sha256="f2d7c4eb9ec9c32845ff8f19874c1e6bcb0fa8ab2c12e73addcbf23a6d1bd623")
# TODO: build Power Profiling driver on Linux
# TODO: ROCm for GPU tracing and profiling
# TODO: BCC and eBPF for OS tracing
depends_on("binutils@2.27:", type="run")
conflicts("platform=darwin")
requires("target=x86_64:", msg="AMD uProf available only on x86_64")
def install(self, spec, prefix):
install_tree(".", prefix)

View File

@@ -21,7 +21,7 @@
"amzn2023": "RHEL-7",
}
_os_map = {
_os_map_before_24 = {
"ubuntu20.04": "Ubuntu-20.04",
"ubuntu22.04": "Ubuntu-22.04",
"sles15": "SLES-15",
@@ -36,7 +36,27 @@
"amzn2023": "AmazonLinux-2023",
}
_os_pkg_map = {
"ubuntu20.04": "deb",
"ubuntu22.04": "deb",
"sles15": "rpm",
"centos7": "rpm",
"centos8": "rpm",
"rhel7": "rpm",
"rhel8": "rpm",
"rhel9": "rpm",
"rocky8": "rpm",
"rocky9": "rpm",
"amzn2": "rpm",
"amzn2023": "rpm",
}
_versions = {
"24.04": {
"deb": ("a323074cd08af82f4d79988cc66088b18e47dea4b93323b1b8a0f994f769f2f0"),
"macOS": ("228bf3a2c25dbd45c2f89c78f455ee3c7dfb25e121c20d2765138b5174e688dc"),
"rpm": ("d3917523034cf5a35e4f31f9a8bf4e53e7cc97892e89739d5757cb65ce40dc2e"),
},
"23.10_gcc-12.2": {
"RHEL-7": ("e5e2c69ad281a676f2a06c835fbf31d4f9fdf46aa3f3f7c8aafff46985f64902"),
"RHEL-8": ("cc0f3572ead93d1e31797b7a39a40cff3414878df9bd24a452bf4877dc35ca4c"),
@@ -227,28 +247,32 @@
}
def get_os(ver):
def get_os_or_pkg_manager(ver):
platform = spack.platforms.host()
if platform.name == "darwin":
return "macOS"
if ver.startswith("22."):
return _os_map_before_23.get(platform.default_os, "")
elif ver.startswith("23."):
return _os_map_before_24.get(platform.default_os, "RHEL-7")
else:
return _os_map.get(platform.default_os, "RHEL-7")
return _os_pkg_map.get(platform.default_os, "rpm")
def get_package_url(version):
base_url = "https://developer.arm.com/-/media/Files/downloads/hpc/arm-performance-libraries/"
def get_package_url_before_24(base_url, version):
armpl_version = version.split("_")[0]
armpl_version_dashed = armpl_version.replace(".", "-")
compiler_version = version.split("_", 1)[1]
os = get_os(armpl_version)
os = get_os_or_pkg_manager(armpl_version)
if os == "macOS":
if armpl_version.startswith("23.06"):
return f"{base_url}{armpl_version_dashed}/armpl_{armpl_version}_{compiler_version}.dmg"
return (
f"{base_url}/{armpl_version_dashed}/"
+ f"armpl_{armpl_version}_{compiler_version}.dmg"
)
else:
filename = f"arm-performance-libraries_{armpl_version}_macOS.dmg"
return f"{base_url}{armpl_version_dashed}/macos/{filename}"
return f"{base_url}/{armpl_version_dashed}/macos/{filename}"
filename = f"arm-performance-libraries_{armpl_version}_{os}_{compiler_version}.tar"
os_short = ""
if armpl_version.startswith("22.0."):
@@ -257,11 +281,51 @@ def get_package_url(version):
os_short = os.split(".")[0].lower()
if "amazonlinux" in os_short:
os_short = os_short.replace("amazonlinux", "al")
return f"{base_url}{armpl_version_dashed}/{os_short}/{filename}"
return f"{base_url}/{armpl_version_dashed}/{os_short}/{filename}"
def get_package_url_from_24(base, version):
pkg_system = get_os_or_pkg_manager(version)
os = "macOS" if pkg_system == "macOS" else "linux"
extension = "tgz" if pkg_system == "macOS" else "tar"
full_name_library = f"arm-performance-libraries_{version}_{pkg_system}"
if pkg_system != "macOS":
full_name_library = f"{full_name_library}_gcc"
file_name = f"{full_name_library}.{extension}"
vn = version.replace(".", "-")
url_parts = f"{base}/{vn}/{os}/{file_name}"
return url_parts
def get_package_url(version):
base_url = "https://developer.arm.com/-/media/Files/downloads/hpc/arm-performance-libraries"
if version[:2] >= "24":
return get_package_url_from_24(base_url, version)
else:
return get_package_url_before_24(base_url, version)
def get_armpl_prefix(spec):
return os.path.join(spec.prefix, "armpl_" + spec.version.string)
armpl_dir = [
d
for d in os.listdir(spec.prefix)
if os.path.isdir(os.path.join(spec.prefix, d)) and d.startswith("armpl_")
][0]
return os.path.join(spec.prefix, armpl_dir)
def get_armpl_suffix(spec):
suffix = ""
if spec.satisfies("@24:"):
suffix += "_ilp64" if spec.satisfies("+ilp64") else "_lp64"
else:
suffix += "_ilp64" if spec.satisfies("+ilp64") else ""
suffix += "_mp" if spec.satisfies("threads=openmp") else ""
return suffix
class ArmplGcc(Package):
@@ -269,12 +333,12 @@ class ArmplGcc(Package):
high-performance computing applications on Arm processors."""
homepage = "https://developer.arm.com/tools-and-software/server-and-hpc/downloads/arm-performance-libraries"
url = "https://developer.arm.com/-/media/Files/downloads/hpc/arm-performance-libraries/23-04-1/ubuntu-22/arm-performance-libraries_23.04.1_Ubuntu-22.04_gcc-12.2.tar"
url = "https://developer.arm.com/-/media/Files/downloads/hpc/arm-performance-libraries/24-04/linux/arm-performance-libraries_24.04_deb_gcc.tar"
maintainers("annop-w")
maintainers("paolotricerri")
for ver, packages in _versions.items():
key = get_os(ver)
key = get_os_or_pkg_manager(ver)
sha256sum = packages.get(key)
url = get_package_url(ver)
if sha256sum:
@@ -341,10 +405,17 @@ def install(self, spec, prefix):
hdiutil = which("hdiutil")
# Mount image
mountpoint = os.path.join(self.stage.path, "mount")
hdiutil("attach", "-mountpoint", mountpoint, self.stage.archive_file)
if spec.satisfies("@:23"):
dmg_file = self.stage.archive_file
else:
# The archive file only extracts to one .dmg file
dmg_file = os.path.join(
self.stage.source_path, os.listdir(self.stage.source_path)[0]
)
hdiutil("attach", "-mountpoint", mountpoint, dmg_file)
try:
# Run installer
exe_name = f"armpl_{spec.version.string}_install.sh"
exe_name = [f for f in os.listdir(mountpoint) if f.endswith(".sh")][0]
installer = Executable(os.path.join(mountpoint, exe_name))
installer("-y", f"--install_dir={prefix}")
finally:
@@ -359,15 +430,21 @@ def install(self, spec, prefix):
with when("@23:"):
armpl_version = spec.version.string.split("_")[0]
exe = Executable(f"./arm-performance-libraries_{armpl_version}_{get_os(armpl_version)}.sh")
if spec.satisfies("@:23"):
exe = Executable(
f"./arm-performance-libraries_{armpl_version}_"
+ f"{get_os_or_pkg_manager(armpl_version)}.sh"
)
else:
package_type = (
"deb" if spack.platforms.host().default_os.startswith("ubuntu") else "rpm"
)
exe = Executable(f"./arm-performance-libraries_{armpl_version}_{package_type}.sh")
exe("--accept", "--force", "--install-to", prefix)
@property
def lib_suffix(self):
suffix = ""
suffix += "_ilp64" if self.spec.satisfies("+ilp64") else ""
suffix += "_mp" if self.spec.satisfies("threads=openmp") else ""
return suffix
return get_armpl_suffix(self.spec)
@property
def blas_libs(self):
@@ -403,7 +480,10 @@ def libs(self):
def headers(self):
armpl_dir = get_armpl_prefix(self.spec)
suffix = "include" + self.lib_suffix
if self.spec.satisfies("@24:"):
suffix = "include"
else:
suffix = "include" + self.lib_suffix
incdir = join_path(armpl_dir, suffix)
@@ -421,7 +501,9 @@ def setup_run_environment(self, env):
@run_after("install")
def check_install(self):
armpl_dir = get_armpl_prefix(self.spec)
armpl_example_dir = join_path(armpl_dir, "examples")
suffix = get_armpl_suffix(self.spec)
armpl_example_dir = join_path(armpl_dir, f"examples{suffix}")
# run example makefile
if self.spec.platform == "darwin":
# Fortran examples on MacOS requires flang-new which is

View File

@@ -19,6 +19,9 @@ class Asio(AutotoolsPackage):
license("BSL-1.0")
# As uneven minor versions of asio are not considered stable, they wont be added anymore
version("1.30.2", sha256="755bd7f85a4b269c67ae0ea254907c078d408cce8e1a352ad2ed664d233780e8")
version("1.30.1", sha256="94b121cc2016680f2314ef58eadf169c2d34fff97fba01df325a192d502d3a58")
version("1.30.0", sha256="df6674bd790842b3a7422e9cc4c5d3212ac268cebdb5d38f3e783e4918313c7b")
version("1.28.2", sha256="5705a0e403017eba276625107160498518838064a6dd7fd8b00b2e30c0ffbdee")
version("1.28.1", sha256="5ff6111ec8cbe73a168d997c547f562713aa7bd004c5c02326f0e9d579a5f2ce")
version("1.28.0", sha256="226438b0798099ad2a202563a83571ce06dd13b570d8fded4840dbc1f97fa328")

View File

@@ -18,6 +18,7 @@ class Benchmark(CMakePackage):
# first properly installed CMake config packages in
# 1.2.0 release: https://github.com/google/benchmark/issues/363
version("main", branch="main")
version("1.8.4", sha256="3e7059b6b11fb1bbe28e33e02519398ca94c1818874ebed18e504dc6f709be45")
version("1.8.3", sha256="6bc180a57d23d4d9515519f92b0c83d61b05b5bab188961f36ac7b06b0d9e9ce")
version("1.8.2", sha256="2aab2980d0376137f969d92848fbb68216abb07633034534fc8c65cc4e7a0e93")
version("1.8.1", sha256="e9ff65cecfed4f60c893a1e8a1ba94221fad3b27075f2f80f47eb424b0f8c9bd")

View File

@@ -30,6 +30,7 @@ class Cmake(Package):
version("master", branch="master")
version("3.29.2", sha256="36db4b6926aab741ba6e4b2ea2d99c9193222132308b4dc824d4123cb730352e")
version("3.28.4", sha256="eb9c787e078848dc493f4f83f8a4bbec857cd1f38ab6425ce8d2776a9f6aa6fb")
version("3.27.9", sha256="609a9b98572a6a5ea477f912cffb973109ed4d0a6a6b3f9e2353d2cdc048708e")
version("3.26.6", sha256="070b9a2422e666d2c1437e2dab239a236e8a63622d0a8d0ffe9e389613d2b76a")
version("3.25.3", sha256="cc995701d590ca6debc4245e9989939099ca52827dd46b5d3592f093afe1901c")
@@ -66,6 +67,18 @@ class Cmake(Package):
version(
"3.29.0", sha256="a0669630aae7baa4a8228048bf30b622f9e9fd8ee8cedb941754e9e38686c778"
)
version(
"3.28.3", sha256="72b7570e5c8593de6ac4ab433b73eab18c5fb328880460c86ce32608141ad5c1"
)
version(
"3.28.2", sha256="1466f872dc1c226f373cf8fba4230ed216a8f108bd54b477b5ccdfd9ea2d124a"
)
version(
"3.28.1", sha256="15e94f83e647f7d620a140a7a5da76349fc47a1bfed66d0f5cdee8e7344079ad"
)
version(
"3.28.0", sha256="e1dcf9c817ae306e73a45c2ba6d280c65cf4ec00dd958eb144adaf117fb58e71"
)
version(
"3.27.8", sha256="fece24563f697870fbb982ea8bf17482c9d5f855d8c9bf0b82463d76c9e8d0cc"
)

View File

@@ -0,0 +1,43 @@
# Copyright 2013-2024 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 DlaFutureFortran(CMakePackage):
"""
Fortran interface to the DLA-Future library.
"""
homepage = "https://github.com/eth-cscs/DLA-Future-Fortran"
url = "https://github.com/eth-cscs/DLA-Future-Fortran/archive/v0.0.0.tar.gz"
git = "https://github.com/eth-cscs/DLA-Future-Fortran.git"
maintainers("RMeli", "rasolca", "aurianer")
license("BSD-3-Clause")
version("main", branch="main")
version("0.1.0", sha256="9fd8a105cbb2f3e1daf8a49910f98fce68ca0b954773dba98a91464cf2e7c1da")
variant("shared", default=True, description="Build shared libraries.")
variant("test", default=False, description="Build tests.")
generator("ninja")
depends_on("cmake@3.22:", type="build")
depends_on("dla-future@0.4.1: +scalapack")
depends_on("dla-future +shared", when="+shared")
depends_on("mpi", when="+test")
depends_on("py-fypp", when="+test", type="build")
def cmake_args(self):
args = []
args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
args.append(self.define_from_variant("DLAF_FORTRAN_BUILD_TESTING", "test"))
return args

View File

@@ -23,6 +23,7 @@ class DoubleBatchedFftLibrary(CMakePackage):
version("main", branch="main")
version("develop", branch="develop")
version("0.5.1", sha256="3651b982b6b5649d2bf95a3391a0a28d6637c51c642379d9708de88ad8d45f61")
version("0.5.0", sha256="cbd2ecf039cc40830e57a8af8295abf2083ce3b1a333279a8c17762f41131fff")
version("0.4.0", sha256="f3518012b632c92c2a933d70a040d6b0eee2d631ab6b1881a192a8d1624f242d")
version("0.3.6", sha256="ff163251d77d3c686563141e871c702bf4997c0302d53616add55d6cf9b02d28")

View File

@@ -43,6 +43,7 @@ class Emacs(AutotoolsPackage, GNUMirrorPackage):
values=("gtk", "athena"),
description="Select an X toolkit (gtk, athena)",
)
variant("gui", default=False, description="Enable GUI build on Mac")
variant("tls", default=True, description="Build Emacs with gnutls")
variant("native", default=False, when="@28:", description="enable native compilation of elisp")
variant("treesitter", default=False, when="@29:", description="Build with tree-sitter support")
@@ -91,10 +92,13 @@ def configure_args(self):
else:
args = ["--without-x"]
# On OS X/macOS, do not build "nextstep/Emacs.app", because
# doing so throws an error at build-time
if sys.platform == "darwin":
args.append("--without-ns")
if spec.satisfies("+gui"):
# Do not build the self-contained "nextstep/Emacs.app"
args.append("--disable-ns-self-contained")
else:
# Do not build "nextstep/Emacs.app" at all
args.append("--without-ns")
args += self.with_or_without("native-compilation", variant="native")
args += self.with_or_without("gnutls", variant="tls")
@@ -103,6 +107,15 @@ def configure_args(self):
return args
@run_after("install")
def move_macos_app(self):
"""Move the Emacs.app build on MacOS to <prefix>/Applications.
From there users can move it or link it in ~/Applications."""
if sys.platform == "darwin" and "+gui" in self.spec:
apps_dir = join_path(self.prefix, "Applications")
mkdir(apps_dir)
move("nextstep/Emacs.app", apps_dir)
def run_version_check(self, bin):
"""Runs and checks output of the installed binary."""
exe_path = join_path(self.prefix.bin, bin)

View File

@@ -2,9 +2,6 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import sys
from spack.package import *
@@ -23,29 +20,9 @@ class Glew(CMakePackage):
version("2.1.0", sha256="04de91e7e6763039bc11940095cd9c7f880baba82196a7765f727ac05a993c95")
version("2.0.0", sha256="c572c30a4e64689c342ba1624130ac98936d7af90c3103f9ce12b8a0c5736764")
variant(
"gl",
default="glx" if sys.platform.startswith("linux") else "other",
values=("glx", "osmesa", "egl", "other"),
multi=False,
description="The OpenGL provider to use",
)
conflicts("^osmesa", when="gl=glx")
conflicts("^osmesa", when="gl=egl")
conflicts("^osmesa", when="gl=other")
conflicts("^glx", when="gl=osmesa")
conflicts("^glx", when="gl=other")
conflicts("^glx", when="gl=egl")
conflicts("^egl", when="gl=glx")
conflicts("^egl", when="gl=osmesa")
conflicts("^egl", when="gl=other")
depends_on("gl")
depends_on("osmesa", when="gl=osmesa")
depends_on("glx", when="gl=glx")
depends_on("libx11", when="gl=glx")
depends_on("xproto", when="gl=glx")
depends_on("egl", when="gl=egl")
depends_on("libx11", when="^[virtuals=gl] glx")
depends_on("xproto", when="^[virtuals=gl] glx")
# glu is already forcibly disabled in the CMakeLists.txt. This prevents
# it from showing up in the .pc file
@@ -56,15 +33,15 @@ def cmake_args(self):
args = [
self.define("BUILD_UTILS", True),
self.define("GLEW_REGAL", False),
self.define("GLEW_EGL", "gl=egl" in spec),
self.define("GLEW_EGL", spec.satisfies("^[virtuals=gl] egl")),
self.define("OPENGL_INCLUDE_DIR", spec["gl"].headers.directories[0]),
self.define("OPENGL_gl_LIBRARY", spec["gl"].libs[0]),
self.define("OPENGL_opengl_LIBRARY", "IGNORE"),
self.define("OPENGL_glx_LIBRARY", "IGNORE"),
self.define("OPENGL_glu_LIBRARY", "IGNORE"),
self.define("GLEW_OSMESA", "gl=osmesa" in spec),
self.define("GLEW_OSMESA", spec.satisfies("^[virtuals=gl] osmesa")),
]
if "gl=egl" in spec:
if spec.satisfies("^[virtuals=gl] egl"):
args.append(
self.define("OPENGL_egl_LIBRARY", [spec["egl"].libs[0], spec["egl"].libs[1]])
)
@@ -76,4 +53,4 @@ def cmake_args(self):
def flag_handler(self, name, flags):
if name == "ldflags" and self.spec.satisfies("platform=darwin ^apple-gl"):
flags.append("-framework OpenGL")
return (flags, None, None)
return flags, None, None

View File

@@ -68,6 +68,8 @@ def cmake_args(self):
),
self.define_from_variant("GPERFTOOLS_BUILD_DEBUGALLOC", "debugalloc"),
self.define_from_variant("gperftools_enable_libunwind", "libunwind"),
self.define("gperftools_build_benchmark", False),
self.define("BUILD_TESTING", False),
]

View File

@@ -224,6 +224,8 @@ def _find_mkl_libs(self, shared):
"^intel-oneapi-mpi",
"^intel-mpi",
"^mpich",
"^mvapich",
"^mvapich2",
"^cray-mpich",
"mpi_family=mpich",
]

View File

@@ -51,6 +51,7 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
version("3.0.00", sha256="c00613d0194a4fbd0726719bbed8b0404ed06275f310189b3493f5739042a92b")
depends_on("cmake@3.16:", type="build")
conflicts("cmake@3.28", when="@:4.2.01 +cuda")
devices_variants = {
"cuda": [False, "Whether to build CUDA backend"],

View File

@@ -22,6 +22,8 @@ class Libxkbcommon(MesonPackage, AutotoolsPackage):
license("MIT")
version("1.7.0", sha256="65782f0a10a4b455af9c6baab7040e2f537520caa2ec2092805cdfd36863b247")
version("1.6.0", sha256="0edc14eccdd391514458bc5f5a4b99863ed2d651e4dd761a90abf4f46ef99c2b")
version("1.5.0", sha256="560f11c4bbbca10f495f3ef7d3a6aa4ca62b4f8fb0b52e7d459d18a26e46e017")
version("1.4.1", sha256="943c07a1e2198026d8102b17270a1f406e4d3d6bbc4ae105b9e1b82d7d136b39")
version("1.4.0", sha256="106cec5263f9100a7e79b5f7220f889bc78e7d7ffc55d2b6fdb1efefb8024031")
@@ -46,6 +48,7 @@ class Libxkbcommon(MesonPackage, AutotoolsPackage):
depends_on("meson@0.41:", type="build", when="@0.9:")
depends_on("meson@0.49:", type="build", when="@1.0:")
depends_on("meson@0.51:", type="build", when="@1.5:")
depends_on("meson@0.52:", type="build", when="@1.6:")
depends_on("pkgconfig@0.9.0:", type="build")
depends_on("bison", type="build")
depends_on("util-macros")
@@ -59,12 +62,17 @@ class Libxkbcommon(MesonPackage, AutotoolsPackage):
class MesonBuilder(spack.build_systems.meson.MesonBuilder):
def meson_args(self):
return [
args = [
"-Dxkb-config-root={0}".format(self.spec["xkbdata"].prefix),
"-Denable-docs=false",
"-Denable-wayland=" + str(self.spec.satisfies("+wayland")),
]
if self.spec.satisfies("@1.6:"):
args.append("-Denable-bash-completion=false")
return args
class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
def configure_args(self):

View File

@@ -224,6 +224,10 @@ class Mapl(CMakePackage):
values=("Debug", "Release", "Aggressive"),
)
# https://github.com/JCSDA/spack-stack/issues/769
conflicts("+pflogger", when="@:2.40.3 %intel@2021.7:")
conflicts("+extdata2g", when="@:2.40.3 %intel@2021.7:")
depends_on("cmake@3.17:", type="build")
depends_on("mpi")
depends_on("hdf5")

View File

@@ -2,8 +2,6 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import sys
from spack.package import *
@@ -20,18 +18,6 @@ class MesaDemos(AutotoolsPackage):
version("8.2.0", sha256="5a9f71b815d968d0c3b77edfcc3782d0211f8520b00da9e554ccfed80c8889f6")
version("8.1.0", sha256="cc5826105355830208c90047fc38c5b09fa3ab0045366e7e859104935b00b76d")
variant(
"gl",
default="glx" if sys.platform.startswith("linux") else "osmesa",
values=("glx", "osmesa", "other"),
multi=False,
description="The OpenGL provider to use",
)
conflicts("^osmesa", when="gl=glx")
conflicts("^osmesa", when="gl=other")
conflicts("^glx", when="gl=osmesa")
conflicts("^glx", when="gl=other")
depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
@@ -39,10 +25,8 @@ class MesaDemos(AutotoolsPackage):
depends_on("pkgconfig", type="build")
depends_on("gl")
depends_on("osmesa", when="gl=osmesa")
depends_on("glx", when="gl=glx")
depends_on("libx11", when="gl=glx")
depends_on("libxext", when="gl=glx")
depends_on("libx11", when="^[virtuals=gl] glx")
depends_on("libxext", when="^[virtuals=gl] glx")
depends_on("glu")
depends_on("glew@1.5.4:")
@@ -64,11 +48,11 @@ def configure_args(self):
"--disable-rbug",
"--without-glut",
]
if "gl=glx" in spec:
if spec.satisfies("^[virtuals=gl] glx"):
args.append("--enable-x11")
else:
args.append("--disable-x11")
if "gl=osmesa" in spec:
if spec.satisfies("^[virtuals=gl] osmesa"):
args.append("--enable-osmesa")
else:
args.append("--disable-osmesa")

View File

@@ -2,9 +2,6 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import sys
from spack.package import *
@@ -18,22 +15,7 @@ class MesaGlu(AutotoolsPackage):
version("9.0.1", sha256="f6f484cfcd51e489afe88031afdea1e173aa652697e4c19ddbcb8260579a10f7")
version("9.0.0", sha256="4387476a1933f36fec1531178ea204057bbeb04cc2d8396c9ea32720a1f7e264")
variant(
"gl",
default="glx" if sys.platform.startswith("linux") else "other",
values=("glx", "osmesa", "other"),
multi=False,
description="The OpenGL provider to use",
)
conflicts("^osmesa", when="gl=glx")
conflicts("^osmesa", when="gl=other")
conflicts("^glx", when="gl=osmesa")
conflicts("^glx", when="gl=other")
depends_on("gl@3:")
depends_on("osmesa", when="gl=osmesa")
depends_on("glx", when="gl=glx")
provides("glu@1.3")
# When using -std=c++17, using register long will throw an error. This
@@ -43,7 +25,7 @@ class MesaGlu(AutotoolsPackage):
def configure_args(self):
args = ["--disable-libglvnd"]
if "gl=osmesa" in self.spec:
if self.spec.satisfies("^[virtuals=gl] osmesa"):
args.append("--enable-osmesa")
else:
args.append("--disable-osmesa")

View File

@@ -62,6 +62,7 @@ class Mesa(MesonPackage):
depends_on("unwind")
depends_on("expat")
depends_on("zlib-api")
depends_on("libxml2")
# Internal options
variant("llvm", default=True, description="Enable LLVM.")
@@ -111,12 +112,13 @@ class Mesa(MesonPackage):
depends_on("libllvm@:12", when="@:21")
depends_on("libllvm@:17", when="@:23")
depends_on("libx11", when="+glx")
depends_on("libxcb", when="+glx")
depends_on("libxext", when="+glx")
depends_on("libxt", when="+glx")
depends_on("xrandr", when="+glx")
depends_on("glproto@1.4.14:", when="+glx")
with when("+glx"):
depends_on("libx11")
depends_on("libxcb")
depends_on("libxext")
depends_on("libxt")
depends_on("xrandr")
depends_on("glproto@1.4.14:")
# version specific issue
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96130

View File

@@ -0,0 +1,41 @@
# Copyright 2013-2024 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 *
from spack.pkg.builtin.boost import Boost
class Metacarpa(MakefilePackage):
"""
METACARPA is designed for meta-analysing genetic
association studies with overlapping or related samples,
when details of the overlap or relatedness are unknown.
It implements and expands a method first described by Province and Borecki.
"""
homepage = "https://www.sanger.ac.uk/tool/metacarpa/"
url = "https://github.com/hmgu-itg/metacarpa/archive/refs/tags/1.0.1.tar.gz"
version("1.0.1", sha256="7d8fc774a88bf75a53ef8f74462924abba9b99fccbaa9979654c01e4379fab91")
depends_on("boost@1.60.0")
depends_on(Boost.with_default_variants)
depends_on("cmake")
build_system = "Makefile"
build_directory = "src"
def edit(self, spec, prefix):
makefile = FileFilter("src/Makefile")
makefile.filter(r"^IDIR.*", "IDIR=" + spec["boost"].prefix.include)
makefile.filter(r"^LDIR.*", "LDIR=" + spec["boost"].prefix.lib)
def install(self, spec, prefix):
mkdirp(prefix.src)
install_tree("src", prefix.src)
mkdirp(prefix.bin)
install("src/metacarpa", prefix.bin)

View File

@@ -14,6 +14,11 @@ class Nextflow(Package):
maintainers("dialvarezs", "marcodelapierre")
version(
"24.04.1",
sha256="d1199179e31d0701d86e6c38afa9ccade93f62d545e800824be7767a130510ba",
expand=False,
)
version(
"23.10.1",
sha256="9abc54f1ffb2b834a8135d44300404552d1e27719659cbb635199898677b660a",
@@ -177,7 +182,8 @@ class Nextflow(Package):
deprecated=True,
)
depends_on("java")
depends_on("java@17", when="@24", type="run")
depends_on("java", type="run")
def install(self, spec, prefix):
mkdirp(prefix.bin)

View File

@@ -32,7 +32,11 @@ class OfCatalyst(CMakePackage):
depends_on("openfoam@1806", when="@1806", type=("build", "link", "run"))
depends_on("openfoam@develop", when="@develop", type=("build", "link", "run"))
depends_on("paraview@5.5:+osmesa~qt", when="+full")
with when("+full"):
depends_on("paraview@5.5: ~qt")
depends_on("gl")
requires("^[virtuals=gl] osmesa")
root_cmakelists_dir = "src/catalyst"

View File

@@ -23,6 +23,26 @@ class OneapiLevelZero(CMakePackage):
license("MIT")
version("1.17.2", sha256="f1b7414f468779a6c422d38bd06b2e5a59d861c9b1af826472724078b49b2277")
version("1.17.0", sha256="edf820eab84a5f746fee730604f0381c8811f7942302c0835226715e5ae93a25")
version("1.16.15", sha256="dba50f512c7da81c8d2c487f04c0fcf0ffff79a41f88a90658c96680e7c97be6")
version("1.16.14", sha256="afd1dfc4db6869a3e252bf15a2a6e1d59b4e511671ebc3e29becd4ac4dc4f03e")
version("1.16.11", sha256="885bc356d1ecb74e4d3406ece91503d998dd0b4ab484864c38fd41dac588afbb")
version("1.16.9", sha256="1d348370ba47a7047ae58805a7a33f219d78c8cbb1dd32a0b6c140be66f71d11")
version("1.16.1", sha256="f341dd6355d8da6ee9c29031642b8e8e4259f91c13c72d318c81663af048817e")
version("1.16.0", sha256="e5bf9caddeabf58b73252ada5390a78772001d91ec853ee12636811aeb66db41")
version("1.15.13", sha256="fadda7306dc05c279a9dfc0c60749846351ce5ac7186692201220acb02c59787")
version("1.15.8", sha256="80663dbd4d01d9519185c6e568f2e836bfea7484363f4da8cf5cf77c3bf58602")
version("1.15.7", sha256="3f82c83218cc047dc98a3b0767b874964d757b808d9954a2e8949edfcdddbf81")
version("1.15.1", sha256="aa96edb85a7953041baf8e7d0b0a0e10fa85673e52f5d0466bc2fc802beb9522")
version("1.15.0", sha256="0472f919435e72d93ef00239694c9380692f923fa1d3bf7e7ba79270cf78291c")
version("1.14.0", sha256="44b9cfa039625e4d9b273bebda26597a91d34c039ea22311530777ea386cfe6c")
version("1.13.5", sha256="bb0f37c40b1b2c1eb2c379928314539cac778d3accfc5de66d9f909a2f69fd32")
version("1.13.1", sha256="9c41640edd3738528911405ffe31c3caa9f9a747c43f6a7375a7b2e77eca3192")
version("1.13.0", sha256="8966e16f5152d14fed3b2d526d1a75eb99b8ef870499d8375c5d327345d09e48")
version("1.12.0", sha256="96e6f7ce0179833316f70582ebe4889619349cd4fb1a76efd49a71d8e8ac2e93")
version("1.11.0", sha256="eee9805bdf0973aff5858a32a8c3ac98e0337b64648d96bb8adeaecc0bdda5bd")
version("1.10.0", sha256="2811e4128ff6114020d0a147c2769b9b2e782e68ad49827685c33b9e716bf6ab")
version("1.9.9", sha256="3d1784e790bbaae5f160b920c07e7dc2941640d9c631aaa668ccfd57aafc7b56")
version("1.9.4", sha256="7f91ed993be1e643c752cf95a319a0fc64113d91ec481fbb8a2f478f433d3380")
version("1.8.12", sha256="9c5d3dd912882abe8e2e3ba72f8c27e2a2d86759ac48f6318a0df091204985eb")

View File

@@ -16,6 +16,9 @@ class OpenclCHeaders(CMakePackage):
license("Apache-2.0")
version(
"2024.05.08", sha256="3c3dd236d35f4960028f4f58ce8d963fb63f3d50251d1e9854b76f1caab9a309"
)
version(
"2023.12.14", sha256="407d5e109a70ec1b6cd3380ce357c21e3d3651a91caae6d0d8e1719c69a1791d"
)

View File

@@ -0,0 +1,66 @@
# Copyright 2013-2024 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 OpenclIcdLoader(CMakePackage):
"""Khronos official OpenCL ICD Loader"""
homepage = "https://github.com/KhronosGroup/OpenCL-ICD-Loader"
url = "https://github.com/KhronosGroup/OpenCL-ICD-Loader/archive/refs/tags/v2024.05.08.tar.gz"
maintainers("uphoffc")
license("Apache-2.0", checked_by="uphoffc")
version(
"2024.05.08", sha256="eb2c9fde125ffc58f418d62ad83131ba686cccedcb390cc7e6bb81cc5ef2bd4f"
)
version(
"2023.12.14", sha256="af8df96f1e1030329e8d4892ba3aa761b923838d4c689ef52d97822ab0bd8917"
)
version(
"2023.04.17", sha256="173bdc4f321d550b6578ad2aafc2832f25fbb36041f095e6221025f74134b876"
)
version(
"2023.02.06", sha256="f31a932b470c1e115d6a858b25c437172809b939953dc1cf20a3a15e8785d698"
)
version(
"2022.09.30", sha256="e9522fb736627dd4feae2a9c467a864e7d25bb715f808de8a04eea5a7d394b74"
)
version(
"2022.09.23", sha256="937bbdb52819922e0e38ae765e3c3d76b63be185d62f25e256ea3f77fdaa9913"
)
version(
"2022.05.18", sha256="71f70bba797a501b13b6b0905dc852f3fd6e264d74ce294f2df98d29914c4303"
)
version(
"2022.01.04", sha256="9f21d958af68c1b625a03c2befddd79da95d610614ddab6c291f26f01a947dd8"
)
version(
"2021.06.30", sha256="a50557ed6ff18c81aa1ed5e74700521e389c84ca5cd9188d35d368936e0a4972"
)
version(
"2021.04.29", sha256="c2eb8a15b3d6d0795d609f55a4cea92eaa34571f6a21428d5593673b568ac6fd"
)
depends_on("opencl-c-headers@2024.05.08", when="@2024.05.08")
depends_on("opencl-c-headers@2023.12.14", when="@2023.12.14")
depends_on("opencl-c-headers@2023.04.17", when="@2023.04.17")
depends_on("opencl-c-headers@2023.02.06", when="@2023.02.06")
depends_on("opencl-c-headers@2022.09.30", when="@2022.09.30")
depends_on("opencl-c-headers@2022.09.23", when="@2022.09.23")
depends_on("opencl-c-headers@2022.05.18", when="@2022.05.18")
depends_on("opencl-c-headers@2022.01.04", when="@2022.01.04")
depends_on("opencl-c-headers@2021.06.30", when="@2021.06.30")
depends_on("opencl-c-headers@2021.04.29", when="@2021.04.29")
provides("opencl@:3.0")
def cmake_args(self):
headers_include_dir = self.spec["opencl-c-headers"].prefix.include
args = [self.define("OPENCL_ICD_LOADER_HEADERS_DIR", headers_include_dir)]
return args

View File

@@ -18,12 +18,40 @@
# format returned by platform.system() and 'arch' by platform.machine()
_versions = {
"21.0.3_9": {
"Linux-x86_64": (
"fffa52c22d797b715a962e6c8d11ec7d79b90dd819b5bc51d62137ea4b22a340",
"https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_x64_linux_hotspot_21.0.3_9.tar.gz",
),
"Linux-aarch64": (
"7d3ab0e8eba95bd682cfda8041c6cb6fa21e09d0d9131316fd7c96c78969de31",
"https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_aarch64_linux_hotspot_21.0.3_9.tar.gz",
),
"Darwin-aarch64": (
"b6be6a9568be83695ec6b7cb977f4902f7be47d74494c290bc2a5c3c951e254f",
"https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_aarch64_mac_hotspot_21.0.3_9.tar.gz",
),
},
"21.0.0_35": {
"Linux-x86_64": (
"82f64c53acaa045370d6762ebd7441b74e6fda14b464d54d1ff8ca941ec069e6",
"https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21%2B35/OpenJDK21U-jdk_x64_linux_hotspot_21_35.tar.gz",
)
},
"17.0.11_9": {
"Linux-x86_64": (
"aa7fb6bb342319d227a838af5c363bfa1b4a670c209372f9e6585bd79da6220c",
"https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jdk_x64_linux_hotspot_17.0.11_9.tar.gz",
),
"Linux-aarch64": (
"a900acf3ae56b000afc35468a083b6d6fd695abec87a8abdb02743d5c72f6d6d",
"https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jdk_aarch64_linux_hotspot_17.0.11_9.tar.gz",
),
"Darwin-aarch64": (
"09a162c58dd801f7cfacd87e99703ed11fb439adc71cfa14ceb2d3194eaca01c",
"https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jdk_aarch64_mac_hotspot_17.0.11_9.tar.gz",
),
},
"17.0.8.1_1": {
"Linux-x86_64": (
"c25dfbc334068a48c19c44ce39ad4b8427e309ae1cfa83f23c102e78b8a6dcc0",
@@ -160,6 +188,20 @@
"https://download.java.net/java/GA/jdk15.0.2/0d1cfde4252546c6931946de8db48ee2/7/GPL/openjdk-15.0.2_linux-aarch64_bin.tar.gz",
),
},
"11.0.23_9": {
"Linux-x86_64": (
"23e47ea7a3015be3240f21185fd902adebdcf76530757c9b482c7eb5bd3417c2",
"https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.23%2B9/OpenJDK11U-jdk_x64_linux_hotspot_11.0.23_9.tar.gz",
),
"Linux-aarch64": (
"e00476a7be3c4adfa9b3d55d30768967fd246a8352e518894e183fa444d4d3ce",
"https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.23%2B9/OpenJDK11U-jdk_aarch64_linux_hotspot_11.0.23_9.tar.gz",
),
"Darwin-aarch64": (
"49122443bdeab2c9f468bd400f58f85a9ea462846faa79084fd6fd786d9b492d",
"https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.23%2B9/OpenJDK11U-jdk_aarch64_mac_hotspot_11.0.23_9.tar.gz",
),
},
"11.0.20.1_1": {
"Linux-x86_64": (
"398a64bff002f0e3b0c01ecd24a1a32c83cb72a5255344219e9757d4ddd9f857",

View File

@@ -66,8 +66,6 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
variant("python", default=False, description="Enable Python support", when="@5.6:")
variant("fortran", default=False, description="Enable Fortran support")
variant("mpi", default=True, description="Enable MPI support")
variant("osmesa", default=False, description="Enable OSMesa support")
variant("egl", default=False, description="Enable EGL in the OpenGL library being used")
variant("qt", default=False, description="Enable Qt (gui) support")
variant("opengl2", default=True, description="Enable OpenGL2 backend")
variant("examples", default=False, description="Build examples")
@@ -187,16 +185,12 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
depends_on("gl@3.2:", when="+opengl2")
depends_on("gl@1.2:", when="~opengl2")
depends_on("glew", when="~egl")
depends_on("glew gl=egl", when="+egl")
depends_on("glew")
depends_on("osmesa", when="+osmesa")
for p in ["linux", "cray"]:
depends_on("glx", when="~egl ~osmesa platform={}".format(p))
depends_on("libxt", when="~egl ~osmesa platform={}".format(p))
conflicts("+qt", when="+osmesa")
conflicts("+qt", when="+egl")
conflicts("+egl", when="+osmesa")
depends_on("libxt", when=f"platform={p} ^[virtuals=gl] glx")
requires("^[virtuals=gl] glx", when="+qt", msg="Qt support requires GLX")
depends_on("ospray@2.1:2", when="+raytracing")
depends_on("openimagedenoise", when="+raytracing")
@@ -376,7 +370,7 @@ def flag_handler(self, name, flags):
if self.spec["hdf5"].satisfies("@1.12:"):
flags.append("-DH5_USE_110_API")
return (flags, None, None)
return flags, None, None
def setup_run_environment(self, env):
# paraview 5.5 and later
@@ -424,19 +418,17 @@ def cmake_args(self):
def variant_bool(feature, on="ON", off="OFF"):
"""Ternary for spec variant to ON/OFF string"""
if feature in spec:
if spec.satisfies(feature):
return on
return off
def nvariant_bool(feature):
"""Negated ternary for spec variant to OFF/ON string"""
return variant_bool(feature, on="OFF", off="ON")
def use_x11():
"""Return false if osmesa or egl are requested"""
if "+osmesa" in spec or "+egl" in spec:
return "OFF"
if spec.satisfies("platform=windows"):
if (
spec.satisfies("^[virtuals=gl] osmesa")
or spec.satisfies("^[virtuals=gl] egl")
or spec.satisfies("platform=windows")
):
return "OFF"
return "ON"
@@ -444,7 +436,7 @@ def use_x11():
includes = variant_bool("+development_files")
cmake_args = [
"-DVTK_OPENGL_HAS_OSMESA:BOOL=%s" % variant_bool("+osmesa"),
"-DVTK_OPENGL_HAS_OSMESA:BOOL=%s" % variant_bool("^[virtuals=gl] osmesa"),
"-DVTK_USE_X:BOOL=%s" % use_x11(),
"-DPARAVIEW_INSTALL_DEVELOPMENT_FILES:BOOL=%s" % includes,
"-DBUILD_TESTING:BOOL=OFF",
@@ -453,7 +445,7 @@ def use_x11():
self.define_from_variant("VISIT_BUILD_READER_Silo", "visitbridge"),
]
if "+egl" in spec:
if spec.satisfies("^[virtuals=gl] egl"):
cmake_args.append("-DVTK_OPENGL_HAS_EGL:BOOL=ON")
if spec.satisfies("@5.12:"):
@@ -530,7 +522,7 @@ def use_x11():
# The assumed qt version changed to QT5 (as of paraview 5.2.1),
# so explicitly specify which QT major version is actually being used
if "+qt" in spec:
if spec.satisfies("+qt"):
cmake_args.extend(["-DPARAVIEW_QT_VERSION=%s" % spec["qt"].version[0]])
if "+fortran" in spec:

View File

@@ -92,7 +92,7 @@ class Proj(CMakePackage, AutotoolsPackage):
# CMake 3.19 refactored the FindTiff module interface, update older proj's
# to be compatible with this "new" interface
# patch replaces the TIFF_LIBRARY variable (no longer used) with TIFF_LIBRARIES
patch("proj-8.1-cmake-3.29-new-tiff-interface.patch", when="+tiff @7:9.1.0 ^cmake@3.19:")
patch("proj-8.1-cmake-3.29-new-tiff-interface.patch", when="+tiff @8:9.1.0 ^cmake@3.19:")
patch("proj.cmakelists.5.0.patch", when="@5.0")
patch("proj.cmakelists.5.1.patch", when="@5.1:5.2")
conflicts("cmake@3.19:", when="@:7")

View File

@@ -14,6 +14,8 @@ class PyCloudpickle(PythonPackage):
license("BSD-3-Clause")
version("3.0.0", sha256="996d9a482c6fb4f33c1a35335cf8afd065d2a56e973270364840712d9131a882")
version("2.2.1", sha256="d89684b8de9e34a2a43b3460fbca07d09d6e25ce858df4d5a44240403b6178f5")
version("2.2.0", sha256="3f4219469c55453cfe4737e564b67c2a149109dabf7f242478948b895f61106f")
version("1.6.0", sha256="9bc994f9e9447593bd0a45371f0e7ac7333710fcf64a4eb9834bf149f4ef2f32")
version("1.2.1", sha256="603244e0f552b72a267d47a7d9b347b27a3430f58a0536037a290e7e0e212ecf")
@@ -22,4 +24,6 @@ class PyCloudpickle(PythonPackage):
depends_on("python@3.5:", type=("build", "run"), when="@1.6.0:")
depends_on("python@3.6:", type=("build", "run"), when="@2.2.0:")
depends_on("py-setuptools", type="build")
depends_on("python@3.8:", type=("build", "run"), when="@3:")
depends_on("py-setuptools", type="build", when="@:2")
depends_on("py-flit-core", type="build", when="@3:")

View File

@@ -16,7 +16,10 @@ class PyOrderedSet(PythonPackage):
license("MIT")
version("4.1.0", sha256="694a8e44c87657c59292ede72891eb91d34131f6531463aab3009191c77364a8")
version("4.0.2", sha256="ba93b2df055bca202116ec44b9bead3df33ea63a7d5827ff8e16738b97f33a95")
depends_on("python@3.5:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("python@3.7:", type=("build", "run"), when="@4.1:")
depends_on("py-setuptools", type="build", when="@:4.0")
depends_on("py-flit-core@3.2:3", type="build", when="@4.1:")

View File

@@ -17,9 +17,8 @@ class PyPandas(PythonPackage):
skip_modules = ["pandas.tests", "pandas.plotting._matplotlib", "pandas.core._numba.kernels"]
maintainers("adamjstewart")
license("Apache-2.0")
maintainers("adamjstewart", "rgommers")
version("2.2.2", sha256="9e79019aba43cb4fda9e4d983f8e88ca0373adbb697ae9c6c43093218de28b54")
version("2.2.1", sha256="0ab90f87093c13f3e8fa45b48ba9f39181046e8f3317d3aadb2fffbb1b978572")

View File

@@ -27,4 +27,5 @@ class PyScikitLearnExtra(PythonPackage):
depends_on("py-cython@0.28.5:", type="build")
depends_on("py-numpy@1.13.3:", type=("build", "run"))
depends_on("py-scipy@0.19.1:", type=("build", "run"))
depends_on("py-scikit-learn@0.23:", type=("build", "run"))
# For upperbound see https://github.com/scikit-learn-contrib/scikit-learn-extra/issues/171
depends_on("py-scikit-learn@0.23:1.2", type=("build", "run"))

View File

@@ -11,14 +11,15 @@ class PyScikitLearn(PythonPackage):
"""A set of python modules for machine learning and data mining."""
homepage = "https://scikit-learn.org/"
pypi = "scikit-learn/scikit-learn-0.24.0.tar.gz"
pypi = "scikit-learn/scikit_learn-1.5.0.tar.gz"
git = "https://github.com/scikit-learn/scikit-learn.git"
maintainers("adamjstewart")
license("BSD-3-Clause")
maintainers("adamjstewart", "rgommers")
version("master", branch="master")
version("main", branch="main")
version("master", branch="main", deprecated=True)
version("1.5.0", sha256="789e3db01c750ed6d496fa2db7d50637857b451e57bcae863bff707c1247bef7")
version("1.4.2", sha256="daa1c471d95bad080c6e44b4946c9390a4842adc3082572c20e4f8884e39e959")
version("1.4.0", sha256="d4373c984eba20e393216edd51a3e3eede56cbe93d4247516d205643c3b93121")
version("1.3.2", sha256="a2f54c76accc15a34bfb9066e6c7a56c1e7235dda5762b990792330b52ccfb05")
@@ -46,8 +47,6 @@ class PyScikitLearn(PythonPackage):
version("0.22.1", sha256="51ee25330fc244107588545c70e2f3570cfc4017cff09eed69d6e1d82a212b7d")
version("0.22", sha256="314abf60c073c48a1e95feaae9f3ca47a2139bd77cebb5b877c23a45c9e03012")
variant("openmp", default=True, description="Build with OpenMP support")
# Based on PyPI wheel availability
with default_args(type=("build", "link", "run")):
depends_on("python@3.9:3.12", when="@1.4:")
@@ -58,17 +57,15 @@ class PyScikitLearn(PythonPackage):
depends_on("python@:3.9", when="@0.24:1.0.1")
depends_on("python@:3.8", when="@0.22:0.23")
# pyproject.toml
with default_args(type="build"):
depends_on("py-setuptools")
depends_on("py-setuptools@:59", when="@:1.2.1")
depends_on("py-meson-python@0.15:", when="@1.5:")
depends_on("py-cython@3.0.10:", when="@1.5:")
depends_on("py-cython@3.0.8:", when="@1.4.2:")
depends_on("py-cython@0.29.33:", when="@1.4.0:1.4.1")
depends_on("py-cython@0.29.33:2", when="@1.3")
depends_on("py-cython@0.29.24:2", when="@1.0.2:1.2")
depends_on("py-cython@0.28.5:2", when="@0.21:1.0.1")
# sklearn/_min_dependencies.py
with default_args(type=("build", "link", "run")):
depends_on("py-numpy@1.19.5:", when="@1.4.2:")
depends_on("py-numpy@1.19.5:1", when="@1.4.0:1.4.1")
@@ -76,6 +73,7 @@ class PyScikitLearn(PythonPackage):
depends_on("py-numpy@1.14.6:1", when="@1.0")
depends_on("py-numpy@1.13.3:1", when="@0.23:0.24")
depends_on("py-numpy@1.11.0:1", when="@0.21:0.22")
with default_args(type=("build", "run")):
depends_on("py-scipy@1.6:", when="@1.4:")
depends_on("py-scipy@1.5:", when="@1.3:")
@@ -87,44 +85,31 @@ class PyScikitLearn(PythonPackage):
depends_on("py-joblib@1.1.1:", when="@1.2:")
depends_on("py-joblib@1:", when="@1.1:")
depends_on("py-joblib@0.11:")
depends_on("py-threadpoolctl@2.0.0:", when="@0.23:")
depends_on("llvm-openmp", when="%apple-clang +openmp")
depends_on("py-threadpoolctl@3.1:", when="@1.5:")
depends_on("py-threadpoolctl@2.0:", when="@0.23:")
# Test dependencies
with default_args(type="test"):
depends_on("py-matplotlib@3.3.4:")
depends_on("py-scikit-image@0.17.2:")
depends_on("py-pandas@1.1.5:")
depends_on("py-pytest@7.1.2:")
depends_on("py-pyamg@4:")
depends_on("py-polars@0.19.12:", when="@1.4:")
depends_on("py-pyarrow@12:", when="@1.4:")
depends_on("py-pooch@1.6:", when="@1.2:")
depends_on("llvm-openmp", when="%apple-clang")
# Release tarballs are already cythonized. If you wanted to build a release
# version without OpenMP support, you would need to delete all .c files
# that include omp.h, as well as PKG-INFO.
# See https://github.com/scikit-learn/scikit-learn/issues/14332
conflicts("~openmp", when="@:999", msg="Only master supports ~openmp")
# Historical dependencies
with default_args(type="build"):
depends_on("py-setuptools", when="@:1.4")
depends_on("py-setuptools@:59", when="@:1.2.1")
def url_for_version(self, version):
url = "https://files.pythonhosted.org/packages/source/s/scikit-learn/{}-{}.tar.gz"
if version >= Version("1.5"):
name = "scikit_learn"
else:
name = "scikit-learn"
return url.format(name, version)
def setup_build_environment(self, env):
# enable parallel builds of the sklearn backend
# Enable parallel builds of the sklearn backend
env.append_flags("SKLEARN_BUILD_PARALLEL", str(make_jobs))
# https://scikit-learn.org/stable/developers/advanced_installation.html#building-from-source
if self.spec.satisfies("~openmp"):
env.set("SKLEARN_NO_OPENMP", "True")
# https://scikit-learn.org/stable/developers/advanced_installation.html#mac-osx
elif self.spec.satisfies("@0.21: %apple-clang +openmp"):
# https://scikit-learn.org/stable/developers/advanced_installation.html#macos
if self.spec.satisfies("%apple-clang"):
env.append_flags("CPPFLAGS", self.compiler.openmp_flag)
env.append_flags("CFLAGS", self.spec["llvm-openmp"].headers.include_flags)
env.append_flags("CXXFLAGS", self.spec["llvm-openmp"].headers.include_flags)
env.append_flags("LDFLAGS", self.spec["llvm-openmp"].libs.ld_flags)
@run_after("install")
@on_package_attributes(run_tests=True)
def install_test(self):
# https://scikit-learn.org/stable/developers/advanced_installation.html#testing
with working_dir("spack-test", create=True):
pytest = which("pytest")
pytest(join_path(self.prefix, python_purelib, "sklearn"))

View File

@@ -18,6 +18,7 @@ class PyScipy(PythonPackage):
license("BSD-3-Clause")
version("main", branch="main")
version("1.13.1", sha256="095a87a0312b08dfd6a6155cbbd310a8c51800fc931b8c0b84003014b874ed3c")
version("1.13.0", sha256="58569af537ea29d3f78e5abd18398459f195546bb3be23d16677fb26616cc11e")
version("1.12.0", sha256="4bf5abab8a36d20193c698b0f1fc282c1d083c94723902c447e5d2f1780936a3")
version("1.11.4", sha256="90a2b78e7f5733b9de748f589f09225013685f9b218275257f8a8168ededaeaa")

View File

@@ -17,7 +17,9 @@ class TrilinosCatalystIossAdapter(CMakePackage):
depends_on("bison", type="build")
depends_on("flex", type="build")
depends_on("paraview+mpi+python+osmesa")
depends_on("paraview+mpi+python")
depends_on("gl", type="run")
requires("^[virtuals=gl] osmesa", msg="OSMesa is required for paraview")
depends_on("py-numpy", type=("build", "run"))
# Here we avoid paraview trying to use netcdf-c~parallel-netcdf
# which is netcdf-c's default, even though paraview depends on 'netcdf-c'

View File

@@ -17,8 +17,9 @@ class UfsWeatherModel(CMakePackage):
url = "https://github.com/ufs-community/ufs-weather-model/archive/refs/tags/ufs-v1.1.0.tar.gz"
git = "https://github.com/ufs-community/ufs-weather-model.git"
maintainers("t-brown")
maintainers("AlexanderRichert-NOAA")
version("develop", branch="develop", submodules=True)
version(
"2.0.0",
tag="ufs-v2.0.0",
@@ -32,12 +33,45 @@ class UfsWeatherModel(CMakePackage):
submodules=True,
)
variant("mpi", default=True, description="Enable MPI")
variant(
"32bit", default=True, description="Enable 32-bit single precision arithmetic in dycore"
)
variant("avx2", default=False, description="Enable AVX2 instructions")
variant(
"ccpp", default=True, description="Enable the Common Community Physics Package (CCPP))"
"ccpp_32bit",
default=False,
description="Enable CCPP_32BIT (single precision arithmetic in slow physics)",
)
variant("debug", default=False, description="Enable DEBUG mode", when="@develop")
variant(
"debug_linkmpi",
default=True,
description="Enable linkmpi option when DEBUG mode is on",
when="@develop",
)
variant("inline_post", default=False, description="Enable inline post")
variant("multi_gases", default=False, description="Enable multi gases in physics routines")
variant("moving_nest", default=False, description="Enable moving nest code", when="@develop")
variant("openmp", default=True, description="Enable OpenMP")
variant("pdlib", default=False, description="Enable PDLIB (WW3)", when="@develop")
variant("parallel_netcdf", default=True, description="Enable parallel NetCDF")
variant(
"jedi_driver",
default=False,
description="Enable JEDI as top level driver",
when="@develop",
)
variant(
"cmeps_aoflux",
default=False,
description="Enable atmosphere-ocean flux calculation in mediator",
when="@develop",
)
variant(
"ccpp",
default=True,
description="Enable the Common Community Physics Package (CCPP)",
when="@:2.0.0",
)
variant(
"ccpp_suites",
@@ -45,37 +79,96 @@ class UfsWeatherModel(CMakePackage):
description="CCPP suites to compile",
values=("FV3_GFS_v15p2", "FV3_RRFS_v1alpha", "FV3_GFS_v15p2,FV3_RRFS_v1alpha"),
multi=True,
when="@:2.0.0",
)
dev_ccpp_default = [
"FV3_GFS_v16",
"FV3_GFS_v16_flake",
"FV3_GFS_v17_p8",
"FV3_GFS_v17_p8_rrtmgp",
"FV3_GFS_v15_thompson_mynn_lam3km",
"FV3_WoFS_v0",
"FV3_GFS_v17_p8_mynn",
"FV3_GFS_v17_p8_ugwpv1",
]
variant(
"ccpp_suites",
default=",".join(dev_ccpp_default),
description="CCPP suites to compile",
multi=True,
when="@develop",
)
variant("inline_post", default=False, description="Compile post processing inline")
variant("multi_gases", default=False, description="Enable multi gases in physics routines")
variant("openmp", default=True, description="Enable OpenMP")
variant("parallel_netcdf", default=True, description="Enable parallel I/O in netCDF")
variant(
"quad_precision",
default=False,
description="Enable quad precision for certain grid metric terms in dycore",
when="@:2.0.0",
)
variant(
"simdmultiarch", default=False, description="Enable multi-target SIMD instruction sets"
)
variant("mom6solo", default=False, description="Build MOM6 solo executable", when="@develop")
variant("app", default="ATM", description="UFS application", when="@develop")
depends_on("bacio")
depends_on("esmf@:8.0.0")
depends_on("mpi")
depends_on("nemsio")
depends_on("mpi", when="+mpi")
depends_on("netcdf-c")
depends_on("netcdf-fortran")
depends_on("sp")
depends_on("w3emc")
depends_on("w3nco")
depends_on("python", type="build")
depends_on("esmf@:8.0.0", when="@:2.0.0")
depends_on("nemsio", when="@:2.0.0")
depends_on("w3nco", when="@:2.0.0")
depends_on("bacio@2.4.0:", when="@develop")
depends_on("crtm", when="@develop")
depends_on("esmf@8.3.0:", when="@develop")
depends_on("fms@2022.04: +deprecated_io precision=32,64 constants=GFS", when="@develop")
depends_on("g2", when="@develop")
depends_on("g2tmpl", when="@develop")
depends_on("hdf5+hl+mpi", when="@develop")
depends_on("ip@:4", when="@develop")
depends_on("netcdf-c~parallel-netcdf+mpi", when="@develop")
for app in [
"ATMW",
"ATML",
"NG-GODAS",
"S2S",
"S2SA",
"S2SW",
"S2SWA",
"S2SWAL",
"HAFS",
"HAFSW",
"HAFS-ALL",
"LND",
]:
depends_on("parallelio@2.5.3: +fortran~pnetcdf~shared", when="@develop app=%s" % app)
depends_on("python@3.6:", type="build", when="@develop")
depends_on("sp@2.3.3:", when="@develop")
depends_on("w3emc@2.9.2:", when="@develop")
with when("@develop app=S2SA"):
depends_on("mapl")
depends_on("gftl-shared")
with when("@develop app=S2SWA"):
depends_on("mapl")
depends_on("gftl-shared")
with when("@develop app=ATMAERO"):
depends_on("mapl")
depends_on("gftl-shared")
depends_on("scotch", when="+pdlib")
depends_on("w3nco", when="@:2.0.0")
depends_on("python", type="build", when="@:2.0.0")
conflicts("%gcc@:8", when="@develop")
def setup_build_environment(self, env):
spec = self.spec
env.set("CC", spec["mpi"].mpicc)
env.set("CXX", spec["mpi"].mpicxx)
env.set("FC", spec["mpi"].mpifc)
env.set("CMAKE_C_COMPILER", spec["mpi"].mpicc)
env.set("CMAKE_CXX_COMPILER", spec["mpi"].mpicxx)
env.set("CMAKE_Fortran_COMPILER", spec["mpi"].mpifc)
env.set("ESMFMKFILE", join_path(spec["esmf"].prefix.lib, "esmf.mk"))
env.set("CCPP_SUITES", ",".join([x for x in spec.variants["ccpp_suites"].value if x]))
@@ -91,25 +184,50 @@ def setup_build_environment(self, env):
raise InstallError(msg.format(spec.platform, self.compiler.name))
def cmake_args(self):
from_variant = self.define_from_variant
args = [
from_variant("32BIT", "32bit"),
from_variant("AVX2", "avx2"),
from_variant("CCPP", "ccpp"),
from_variant("INLINE_POST", "inline_post"),
from_variant("MULTI_GASES", "multi_gases"),
from_variant("OPENMP", "openmp"),
from_variant("PARALLEL_NETCDF", "parallel_netcdf"),
from_variant("QUAD_PRECISION", "quad_precision"),
from_variant("SIMDMULTIARCH", "simdmultiarch"),
self.define("AVX2", False), # use target settings from Spack
self.define("SIMDMULTIARCH", False), # use target settings from Spack
self.define_from_variant("CCPP_SUITES", "ccpp_suites").replace(";", ","),
]
variants = [
"32bit",
"app",
"ccpp_32bit",
"cmeps_aoflux",
"debug",
"debug_linkmpi",
"inline_post",
"jedi_driver",
"moving_nest",
"mpi",
"multi_gases",
"openmp",
"parallel_netcdf",
"pdlib",
]
for variant in variants:
args.append(self.define_from_variant(variant.upper(), variant))
if self.spec.satisfies("@:2.0.0"):
args.append(self.define_from_variant("CCPP", "ccpp"))
args.append(self.define_from_variant("QUAD_PRECISION", "quad_precision"))
return args
# This patch can be removed once https://github.com/NOAA-EMC/WW3/issues/1021
# is resolved.
@when("+pdlib ^scotch+shared")
def patch(self):
filter_file(r"(lib[^ ]+)\.a", r"\1.so", "WW3/cmake/FindSCOTCH.cmake")
filter_file("STATIC", "SHARED", "WW3/cmake/FindSCOTCH.cmake")
@run_after("install")
def install_additional_files(self):
mkdirp(prefix.bin)
ufs_src = join_path(self.build_directory, "NEMS.exe")
if self.spec.satisfies("@develop"):
ufs_src = join_path(self.build_directory, "ufs_model")
else:
ufs_src = join_path(self.build_directory, "NEMS.exe")
ufs_dst = join_path(prefix.bin, "ufs_weather_model")
install(ufs_src, ufs_dst)
set_executable(ufs_dst)

View File

@@ -75,7 +75,6 @@ class Visit(CMakePackage):
generator("ninja")
variant("gui", default=True, description="Enable VisIt's GUI")
variant("osmesa", default=False, description="Use OSMesa for off-screen CPU rendering")
variant("adios2", default=True, description="Enable ADIOS2 file format")
variant("hdf5", default=True, description="Enable HDF5 file format")
variant("netcdf", default=True, description="Enable NetCDF file format")
@@ -105,14 +104,13 @@ class Visit(CMakePackage):
# Fix const-correctness in VTK interface
patch("vtk-8.2-constcorrect.patch", when="@3.3.3 ^vtk@8.2.1a")
# Exactly one of 'gui' or 'osmesa' has to be enabled
conflicts("+gui", when="+osmesa")
conflicts(
"+gui", when="^[virtuals=gl] osmesa", msg="GUI cannot be activated with OSMesa front-end"
)
depends_on("cmake@3.14.7:", type="build")
depends_on("mpi", when="+mpi")
requires("^[virtuals=gl] osmesa", when="+osmesa")
# VTK flavors
depends_on("vtk@8.1:8 +opengl2")
depends_on("vtk +qt", when="+gui")
@@ -125,7 +123,7 @@ class Visit(CMakePackage):
depends_on(
"vtk",
patches=[patch("vtk_rendering_opengl2_x11.patch")],
when="~osmesa platform=linux ^vtk@8",
when="platform=linux ^[virtuals=gl] glx ^vtk@8",
)
depends_on("vtk", patches=[patch("vtk_wrapping_python_x11.patch")], when="+python ^vtk@8")
@@ -296,7 +294,7 @@ def cmake_args(self):
self.define("OPENGL_glu_LIBRARY", spec["glu"].libs[0]),
]
)
if "+osmesa" in spec:
if spec.satisfies("^[virtuals=gl] osmesa"):
args.extend(
[
self.define("HAVE_OSMESA", True),