Compare commits
69 Commits
features/r
...
develop-20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
88e738c343 | ||
|
|
8bbc2e2ade | ||
|
|
1509e54435 | ||
|
|
ca164d6619 | ||
|
|
a632576231 | ||
|
|
70b16cfb59 | ||
|
|
1d89d4dc13 | ||
|
|
bc8a0f56ed | ||
|
|
4e09396f8a | ||
|
|
0d488c6e4f | ||
|
|
50e76bc3d3 | ||
|
|
a543fd79f1 | ||
|
|
ab50aa61db | ||
|
|
d06a102e69 | ||
|
|
b0f0d2f1fb | ||
|
|
6029b600f0 | ||
|
|
e6107e336c | ||
|
|
9ef57c3c86 | ||
|
|
3b021bb4ac | ||
|
|
42bac83c2e | ||
|
|
7e38e9e515 | ||
|
|
cf5ffedc23 | ||
|
|
3a9aea753d | ||
|
|
c61da8381c | ||
|
|
8de814eddf | ||
|
|
c9341a2532 | ||
|
|
8b202b3fb2 | ||
|
|
2ecc260e0e | ||
|
|
6130fe8f57 | ||
|
|
d3aa7a620e | ||
|
|
2794e14870 | ||
|
|
cc1e990c7e | ||
|
|
59e6b0b100 | ||
|
|
ec53d02814 | ||
|
|
389c77cf83 | ||
|
|
17c87b4c29 | ||
|
|
91453c5ba0 | ||
|
|
a587a10c86 | ||
|
|
cfe77fcd90 | ||
|
|
6cf36a1817 | ||
|
|
ee40cfa830 | ||
|
|
04f64d4ac6 | ||
|
|
779fef7d41 | ||
|
|
5be3ca396b | ||
|
|
e420441bc2 | ||
|
|
a039dc16fa | ||
|
|
b31c89b110 | ||
|
|
bc4f3d6cbd | ||
|
|
40209506b7 | ||
|
|
6ff07c7753 | ||
|
|
d874c6d79c | ||
|
|
927e739e0a | ||
|
|
dd607d11d5 | ||
|
|
d436e97fc6 | ||
|
|
f3983d60c2 | ||
|
|
40e705d39e | ||
|
|
d92457467a | ||
|
|
4c2734fe14 | ||
|
|
34d791189d | ||
|
|
eec9eced1b | ||
|
|
3bc8a7aa5f | ||
|
|
3b045c289d | ||
|
|
4b93c57d44 | ||
|
|
377e7de0d2 | ||
|
|
0a9c84dd25 | ||
|
|
2ececcd03e | ||
|
|
f4f67adf49 | ||
|
|
220898b4de | ||
|
|
450f938056 |
2
.github/workflows/build-containers.yml
vendored
2
.github/workflows/build-containers.yml
vendored
@@ -57,7 +57,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # @v2
|
||||
|
||||
- uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934
|
||||
- uses: docker/metadata-action@e6428a5c4e294a61438ed7f43155db912025b6b3
|
||||
id: docker_meta
|
||||
with:
|
||||
images: |
|
||||
|
||||
2
.github/workflows/style/requirements.txt
vendored
2
.github/workflows/style/requirements.txt
vendored
@@ -2,6 +2,6 @@ black==23.11.0
|
||||
clingo==5.6.2
|
||||
flake8==6.1.0
|
||||
isort==5.12.0
|
||||
mypy==1.6.1
|
||||
mypy==1.7.1
|
||||
types-six==1.16.21.9
|
||||
vermin==1.6.0
|
||||
|
||||
@@ -82,7 +82,7 @@ class already contains:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
depends_on('cmake', type='build')
|
||||
depends_on("cmake", type="build")
|
||||
|
||||
|
||||
If you need to specify a particular version requirement, you can
|
||||
@@ -90,7 +90,7 @@ override this in your package:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
depends_on('cmake@2.8.12:', type='build')
|
||||
depends_on("cmake@2.8.12:", type="build")
|
||||
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
@@ -137,10 +137,10 @@ and without the :meth:`~spack.build_systems.cmake.CMakeBuilder.define` and
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
'-DWHATEVER:STRING=somevalue',
|
||||
self.define('ENABLE_BROKEN_FEATURE', False),
|
||||
self.define_from_variant('DETECT_HDF5', 'hdf5'),
|
||||
self.define_from_variant('THREADS'), # True if +threads
|
||||
"-DWHATEVER:STRING=somevalue",
|
||||
self.define("ENABLE_BROKEN_FEATURE", False),
|
||||
self.define_from_variant("DETECT_HDF5", "hdf5"),
|
||||
self.define_from_variant("THREADS"), # True if +threads
|
||||
]
|
||||
|
||||
return args
|
||||
@@ -151,10 +151,10 @@ and CMake simply ignores the empty command line argument. For example the follow
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
variant('example', default=True, when='@2.0:')
|
||||
variant("example", default=True, when="@2.0:")
|
||||
|
||||
def cmake_args(self):
|
||||
return [self.define_from_variant('EXAMPLE', 'example')]
|
||||
return [self.define_from_variant("EXAMPLE", "example")]
|
||||
|
||||
will generate ``'cmake' '-DEXAMPLE=ON' ...`` when `@2.0: +example` is met, but will
|
||||
result in ``'cmake' '' ...`` when the spec version is below ``2.0``.
|
||||
@@ -193,9 +193,9 @@ a variant to control this:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
variant('build_type', default='RelWithDebInfo',
|
||||
description='CMake build type',
|
||||
values=('Debug', 'Release', 'RelWithDebInfo', 'MinSizeRel'))
|
||||
variant("build_type", default="RelWithDebInfo",
|
||||
description="CMake build type",
|
||||
values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"))
|
||||
|
||||
However, not every CMake package accepts all four of these options.
|
||||
Grep the ``CMakeLists.txt`` file to see if the default values are
|
||||
@@ -205,9 +205,9 @@ package overrides the default variant with:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
variant('build_type', default='DebugRelease',
|
||||
description='The build type to build',
|
||||
values=('Debug', 'Release', 'DebugRelease'))
|
||||
variant("build_type", default="DebugRelease",
|
||||
description="The build type to build",
|
||||
values=("Debug", "Release", "DebugRelease"))
|
||||
|
||||
For more information on ``CMAKE_BUILD_TYPE``, see:
|
||||
https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html
|
||||
@@ -250,7 +250,7 @@ generator is Ninja. To switch to the Ninja generator, simply add:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
generator = 'Ninja'
|
||||
generator = "Ninja"
|
||||
|
||||
|
||||
``CMakePackage`` defaults to "Unix Makefiles". If you switch to the
|
||||
@@ -258,7 +258,7 @@ Ninja generator, make sure to add:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
depends_on('ninja', type='build')
|
||||
depends_on("ninja", type="build")
|
||||
|
||||
to the package as well. Aside from that, you shouldn't need to do
|
||||
anything else. Spack will automatically detect that you are using
|
||||
@@ -288,7 +288,7 @@ like so:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
root_cmakelists_dir = 'src'
|
||||
root_cmakelists_dir = "src"
|
||||
|
||||
|
||||
Note that this path is relative to the root of the extracted tarball,
|
||||
@@ -304,7 +304,7 @@ different sub-directory, simply override ``build_directory`` like so:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
build_directory = 'my-build'
|
||||
build_directory = "my-build"
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Build and install targets
|
||||
@@ -324,8 +324,8 @@ library or build the documentation, you can add these like so:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
build_targets = ['all', 'docs']
|
||||
install_targets = ['install', 'docs']
|
||||
build_targets = ["all", "docs"]
|
||||
install_targets = ["install", "docs"]
|
||||
|
||||
^^^^^^^
|
||||
Testing
|
||||
|
||||
@@ -934,9 +934,9 @@ a *virtual* ``mkl`` package is declared in Spack.
|
||||
.. code-block:: python
|
||||
|
||||
# Examples for absolute and conditional dependencies:
|
||||
depends_on('mkl')
|
||||
depends_on('mkl', when='+mkl')
|
||||
depends_on('mkl', when='fftw=mkl')
|
||||
depends_on("mkl")
|
||||
depends_on("mkl", when="+mkl")
|
||||
depends_on("mkl", when="fftw=mkl")
|
||||
|
||||
The ``MKLROOT`` environment variable (part of the documented API) will be set
|
||||
during all stages of client package installation, and is available to both
|
||||
@@ -972,8 +972,8 @@ a *virtual* ``mkl`` package is declared in Spack.
|
||||
def configure_args(self):
|
||||
args = []
|
||||
...
|
||||
args.append('--with-blas=%s' % self.spec['blas'].libs.ld_flags)
|
||||
args.append('--with-lapack=%s' % self.spec['lapack'].libs.ld_flags)
|
||||
args.append("--with-blas=%s" % self.spec["blas"].libs.ld_flags)
|
||||
args.append("--with-lapack=%s" % self.spec["lapack"].libs.ld_flags)
|
||||
...
|
||||
|
||||
.. tip::
|
||||
@@ -989,13 +989,13 @@ a *virtual* ``mkl`` package is declared in Spack.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
self.spec['blas'].headers.include_flags
|
||||
self.spec["blas"].headers.include_flags
|
||||
|
||||
and to generate linker options (``-L<dir> -llibname ...``), use the same as above,
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
self.spec['blas'].libs.ld_flags
|
||||
self.spec["blas"].libs.ld_flags
|
||||
|
||||
See
|
||||
:ref:`MakefilePackage <makefilepackage>`
|
||||
|
||||
@@ -88,7 +88,7 @@ override the ``luarocks_args`` method like so:
|
||||
.. code-block:: python
|
||||
|
||||
def luarocks_args(self):
|
||||
return ['flag1', 'flag2']
|
||||
return ["flag1", "flag2"]
|
||||
|
||||
One common use of this is to override warnings or flags for newer compilers, as in:
|
||||
|
||||
|
||||
@@ -48,8 +48,8 @@ class automatically adds the following dependencies:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
depends_on('java', type=('build', 'run'))
|
||||
depends_on('maven', type='build')
|
||||
depends_on("java", type=("build", "run"))
|
||||
depends_on("maven", type="build")
|
||||
|
||||
|
||||
In the ``pom.xml`` file, you may see sections like:
|
||||
@@ -72,8 +72,8 @@ should add:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
depends_on('java@7:', type='build')
|
||||
depends_on('maven@3.5.4:', type='build')
|
||||
depends_on("java@7:", type="build")
|
||||
depends_on("maven@3.5.4:", type="build")
|
||||
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@@ -88,9 +88,9 @@ the build phase. For example:
|
||||
|
||||
def build_args(self):
|
||||
return [
|
||||
'-Pdist,native',
|
||||
'-Dtar',
|
||||
'-Dmaven.javadoc.skip=true'
|
||||
"-Pdist,native",
|
||||
"-Dtar",
|
||||
"-Dmaven.javadoc.skip=true"
|
||||
]
|
||||
|
||||
|
||||
|
||||
@@ -86,8 +86,8 @@ the ``MesonPackage`` base class already contains:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
depends_on('meson', type='build')
|
||||
depends_on('ninja', type='build')
|
||||
depends_on("meson", type="build")
|
||||
depends_on("ninja", type="build")
|
||||
|
||||
|
||||
If you need to specify a particular version requirement, you can
|
||||
@@ -95,8 +95,8 @@ override this in your package:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
depends_on('meson@0.43.0:', type='build')
|
||||
depends_on('ninja', type='build')
|
||||
depends_on("meson@0.43.0:", type="build")
|
||||
depends_on("ninja", type="build")
|
||||
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
@@ -121,7 +121,7 @@ override the ``meson_args`` method like so:
|
||||
.. code-block:: python
|
||||
|
||||
def meson_args(self):
|
||||
return ['--warnlevel=3']
|
||||
return ["--warnlevel=3"]
|
||||
|
||||
|
||||
This method can be used to pass flags as well as variables.
|
||||
|
||||
@@ -118,7 +118,7 @@ so ``PerlPackage`` contains:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
extends('perl')
|
||||
extends("perl")
|
||||
|
||||
|
||||
If your package requires a specific version of Perl, you should
|
||||
@@ -132,14 +132,14 @@ properly. If your package uses ``Makefile.PL`` to build, add:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
depends_on('perl-extutils-makemaker', type='build')
|
||||
depends_on("perl-extutils-makemaker", type="build")
|
||||
|
||||
|
||||
If your package uses ``Build.PL`` to build, add:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
depends_on('perl-module-build', type='build')
|
||||
depends_on("perl-module-build", type="build")
|
||||
|
||||
|
||||
^^^^^^^^^^^^^^^^^
|
||||
@@ -165,11 +165,11 @@ arguments to ``Makefile.PL`` or ``Build.PL`` by overriding
|
||||
.. code-block:: python
|
||||
|
||||
def configure_args(self):
|
||||
expat = self.spec['expat'].prefix
|
||||
expat = self.spec["expat"].prefix
|
||||
|
||||
return [
|
||||
'EXPATLIBPATH={0}'.format(expat.lib),
|
||||
'EXPATINCPATH={0}'.format(expat.include),
|
||||
"EXPATLIBPATH={0}".format(expat.lib),
|
||||
"EXPATINCPATH={0}".format(expat.include),
|
||||
]
|
||||
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ base class already contains:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
depends_on('qt', type='build')
|
||||
depends_on("qt", type="build")
|
||||
|
||||
|
||||
If you want to specify a particular version requirement, or need to
|
||||
@@ -91,7 +91,7 @@ link to the ``qt`` libraries, you can override this in your package:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
depends_on('qt@5.6.0:')
|
||||
depends_on("qt@5.6.0:")
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Passing arguments to qmake
|
||||
@@ -103,7 +103,7 @@ override the ``qmake_args`` method like so:
|
||||
.. code-block:: python
|
||||
|
||||
def qmake_args(self):
|
||||
return ['-recursive']
|
||||
return ["-recursive"]
|
||||
|
||||
|
||||
This method can be used to pass flags as well as variables.
|
||||
@@ -118,7 +118,7 @@ sub-directory by adding the following to the package:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
build_directory = 'src'
|
||||
build_directory = "src"
|
||||
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -163,28 +163,28 @@ attributes that can be used to set ``homepage``, ``url``, ``list_url``, and
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
cran = 'caret'
|
||||
cran = "caret"
|
||||
|
||||
is equivalent to:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
homepage = 'https://cloud.r-project.org/package=caret'
|
||||
url = 'https://cloud.r-project.org/src/contrib/caret_6.0-86.tar.gz'
|
||||
list_url = 'https://cloud.r-project.org/src/contrib/Archive/caret'
|
||||
homepage = "https://cloud.r-project.org/package=caret"
|
||||
url = "https://cloud.r-project.org/src/contrib/caret_6.0-86.tar.gz"
|
||||
list_url = "https://cloud.r-project.org/src/contrib/Archive/caret"
|
||||
|
||||
Likewise, the following ``bioc`` attribute:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
bioc = 'BiocVersion'
|
||||
bioc = "BiocVersion"
|
||||
|
||||
is equivalent to:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
homepage = 'https://bioconductor.org/packages/BiocVersion/'
|
||||
git = 'https://git.bioconductor.org/packages/BiocVersion'
|
||||
homepage = "https://bioconductor.org/packages/BiocVersion/"
|
||||
git = "https://git.bioconductor.org/packages/BiocVersion"
|
||||
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@@ -200,7 +200,7 @@ base class contains:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
extends('r')
|
||||
extends("r")
|
||||
|
||||
|
||||
Take a close look at the homepage for ``caret``. If you look at the
|
||||
@@ -209,7 +209,7 @@ You should add this to your package like so:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
depends_on('r@3.2.0:', type=('build', 'run'))
|
||||
depends_on("r@3.2.0:", type=("build", "run"))
|
||||
|
||||
|
||||
^^^^^^^^^^^^^^
|
||||
@@ -227,7 +227,7 @@ and list all of their dependencies in the following sections:
|
||||
* LinkingTo
|
||||
|
||||
As far as Spack is concerned, all 3 of these dependency types
|
||||
correspond to ``type=('build', 'run')``, so you don't have to worry
|
||||
correspond to ``type=("build", "run")``, so you don't have to worry
|
||||
about the details. If you are curious what they mean,
|
||||
https://github.com/spack/spack/issues/2951 has a pretty good summary:
|
||||
|
||||
@@ -330,7 +330,7 @@ the dependency:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
depends_on('r-lattice@0.20:', type=('build', 'run'))
|
||||
depends_on("r-lattice@0.20:", type=("build", "run"))
|
||||
|
||||
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
@@ -361,20 +361,20 @@ like so:
|
||||
.. code-block:: python
|
||||
|
||||
def configure_args(self):
|
||||
mpi_name = self.spec['mpi'].name
|
||||
mpi_name = self.spec["mpi"].name
|
||||
|
||||
# The type of MPI. Supported values are:
|
||||
# OPENMPI, LAM, MPICH, MPICH2, or CRAY
|
||||
if mpi_name == 'openmpi':
|
||||
Rmpi_type = 'OPENMPI'
|
||||
elif mpi_name == 'mpich':
|
||||
Rmpi_type = 'MPICH2'
|
||||
if mpi_name == "openmpi":
|
||||
Rmpi_type = "OPENMPI"
|
||||
elif mpi_name == "mpich":
|
||||
Rmpi_type = "MPICH2"
|
||||
else:
|
||||
raise InstallError('Unsupported MPI type')
|
||||
raise InstallError("Unsupported MPI type")
|
||||
|
||||
return [
|
||||
'--with-Rmpi-type={0}'.format(Rmpi_type),
|
||||
'--with-mpi={0}'.format(spec['mpi'].prefix),
|
||||
"--with-Rmpi-type={0}".format(Rmpi_type),
|
||||
"--with-mpi={0}".format(spec["mpi"].prefix),
|
||||
]
|
||||
|
||||
|
||||
|
||||
@@ -84,8 +84,8 @@ The ``*.gemspec`` file may contain something like:
|
||||
|
||||
.. code-block:: ruby
|
||||
|
||||
summary = 'An implementation of the AsciiDoc text processor and publishing toolchain'
|
||||
description = 'A fast, open source text processor and publishing toolchain for converting AsciiDoc content to HTML 5, DocBook 5, and other formats.'
|
||||
summary = "An implementation of the AsciiDoc text processor and publishing toolchain"
|
||||
description = "A fast, open source text processor and publishing toolchain for converting AsciiDoc content to HTML 5, DocBook 5, and other formats."
|
||||
|
||||
|
||||
Either of these can be used for the description of the Spack package.
|
||||
@@ -98,7 +98,7 @@ The ``*.gemspec`` file may contain something like:
|
||||
|
||||
.. code-block:: ruby
|
||||
|
||||
homepage = 'https://asciidoctor.org'
|
||||
homepage = "https://asciidoctor.org"
|
||||
|
||||
|
||||
This should be used as the official homepage of the Spack package.
|
||||
@@ -112,21 +112,21 @@ the base class contains:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
extends('ruby')
|
||||
extends("ruby")
|
||||
|
||||
|
||||
The ``*.gemspec`` file may contain something like:
|
||||
|
||||
.. code-block:: ruby
|
||||
|
||||
required_ruby_version = '>= 2.3.0'
|
||||
required_ruby_version = ">= 2.3.0"
|
||||
|
||||
|
||||
This can be added to the Spack package using:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
depends_on('ruby@2.3.0:', type=('build', 'run'))
|
||||
depends_on("ruby@2.3.0:", type=("build", "run"))
|
||||
|
||||
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -124,7 +124,7 @@ are wrong, you can provide the names yourself by overriding
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import_modules = ['PyQt5']
|
||||
import_modules = ["PyQt5"]
|
||||
|
||||
|
||||
These tests often catch missing dependencies and non-RPATHed
|
||||
|
||||
@@ -63,8 +63,8 @@ run package-specific unit tests.
|
||||
.. code-block:: python
|
||||
|
||||
def installtest(self):
|
||||
with working_dir('test'):
|
||||
pytest = which('py.test')
|
||||
with working_dir("test"):
|
||||
pytest = which("py.test")
|
||||
pytest()
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ the following dependency automatically:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
depends_on('python@2.5:', type='build')
|
||||
depends_on("python@2.5:", type="build")
|
||||
|
||||
|
||||
Waf only supports Python 2.5 and up.
|
||||
@@ -113,7 +113,7 @@ phase, you can use:
|
||||
args = []
|
||||
|
||||
if self.run_tests:
|
||||
args.append('--test')
|
||||
args.append("--test")
|
||||
|
||||
return args
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
sphinx==7.2.6
|
||||
sphinxcontrib-programoutput==0.17
|
||||
sphinx_design==0.5.0
|
||||
sphinx-rtd-theme==1.3.0
|
||||
sphinx-rtd-theme==2.0.0
|
||||
python-levenshtein==0.23.0
|
||||
docutils==0.18.1
|
||||
pygments==2.17.1
|
||||
docutils==0.20.1
|
||||
pygments==2.17.2
|
||||
urllib3==2.1.0
|
||||
pytest==7.4.3
|
||||
isort==5.12.0
|
||||
black==23.11.0
|
||||
flake8==6.1.0
|
||||
mypy==1.7.0
|
||||
mypy==1.7.1
|
||||
|
||||
@@ -230,7 +230,11 @@ def _associate_built_specs_with_mirror(self, cache_key, mirror_url):
|
||||
)
|
||||
return
|
||||
|
||||
spec_list = db.query_local(installed=False, in_buildcache=True)
|
||||
spec_list = [
|
||||
s
|
||||
for s in db.query_local(installed=any, in_buildcache=any)
|
||||
if s.external or db.query_local_by_spec_hash(s.dag_hash()).in_buildcache
|
||||
]
|
||||
|
||||
for indexed_spec in spec_list:
|
||||
dag_hash = indexed_spec.dag_hash()
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import llnl.util.tty as tty
|
||||
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
from spack.cmd.common import arguments
|
||||
|
||||
description = "add a spec to an environment"
|
||||
section = "environments"
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
import spack.bootstrap
|
||||
import spack.bootstrap.config
|
||||
import spack.bootstrap.core
|
||||
import spack.cmd.common.arguments
|
||||
import spack.config
|
||||
import spack.main
|
||||
import spack.mirror
|
||||
import spack.spec
|
||||
import spack.stage
|
||||
import spack.util.path
|
||||
from spack.cmd.common import arguments
|
||||
|
||||
description = "manage bootstrap configuration"
|
||||
section = "system"
|
||||
@@ -68,12 +68,8 @@
|
||||
|
||||
|
||||
def _add_scope_option(parser):
|
||||
scopes = spack.config.scopes()
|
||||
parser.add_argument(
|
||||
"--scope",
|
||||
choices=scopes,
|
||||
metavar=spack.config.SCOPES_METAVAR,
|
||||
help="configuration scope to read/modify",
|
||||
"--scope", action=arguments.ConfigScope, help="configuration scope to read/modify"
|
||||
)
|
||||
|
||||
|
||||
@@ -106,7 +102,7 @@ def setup_parser(subparser):
|
||||
disable.add_argument("name", help="name of the source to be disabled", nargs="?", default=None)
|
||||
|
||||
reset = sp.add_parser("reset", help="reset bootstrapping configuration to Spack defaults")
|
||||
spack.cmd.common.arguments.add_common_arguments(reset, ["yes_to_all"])
|
||||
arguments.add_common_arguments(reset, ["yes_to_all"])
|
||||
|
||||
root = sp.add_parser("root", help="get/set the root bootstrap directory")
|
||||
_add_scope_option(root)
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
|
||||
import spack.binary_distribution as bindist
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.config
|
||||
import spack.environment as ev
|
||||
import spack.error
|
||||
@@ -40,6 +39,7 @@
|
||||
import spack.util.web as web_util
|
||||
from spack.build_environment import determine_number_of_jobs
|
||||
from spack.cmd import display_specs
|
||||
from spack.cmd.common import arguments
|
||||
from spack.oci.image import (
|
||||
Digest,
|
||||
ImageReference,
|
||||
@@ -182,13 +182,10 @@ def setup_parser(subparser: argparse.ArgumentParser):
|
||||
)
|
||||
|
||||
# used to construct scope arguments below
|
||||
scopes = spack.config.scopes()
|
||||
|
||||
check.add_argument(
|
||||
"--scope",
|
||||
choices=scopes,
|
||||
metavar=spack.config.SCOPES_METAVAR,
|
||||
default=spack.config.default_modify_scope(),
|
||||
action=arguments.ConfigScope,
|
||||
default=lambda: spack.config.default_modify_scope(),
|
||||
help="configuration scope containing mirrors to check",
|
||||
)
|
||||
check_spec_or_specfile = check.add_mutually_exclusive_group(required=True)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
from spack.cmd.common import arguments
|
||||
|
||||
description = "change an existing spec in an environment"
|
||||
section = "environments"
|
||||
|
||||
@@ -12,13 +12,13 @@
|
||||
|
||||
import spack.bootstrap
|
||||
import spack.caches
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.cmd.test
|
||||
import spack.config
|
||||
import spack.repo
|
||||
import spack.stage
|
||||
import spack.store
|
||||
import spack.util.path
|
||||
from spack.cmd.common import arguments
|
||||
from spack.paths import lib_path, var_path
|
||||
|
||||
description = "remove temporary build files and/or downloaded archives"
|
||||
|
||||
@@ -124,6 +124,33 @@ def __call__(self, parser, namespace, values, option_string=None):
|
||||
setattr(namespace, self.dest, deptype)
|
||||
|
||||
|
||||
class ConfigScope(argparse.Action):
|
||||
"""Pick the currently configured config scopes."""
|
||||
|
||||
def __init__(self, *args, **kwargs) -> None:
|
||||
kwargs.setdefault("metavar", spack.config.SCOPES_METAVAR)
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
@property
|
||||
def default(self):
|
||||
return self._default() if callable(self._default) else self._default
|
||||
|
||||
@default.setter
|
||||
def default(self, value):
|
||||
self._default = value
|
||||
|
||||
@property
|
||||
def choices(self):
|
||||
return spack.config.scopes().keys()
|
||||
|
||||
@choices.setter
|
||||
def choices(self, value):
|
||||
pass
|
||||
|
||||
def __call__(self, parser, namespace, values, option_string=None):
|
||||
setattr(namespace, self.dest, values)
|
||||
|
||||
|
||||
def _cdash_reporter(namespace):
|
||||
"""Helper function to create a CDash reporter. This function gets an early reference to the
|
||||
argparse namespace under construction, so it can later use it to create the object.
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
import llnl.util.tty as tty
|
||||
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.deptypes as dt
|
||||
import spack.error
|
||||
import spack.paths
|
||||
import spack.spec
|
||||
import spack.store
|
||||
from spack import build_environment, traverse
|
||||
from spack.cmd.common import arguments
|
||||
from spack.context import Context
|
||||
from spack.util.environment import dump_environment, pickle_environment
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
import spack.compilers
|
||||
import spack.config
|
||||
import spack.spec
|
||||
from spack.cmd.common import arguments
|
||||
|
||||
description = "manage compilers"
|
||||
section = "system"
|
||||
@@ -23,8 +24,6 @@
|
||||
def setup_parser(subparser):
|
||||
sp = subparser.add_subparsers(metavar="SUBCOMMAND", dest="compiler_command")
|
||||
|
||||
scopes = spack.config.scopes()
|
||||
|
||||
# Find
|
||||
find_parser = sp.add_parser(
|
||||
"find",
|
||||
@@ -47,9 +46,8 @@ def setup_parser(subparser):
|
||||
find_parser.add_argument("add_paths", nargs=argparse.REMAINDER)
|
||||
find_parser.add_argument(
|
||||
"--scope",
|
||||
choices=scopes,
|
||||
metavar=spack.config.SCOPES_METAVAR,
|
||||
default=spack.config.default_modify_scope("compilers"),
|
||||
action=arguments.ConfigScope,
|
||||
default=lambda: spack.config.default_modify_scope("compilers"),
|
||||
help="configuration scope to modify",
|
||||
)
|
||||
|
||||
@@ -60,20 +58,15 @@ def setup_parser(subparser):
|
||||
)
|
||||
remove_parser.add_argument("compiler_spec")
|
||||
remove_parser.add_argument(
|
||||
"--scope",
|
||||
choices=scopes,
|
||||
metavar=spack.config.SCOPES_METAVAR,
|
||||
default=None,
|
||||
help="configuration scope to modify",
|
||||
"--scope", action=arguments.ConfigScope, default=None, help="configuration scope to modify"
|
||||
)
|
||||
|
||||
# List
|
||||
list_parser = sp.add_parser("list", help="list available compilers")
|
||||
list_parser.add_argument(
|
||||
"--scope",
|
||||
choices=scopes,
|
||||
metavar=spack.config.SCOPES_METAVAR,
|
||||
default=spack.config.default_list_scope(),
|
||||
action=arguments.ConfigScope,
|
||||
default=lambda: spack.config.default_list_scope(),
|
||||
help="configuration scope to read from",
|
||||
)
|
||||
|
||||
@@ -82,9 +75,8 @@ def setup_parser(subparser):
|
||||
info_parser.add_argument("compiler_spec")
|
||||
info_parser.add_argument(
|
||||
"--scope",
|
||||
choices=scopes,
|
||||
metavar=spack.config.SCOPES_METAVAR,
|
||||
default=spack.config.default_list_scope(),
|
||||
action=arguments.ConfigScope,
|
||||
default=lambda: spack.config.default_list_scope(),
|
||||
help="configuration scope to read from",
|
||||
)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import spack.config
|
||||
from spack.cmd.common import arguments
|
||||
from spack.cmd.compiler import compiler_list
|
||||
|
||||
description = "list available compilers"
|
||||
@@ -12,13 +12,8 @@
|
||||
|
||||
|
||||
def setup_parser(subparser):
|
||||
scopes = spack.config.scopes()
|
||||
|
||||
subparser.add_argument(
|
||||
"--scope",
|
||||
choices=scopes,
|
||||
metavar=spack.config.SCOPES_METAVAR,
|
||||
help="configuration scope to read/modify",
|
||||
"--scope", action=arguments.ConfigScope, help="configuration scope to read/modify"
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
import llnl.util.filesystem as fs
|
||||
import llnl.util.tty as tty
|
||||
|
||||
import spack.cmd.common.arguments
|
||||
import spack.config
|
||||
import spack.environment as ev
|
||||
import spack.repo
|
||||
@@ -18,6 +17,7 @@
|
||||
import spack.schema.packages
|
||||
import spack.store
|
||||
import spack.util.spack_yaml as syaml
|
||||
from spack.cmd.common import arguments
|
||||
from spack.util.editor import editor
|
||||
|
||||
description = "get and set configuration options"
|
||||
@@ -26,14 +26,9 @@
|
||||
|
||||
|
||||
def setup_parser(subparser):
|
||||
scopes = spack.config.scopes()
|
||||
|
||||
# User can only choose one
|
||||
subparser.add_argument(
|
||||
"--scope",
|
||||
choices=scopes,
|
||||
metavar=spack.config.SCOPES_METAVAR,
|
||||
help="configuration scope to read/modify",
|
||||
"--scope", action=arguments.ConfigScope, help="configuration scope to read/modify"
|
||||
)
|
||||
|
||||
sp = subparser.add_subparsers(metavar="SUBCOMMAND", dest="config_command")
|
||||
@@ -101,13 +96,13 @@ def setup_parser(subparser):
|
||||
setup_parser.add_parser = add_parser
|
||||
|
||||
update = sp.add_parser("update", help="update configuration files to the latest format")
|
||||
spack.cmd.common.arguments.add_common_arguments(update, ["yes_to_all"])
|
||||
arguments.add_common_arguments(update, ["yes_to_all"])
|
||||
update.add_argument("section", help="section to update")
|
||||
|
||||
revert = sp.add_parser(
|
||||
"revert", help="revert configuration files to their state before update"
|
||||
)
|
||||
spack.cmd.common.arguments.add_common_arguments(revert, ["yes_to_all"])
|
||||
arguments.add_common_arguments(revert, ["yes_to_all"])
|
||||
revert.add_argument("section", help="section to update")
|
||||
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
import llnl.util.tty as tty
|
||||
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.cmd.common.confirmation as confirmation
|
||||
import spack.environment as ev
|
||||
import spack.spec
|
||||
from spack.cmd.common import arguments
|
||||
|
||||
description = "remove specs from the concretized lockfile of an environment"
|
||||
section = "environments"
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
from llnl.util.tty.colify import colify
|
||||
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.environment as ev
|
||||
import spack.package_base
|
||||
import spack.repo
|
||||
import spack.store
|
||||
from spack.cmd.common import arguments
|
||||
|
||||
description = "show dependencies of a package"
|
||||
section = "basic"
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
from llnl.util.tty.colify import colify
|
||||
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.environment as ev
|
||||
import spack.repo
|
||||
import spack.store
|
||||
from spack.cmd.common import arguments
|
||||
|
||||
description = "show packages that depend on another"
|
||||
section = "basic"
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
from llnl.util.symlink import symlink
|
||||
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.environment as ev
|
||||
import spack.store
|
||||
from spack.cmd.common import arguments
|
||||
from spack.database import InstallStatuses
|
||||
from spack.error import SpackError
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
import llnl.util.tty as tty
|
||||
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.config
|
||||
import spack.repo
|
||||
from spack.cmd.common import arguments
|
||||
|
||||
description = "developer build: build from code in current working directory"
|
||||
section = "build"
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
import llnl.util.tty as tty
|
||||
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.spec
|
||||
import spack.util.path
|
||||
import spack.version
|
||||
from spack.cmd.common import arguments
|
||||
from spack.error import SpackError
|
||||
|
||||
description = "add a spec to an environment's dev-build information"
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
from llnl.util.tty.color import cprint, get_color_when
|
||||
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.environment as ev
|
||||
import spack.solver.asp as asp
|
||||
import spack.util.environment
|
||||
import spack.util.spack_json as sjson
|
||||
from spack.cmd.common import arguments
|
||||
|
||||
description = "compare two specs"
|
||||
section = "basic"
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
import spack.cmd
|
||||
import spack.cmd.common
|
||||
import spack.cmd.common.arguments
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.cmd.install
|
||||
import spack.cmd.modules
|
||||
import spack.cmd.uninstall
|
||||
@@ -31,6 +30,7 @@
|
||||
import spack.schema.env
|
||||
import spack.spec
|
||||
import spack.tengine
|
||||
from spack.cmd.common import arguments
|
||||
from spack.util.environment import EnvironmentModifications
|
||||
|
||||
description = "manage virtual environments"
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
from llnl.util.tty.colify import colify
|
||||
|
||||
import spack.cmd as cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.environment as ev
|
||||
import spack.repo
|
||||
import spack.store
|
||||
from spack.cmd.common import arguments
|
||||
|
||||
description = "list extensions for package"
|
||||
section = "extensions"
|
||||
|
||||
@@ -14,12 +14,12 @@
|
||||
|
||||
import spack
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments
|
||||
import spack.config
|
||||
import spack.cray_manifest as cray_manifest
|
||||
import spack.detection
|
||||
import spack.error
|
||||
import spack.util.environment
|
||||
from spack.cmd.common import arguments
|
||||
|
||||
description = "manage external packages in Spack configuration"
|
||||
section = "config"
|
||||
@@ -29,8 +29,6 @@
|
||||
def setup_parser(subparser):
|
||||
sp = subparser.add_subparsers(metavar="SUBCOMMAND", dest="external_command")
|
||||
|
||||
scopes = spack.config.scopes()
|
||||
|
||||
find_parser = sp.add_parser("find", help="add external packages to packages.yaml")
|
||||
find_parser.add_argument(
|
||||
"--not-buildable",
|
||||
@@ -48,15 +46,14 @@ def setup_parser(subparser):
|
||||
)
|
||||
find_parser.add_argument(
|
||||
"--scope",
|
||||
choices=scopes,
|
||||
metavar=spack.config.SCOPES_METAVAR,
|
||||
default=spack.config.default_modify_scope("packages"),
|
||||
action=arguments.ConfigScope,
|
||||
default=lambda: spack.config.default_modify_scope("packages"),
|
||||
help="configuration scope to modify",
|
||||
)
|
||||
find_parser.add_argument(
|
||||
"--all", action="store_true", help="search for all packages that Spack knows about"
|
||||
)
|
||||
spack.cmd.common.arguments.add_common_arguments(find_parser, ["tags", "jobs"])
|
||||
arguments.add_common_arguments(find_parser, ["tags", "jobs"])
|
||||
find_parser.add_argument("packages", nargs=argparse.REMAINDER)
|
||||
find_parser.epilog = (
|
||||
'The search is by default on packages tagged with the "build-tools" or '
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
import llnl.util.tty as tty
|
||||
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.config
|
||||
import spack.environment as ev
|
||||
import spack.repo
|
||||
import spack.traverse
|
||||
from spack.cmd.common import arguments
|
||||
|
||||
description = "fetch archives for packages"
|
||||
section = "build"
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
|
||||
import spack.bootstrap
|
||||
import spack.cmd as cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.environment as ev
|
||||
import spack.repo
|
||||
from spack.cmd.common import arguments
|
||||
from spack.database import InstallStatuses
|
||||
|
||||
description = "list and search installed packages"
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
import os
|
||||
|
||||
import spack.binary_distribution
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.mirror
|
||||
import spack.paths
|
||||
import spack.util.gpg
|
||||
import spack.util.url
|
||||
from spack.cmd.common import arguments
|
||||
|
||||
description = "handle GPG actions for spack"
|
||||
section = "packaging"
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
from llnl.util import tty
|
||||
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.config
|
||||
import spack.environment as ev
|
||||
import spack.store
|
||||
from spack.cmd.common import arguments
|
||||
from spack.graph import DAGWithDependencyTypes, SimpleDAG, graph_ascii, graph_dot, static_graph_dot
|
||||
|
||||
description = "generate graphs of package dependency relationships"
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
import llnl.util.tty.color as color
|
||||
from llnl.util.tty.colify import colify
|
||||
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.deptypes as dt
|
||||
import spack.fetch_strategy as fs
|
||||
import spack.install_test
|
||||
import spack.repo
|
||||
import spack.spec
|
||||
import spack.version
|
||||
from spack.cmd.common import arguments
|
||||
from spack.package_base import preferred_version
|
||||
|
||||
description = "get detailed information on a particular package"
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
|
||||
import spack.build_environment
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.config
|
||||
import spack.environment as ev
|
||||
import spack.fetch_strategy
|
||||
@@ -23,6 +22,7 @@
|
||||
import spack.report
|
||||
import spack.spec
|
||||
import spack.store
|
||||
from spack.cmd.common import arguments
|
||||
from spack.error import SpackError
|
||||
from spack.installer import PackageInstaller
|
||||
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
import llnl.util.tty as tty
|
||||
from llnl.util.tty.colify import colify
|
||||
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.deptypes as dt
|
||||
import spack.repo
|
||||
from spack.cmd.common import arguments
|
||||
from spack.version import VersionList
|
||||
|
||||
description = "list and search available packages"
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
import llnl.util.tty as tty
|
||||
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.cmd.find
|
||||
import spack.environment as ev
|
||||
import spack.store
|
||||
import spack.user_environment as uenv
|
||||
import spack.util.environment
|
||||
from spack.cmd.common import arguments
|
||||
|
||||
description = "add package to the user environment"
|
||||
section = "user environment"
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
|
||||
import spack.builder
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.environment as ev
|
||||
import spack.paths
|
||||
import spack.repo
|
||||
import spack.stage
|
||||
from spack.cmd.common import arguments
|
||||
|
||||
description = "print out locations of packages and spack directories"
|
||||
section = "basic"
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
from llnl.util import tty
|
||||
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.error
|
||||
import spack.package_base
|
||||
import spack.repo
|
||||
import spack.store
|
||||
from spack.cmd.common import arguments
|
||||
from spack.database import InstallStatuses
|
||||
|
||||
description = "mark packages as explicitly or implicitly installed"
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
|
||||
import spack.caches
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.concretize
|
||||
import spack.config
|
||||
import spack.environment as ev
|
||||
@@ -20,6 +19,7 @@
|
||||
import spack.spec
|
||||
import spack.util.path
|
||||
import spack.util.web as web_util
|
||||
from spack.cmd.common import arguments
|
||||
from spack.error import SpackError
|
||||
|
||||
description = "manage mirrors (source and binary)"
|
||||
@@ -88,18 +88,14 @@ def setup_parser(subparser):
|
||||
"--mirror-url", metavar="mirror_url", type=str, help="find mirror to destroy by url"
|
||||
)
|
||||
|
||||
# used to construct scope arguments below
|
||||
scopes = spack.config.scopes()
|
||||
|
||||
# Add
|
||||
add_parser = sp.add_parser("add", help=mirror_add.__doc__)
|
||||
add_parser.add_argument("name", help="mnemonic name for mirror", metavar="mirror")
|
||||
add_parser.add_argument("url", help="url of mirror directory from 'spack mirror create'")
|
||||
add_parser.add_argument(
|
||||
"--scope",
|
||||
choices=scopes,
|
||||
metavar=spack.config.SCOPES_METAVAR,
|
||||
default=spack.config.default_modify_scope(),
|
||||
action=arguments.ConfigScope,
|
||||
default=lambda: spack.config.default_modify_scope(),
|
||||
help="configuration scope to modify",
|
||||
)
|
||||
add_parser.add_argument(
|
||||
@@ -117,9 +113,8 @@ def setup_parser(subparser):
|
||||
remove_parser.add_argument("name", help="mnemonic name for mirror", metavar="mirror")
|
||||
remove_parser.add_argument(
|
||||
"--scope",
|
||||
choices=scopes,
|
||||
metavar=spack.config.SCOPES_METAVAR,
|
||||
default=spack.config.default_modify_scope(),
|
||||
action=arguments.ConfigScope,
|
||||
default=lambda: spack.config.default_modify_scope(),
|
||||
help="configuration scope to modify",
|
||||
)
|
||||
|
||||
@@ -136,9 +131,8 @@ def setup_parser(subparser):
|
||||
)
|
||||
set_url_parser.add_argument(
|
||||
"--scope",
|
||||
choices=scopes,
|
||||
metavar=spack.config.SCOPES_METAVAR,
|
||||
default=spack.config.default_modify_scope(),
|
||||
action=arguments.ConfigScope,
|
||||
default=lambda: spack.config.default_modify_scope(),
|
||||
help="configuration scope to modify",
|
||||
)
|
||||
arguments.add_connection_args(set_url_parser, False)
|
||||
@@ -165,9 +159,8 @@ def setup_parser(subparser):
|
||||
set_parser.add_argument("--url", help="url of mirror directory from 'spack mirror create'")
|
||||
set_parser.add_argument(
|
||||
"--scope",
|
||||
choices=scopes,
|
||||
metavar=spack.config.SCOPES_METAVAR,
|
||||
default=spack.config.default_modify_scope(),
|
||||
action=arguments.ConfigScope,
|
||||
default=lambda: spack.config.default_modify_scope(),
|
||||
help="configuration scope to modify",
|
||||
)
|
||||
arguments.add_connection_args(set_parser, False)
|
||||
@@ -176,9 +169,8 @@ def setup_parser(subparser):
|
||||
list_parser = sp.add_parser("list", help=mirror_list.__doc__)
|
||||
list_parser.add_argument(
|
||||
"--scope",
|
||||
choices=scopes,
|
||||
metavar=spack.config.SCOPES_METAVAR,
|
||||
default=spack.config.default_list_scope(),
|
||||
action=arguments.ConfigScope,
|
||||
default=lambda: spack.config.default_list_scope(),
|
||||
help="configuration scope to read from",
|
||||
)
|
||||
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
from llnl.util.tty import color
|
||||
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.config
|
||||
import spack.modules
|
||||
import spack.modules.common
|
||||
import spack.repo
|
||||
from spack.cmd.common import arguments
|
||||
|
||||
description = "manipulate module files"
|
||||
section = "environment"
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
import llnl.util.tty as tty
|
||||
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.config
|
||||
import spack.environment as ev
|
||||
import spack.package_base
|
||||
import spack.repo
|
||||
import spack.traverse
|
||||
from spack.cmd.common import arguments
|
||||
|
||||
description = "patch expanded archive sources in preparation for install"
|
||||
section = "build"
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
from llnl.util.tty.colify import colify
|
||||
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.paths
|
||||
import spack.repo
|
||||
import spack.util.executable as exe
|
||||
import spack.util.package_hash as ph
|
||||
from spack.cmd.common import arguments
|
||||
|
||||
description = "query packages associated with particular git revisions"
|
||||
section = "developer"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import llnl.util.tty as tty
|
||||
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
from spack.cmd.common import arguments
|
||||
|
||||
description = "remove specs from an environment"
|
||||
section = "environments"
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
import spack.config
|
||||
import spack.repo
|
||||
import spack.util.path
|
||||
from spack.cmd.common import arguments
|
||||
|
||||
description = "manage package source repositories"
|
||||
section = "config"
|
||||
@@ -19,7 +20,6 @@
|
||||
|
||||
def setup_parser(subparser):
|
||||
sp = subparser.add_subparsers(metavar="SUBCOMMAND", dest="repo_command")
|
||||
scopes = spack.config.scopes()
|
||||
|
||||
# Create
|
||||
create_parser = sp.add_parser("create", help=repo_create.__doc__)
|
||||
@@ -43,9 +43,8 @@ def setup_parser(subparser):
|
||||
list_parser = sp.add_parser("list", help=repo_list.__doc__)
|
||||
list_parser.add_argument(
|
||||
"--scope",
|
||||
choices=scopes,
|
||||
metavar=spack.config.SCOPES_METAVAR,
|
||||
default=spack.config.default_list_scope(),
|
||||
action=arguments.ConfigScope,
|
||||
default=lambda: spack.config.default_list_scope(),
|
||||
help="configuration scope to read from",
|
||||
)
|
||||
|
||||
@@ -54,9 +53,8 @@ def setup_parser(subparser):
|
||||
add_parser.add_argument("path", help="path to a Spack package repository directory")
|
||||
add_parser.add_argument(
|
||||
"--scope",
|
||||
choices=scopes,
|
||||
metavar=spack.config.SCOPES_METAVAR,
|
||||
default=spack.config.default_modify_scope(),
|
||||
action=arguments.ConfigScope,
|
||||
default=lambda: spack.config.default_modify_scope(),
|
||||
help="configuration scope to modify",
|
||||
)
|
||||
|
||||
@@ -67,9 +65,8 @@ def setup_parser(subparser):
|
||||
)
|
||||
remove_parser.add_argument(
|
||||
"--scope",
|
||||
choices=scopes,
|
||||
metavar=spack.config.SCOPES_METAVAR,
|
||||
default=spack.config.default_modify_scope(),
|
||||
action=arguments.ConfigScope,
|
||||
default=lambda: spack.config.default_modify_scope(),
|
||||
help="configuration scope to modify",
|
||||
)
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
import llnl.util.tty as tty
|
||||
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.repo
|
||||
from spack.cmd.common import arguments
|
||||
|
||||
description = "revert checked out package source code"
|
||||
section = "build"
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
|
||||
import spack
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.config
|
||||
import spack.environment
|
||||
import spack.hash_types as ht
|
||||
import spack.package_base
|
||||
import spack.solver.asp as asp
|
||||
from spack.cmd.common import arguments
|
||||
|
||||
description = "concretize a specs using an ASP solver"
|
||||
section = "developer"
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
|
||||
import spack
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.environment as ev
|
||||
import spack.hash_types as ht
|
||||
import spack.spec
|
||||
import spack.store
|
||||
from spack.cmd.common import arguments
|
||||
|
||||
description = "show what would be installed, given a spec"
|
||||
section = "build"
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
import llnl.util.tty as tty
|
||||
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.config
|
||||
import spack.environment as ev
|
||||
import spack.package_base
|
||||
import spack.repo
|
||||
import spack.stage
|
||||
import spack.traverse
|
||||
from spack.cmd.common import arguments
|
||||
|
||||
description = "expand downloaded archive in preparation for install"
|
||||
section = "build"
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
from llnl.util.tty import colify
|
||||
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.environment as ev
|
||||
import spack.install_test
|
||||
import spack.package_base
|
||||
import spack.repo
|
||||
import spack.report
|
||||
from spack.cmd.common import arguments
|
||||
|
||||
description = "run spack's tests for an install"
|
||||
section = "admin"
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
from llnl.util.filesystem import working_dir
|
||||
|
||||
import spack
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.config
|
||||
import spack.paths
|
||||
import spack.util.git
|
||||
import spack.util.gpg
|
||||
from spack.cmd.common import arguments
|
||||
from spack.util.spack_yaml import syaml_dict
|
||||
|
||||
description = "set up spack for our tutorial (WARNING: modifies config!)"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import llnl.util.tty as tty
|
||||
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
from spack.cmd.common import arguments
|
||||
|
||||
description = "remove specs from an environment"
|
||||
section = "environments"
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
from llnl.util.tty.colify import colify
|
||||
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.cmd.common.confirmation as confirmation
|
||||
import spack.environment as ev
|
||||
import spack.package_base
|
||||
import spack.spec
|
||||
import spack.store
|
||||
import spack.traverse as traverse
|
||||
from spack.cmd.common import arguments
|
||||
from spack.database import InstallStatuses
|
||||
|
||||
description = "remove installed packages"
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
import sys
|
||||
|
||||
import spack.cmd
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.error
|
||||
import spack.user_environment as uenv
|
||||
import spack.util.environment
|
||||
from spack.cmd.common import arguments
|
||||
|
||||
description = "remove package from the user environment"
|
||||
section = "user environment"
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
import llnl.util.tty as tty
|
||||
from llnl.util.tty.colify import colify
|
||||
|
||||
import spack.cmd.common.arguments as arguments
|
||||
import spack.repo
|
||||
import spack.spec
|
||||
from spack.cmd.common import arguments
|
||||
from spack.version import infinity_versions, ver
|
||||
|
||||
description = "list available versions of a package"
|
||||
|
||||
@@ -206,11 +206,15 @@ def tokenize(text: str) -> Iterator[Token]:
|
||||
scanner = ALL_TOKENS.scanner(text) # type: ignore[attr-defined]
|
||||
match: Optional[Match] = None
|
||||
for match in iter(scanner.match, None):
|
||||
# The following two assertions are to help mypy
|
||||
msg = (
|
||||
"unexpected value encountered during parsing. Please submit a bug report "
|
||||
"at https://github.com/spack/spack/issues/new/choose"
|
||||
)
|
||||
assert match is not None, msg
|
||||
assert match.lastgroup is not None, msg
|
||||
yield Token(
|
||||
TokenType.__members__[match.lastgroup], # type: ignore[attr-defined]
|
||||
match.group(), # type: ignore[attr-defined]
|
||||
match.start(), # type: ignore[attr-defined]
|
||||
match.end(), # type: ignore[attr-defined]
|
||||
TokenType.__members__[match.lastgroup], match.group(), match.start(), match.end()
|
||||
)
|
||||
|
||||
if match is None and not text:
|
||||
|
||||
@@ -3134,6 +3134,25 @@ def _develop_specs_from_env(spec, env):
|
||||
spec.constrain(dev_info["spec"])
|
||||
|
||||
|
||||
def _is_reusable_external(packages, spec: spack.spec.Spec) -> bool:
|
||||
"""Returns true iff spec is an external that can be reused.
|
||||
|
||||
Arguments:
|
||||
packages: the packages configuration
|
||||
spec: the spec to check
|
||||
"""
|
||||
for name in {spec.name, *(p.name for p in spec.package.provided)}:
|
||||
for entry in packages.get(name, {}).get("externals", []):
|
||||
if (
|
||||
spec.satisfies(entry["spec"])
|
||||
and spec.external_path == entry.get("prefix")
|
||||
and spec.external_modules == entry.get("modules")
|
||||
):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
||||
class Solver:
|
||||
"""This is the main external interface class for solving.
|
||||
|
||||
@@ -3181,8 +3200,18 @@ def _reusable_specs(self, specs):
|
||||
|
||||
# Specs from buildcaches
|
||||
try:
|
||||
index = spack.binary_distribution.update_cache_and_get_specs()
|
||||
reusable_specs.extend(index)
|
||||
# Specs in a build cache that depend on externals are reusable as long as local
|
||||
# config has matching externals. This should guard against picking up binaries
|
||||
# linked against externals not available locally, while still supporting the use
|
||||
# case of distributing binaries across machines with similar externals.
|
||||
packages = spack.config.get("packages")
|
||||
reusable_specs.extend(
|
||||
[
|
||||
s
|
||||
for s in spack.binary_distribution.update_cache_and_get_specs()
|
||||
if not s.external or _is_reusable_external(packages, s)
|
||||
]
|
||||
)
|
||||
except (spack.binary_distribution.FetchCacheError, IndexError):
|
||||
# this is raised when no mirrors had indices.
|
||||
# TODO: update mirror configuration so it can indicate that the
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
% Integrity constraints on DAG nodes
|
||||
:- attr("root", PackageNode), not attr("node", PackageNode).
|
||||
:- attr("version", PackageNode, _), not attr("node", PackageNode), not attr("virtual_node", PackageNode).
|
||||
:- attr("node_version_satisfies", PackageNode), not attr("node", PackageNode).
|
||||
:- attr("node_version_satisfies", PackageNode, _), not attr("node", PackageNode), not attr("virtual_node", PackageNode).
|
||||
:- attr("hash", PackageNode, _), not attr("node", PackageNode).
|
||||
:- attr("node_platform", PackageNode, _), not attr("node", PackageNode).
|
||||
:- attr("node_os", PackageNode, _), not attr("node", PackageNode).
|
||||
|
||||
@@ -3540,7 +3540,7 @@ def test_environment_created_in_users_location(mutable_mock_env_path, tmp_path):
|
||||
assert os.path.isdir(os.path.join(env_dir, dir_name))
|
||||
|
||||
|
||||
def test_environment_created_from_lockfile_has_view(mock_packages, tmpdir):
|
||||
def test_environment_created_from_lockfile_has_view(mock_packages, temporary_store, tmpdir):
|
||||
"""When an env is created from a lockfile, a view should be generated for it"""
|
||||
env_a = str(tmpdir.join("a"))
|
||||
env_b = str(tmpdir.join("b"))
|
||||
|
||||
@@ -203,7 +203,9 @@ def change(self, changes=None):
|
||||
# TODO: in case tests using this fixture start failing.
|
||||
if sys.modules.get("spack.pkg.changing.changing"):
|
||||
del sys.modules["spack.pkg.changing.changing"]
|
||||
if sys.modules.get("spack.pkg.changing.root"):
|
||||
del sys.modules["spack.pkg.changing.root"]
|
||||
if sys.modules.get("spack.pkg.changing"):
|
||||
del sys.modules["spack.pkg.changing"]
|
||||
|
||||
# Change the recipe
|
||||
@@ -1604,7 +1606,9 @@ def test_installed_version_is_selected_only_for_reuse(
|
||||
assert not new_root["changing"].satisfies("@1.0")
|
||||
|
||||
@pytest.mark.regression("28259")
|
||||
def test_reuse_with_unknown_namespace_dont_raise(self, mock_custom_repository):
|
||||
def test_reuse_with_unknown_namespace_dont_raise(
|
||||
self, temporary_store, mock_custom_repository
|
||||
):
|
||||
with spack.repo.use_repositories(mock_custom_repository, override=False):
|
||||
s = Spec("c").concretized()
|
||||
assert s.namespace != "builtin.mock"
|
||||
@@ -1615,8 +1619,8 @@ def test_reuse_with_unknown_namespace_dont_raise(self, mock_custom_repository):
|
||||
assert s.namespace == "builtin.mock"
|
||||
|
||||
@pytest.mark.regression("28259")
|
||||
def test_reuse_with_unknown_package_dont_raise(self, tmpdir, monkeypatch):
|
||||
builder = spack.repo.MockRepositoryBuilder(tmpdir, namespace="myrepo")
|
||||
def test_reuse_with_unknown_package_dont_raise(self, tmpdir, temporary_store, monkeypatch):
|
||||
builder = spack.repo.MockRepositoryBuilder(tmpdir.mkdir("mock.repo"), namespace="myrepo")
|
||||
builder.add_package("c")
|
||||
with spack.repo.use_repositories(builder.root, override=False):
|
||||
s = Spec("c").concretized()
|
||||
@@ -2423,3 +2427,81 @@ def test_virtuals_provided_together_but_only_one_required_in_dag(self):
|
||||
s = Spec("blas-only-client ^openblas").concretized()
|
||||
assert s.satisfies("^[virtuals=blas] openblas")
|
||||
assert not s.satisfies("^[virtuals=blas,lapack] openblas")
|
||||
|
||||
|
||||
def test_reusable_externals_match(mock_packages, tmpdir):
|
||||
spec = Spec("mpich@4.1%gcc@13.1.0~debug build_system=generic arch=linux-ubuntu23.04-zen2")
|
||||
spec.external_path = tmpdir.strpath
|
||||
spec.external_modules = ["mpich/4.1"]
|
||||
spec._mark_concrete()
|
||||
assert spack.solver.asp._is_reusable_external(
|
||||
{
|
||||
"mpich": {
|
||||
"externals": [
|
||||
{"spec": "mpich@4.1", "prefix": tmpdir.strpath, "modules": ["mpich/4.1"]}
|
||||
]
|
||||
}
|
||||
},
|
||||
spec,
|
||||
)
|
||||
|
||||
|
||||
def test_reusable_externals_match_virtual(mock_packages, tmpdir):
|
||||
spec = Spec("mpich@4.1%gcc@13.1.0~debug build_system=generic arch=linux-ubuntu23.04-zen2")
|
||||
spec.external_path = tmpdir.strpath
|
||||
spec.external_modules = ["mpich/4.1"]
|
||||
spec._mark_concrete()
|
||||
assert spack.solver.asp._is_reusable_external(
|
||||
{
|
||||
"mpi": {
|
||||
"externals": [
|
||||
{"spec": "mpich@4.1", "prefix": tmpdir.strpath, "modules": ["mpich/4.1"]}
|
||||
]
|
||||
}
|
||||
},
|
||||
spec,
|
||||
)
|
||||
|
||||
|
||||
def test_reusable_externals_different_prefix(mock_packages, tmpdir):
|
||||
spec = Spec("mpich@4.1%gcc@13.1.0~debug build_system=generic arch=linux-ubuntu23.04-zen2")
|
||||
spec.external_path = "/other/path"
|
||||
spec.external_modules = ["mpich/4.1"]
|
||||
spec._mark_concrete()
|
||||
assert not spack.solver.asp._is_reusable_external(
|
||||
{
|
||||
"mpich": {
|
||||
"externals": [
|
||||
{"spec": "mpich@4.1", "prefix": tmpdir.strpath, "modules": ["mpich/4.1"]}
|
||||
]
|
||||
}
|
||||
},
|
||||
spec,
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("modules", [None, ["mpich/4.1", "libfabric/1.19"]])
|
||||
def test_reusable_externals_different_modules(mock_packages, tmpdir, modules):
|
||||
spec = Spec("mpich@4.1%gcc@13.1.0~debug build_system=generic arch=linux-ubuntu23.04-zen2")
|
||||
spec.external_path = tmpdir.strpath
|
||||
spec.external_modules = modules
|
||||
spec._mark_concrete()
|
||||
assert not spack.solver.asp._is_reusable_external(
|
||||
{
|
||||
"mpich": {
|
||||
"externals": [
|
||||
{"spec": "mpich@4.1", "prefix": tmpdir.strpath, "modules": ["mpich/4.1"]}
|
||||
]
|
||||
}
|
||||
},
|
||||
spec,
|
||||
)
|
||||
|
||||
|
||||
def test_reusable_externals_different_spec(mock_packages, tmpdir):
|
||||
spec = Spec("mpich@4.1%gcc@13.1.0~debug build_system=generic arch=linux-ubuntu23.04-zen2")
|
||||
spec.external_path = tmpdir.strpath
|
||||
spec._mark_concrete()
|
||||
assert not spack.solver.asp._is_reusable_external(
|
||||
{"mpich": {"externals": [{"spec": "mpich@4.1 +debug", "prefix": tmpdir.strpath}]}}, spec
|
||||
)
|
||||
|
||||
@@ -1239,11 +1239,11 @@ def test_user_config_path_is_default_when_env_var_is_empty(working_env):
|
||||
assert os.path.expanduser("~%s.spack" % os.sep) == spack.paths._get_user_config_path()
|
||||
|
||||
|
||||
def test_default_install_tree(monkeypatch):
|
||||
def test_default_install_tree(monkeypatch, default_config):
|
||||
s = spack.spec.Spec("nonexistent@x.y.z %none@a.b.c arch=foo-bar-baz")
|
||||
monkeypatch.setattr(s, "dag_hash", lambda: "abc123")
|
||||
projection = spack.config.get("config:install_tree:projections:all", scope="defaults")
|
||||
assert s.format(projection) == "foo-bar-baz/none-a.b.c/nonexistent-x.y.z-abc123"
|
||||
_, _, projections = spack.store.parse_install_tree(spack.config.get("config"))
|
||||
assert s.format(projections["all"]) == "foo-bar-baz/none-a.b.c/nonexistent-x.y.z-abc123"
|
||||
|
||||
|
||||
def test_local_config_can_be_disabled(working_env):
|
||||
|
||||
@@ -630,7 +630,7 @@ def platform_config():
|
||||
spack.config.add_default_platform_scope(spack.platforms.real_host().name)
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
@pytest.fixture
|
||||
def default_config():
|
||||
"""Isolates the default configuration from the user configs.
|
||||
|
||||
|
||||
@@ -695,7 +695,7 @@ def test_removing_spec_from_manifest_with_exact_duplicates(
|
||||
|
||||
@pytest.mark.regression("35298")
|
||||
@pytest.mark.only_clingo("Propagation not supported in the original concretizer")
|
||||
def test_variant_propagation_with_unify_false(tmp_path, mock_packages):
|
||||
def test_variant_propagation_with_unify_false(tmp_path, mock_packages, config):
|
||||
"""Spack distributes concretizations to different processes, when unify:false is selected and
|
||||
the number of roots is 2 or more. When that happens, the specs to be concretized need to be
|
||||
properly reconstructed on the worker process, if variant propagation was requested.
|
||||
|
||||
@@ -147,7 +147,8 @@ def test_reverse_environment_modifications(working_env):
|
||||
|
||||
reversal = to_reverse.reversed()
|
||||
|
||||
os.environ = start_env.copy()
|
||||
os.environ.clear()
|
||||
os.environ.update(start_env)
|
||||
|
||||
print(os.environ)
|
||||
to_reverse.apply_modifications()
|
||||
|
||||
@@ -461,6 +461,28 @@ build_systems-build:
|
||||
- artifacts: True
|
||||
job: build_systems-generate
|
||||
|
||||
###########################################
|
||||
# Build tests for different developer tools
|
||||
###########################################
|
||||
.developer-tools:
|
||||
extends: [ ".linux_x86_64_v3" ]
|
||||
variables:
|
||||
SPACK_CI_STACK_NAME: developer-tools
|
||||
|
||||
developer-tools-generate:
|
||||
extends: [ ".developer-tools", ".generate-x86_64"]
|
||||
|
||||
developer-tools-build:
|
||||
extends: [ ".developer-tools", ".build" ]
|
||||
trigger:
|
||||
include:
|
||||
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
|
||||
job: developer-tools-generate
|
||||
strategy: depend
|
||||
needs:
|
||||
- artifacts: True
|
||||
job: developer-tools-generate
|
||||
|
||||
#########################################
|
||||
# RADIUSS
|
||||
#########################################
|
||||
|
||||
@@ -193,7 +193,6 @@ ci:
|
||||
- blt
|
||||
- bzip2
|
||||
- camp
|
||||
- cmake
|
||||
- curl
|
||||
- czmq
|
||||
- darshan-util
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
spack:
|
||||
view: false
|
||||
packages:
|
||||
all:
|
||||
require: target=x86_64_v3
|
||||
concretizer:
|
||||
unify: true
|
||||
definitions:
|
||||
- default_specs:
|
||||
# editors
|
||||
- neovim~no_luajit
|
||||
- py-pynvim
|
||||
- emacs@29.1+json+native+treesitter # note, pulls in gcc
|
||||
# - tree-sitter is a dep, should also have cli but no package
|
||||
- nano # just in case
|
||||
# tags and scope search helpers
|
||||
- universal-ctags # only maintained ctags, works better with c++
|
||||
- direnv
|
||||
# runtimes and compilers
|
||||
- python
|
||||
- llvm+link_llvm_dylib~lld~lldb~polly+python build_type=MinSizeRel # for clangd, clang-format
|
||||
- node-js # for editor plugins etc., pyright language server
|
||||
- npm
|
||||
- go # to build fzf, gh, hub
|
||||
- rust+analysis # fd, ripgrep, hyperfine, exa, rust-analyzer
|
||||
- binutils+ld+gold+plugins # support linking with built gcc
|
||||
# styling and lints
|
||||
- astyle
|
||||
- cppcheck
|
||||
- uncrustify
|
||||
- py-fprettify
|
||||
- py-fortran-language-server
|
||||
- py-python-lsp-server
|
||||
# cli dev tools
|
||||
- ripgrep
|
||||
- gh
|
||||
- fd
|
||||
- bfs
|
||||
- fzf
|
||||
- tree
|
||||
- jq
|
||||
- py-yq
|
||||
- hub
|
||||
- ncdu
|
||||
- eza
|
||||
- lsd
|
||||
- hyperfine
|
||||
- htop
|
||||
- tmux
|
||||
- ccache
|
||||
# ensure we can use a jobserver build and do this fast
|
||||
- gmake
|
||||
- ninja # should be @kitware, can't be because of meson requirement
|
||||
- "openssl certs=system" # must be this, system external does not work
|
||||
- arch:
|
||||
- '%gcc target=x86_64_v3'
|
||||
|
||||
specs:
|
||||
- matrix:
|
||||
- - $default_specs
|
||||
- - $arch
|
||||
|
||||
ci:
|
||||
pipeline-gen:
|
||||
- build-job:
|
||||
image: "ghcr.io/spack/ubuntu20.04-runner-amd64-gcc-11.4:2023.08.01"
|
||||
|
||||
cdash:
|
||||
build-group: Developer Tools
|
||||
@@ -198,12 +198,12 @@ spack:
|
||||
# GPU
|
||||
- aml +ze
|
||||
- amrex +sycl
|
||||
- arborx +sycl ^kokkos +sycl +openmp cxxstd=17 +tests +examples
|
||||
- cabana +sycl ^kokkos +sycl +openmp cxxstd=17 +tests +examples
|
||||
- arborx +sycl ^kokkos +sycl +openmp cxxstd=17 +examples
|
||||
- cabana +sycl ^kokkos +sycl +openmp cxxstd=17 +examples
|
||||
- ginkgo +sycl
|
||||
- heffte +sycl
|
||||
- kokkos +sycl +openmp cxxstd=17 +tests +examples
|
||||
- kokkos-kernels build_type=Release %oneapi ^kokkos +sycl +openmp cxxstd=17 +tests +examples
|
||||
- kokkos +sycl +openmp cxxstd=17 +examples
|
||||
- kokkos-kernels build_type=Release %oneapi ^kokkos +sycl +openmp cxxstd=17 +examples
|
||||
- petsc +sycl
|
||||
- slate +sycl
|
||||
- sundials +sycl cxxstd=17 +examples-install
|
||||
|
||||
@@ -24,7 +24,9 @@ spack:
|
||||
|
||||
# Keras
|
||||
# Bazel codesign issues
|
||||
# - py-keras
|
||||
# - py-keras backend=tensorflow
|
||||
# - py-keras backend=jax
|
||||
- py-keras backend=torch
|
||||
- py-keras-applications
|
||||
- py-keras-preprocessing
|
||||
- py-keras2onnx
|
||||
|
||||
@@ -19,7 +19,9 @@ spack:
|
||||
- py-jaxlib
|
||||
|
||||
# Keras
|
||||
- py-keras
|
||||
# - py-keras backend=tensorflow
|
||||
- py-keras backend=jax
|
||||
- py-keras backend=torch
|
||||
- py-keras-applications
|
||||
- py-keras-preprocessing
|
||||
- py-keras2onnx
|
||||
|
||||
@@ -22,7 +22,9 @@ spack:
|
||||
- py-jaxlib
|
||||
|
||||
# Keras
|
||||
- py-keras
|
||||
# - py-keras backend=tensorflow
|
||||
- py-keras backend=jax
|
||||
- py-keras backend=torch
|
||||
- py-keras-applications
|
||||
- py-keras-preprocessing
|
||||
- py-keras2onnx
|
||||
|
||||
@@ -24,7 +24,9 @@ spack:
|
||||
- py-jaxlib
|
||||
|
||||
# Keras
|
||||
- py-keras
|
||||
# - py-keras backend=tensorflow
|
||||
- py-keras backend=jax
|
||||
# - py-keras backend=torch
|
||||
- py-keras-applications
|
||||
- py-keras-preprocessing
|
||||
- py-keras2onnx
|
||||
|
||||
@@ -184,12 +184,13 @@ def get_os(ver):
|
||||
|
||||
def get_armpl_version_to_3(spec):
|
||||
"""Return version string with 3 numbers"""
|
||||
version_len = len(spec.version)
|
||||
version = spec.version.up_to(3)
|
||||
version_len = len(version)
|
||||
assert version_len == 2 or version_len == 3
|
||||
if version_len == 2:
|
||||
return spec.version.string + ".0"
|
||||
return version.string + ".0"
|
||||
elif version_len == 3:
|
||||
return spec.version.string
|
||||
return version.string
|
||||
|
||||
|
||||
def get_armpl_prefix(spec):
|
||||
|
||||
@@ -18,7 +18,6 @@ class Amg2023(CMakePackage, CudaPackage, ROCmPackage):
|
||||
git = "https://github.com/LLNL/AMG2023.git"
|
||||
|
||||
version("develop", branch="main")
|
||||
version("cmake-build", git="https://github.com/dyokelson/AMG2023.git", branch="cmake")
|
||||
|
||||
variant("mpi", default=True, description="Enable MPI support")
|
||||
variant("openmp", default=False, description="Enable OpenMP support")
|
||||
|
||||
@@ -24,6 +24,7 @@ class Amrex(CMakePackage, CudaPackage, ROCmPackage):
|
||||
maintainers("WeiqunZhang", "asalmgren", "atmyers")
|
||||
|
||||
version("develop", branch="development")
|
||||
version("23.12", sha256="90e00410833d7a82bf6d9e71a70ce85d2bfb89770da7e34d0dda940f2bf5384a")
|
||||
version("23.11", sha256="49b9fea10cd2a2b6cb0fedf7eac8f7889eacc68a05ae5ac7c5702bc0eb1b3848")
|
||||
version("23.10", sha256="3c85aa0ad5f96303e797960a6e0aa37c427f6483f39cdd61dbc2f7ca16357714")
|
||||
version("23.09", sha256="1a539c2628041b17ad910afd9270332060251c8e346b1482764fdb87a4f25053")
|
||||
|
||||
@@ -49,6 +49,6 @@ def cmake_args(self):
|
||||
def setup_dependent_package(self, module, dependent_spec):
|
||||
llvm_dir = self.spec["llvm"].prefix
|
||||
self.spec.clang_include_dirs = llvm_dir.include
|
||||
self.spec.LibClang_include_dir = llvm_dir.lib.clang.join(
|
||||
self.spec.libclang_include_dir = llvm_dir.lib.clang.join(
|
||||
format(self.spec["llvm"].version)
|
||||
).include
|
||||
|
||||
@@ -271,7 +271,8 @@ class Cp2k(MakefilePackage, CudaPackage, CMakePackage, ROCmPackage):
|
||||
depends_on("sirius@7.0.0:7.0", when="@8:8.2")
|
||||
depends_on("sirius@7.2", when="@8.3:8.9")
|
||||
depends_on("sirius@7.3:", when="@9.1")
|
||||
depends_on("sirius@7.4:", when="@2023.2")
|
||||
depends_on("sirius@7.4:7.5", when="@2023.2")
|
||||
depends_on("sirius@7.5:", when="@master")
|
||||
conflicts("~mpi", msg="SIRIUS requires MPI")
|
||||
# sirius support was introduced in 7, but effectively usable starting from CP2K 9
|
||||
conflicts("@:8")
|
||||
|
||||
@@ -345,6 +345,12 @@ def determine_variants(cls, exes, version):
|
||||
def command(self):
|
||||
return Executable(self.prefix.bin.join("curl-config"))
|
||||
|
||||
def flag_handler(self, name, flags):
|
||||
build_system_flags = []
|
||||
if name == "cflags" and self.spec.compiler.name in ["intel", "oneapi"]:
|
||||
build_system_flags = ["-we147"]
|
||||
return flags, None, build_system_flags
|
||||
|
||||
|
||||
class AutotoolsBuilder(AutotoolsBuilder):
|
||||
def configure_args(self):
|
||||
|
||||
@@ -3,85 +3,161 @@
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import os
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class Dftbplus(MakefilePackage):
|
||||
class Dftbplus(CMakePackage, MakefilePackage):
|
||||
"""DFTB+ is an implementation of the
|
||||
Density Functional based Tight Binding (DFTB) method,
|
||||
containing many extensions to the original method."""
|
||||
|
||||
homepage = "https://www.dftbplus.org"
|
||||
url = "https://github.com/dftbplus/dftbplus/archive/19.1.tar.gz"
|
||||
url = "https://github.com/dftbplus/dftbplus/releases/download/22.1/dftbplus-22.1.tar.xz"
|
||||
git = "https://github.com/dftbplus/dftbplus.git"
|
||||
|
||||
version("19.1", sha256="4d07f5c6102f06999d8cfdb1d17f5b59f9f2b804697f14b3bc562e3ea094b8a8")
|
||||
maintainers = ["HaoZeke", "aradi", "iamashwin99"]
|
||||
generator = "Ninja"
|
||||
|
||||
resource(
|
||||
name="slakos",
|
||||
url="https://github.com/dftbplus/testparams/archive/dftbplus-18.2.tar.gz",
|
||||
sha256="bd191b3d240c1a81a8754a365e53a78b581fc92eb074dd5beb8b56a669a8d3d1",
|
||||
destination="external/slakos",
|
||||
when="@18.2:",
|
||||
build_system(
|
||||
conditional("cmake", when="@20.1:"),
|
||||
conditional("makefile", when="@:19.1"),
|
||||
default="cmake",
|
||||
)
|
||||
|
||||
variant("mpi", default=True, description="Build an MPI-paralelised version of the code.")
|
||||
version("main", branch="main")
|
||||
version("22.1", sha256="02daca6f4c6372656598f3ba0311110c8e473c87c8d934d7bb276feaa4cc1c82")
|
||||
version("21.2", sha256="fbeb0e0ea93ab4dc4450f298ec712d2cf991f19f621badf57dae05f0e43b5906")
|
||||
version("21.1", sha256="8c1eb8a38f72c421e2ae20118a6db3a656fa84e8b180ef387e549a73ae77f970")
|
||||
version("20.2.1", sha256="95cc85fdb08bd57ca013bd09f4f902303720e17d015a5fab2d4db63fcb6d9cb3")
|
||||
version("20.2", sha256="eafd219159d600624041658046c89db539ceb0c1d2988b72321c80d9b992c9bf")
|
||||
version("20.1", sha256="04c2b906b8670937c8ddd9c5fb68e7e9921b464840cf54aa3d698db98167d0b7")
|
||||
version(
|
||||
"19.1",
|
||||
deprecated=True,
|
||||
sha256="78f45ef0571c78cf732a5493d32830455a832fa05ebcad43098895e46ad8d220",
|
||||
)
|
||||
|
||||
variant(
|
||||
"gpu",
|
||||
default=False,
|
||||
description="Use the MAGMA library " "for GPU accelerated computation",
|
||||
"api",
|
||||
default=True,
|
||||
description="Whether public API should be included and the DFTB+ library installed.",
|
||||
)
|
||||
variant(
|
||||
"arpack",
|
||||
default=False,
|
||||
description="Whether the ARPACK library should be included (needed for TD-DFTB).",
|
||||
when="~mpi",
|
||||
)
|
||||
variant(
|
||||
"chimes",
|
||||
default=False,
|
||||
when="@21.2:",
|
||||
description="Whether repulsive corrections" "via the ChIMES library should be enabled.",
|
||||
)
|
||||
|
||||
variant(
|
||||
"elsi",
|
||||
default=False,
|
||||
description="Use the ELSI library for large scale systems. "
|
||||
"Only has any effect if you build with '+mpi'",
|
||||
when="+mpi",
|
||||
)
|
||||
variant(
|
||||
"gpu",
|
||||
default=False,
|
||||
description="Use the MAGMA library " "for GPU accelerated computation",
|
||||
)
|
||||
variant(
|
||||
"mbd",
|
||||
default=False,
|
||||
when="@21.1:",
|
||||
description="Whether DFTB+ should be built with many-body-dispersion support.",
|
||||
)
|
||||
variant("mpi", default=False, description="Whether DFTB+ should support MPI-parallelism.")
|
||||
variant(
|
||||
"openmp",
|
||||
default=True,
|
||||
description="Whether OpenMP thread parallisation should be enabled.",
|
||||
)
|
||||
variant(
|
||||
"plumed",
|
||||
default=False,
|
||||
when="@20.1:",
|
||||
description="Whether metadynamics via the PLUMED2 library should be allowed.",
|
||||
)
|
||||
variant("poisson", default=False, description="Whether the Poisson-solver should be included.")
|
||||
variant(
|
||||
"python",
|
||||
default=False,
|
||||
description="Whether the Python components of DFTB+ should be tested and installed.",
|
||||
)
|
||||
variant(
|
||||
"sdftd3",
|
||||
default=False,
|
||||
when="@21.2:",
|
||||
description="Whether the s-dftd3 library should be included",
|
||||
)
|
||||
|
||||
variant(
|
||||
"sockets",
|
||||
default=False,
|
||||
description="Whether the socket library " "(external control) should be linked",
|
||||
)
|
||||
|
||||
variant("arpack", default=False, description="Use ARPACK for excited state DFTB functionality")
|
||||
|
||||
variant(
|
||||
"transport",
|
||||
default=False,
|
||||
when="+shared",
|
||||
description="Whether transport via libNEGF should be included. "
|
||||
"Only affects parallel build. "
|
||||
"(serial version is built without libNEGF/transport)",
|
||||
)
|
||||
variant(
|
||||
"tblite",
|
||||
default=False,
|
||||
when="@21.2:",
|
||||
description="Whether xTB support should be included via tblite.",
|
||||
)
|
||||
|
||||
variant("shared", default=False, description="Most often for the Python wrappers.")
|
||||
|
||||
variant(
|
||||
"dftd3",
|
||||
default=False,
|
||||
when="@:19.1",
|
||||
description="Use DftD3 dispersion library " "(if you need this dispersion model)",
|
||||
)
|
||||
|
||||
depends_on("lapack")
|
||||
depends_on("blas")
|
||||
depends_on("scalapack", when="+mpi")
|
||||
depends_on("mpi", when="+mpi")
|
||||
depends_on("cmake@3.16:", type="build", when="@20.1:")
|
||||
depends_on("ninja@1.10", type="build", when="@20.1:")
|
||||
|
||||
depends_on("blas", when="-mpi")
|
||||
depends_on("lapack", when="-mpi")
|
||||
|
||||
depends_on("arpack-ng", when="+arpack~mpi")
|
||||
depends_on("simple-dftd3", when="+sdftd3")
|
||||
depends_on("elsi", when="+elsi")
|
||||
depends_on("magma", when="+gpu")
|
||||
depends_on("arpack-ng", when="+arpack")
|
||||
depends_on("mpi", when="+mpi")
|
||||
depends_on("plumed", when="+plumed")
|
||||
depends_on("scalapack", when="+mpi")
|
||||
depends_on("python@3.2:", type=("build", "run"))
|
||||
depends_on("py-numpy", type=("build", "run")) # for tests
|
||||
# Only for 19.1
|
||||
depends_on("dftd3-lib@0.9.2", when="+dftd3")
|
||||
|
||||
# Conflicts
|
||||
conflicts("+python", when="~shared")
|
||||
conflicts("-poisson", when="+transport")
|
||||
|
||||
# Extensions
|
||||
extends("python", when="+python")
|
||||
|
||||
@when("@19.1") # Only version without CMake
|
||||
def edit(self, spec, prefix):
|
||||
"""
|
||||
First, change the ROOT variable, because, for some reason,
|
||||
the Makefile and the spack install script run in different directories
|
||||
|
||||
Then, if using GCC, rename the file 'sys/make.x86_64-linux-gnu'
|
||||
to make.arch.
|
||||
|
||||
After that, edit the make.arch to point to the dependencies
|
||||
|
||||
And the last thing we do here is to set the installdir
|
||||
"""
|
||||
dircwd = os.getcwd()
|
||||
@@ -160,3 +236,79 @@ def edit(self, spec, prefix):
|
||||
)
|
||||
|
||||
mconfig.filter("WITH_DFTD3 := .*", "WITH_DFTD3 := 1")
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
self.define_from_variant("WITH_OPENMP", "openmp"),
|
||||
self.define_from_variant("WITH_API", "api"),
|
||||
self.define_from_variant("WITH_ARPACK", "arpack"),
|
||||
self.define_from_variant("WITH_CHIMES", "chimes"),
|
||||
self.define_from_variant("WITH_ELSI", "elsi"),
|
||||
self.define_from_variant("WITH_GPU", "gpu"),
|
||||
self.define_from_variant("WITH_MBD", "mbd"),
|
||||
self.define_from_variant("WITH_MPI", "mpi"),
|
||||
self.define_from_variant("WITH_PLUMED", "plumed"),
|
||||
self.define_from_variant("WITH_POISSON", "poisson"),
|
||||
self.define_from_variant("WITH_PYTHON", "python"),
|
||||
self.define_from_variant("WITH_SDFTD3", "sdftd3"),
|
||||
self.define_from_variant("WITH_SOCKETS", "sockets"),
|
||||
self.define_from_variant("WITH_TBLITE", "tblite"),
|
||||
self.define_from_variant("WITH_TRANSPORT", "transport"),
|
||||
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
|
||||
]
|
||||
# SCALAPACK
|
||||
# Note: dftbplus@20.1 uses plural form of the option names
|
||||
# (e.g. -DSCALAPACK_LIBRARIES)
|
||||
# but dftbplus@20.2 onwards uses singular
|
||||
# (e.g. -DSCALAPACK_LIBRARY)
|
||||
# and plural form is ignored.
|
||||
# We set both inorder to be compatible with all versions.
|
||||
if "+mpi" in self.spec:
|
||||
# we use scalapack for linear algebra
|
||||
args.extend(
|
||||
[
|
||||
self.define("SCALAPACK_FOUND", "true"),
|
||||
self.define("SCALAPACK_INCLUDE_DIRS", self.spec["scalapack"].prefix.include),
|
||||
self.define("SCALAPACK_LIBRARIES", self.spec["scalapack"].libs.joined(";")),
|
||||
self.define("SCALAPACK_LIBRARY", self.spec["scalapack"].libs.joined(";")),
|
||||
]
|
||||
)
|
||||
else:
|
||||
# we define the lapack and blas libraries
|
||||
lapack_libs = self.spec["lapack"].libs.joined(";")
|
||||
blas_libs = self.spec["blas"].libs.joined(";")
|
||||
args.extend(
|
||||
[
|
||||
self.define("LAPACK_FOUND", True),
|
||||
self.define("LAPACK_INCLUDE_DIRS", self.spec["lapack"].prefix.include),
|
||||
self.define("LAPACK_LIBRARIES", lapack_libs),
|
||||
self.define("LAPACK_LIBRARY", lapack_libs),
|
||||
self.define("BLAS_FOUND", True),
|
||||
self.define("BLAS_INCLUDE_DIRS", self.spec["blas"].prefix.include),
|
||||
self.define("BLAS_LIBRARIES", blas_libs),
|
||||
self.define("BLAS_LIBRARY", blas_libs),
|
||||
]
|
||||
)
|
||||
if "+python" in self.spec:
|
||||
args.append(self.define("BUILD_SHARED_LIBS", True))
|
||||
if self.run_tests:
|
||||
args.append("-DWITH_UNIT_TESTS=ON")
|
||||
else:
|
||||
args.append("-DWITH_UNIT_TESTS=OFF")
|
||||
return args
|
||||
|
||||
@run_after("build")
|
||||
@on_package_attributes(run_tests=True)
|
||||
def check_install(self):
|
||||
"""Run ctest after building binary.
|
||||
only run the unit tests. If the unit tests fail, the installation throws
|
||||
a warning."""
|
||||
|
||||
with working_dir(self.build_directory):
|
||||
try:
|
||||
ctest("")
|
||||
except ProcessError:
|
||||
warn = "Unit tests failed.\n"
|
||||
warn += "Please report this failure to:\n"
|
||||
warn += "https://github.com/dftbplus/dftbplus/issues"
|
||||
tty.msg(warn)
|
||||
|
||||
@@ -48,6 +48,8 @@ class Eccodes(CMakePackage):
|
||||
maintainers("skosukhin")
|
||||
|
||||
version("develop", branch="develop")
|
||||
version("2.32.0", sha256="b57e8eeb0eba0c05d66fda5527c4ffa84b5ab35c46bcbc9a2227142973ccb8e6")
|
||||
version("2.31.0", sha256="808ecd2c11fbf2c3f9fc7a36f8c2965b343f3151011b58a1d6e7cc2e6b3cac5d")
|
||||
version("2.25.0", sha256="8975131aac54d406e5457706fd4e6ba46a8cc9c7dd817a41f2aa64ce1193c04e")
|
||||
version("2.24.2", sha256="c60ad0fd89e11918ace0d84c01489f21222b11d6cad3ff7495856a0add610403")
|
||||
version("2.23.0", sha256="cbdc8532537e9682f1a93ddb03440416b66906a4cc25dec3cbd73940d194bf0c")
|
||||
@@ -70,7 +72,7 @@ class Eccodes(CMakePackage):
|
||||
)
|
||||
variant("png", default=False, description="Enable PNG support for decoding/encoding")
|
||||
variant(
|
||||
"aec", default=False, description="Enable Adaptive Entropy Coding for decoding/encoding"
|
||||
"aec", default=True, description="Enable Adaptive Entropy Coding for decoding/encoding"
|
||||
)
|
||||
variant("pthreads", default=False, description="Enable POSIX threads")
|
||||
variant("openmp", default=False, description="Enable OpenMP threads")
|
||||
@@ -106,6 +108,7 @@ class Eccodes(CMakePackage):
|
||||
depends_on("cmake@3.12:", when="@2.19:", type="build")
|
||||
|
||||
depends_on("ecbuild", type="build", when="@develop")
|
||||
depends_on("ecbuild@3.7:", type="build", when="@2.25:")
|
||||
|
||||
conflicts("+openmp", when="+pthreads", msg="Cannot enable both POSIX threads and OMP")
|
||||
|
||||
|
||||
@@ -140,7 +140,8 @@ class Exago(CMakePackage, CudaPackage, ROCmPackage):
|
||||
depends_on("hiop@0.3.99:", when="@0.99:+hiop")
|
||||
depends_on("hiop@0.5.1:", when="@1.1.0:+hiop")
|
||||
depends_on("hiop@0.5.3:", when="@1.3.0:+hiop")
|
||||
depends_on("hiop@0.7.0:1.0.0", when="@1.5.0:+hiop")
|
||||
depends_on("hiop@0.7.0:1.0.0", when="@1.5.0:1.6.0+hiop")
|
||||
depends_on("hiop@1.0.1:", when="@develop:+hiop")
|
||||
|
||||
depends_on("hiop~mpi", when="+hiop~mpi")
|
||||
depends_on("hiop+mpi", when="+hiop+mpi")
|
||||
@@ -160,7 +161,7 @@ class Exago(CMakePackage, CudaPackage, ROCmPackage):
|
||||
depends_on("petsc@3.13:3.14", when="@:1.2")
|
||||
depends_on("petsc@3.16", when="@1.3:1.4")
|
||||
depends_on("petsc@3.18:3.19", when="@1.5")
|
||||
depends_on("petsc@3.20:", when="@1.6:")
|
||||
depends_on("petsc@3.19:", when="@1.6:")
|
||||
|
||||
depends_on("petsc~mpi", when="~mpi")
|
||||
|
||||
|
||||
@@ -31,27 +31,6 @@ class Flecsi(CMakePackage, CudaPackage, ROCmPackage):
|
||||
version(
|
||||
"1.4.1", tag="v1.4.1", commit="ab974c3164056e6c406917c8ca771ffd43c5a031", submodules=True
|
||||
)
|
||||
version(
|
||||
"1.4.develop",
|
||||
git="https://github.com/laristra/flecsi.git",
|
||||
branch="1.4",
|
||||
submodules=True,
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"1.4.2",
|
||||
git="https://github.com/laristra/flecsi.git",
|
||||
tag="v1.4.2",
|
||||
submodules=True,
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"flecsph",
|
||||
git="https://github.com/laristra/flecsi.git",
|
||||
branch="stable/flecsph",
|
||||
submodules=True,
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
variant(
|
||||
"backend",
|
||||
@@ -63,7 +42,7 @@ class Flecsi(CMakePackage, CudaPackage, ROCmPackage):
|
||||
variant("shared", default=True, description="Build shared libraries")
|
||||
variant("flog", default=False, description="Enable logging support")
|
||||
variant("graphviz", default=False, description="Enable GraphViz Support")
|
||||
variant("doc", default=False, description="Enable documentation")
|
||||
variant("doc", default=False, description="Enable documentation", when="@2.2:")
|
||||
variant("hdf5", default=True, description="Enable HDF5 Support")
|
||||
variant(
|
||||
"caliper_detail",
|
||||
@@ -130,10 +109,12 @@ class Flecsi(CMakePackage, CudaPackage, ROCmPackage):
|
||||
depends_on("kokkos@3.2.00:", when="+kokkos @2.0:")
|
||||
depends_on("kokkos +cuda +cuda_constexpr +cuda_lambda", when="+kokkos +cuda @2.0:")
|
||||
depends_on("kokkos +rocm", when="+kokkos +rocm @2.0:")
|
||||
depends_on("kokkos +openmp", when="+kokkos +openmp @2.0:")
|
||||
depends_on("legion@cr", when="backend=legion @2.0:")
|
||||
depends_on("legion+shared", when="backend=legion +shared @2.0:")
|
||||
depends_on("legion+hdf5", when="backend=legion +hdf5 @2.0:")
|
||||
depends_on("legion+kokkos", when="backend=legion +kokkos @2.0:")
|
||||
depends_on("legion+openmp", when="backend=legion +openmp @2.0:")
|
||||
depends_on("legion+cuda", when="backend=legion +cuda @2.0:")
|
||||
depends_on("legion+rocm", when="backend=legion +rocm @2.0:")
|
||||
depends_on("hdf5@1.10.7:", when="backend=legion +hdf5 @2.0:")
|
||||
@@ -143,11 +124,11 @@ class Flecsi(CMakePackage, CudaPackage, ROCmPackage):
|
||||
depends_on("openmpi@4.1.0:", when="@2.0: ^openmpi")
|
||||
|
||||
# FleCSI 2.2+ documentation dependencies
|
||||
depends_on("py-sphinx", when="@2.2: +doc")
|
||||
depends_on("py-sphinx-rtd-theme", when="@2.2: +doc")
|
||||
depends_on("py-recommonmark", when="@2.2: +doc")
|
||||
depends_on("doxygen", when="@2.2: +doc")
|
||||
depends_on("graphviz", when="@2.2: +doc")
|
||||
depends_on("py-sphinx", when="+doc")
|
||||
depends_on("py-sphinx-rtd-theme", when="+doc")
|
||||
depends_on("py-recommonmark", when="+doc")
|
||||
depends_on("doxygen", when="+doc")
|
||||
depends_on("graphviz", when="+doc")
|
||||
|
||||
# Propagate cuda_arch requirement to dependencies
|
||||
for _flag in CudaPackage.cuda_arch_values:
|
||||
@@ -182,6 +163,7 @@ class Flecsi(CMakePackage, CudaPackage, ROCmPackage):
|
||||
# Due to overhauls of Legion and Gasnet spackages
|
||||
# flecsi@:1.4 can no longer be built with a usable legion
|
||||
conflicts("backend=legion", when="@:1.4")
|
||||
conflicts("+hdf5", when="@2: backend=hpx", msg="HPX backend doesn't support HDF5")
|
||||
|
||||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
@@ -217,7 +199,6 @@ def cmake_args(self):
|
||||
self.define_from_variant("ENABLE_KOKKOS", "kokkos"),
|
||||
self.define_from_variant("ENABLE_OPENMP", "openmp"),
|
||||
self.define_from_variant("ENABLE_DOXYGEN", "doxygen"),
|
||||
self.define_from_variant("ENABLE_DOCUMENTATION", "doc"),
|
||||
self.define_from_variant("ENABLE_COVERAGE_BUILD", "coverage"),
|
||||
self.define_from_variant("ENABLE_FLOG", "flog"),
|
||||
self.define_from_variant("ENABLE_FLECSIT", "tutorial"),
|
||||
|
||||
@@ -30,6 +30,7 @@ class Gdal(CMakePackage, AutotoolsPackage, PythonExtension):
|
||||
|
||||
maintainers("adamjstewart")
|
||||
|
||||
version("3.8.1", sha256="75a20b23879bfa3d8c0db68e1d6f8b924f7f9d97f5fed089b01a72e404293900")
|
||||
version("3.8.0", sha256="ec0f78d9dc32352aeac6edc9c3b27a991b91f9dc6f92c452207d84431c58757d")
|
||||
version("3.7.3", sha256="e0a6f0c453ea7eb7c09967f50ac49426808fcd8f259dbc9888140eb69d7ffee6")
|
||||
version("3.7.2", sha256="40c0068591d2c711c699bbb734319398485ab169116ac28005d8302f80b923ad")
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
@IntelOneApiPackage.update_description
|
||||
class IntelMpi(IntelPackage):
|
||||
"""Intel MPI. This package has been replaced by intel-oneapi-mpi."""
|
||||
"""Intel MPI. This package has been deprecated. Use intel-oneapi-mpi instead."""
|
||||
|
||||
maintainers("rscohn2")
|
||||
|
||||
@@ -18,107 +18,128 @@ class IntelMpi(IntelPackage):
|
||||
"2019.10.317",
|
||||
sha256="28e1b615e63d2170a99feedc75e3b0c5a7e1a07dcdaf0a4181831b07817a5346",
|
||||
url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/17534/l_mpi_2019.10.317.tgz",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2019.9.304",
|
||||
sha256="618a5dc2de54306645e6428c5eb7d267b54b11b5a83dfbcad7d0f9e0d90bb2e7",
|
||||
url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/17263/l_mpi_2019.9.304.tgz",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2019.8.254",
|
||||
sha256="fa163b4b79bd1b7509980c3e7ad81b354fc281a92f9cf2469bf4d323899567c0",
|
||||
url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16814/l_mpi_2019.8.254.tgz",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2019.7.217",
|
||||
sha256="90383b0023f84ac003a55d8bb29dbcf0c639f43a25a2d8d8698a16e770ac9c07",
|
||||
url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16546/l_mpi_2019.7.217.tgz",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2019.6.166",
|
||||
sha256="119be69f1117c93a9e5e9b8b4643918e55d2a55a78ad9567f77d16cdaf18cd6e",
|
||||
url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16120/l_mpi_2019.6.166.tgz",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2019.5.281",
|
||||
sha256="9c59da051f1325b221e5bc4d8b689152e85d019f143069fa39e17989306811f4",
|
||||
url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15838/l_mpi_2019.5.281.tgz",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2019.4.243",
|
||||
sha256="233a8660b92ecffd89fedd09f408da6ee140f97338c293146c9c080a154c5fcd",
|
||||
url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15553/l_mpi_2019.4.243.tgz",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2019.3.199",
|
||||
sha256="5304346c863f64de797250eeb14f51c5cfc8212ff20813b124f20e7666286990",
|
||||
url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15260/l_mpi_2019.3.199.tgz",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2019.2.187",
|
||||
sha256="6a3305933b5ef9e3f7de969e394c91620f3fa4bb815a4f439577739d04778b20",
|
||||
url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15040/l_mpi_2019.2.187.tgz",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2019.1.144",
|
||||
sha256="dac86a5db6b86503313742b17535856a432955604f7103cb4549a9bfc256c3cd",
|
||||
url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/14879/l_mpi_2019.1.144.tgz",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2019.0.117",
|
||||
sha256="dfb403f49c1af61b337aa952b71289c7548c3a79c32c57865eab0ea0f0e1bc08",
|
||||
url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13584/l_mpi_2019.0.117.tgz",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2018.4.274",
|
||||
sha256="a1114b3eb4149c2f108964b83cad02150d619e50032059d119ac4ffc9d5dd8e0",
|
||||
url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13741/l_mpi_2018.4.274.tgz",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2018.3.222",
|
||||
sha256="5021d14b344fc794e89f146e4d53d70184d7048610895d7a6a1e8ac0cf258999",
|
||||
url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13112/l_mpi_2018.3.222.tgz",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2018.2.199",
|
||||
sha256="0927f1bff90d10974433ba2892e3fd38e6fee5232ab056a9f9decf565e814460",
|
||||
url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12748/l_mpi_2018.2.199.tgz",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2018.1.163",
|
||||
sha256="130b11571c3f71af00a722fa8641db5a1552ac343d770a8304216d8f5d00e75c",
|
||||
url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12414/l_mpi_2018.1.163.tgz",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2018.0.128",
|
||||
sha256="debaf2cf80df06db9633dfab6aa82213b84a665a55ee2b0178403906b5090209",
|
||||
url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12120/l_mpi_2018.0.128.tgz",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2017.4.239",
|
||||
sha256="5a1048d284dce8bc75b45789471c83c94b3c59f8f159cab43d783fc44302510b",
|
||||
url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12209/l_mpi_2017.4.239.tgz",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2017.3.196",
|
||||
sha256="dad9efbc5bbd3fd27cce7e1e2507ad77f342d5ecc929747ae141c890e7fb87f0",
|
||||
url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11595/l_mpi_2017.3.196.tgz",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2017.2.174",
|
||||
sha256="106a4b362c13ddc6978715e50f5f81c58c1a4c70cd2d20a99e94947b7e733b88",
|
||||
url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11334/l_mpi_2017.2.174.tgz",
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"2017.1.132",
|
||||
sha256="8d30a63674fe05f17b0a908a9f7d54403018bfed2de03c208380b171ab99be82",
|
||||
url="http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/11014/l_mpi_2017.1.132.tgz",
|
||||
deprecated=True,
|
||||
)
|
||||
# built from parallel_studio_xe_2016.3.068
|
||||
version(
|
||||
"5.1.3.223",
|
||||
sha256="544f4173b09609beba711fa3ba35567397ff3b8390e4f870a3307f819117dd9b",
|
||||
url="https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/9278/l_mpi_p_5.1.3.223.tgz",
|
||||
deprecated=True,
|
||||
)
|
||||
|
||||
provides("mpi")
|
||||
|
||||
@@ -25,6 +25,7 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
|
||||
|
||||
version("master", branch="master")
|
||||
version("develop", branch="develop")
|
||||
version("4.2.00", sha256="ac08765848a0a6ac584a0a46cd12803f66dd2a2c2db99bb17c06ffc589bf5be8")
|
||||
version("4.1.00", sha256="cf725ea34ba766fdaf29c884cfe2daacfdc6dc2d6af84042d1c78d0f16866275")
|
||||
version("4.0.01", sha256="bb942de8afdd519fd6d5d3974706bfc22b6585a62dd565c12e53bdb82cd154f0")
|
||||
version("4.0.00", sha256="1829a423883d4b44223c7c3a53d3c51671145aad57d7d23e6a1a4bebf710dcf6")
|
||||
@@ -155,6 +156,7 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
|
||||
"gfx906": "vega906",
|
||||
"gfx908": "vega908",
|
||||
"gfx90a": "vega90A",
|
||||
"gfx942": "amd_gfx942",
|
||||
"gfx1030": "navi1030",
|
||||
"gfx1100": "navi1100",
|
||||
}
|
||||
@@ -234,6 +236,7 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
|
||||
|
||||
# Patches
|
||||
patch("hpx_profiling_fences.patch", when="@3.5.00 +hpx")
|
||||
patch("sycl_bhalft_test.patch", when="@4.2.00 +sycl")
|
||||
|
||||
variant("shared", default=True, description="Build shared libraries")
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
diff -ruN spack-src/core/unit_test/TestNumericTraits.hpp spack-src-patched/core/unit_test/TestNumericTraits.hpp
|
||||
--- spack-src/core/unit_test/TestNumericTraits.hpp 2023-11-20 13:26:46.000000000 -0800
|
||||
+++ spack-src-patched/core/unit_test/TestNumericTraits.hpp 2023-11-28 12:06:44.216150685 -0800
|
||||
@@ -110,8 +110,8 @@
|
||||
|
||||
KOKKOS_FUNCTION void operator()(Epsilon, int, int& e) const {
|
||||
using Kokkos::Experimental::epsilon;
|
||||
- auto const eps = epsilon<T>::value;
|
||||
- auto const one = T(1);
|
||||
+ T const eps = epsilon<T>::value;
|
||||
+ T const one = 1;
|
||||
// Avoid higher precision intermediate representation
|
||||
compare() = one + eps;
|
||||
e += (int)!(compare() != one);
|
||||
@@ -3,13 +3,14 @@
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
import datetime as dt
|
||||
import os
|
||||
|
||||
import archspec
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class Lammps(CMakePackage, CudaPackage, ROCmPackage):
|
||||
class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension):
|
||||
"""LAMMPS stands for Large-scale Atomic/Molecular Massively
|
||||
Parallel Simulator.
|
||||
"""
|
||||
@@ -28,10 +29,16 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage):
|
||||
# marked deprecated=True
|
||||
# * patch releases older than a stable release should be marked deprecated=True
|
||||
version("develop", branch="develop")
|
||||
version("20231121", sha256="704d8a990874a425bcdfe0245faf13d712231ba23f014a3ebc27bc14398856f1")
|
||||
version(
|
||||
"20230802.1",
|
||||
sha256="0e5568485e5ee080412dba44a1b7a93f864f1b5c75121f11d528854269953ed0",
|
||||
preferred=True,
|
||||
)
|
||||
version(
|
||||
"20230802",
|
||||
sha256="48dc8b0b0583689e80ea2052275acbc3e3fce89707ac557e120db5564257f7df",
|
||||
preferred=True,
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"20230615",
|
||||
@@ -343,6 +350,7 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage):
|
||||
)
|
||||
|
||||
stable_versions = {
|
||||
"20230802.1",
|
||||
"20230802",
|
||||
"20220623.4",
|
||||
"20220623.3",
|
||||
@@ -437,7 +445,7 @@ def url_for_version(self, version):
|
||||
"mofff": {"when": "@20210702:"},
|
||||
"molecule": {"default": True},
|
||||
"molfile": {"when": "@20210702:"},
|
||||
"mpiio": {},
|
||||
"mpiio": {"when": "@:20230802.1"},
|
||||
"netcdf": {"when": "@20210702:"},
|
||||
"openmp-package": {},
|
||||
"opt": {},
|
||||
@@ -530,7 +538,12 @@ def url_for_version(self, version):
|
||||
variant("ffmpeg", default=False, description="Build with ffmpeg support")
|
||||
variant("openmp", default=True, description="Build with OpenMP")
|
||||
variant("opencl", default=False, description="Build with OpenCL")
|
||||
variant("exceptions", default=False, description="Build with lammps exceptions")
|
||||
variant(
|
||||
"exceptions",
|
||||
default=False,
|
||||
description="Build with lammps exceptions",
|
||||
when="@:20230802.1",
|
||||
)
|
||||
variant(
|
||||
"cuda_mps",
|
||||
default=False,
|
||||
@@ -563,6 +576,7 @@ def url_for_version(self, version):
|
||||
multi=False,
|
||||
)
|
||||
|
||||
depends_on("cmake@3.16:", when="@20231121:")
|
||||
depends_on("mpi", when="+mpi")
|
||||
depends_on("mpi", when="+mpiio")
|
||||
depends_on("fftw-api@3", when="+kspace")
|
||||
@@ -602,11 +616,14 @@ def url_for_version(self, version):
|
||||
depends_on("plumed", when="+plumed")
|
||||
depends_on("eigen@3:", when="+user-smd")
|
||||
depends_on("eigen@3:", when="+machdyn")
|
||||
depends_on("py-cython", when="+mliap+python")
|
||||
depends_on("py-cython", when="+ml-iap+python")
|
||||
depends_on("py-numpy", when="+python")
|
||||
depends_on("py-mpi4py", when="+python+mpi")
|
||||
depends_on("py-setuptools", when="@20220217:+python", type="build")
|
||||
depends_on("py-cython", when="+mliap+python", type="build")
|
||||
depends_on("py-cython", when="+ml-iap+python", type="build")
|
||||
depends_on("py-pip", when="+python", type="build")
|
||||
depends_on("py-wheel", when="+python", type="build")
|
||||
depends_on("py-build", when="+python", type="build")
|
||||
depends_on("py-numpy", when="+python", type=("build", "run"))
|
||||
depends_on("py-mpi4py", when="+python+mpi", type=("build", "run"))
|
||||
depends_on("py-setuptools@42:", when="@20220217:+python", type=("build", "run"))
|
||||
depends_on("n2p2@2.1.4:", when="+user-hdnnp")
|
||||
depends_on("n2p2@2.1.4:", when="+ml-hdnnp")
|
||||
depends_on("n2p2+shared", when="+lib ^n2p2")
|
||||
@@ -686,8 +703,8 @@ def url_for_version(self, version):
|
||||
# Older LAMMPS does not compile with Kokkos 4.x
|
||||
conflicts(
|
||||
"^kokkos@4:",
|
||||
when="@:20230802",
|
||||
msg="LAMMPS is incompatible with Kokkos 4.x until @20230802",
|
||||
when="@:20230802.1",
|
||||
msg="LAMMPS is incompatible with Kokkos 4.x until @20230802.1",
|
||||
)
|
||||
|
||||
patch("lib.patch", when="@20170901")
|
||||
@@ -706,6 +723,16 @@ def url_for_version(self, version):
|
||||
)
|
||||
patch("hip_cmake.patch", when="@20220623:20221222 ~kokkos+rocm")
|
||||
|
||||
# Add large potential files
|
||||
resource(
|
||||
name="C_10_10.mesocnt",
|
||||
url="https://download.lammps.org/potentials/C_10_10.mesocnt",
|
||||
sha256="923f600a081d948eb8b4510f84aa96167b5a6c3e1aba16845d2364ae137dc346",
|
||||
expand=False,
|
||||
placement={"C_10_10.mesocnt": "potentials/C_10_10.mesocnt"},
|
||||
when="+mesont",
|
||||
)
|
||||
|
||||
root_cmakelists_dir = "cmake"
|
||||
|
||||
def cmake_args(self):
|
||||
@@ -723,6 +750,7 @@ def cmake_args(self):
|
||||
self.define_from_variant("{}_MPI".format(mpi_prefix), "mpi"),
|
||||
self.define_from_variant("BUILD_OMP", "openmp"),
|
||||
self.define("ENABLE_TESTING", self.run_tests),
|
||||
self.define("DOWNLOAD_POTENTIALS", False),
|
||||
]
|
||||
if "~kokkos" in spec:
|
||||
# LAMMPS can be build with the GPU package OR the KOKKOS package
|
||||
@@ -824,6 +852,9 @@ def cmake_args(self):
|
||||
if "+rocm" in spec:
|
||||
args.append(self.define("CMAKE_CXX_COMPILER", spec["hip"].hipcc))
|
||||
|
||||
if "+python" in spec:
|
||||
args.append(self.define("Python_EXECUTABLE", spec["python"].command.path))
|
||||
|
||||
return args
|
||||
|
||||
def setup_build_environment(self, env):
|
||||
@@ -833,5 +864,20 @@ def setup_build_environment(self, env):
|
||||
def setup_run_environment(self, env):
|
||||
env.set("LAMMPS_POTENTIALS", self.prefix.share.lammps.potentials)
|
||||
if "+python" in self.spec:
|
||||
env.prepend_path("LD_LIBRARY_PATH", self.prefix.lib)
|
||||
env.prepend_path("LD_LIBRARY_PATH", self.prefix.lib64)
|
||||
if self.spec.platform == "darwin":
|
||||
env.prepend_path("DYLD_FALLBACK_LIBRARY_PATH", self.prefix.lib)
|
||||
env.prepend_path("DYLD_FALLBACK_LIBRARY_PATH", self.prefix.lib64)
|
||||
else:
|
||||
env.prepend_path("LD_LIBRARY_PATH", self.prefix.lib)
|
||||
env.prepend_path("LD_LIBRARY_PATH", self.prefix.lib64)
|
||||
|
||||
@run_after("install")
|
||||
def install_python(self):
|
||||
# do LAMMPS Python package installation using pip
|
||||
if self.spec.satisfies("@20230328: +python"):
|
||||
with working_dir("python"):
|
||||
os.environ["LAMMPS_VERSION_FILE"] = join_path(
|
||||
self.stage.source_path, "src", "version.h"
|
||||
)
|
||||
args = std_pip_args + ["--prefix=" + self.prefix, "."]
|
||||
pip(*args)
|
||||
|
||||
@@ -125,6 +125,12 @@ class Libfabric(AutotoolsPackage):
|
||||
|
||||
conflicts("@1.9.0", when="platform=darwin", msg="This distribution is missing critical files")
|
||||
conflicts("fabrics=opx", when="@:1.14.99")
|
||||
conflicts(
|
||||
"fabrics=opx",
|
||||
when="@1.20.0",
|
||||
msg="Libfabric 1.20.0 uses values in memory that are not correctly "
|
||||
"set by OPX, resulting in undefined behavior.",
|
||||
)
|
||||
|
||||
flag_handler = build_system_flags
|
||||
|
||||
|
||||
22
var/spack/repos/builtin/packages/lsd/package.py
Normal file
22
var/spack/repos/builtin/packages/lsd/package.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# 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 Lsd(CargoPackage):
|
||||
"""A rewrite of GNU ls with lots of added features like colors, icons, tree-view,
|
||||
more formatting options etc."""
|
||||
|
||||
homepage = "https://github.com/lsd-rs/lsd"
|
||||
url = "https://github.com/lsd-rs/lsd/archive/refs/tags/v1.0.0.tar.gz"
|
||||
|
||||
maintainers("trws")
|
||||
|
||||
license("Apache-2.0")
|
||||
|
||||
version("1.0.0", sha256="ab34e9c85bc77cfa42b43bfb54414200433a37419f3b1947d0e8cfbb4b7a6325")
|
||||
|
||||
depends_on("rust@1.63:")
|
||||
@@ -106,7 +106,7 @@ def setup_build_environment(self, env):
|
||||
ldflags.append(nc_config("--libs", "--static", output=str).strip())
|
||||
libs.append(nc_config("--libs", "--static", output=str).strip())
|
||||
|
||||
zlib = spec["zlib"]
|
||||
zlib = spec["zlib-api"]
|
||||
cppflags.append("-D__64BIT__")
|
||||
ldflags.append("-L" + zlib.prefix.lib)
|
||||
libs.append("-lz")
|
||||
@@ -128,6 +128,7 @@ def setup_build_environment(self, env):
|
||||
if "+python" in spec:
|
||||
python = spec["python"]
|
||||
env.set("MET_PYTHON", python.command.path)
|
||||
env.set("MET_PYTHON_BIN_EXE", python.command.path)
|
||||
env.set("MET_PYTHON_CC", "-I" + python.headers.directories[0])
|
||||
py_ld = [python.libs.ld_flags]
|
||||
if spec["python"].satisfies("~shared"):
|
||||
@@ -143,6 +144,11 @@ def setup_build_environment(self, env):
|
||||
env.set("MET_HDF5", hdf.prefix)
|
||||
env.set("MET_HDFEOS", hdfeos.prefix)
|
||||
|
||||
if "+szip" in hdf:
|
||||
libs.append(" ".join(hdf["szip"].libs))
|
||||
if "+external-xdr" in hdf:
|
||||
libs.append(" ".join(hdf["rpc"].libs))
|
||||
|
||||
if "+graphics" in spec:
|
||||
cairo = spec["cairo"]
|
||||
freetype = spec["freetype"]
|
||||
|
||||
@@ -751,12 +751,14 @@ def find_optional_library(name, prefix):
|
||||
)
|
||||
gfortran_lib = LibraryList(libfile)
|
||||
sp_lib += [ld_flags_from_library_list(gfortran_lib)]
|
||||
if ("^mpich" in strumpack) or ("^mvapich2" in strumpack):
|
||||
sp_lib += ["-lmpifort"]
|
||||
elif "^openmpi" in strumpack:
|
||||
sp_lib += ["-lmpi_mpifh"]
|
||||
elif "^spectrum-mpi" in strumpack:
|
||||
sp_lib += ["-lmpi_ibm_mpifh"]
|
||||
if "+mpi" in strumpack:
|
||||
mpi = strumpack["mpi"]
|
||||
if ("^mpich" in strumpack) or ("^mvapich2" in strumpack):
|
||||
sp_lib += [ld_flags_from_dirs([mpi.prefix.lib], ["mpifort"])]
|
||||
elif "^openmpi" in strumpack:
|
||||
sp_lib += [ld_flags_from_dirs([mpi.prefix.lib], ["mpi_mpifh"])]
|
||||
elif "^spectrum-mpi" in strumpack:
|
||||
sp_lib += [ld_flags_from_dirs([mpi.prefix.lib], ["mpi_ibm_mpifh"])]
|
||||
if "+openmp" in strumpack:
|
||||
# The '+openmp' in the spec means strumpack will TRY to find
|
||||
# OpenMP; if not found, we should not add any flags -- how do
|
||||
|
||||
@@ -24,6 +24,8 @@ class Mgis(CMakePackage):
|
||||
|
||||
# development branches
|
||||
version("master", branch="master")
|
||||
version("rliv-2.2", branch="rliv-2.2")
|
||||
version("rliv-2.1", branch="rliv-2.1")
|
||||
version("rliv-2.0", branch="rliv-2.0")
|
||||
version("rliv-1.2", branch="rliv-1.2")
|
||||
version("rliv-1.1", branch="rliv-1.1")
|
||||
@@ -31,10 +33,12 @@ class Mgis(CMakePackage):
|
||||
|
||||
# released version
|
||||
version(
|
||||
"2.0",
|
||||
sha256="cb427d77f2c79423e969815b948a8b44da33a4370d1760e8c1e22a569f3585e2",
|
||||
"2.2",
|
||||
sha256="b3776d7b3a534ca626525a42b97665f7660ae2b28ea57b3f53fd7e8538da1ceb",
|
||||
preferred=True,
|
||||
)
|
||||
version("2.1", sha256="f5b556aab130da0c423f395fe4c35d6bf509dd8fc958242f2e37ea788464aea9")
|
||||
version("2.0", sha256="cb427d77f2c79423e969815b948a8b44da33a4370d1760e8c1e22a569f3585e2")
|
||||
version("1.2.2", sha256="dc24e85cc90ec656ed707eef3d511317ad800915014d9e4e9cf8818b406586d5")
|
||||
version("1.2.1", sha256="a2d7cae3a24546adcf1d1bf7f13f012170d359370f5b6b2c1730b19eb507601d")
|
||||
version("1.2", sha256="ed82ab91cbe17c00ef36578dbfcb4d1817d4c956619b7cccbea3e3f1a3b31940")
|
||||
@@ -47,14 +51,10 @@ class Mgis(CMakePackage):
|
||||
variant("fortran", default=True, description="Enables fortran bindings")
|
||||
variant("python", default=True, description="Enables python bindings")
|
||||
variant("static", default=False, description="Enables static libraries")
|
||||
variant(
|
||||
"build_type",
|
||||
default="Release",
|
||||
description="The build type to build",
|
||||
values=("Debug", "Release"),
|
||||
)
|
||||
|
||||
# dependencies
|
||||
depends_on("tfel@4.2.0", when="@2.2")
|
||||
depends_on("tfel@4.1.0", when="@2.1")
|
||||
depends_on("tfel@4.0.0", when="@2.0")
|
||||
depends_on("tfel@3.4.3", when="@1.2.2")
|
||||
depends_on("tfel@3.4.1", when="@1.2.1")
|
||||
@@ -62,6 +62,9 @@ class Mgis(CMakePackage):
|
||||
depends_on("tfel@3.3.0", when="@1.1")
|
||||
depends_on("tfel@3.2.1", when="@1.0.1")
|
||||
depends_on("tfel@3.2.0", when="@1.0")
|
||||
depends_on("tfel@rliv-4.2", when="@rliv-2.2")
|
||||
depends_on("tfel@rliv-4.1", when="@rliv-2.1")
|
||||
depends_on("tfel@rliv-4.0", when="@rliv-2.0")
|
||||
depends_on("tfel@rliv-3.4", when="@rliv-1.2")
|
||||
depends_on("tfel@rliv-3.3", when="@rliv-1.1")
|
||||
depends_on("tfel@rliv-3.2", when="@rliv-1.0")
|
||||
|
||||
@@ -17,6 +17,7 @@ class MochiMargo(AutotoolsPackage):
|
||||
maintainers("carns", "mdorier", "fbudin69500")
|
||||
|
||||
version("main", branch="main")
|
||||
version("0.15.0", sha256="f962f02ddaae125eaf15bf89126ee47b4f852d366b14248d2d67a0be8f661224")
|
||||
version("0.14.1", sha256="69229a9126b76aff7fd47e25c4a8f72804f101c5c603c4e4ef93f4fb7a1b6662")
|
||||
version("0.14.0", sha256="ff0e3fa786630b63280606243c35f1ea3a25fa2ba6f08bf9065cab9fcc7fa1c7")
|
||||
version("0.13.1", sha256="cff1decb94089cd0f9c0930b02092838679827b09ce4a2f3a359d59caee28782")
|
||||
|
||||
@@ -16,6 +16,10 @@ class MochiThallium(CMakePackage):
|
||||
maintainers("mdorier")
|
||||
|
||||
version("main", branch="main")
|
||||
version("0.11.3", sha256="d1ffd7ee1ccbcfb00f246cb29c5bc2560e59f8808609cbc19b7098aa8fc903c4")
|
||||
version("0.11.2", sha256="4f1e57ca843b7592525c179dec73bfb603a27fbda4feaf028d636e05c1b38e36")
|
||||
version("0.11.1", sha256="be99bec2309ce1945a777fba720175f409972cbf27b73388728a740d6406a040")
|
||||
version("0.11.0", sha256="c216310fdef9281e1c7e3264c148c560d7f5edd15816d35866efcc543185b7ee")
|
||||
version("0.10.1", sha256="5a8dc1f1622f4186b02fbabd47a8a33ca6be3d07757010f3d63d30e9f74fec8c")
|
||||
version("0.10.0", sha256="5319e25a42deab7c639e980885fe3be717cda2c2c693a1906f5a6c79b31edef8")
|
||||
version("0.9.1", sha256="dee884d0e054c838807f9c17781acfa99b26e3be1cc527bf09ceaa997336b3e4")
|
||||
@@ -51,6 +55,7 @@ class MochiThallium(CMakePackage):
|
||||
)
|
||||
|
||||
depends_on("pkgconfig", type=("build"))
|
||||
depends_on("mochi-margo@0.12.0:", when="@0.11.2:")
|
||||
depends_on("mochi-margo@0.9.8:", when="@0.10.0:")
|
||||
depends_on("mochi-margo@0.7:", when="@0.7:")
|
||||
depends_on("mochi-margo@0.6:", when="@0.5:")
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user