Compare commits
133 Commits
python/tes
...
releases/v
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8c37ed4534 | ||
![]() |
1f55b59171 | ||
![]() |
6a46a1c27d | ||
![]() |
c78545d5f1 | ||
![]() |
05dcd1d2b7 | ||
![]() |
67e5b4fecf | ||
![]() |
ba6cb62df8 | ||
![]() |
e1437349d1 | ||
![]() |
c1eb3f965b | ||
![]() |
e0d246210f | ||
![]() |
88b47d2714 | ||
![]() |
342520175d | ||
![]() |
8a55299214 | ||
![]() |
174308ca3d | ||
![]() |
506c176d25 | ||
![]() |
88171ff353 | ||
![]() |
fb8f2d8301 | ||
![]() |
27beb100e1 | ||
![]() |
02613d778d | ||
![]() |
a6065334ad | ||
![]() |
243ee7203a | ||
![]() |
271106e5dd | ||
![]() |
9fb9156e82 | ||
![]() |
d88cfbd839 | ||
![]() |
4127a93a91 | ||
![]() |
5df2189e43 | ||
![]() |
667c1960d0 | ||
![]() |
4449058257 | ||
![]() |
1b03f1d5bc | ||
![]() |
cf4e9cb3b3 | ||
![]() |
d189b12050 | ||
![]() |
5134504fd8 | ||
![]() |
ae5018ee09 | ||
![]() |
106ebeb502 | ||
![]() |
ba89754ee1 | ||
![]() |
e733eb0fd9 | ||
![]() |
07b344bf10 | ||
![]() |
a71c65399e | ||
![]() |
d8b73331f6 | ||
![]() |
4741ea683c | ||
![]() |
f33c18290b | ||
![]() |
5ea67e8882 | ||
![]() |
8ade071253 | ||
![]() |
dca09e6e0f | ||
![]() |
2776402c90 | ||
![]() |
3961a86f86 | ||
![]() |
39e594d096 | ||
![]() |
7a91bed5c9 | ||
![]() |
594a376c52 | ||
![]() |
1538c48616 | ||
![]() |
683e50b8d9 | ||
![]() |
9b32fb0beb | ||
![]() |
2c6df0d491 | ||
![]() |
ce7218acae | ||
![]() |
246eeb2b69 | ||
![]() |
cc47ee3984 | ||
![]() |
7b644719c1 | ||
![]() |
d8a6aa551e | ||
![]() |
ac7b18483a | ||
![]() |
39f37de4ce | ||
![]() |
703e153404 | ||
![]() |
aa013611bc | ||
![]() |
6a7ccd4e46 | ||
![]() |
1c6c4b4690 | ||
![]() |
68558b3dd0 | ||
![]() |
5440fe09cd | ||
![]() |
03c22f403f | ||
![]() |
f339225d22 | ||
![]() |
22c815f3d4 | ||
![]() |
4354288e44 | ||
![]() |
ea2d43b4a6 | ||
![]() |
85e67d60a0 | ||
![]() |
bf6a9ff5ed | ||
![]() |
1bdc30979d | ||
![]() |
ef1eabe5b3 | ||
![]() |
43d673f915 | ||
![]() |
8a9c501030 | ||
![]() |
9f035ca030 | ||
![]() |
d66dce2d66 | ||
![]() |
ef2aa2f5f5 | ||
![]() |
41f5f6eaab | ||
![]() |
cba347e0b7 | ||
![]() |
a3cef0f02e | ||
![]() |
45fca040c3 | ||
![]() |
eb2b5739b2 | ||
![]() |
d299e17d43 | ||
![]() |
d883883be0 | ||
![]() |
249dcb49e2 | ||
![]() |
8628add66b | ||
![]() |
aeccba8bc0 | ||
![]() |
d94e8ab36f | ||
![]() |
e66c26871f | ||
![]() |
2db4ff7061 | ||
![]() |
c248932a94 | ||
![]() |
f15d302fc7 | ||
![]() |
74ef630241 | ||
![]() |
a70ea11e69 | ||
![]() |
a79b1bd9af | ||
![]() |
ac5d5485b9 | ||
![]() |
04258f9cce | ||
![]() |
1b14170bd1 | ||
![]() |
a3bc9dbfe8 | ||
![]() |
e7c86259bd | ||
![]() |
2605aeb072 | ||
![]() |
94536d2b66 | ||
![]() |
5e580fc82e | ||
![]() |
195bad8675 | ||
![]() |
bd9f3f100a | ||
![]() |
b5962613a0 | ||
![]() |
cbcfc7e10a | ||
![]() |
579fadacd0 | ||
![]() |
b86d08b022 | ||
![]() |
02d62cf40f | ||
![]() |
97369776f0 | ||
![]() |
47af0159dc | ||
![]() |
db6ead6fc1 | ||
![]() |
b4aa2c3cab | ||
![]() |
4108de1ce4 | ||
![]() |
5fe93fee1e | ||
![]() |
8207f11333 | ||
![]() |
5bb5d2696f | ||
![]() |
55f37dffe5 | ||
![]() |
252a5bd71b | ||
![]() |
f55224f161 | ||
![]() |
189ae4b06e | ||
![]() |
5e9c702fa7 | ||
![]() |
965bb4d3c0 | ||
![]() |
354f98c94a | ||
![]() |
5dce480154 | ||
![]() |
f634d48b7c | ||
![]() |
4daee565ae | ||
![]() |
8e4dbdc2d7 | ||
![]() |
4f6adc03cd |
@@ -5,7 +5,7 @@ coverage:
|
|||||||
status:
|
status:
|
||||||
project:
|
project:
|
||||||
default:
|
default:
|
||||||
threshold: 2.0%
|
threshold: 0.2%
|
||||||
|
|
||||||
ignore:
|
ignore:
|
||||||
- lib/spack/spack/test/.*
|
- lib/spack/spack/test/.*
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
"name": "Ubuntu 20.04",
|
|
||||||
"image": "ghcr.io/spack/ubuntu20.04-runner-amd64-gcc-11.4:2023.08.01",
|
"image": "ghcr.io/spack/ubuntu20.04-runner-amd64-gcc-11.4:2023.08.01",
|
||||||
"postCreateCommand": "./.devcontainer/postCreateCommand.sh"
|
"postCreateCommand": "./.devcontainer/postCreateCommand.sh"
|
||||||
}
|
}
|
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Ubuntu 22.04",
|
|
||||||
"image": "ghcr.io/spack/ubuntu-22.04:v2024-05-07",
|
|
||||||
"postCreateCommand": "./.devcontainer/postCreateCommand.sh"
|
|
||||||
}
|
|
11
.github/dependabot.yml
vendored
11
.github/dependabot.yml
vendored
@@ -5,10 +5,13 @@ updates:
|
|||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
# Requirements to run style checks and build documentation
|
# Requirements to build documentation
|
||||||
- package-ecosystem: "pip"
|
- package-ecosystem: "pip"
|
||||||
directories:
|
directory: "/lib/spack/docs"
|
||||||
- "/.github/workflows/requirements/style/*"
|
schedule:
|
||||||
- "/lib/spack/docs"
|
interval: "daily"
|
||||||
|
# Requirements to run style checks
|
||||||
|
- package-ecosystem: "pip"
|
||||||
|
directory: "/.github/workflows/style"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
25
.github/workflows/audit.yaml
vendored
25
.github/workflows/audit.yaml
vendored
@@ -28,8 +28,8 @@ jobs:
|
|||||||
run:
|
run:
|
||||||
shell: ${{ matrix.system.shell }}
|
shell: ${{ matrix.system.shell }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
|
||||||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
|
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
|
||||||
with:
|
with:
|
||||||
python-version: ${{inputs.python_version}}
|
python-version: ${{inputs.python_version}}
|
||||||
- name: Install Python packages
|
- name: Install Python packages
|
||||||
@@ -40,35 +40,30 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pywin32
|
python -m pip install --upgrade pywin32
|
||||||
- name: Package audits (with coverage)
|
- name: Package audits (with coverage)
|
||||||
env:
|
|
||||||
COVERAGE_FILE: coverage/.coverage-audits-${{ matrix.system.os }}
|
|
||||||
if: ${{ inputs.with_coverage == 'true' && runner.os != 'Windows' }}
|
if: ${{ inputs.with_coverage == 'true' && runner.os != 'Windows' }}
|
||||||
run: |
|
run: |
|
||||||
. share/spack/setup-env.sh
|
. share/spack/setup-env.sh
|
||||||
coverage run $(which spack) audit packages
|
coverage run $(which spack) audit packages
|
||||||
coverage run $(which spack) audit configs
|
|
||||||
coverage run $(which spack) -d audit externals
|
coverage run $(which spack) -d audit externals
|
||||||
coverage combine
|
coverage combine
|
||||||
|
coverage xml
|
||||||
- name: Package audits (without coverage)
|
- name: Package audits (without coverage)
|
||||||
if: ${{ inputs.with_coverage == 'false' && runner.os != 'Windows' }}
|
if: ${{ inputs.with_coverage == 'false' && runner.os != 'Windows' }}
|
||||||
run: |
|
run: |
|
||||||
. share/spack/setup-env.sh
|
. share/spack/setup-env.sh
|
||||||
spack -d audit packages
|
spack -d audit packages
|
||||||
spack -d audit configs
|
|
||||||
spack -d audit externals
|
spack -d audit externals
|
||||||
- name: Package audits (without coverage)
|
- name: Package audits (without coverage)
|
||||||
if: ${{ runner.os == 'Windows' }}
|
if: ${{ runner.os == 'Windows' }}
|
||||||
run: |
|
run: |
|
||||||
. share/spack/setup-env.sh
|
. share/spack/setup-env.sh
|
||||||
spack -d audit packages
|
spack -d audit packages
|
||||||
./share/spack/qa/validate_last_exit.ps1
|
./share/spack/qa/validate_last_exit.ps1
|
||||||
spack -d audit configs
|
|
||||||
./share/spack/qa/validate_last_exit.ps1
|
|
||||||
spack -d audit externals
|
spack -d audit externals
|
||||||
./share/spack/qa/validate_last_exit.ps1
|
./share/spack/qa/validate_last_exit.ps1
|
||||||
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b
|
- uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be
|
||||||
if: ${{ inputs.with_coverage == 'true' && runner.os != 'Windows' }}
|
if: ${{ inputs.with_coverage == 'true' }}
|
||||||
with:
|
with:
|
||||||
name: coverage-audits-${{ matrix.system.os }}
|
flags: unittests,audits
|
||||||
path: coverage
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
include-hidden-files: true
|
verbose: true
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
source share/spack/setup-env.sh
|
source share/spack/setup-env.sh
|
||||||
$PYTHON bin/spack bootstrap disable github-actions-v0.5
|
$PYTHON bin/spack bootstrap disable github-actions-v0.4
|
||||||
$PYTHON bin/spack bootstrap disable spack-install
|
$PYTHON bin/spack bootstrap disable spack-install
|
||||||
$PYTHON bin/spack $SPACK_FLAGS solve zlib
|
$PYTHON bin/spack $SPACK_FLAGS solve zlib
|
||||||
tree $BOOTSTRAP/store
|
tree $BOOTSTRAP/store
|
59
.github/workflows/bootstrap.yml
vendored
59
.github/workflows/bootstrap.yml
vendored
@@ -37,14 +37,14 @@ jobs:
|
|||||||
make patch unzip which xz python3 python3-devel tree \
|
make patch unzip which xz python3 python3-devel tree \
|
||||||
cmake bison
|
cmake bison
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Bootstrap clingo
|
- name: Bootstrap clingo
|
||||||
run: |
|
run: |
|
||||||
source share/spack/setup-env.sh
|
source share/spack/setup-env.sh
|
||||||
spack bootstrap disable github-actions-v0.6
|
|
||||||
spack bootstrap disable github-actions-v0.5
|
spack bootstrap disable github-actions-v0.5
|
||||||
|
spack bootstrap disable github-actions-v0.4
|
||||||
spack external find cmake bison
|
spack external find cmake bison
|
||||||
spack -d solve zlib
|
spack -d solve zlib
|
||||||
tree ~/.spack/bootstrap/store/
|
tree ~/.spack/bootstrap/store/
|
||||||
@@ -60,20 +60,20 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
brew install cmake bison tree
|
brew install cmake bison tree
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
|
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
|
||||||
with:
|
with:
|
||||||
python-version: "3.12"
|
python-version: "3.12"
|
||||||
- name: Bootstrap clingo
|
- name: Bootstrap clingo
|
||||||
run: |
|
run: |
|
||||||
source share/spack/setup-env.sh
|
source share/spack/setup-env.sh
|
||||||
spack bootstrap disable github-actions-v0.6
|
|
||||||
spack bootstrap disable github-actions-v0.5
|
spack bootstrap disable github-actions-v0.5
|
||||||
|
spack bootstrap disable github-actions-v0.4
|
||||||
spack external find --not-buildable cmake bison
|
spack external find --not-buildable cmake bison
|
||||||
spack -d solve zlib
|
spack -d solve zlib
|
||||||
tree $HOME/.spack/bootstrap/store/
|
tree ~/.spack/bootstrap/store/
|
||||||
|
|
||||||
gnupg-sources:
|
gnupg-sources:
|
||||||
runs-on: ${{ matrix.runner }}
|
runs-on: ${{ matrix.runner }}
|
||||||
@@ -90,15 +90,15 @@ jobs:
|
|||||||
sudo rm $(command -v gpg gpg2 patchelf)
|
sudo rm $(command -v gpg gpg2 patchelf)
|
||||||
done
|
done
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Bootstrap GnuPG
|
- name: Bootstrap GnuPG
|
||||||
run: |
|
run: |
|
||||||
source share/spack/setup-env.sh
|
source share/spack/setup-env.sh
|
||||||
spack solve zlib
|
spack solve zlib
|
||||||
spack bootstrap disable github-actions-v0.6
|
|
||||||
spack bootstrap disable github-actions-v0.5
|
spack bootstrap disable github-actions-v0.5
|
||||||
|
spack bootstrap disable github-actions-v0.4
|
||||||
spack -d gpg list
|
spack -d gpg list
|
||||||
tree ~/.spack/bootstrap/store/
|
tree ~/.spack/bootstrap/store/
|
||||||
|
|
||||||
@@ -117,10 +117,10 @@ jobs:
|
|||||||
sudo rm $(command -v gpg gpg2 patchelf)
|
sudo rm $(command -v gpg gpg2 patchelf)
|
||||||
done
|
done
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
|
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
|
||||||
with:
|
with:
|
||||||
python-version: |
|
python-version: |
|
||||||
3.8
|
3.8
|
||||||
@@ -128,16 +128,15 @@ jobs:
|
|||||||
3.10
|
3.10
|
||||||
3.11
|
3.11
|
||||||
3.12
|
3.12
|
||||||
3.13
|
|
||||||
- name: Set bootstrap sources
|
- name: Set bootstrap sources
|
||||||
run: |
|
run: |
|
||||||
source share/spack/setup-env.sh
|
source share/spack/setup-env.sh
|
||||||
spack bootstrap disable github-actions-v0.5
|
spack bootstrap disable github-actions-v0.4
|
||||||
spack bootstrap disable spack-install
|
spack bootstrap disable spack-install
|
||||||
- name: Bootstrap clingo
|
- name: Bootstrap clingo
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
for ver in '3.8' '3.9' '3.10' '3.11' '3.12' '3.13'; do
|
for ver in '3.8' '3.9' '3.10' '3.11' '3.12' ; do
|
||||||
not_found=1
|
not_found=1
|
||||||
ver_dir="$(find $RUNNER_TOOL_CACHE/Python -wholename "*/${ver}.*/*/bin" | grep . || true)"
|
ver_dir="$(find $RUNNER_TOOL_CACHE/Python -wholename "*/${ver}.*/*/bin" | grep . || true)"
|
||||||
if [[ -d "$ver_dir" ]] ; then
|
if [[ -d "$ver_dir" ]] ; then
|
||||||
@@ -147,7 +146,7 @@ jobs:
|
|||||||
not_found=0
|
not_found=0
|
||||||
old_path="$PATH"
|
old_path="$PATH"
|
||||||
export PATH="$ver_dir:$PATH"
|
export PATH="$ver_dir:$PATH"
|
||||||
./bin/spack-tmpconfig -b ./.github/workflows/bin/bootstrap-test.sh
|
./bin/spack-tmpconfig -b ./.github/workflows/bootstrap-test.sh
|
||||||
export PATH="$old_path"
|
export PATH="$old_path"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -160,35 +159,5 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
source share/spack/setup-env.sh
|
source share/spack/setup-env.sh
|
||||||
spack -d gpg list
|
spack -d gpg list
|
||||||
tree $HOME/.spack/bootstrap/store/
|
tree ~/.spack/bootstrap/store/
|
||||||
|
|
||||||
|
|
||||||
windows:
|
|
||||||
runs-on: "windows-latest"
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
|
|
||||||
with:
|
|
||||||
python-version: "3.12"
|
|
||||||
- name: Setup Windows
|
|
||||||
run: |
|
|
||||||
Remove-Item -Path (Get-Command gpg).Path
|
|
||||||
Remove-Item -Path (Get-Command file).Path
|
|
||||||
- name: Bootstrap clingo
|
|
||||||
run: |
|
|
||||||
./share/spack/setup-env.ps1
|
|
||||||
spack bootstrap disable github-actions-v0.6
|
|
||||||
spack bootstrap disable github-actions-v0.5
|
|
||||||
spack external find --not-buildable cmake bison
|
|
||||||
spack -d solve zlib
|
|
||||||
./share/spack/qa/validate_last_exit.ps1
|
|
||||||
tree $env:userprofile/.spack/bootstrap/store/
|
|
||||||
- name: Bootstrap GnuPG
|
|
||||||
run: |
|
|
||||||
./share/spack/setup-env.ps1
|
|
||||||
spack -d gpg list
|
|
||||||
./share/spack/qa/validate_last_exit.ps1
|
|
||||||
tree $env:userprofile/.spack/bootstrap/store/
|
|
||||||
|
30
.github/workflows/build-containers.yml
vendored
30
.github/workflows/build-containers.yml
vendored
@@ -40,7 +40,8 @@ jobs:
|
|||||||
# 1: Platforms to build for
|
# 1: Platforms to build for
|
||||||
# 2: Base image (e.g. ubuntu:22.04)
|
# 2: Base image (e.g. ubuntu:22.04)
|
||||||
dockerfile: [[amazon-linux, 'linux/amd64,linux/arm64', 'amazonlinux:2'],
|
dockerfile: [[amazon-linux, 'linux/amd64,linux/arm64', 'amazonlinux:2'],
|
||||||
[centos-stream9, 'linux/amd64,linux/arm64,linux/ppc64le', 'centos:stream9'],
|
[centos7, 'linux/amd64,linux/arm64,linux/ppc64le', 'centos:7'],
|
||||||
|
[centos-stream, 'linux/amd64,linux/arm64,linux/ppc64le', 'centos:stream'],
|
||||||
[leap15, 'linux/amd64,linux/arm64,linux/ppc64le', 'opensuse/leap:15'],
|
[leap15, 'linux/amd64,linux/arm64,linux/ppc64le', 'opensuse/leap:15'],
|
||||||
[ubuntu-focal, 'linux/amd64,linux/arm64,linux/ppc64le', 'ubuntu:20.04'],
|
[ubuntu-focal, 'linux/amd64,linux/arm64,linux/ppc64le', 'ubuntu:20.04'],
|
||||||
[ubuntu-jammy, 'linux/amd64,linux/arm64,linux/ppc64le', 'ubuntu:22.04'],
|
[ubuntu-jammy, 'linux/amd64,linux/arm64,linux/ppc64le', 'ubuntu:22.04'],
|
||||||
@@ -55,15 +56,9 @@ jobs:
|
|||||||
if: github.repository == 'spack/spack'
|
if: github.repository == 'spack/spack'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
|
||||||
|
|
||||||
- name: Determine latest release tag
|
- uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
|
||||||
id: latest
|
|
||||||
run: |
|
|
||||||
git fetch --quiet --tags
|
|
||||||
echo "tag=$(git tag --list --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1)" | tee -a $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96
|
|
||||||
id: docker_meta
|
id: docker_meta
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
@@ -77,13 +72,12 @@ jobs:
|
|||||||
type=semver,pattern={{major}}
|
type=semver,pattern={{major}}
|
||||||
type=ref,event=branch
|
type=ref,event=branch
|
||||||
type=ref,event=pr
|
type=ref,event=pr
|
||||||
type=raw,value=latest,enable=${{ github.ref == format('refs/tags/{0}', steps.latest.outputs.tag) }}
|
|
||||||
|
|
||||||
- name: Generate the Dockerfile
|
- name: Generate the Dockerfile
|
||||||
env:
|
env:
|
||||||
SPACK_YAML_OS: "${{ matrix.dockerfile[2] }}"
|
SPACK_YAML_OS: "${{ matrix.dockerfile[2] }}"
|
||||||
run: |
|
run: |
|
||||||
.github/workflows/bin/generate_spack_yaml_containerize.sh
|
.github/workflows/generate_spack_yaml_containerize.sh
|
||||||
. share/spack/setup-env.sh
|
. share/spack/setup-env.sh
|
||||||
mkdir -p dockerfiles/${{ matrix.dockerfile[0] }}
|
mkdir -p dockerfiles/${{ matrix.dockerfile[0] }}
|
||||||
spack containerize --last-stage=bootstrap | tee dockerfiles/${{ matrix.dockerfile[0] }}/Dockerfile
|
spack containerize --last-stage=bootstrap | tee dockerfiles/${{ matrix.dockerfile[0] }}/Dockerfile
|
||||||
@@ -94,19 +88,19 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Upload Dockerfile
|
- name: Upload Dockerfile
|
||||||
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
||||||
with:
|
with:
|
||||||
name: dockerfiles_${{ matrix.dockerfile[0] }}
|
name: dockerfiles_${{ matrix.dockerfile[0] }}
|
||||||
path: dockerfiles
|
path: dockerfiles
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf
|
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5
|
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb
|
||||||
|
|
||||||
- name: Log in to GitHub Container Registry
|
- name: Log in to GitHub Container Registry
|
||||||
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
|
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
@@ -114,13 +108,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Log in to DockerHub
|
- name: Log in to DockerHub
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
|
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build & Deploy ${{ matrix.dockerfile[0] }}
|
- name: Build & Deploy ${{ matrix.dockerfile[0] }}
|
||||||
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355
|
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0
|
||||||
with:
|
with:
|
||||||
context: dockerfiles/${{ matrix.dockerfile[0] }}
|
context: dockerfiles/${{ matrix.dockerfile[0] }}
|
||||||
platforms: ${{ matrix.dockerfile[1] }}
|
platforms: ${{ matrix.dockerfile[1] }}
|
||||||
@@ -133,7 +127,7 @@ jobs:
|
|||||||
needs: deploy-images
|
needs: deploy-images
|
||||||
steps:
|
steps:
|
||||||
- name: Merge Artifacts
|
- name: Merge Artifacts
|
||||||
uses: actions/upload-artifact/merge@6f51ac03b9356f520e9adb1b1b7802705f340c2b
|
uses: actions/upload-artifact/merge@65462800fd760344b1a7b4382951275a0abb4808
|
||||||
with:
|
with:
|
||||||
name: dockerfiles
|
name: dockerfiles
|
||||||
pattern: dockerfiles_*
|
pattern: dockerfiles_*
|
||||||
|
66
.github/workflows/ci.yaml
vendored
66
.github/workflows/ci.yaml
vendored
@@ -15,6 +15,18 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
prechecks:
|
||||||
|
needs: [ changes ]
|
||||||
|
uses: ./.github/workflows/valid-style.yml
|
||||||
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
with_coverage: ${{ needs.changes.outputs.core }}
|
||||||
|
all-prechecks:
|
||||||
|
needs: [ prechecks ]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Success
|
||||||
|
run: "true"
|
||||||
# Check which files have been updated by the PR
|
# Check which files have been updated by the PR
|
||||||
changes:
|
changes:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -24,7 +36,7 @@ jobs:
|
|||||||
core: ${{ steps.filter.outputs.core }}
|
core: ${{ steps.filter.outputs.core }}
|
||||||
packages: ${{ steps.filter.outputs.packages }}
|
packages: ${{ steps.filter.outputs.packages }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
|
||||||
if: ${{ github.event_name == 'push' }}
|
if: ${{ github.event_name == 'push' }}
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
@@ -41,13 +53,6 @@ jobs:
|
|||||||
- 'var/spack/repos/builtin/packages/clingo/**'
|
- 'var/spack/repos/builtin/packages/clingo/**'
|
||||||
- 'var/spack/repos/builtin/packages/python/**'
|
- 'var/spack/repos/builtin/packages/python/**'
|
||||||
- 'var/spack/repos/builtin/packages/re2c/**'
|
- 'var/spack/repos/builtin/packages/re2c/**'
|
||||||
- 'var/spack/repos/builtin/packages/gnupg/**'
|
|
||||||
- 'var/spack/repos/builtin/packages/libassuan/**'
|
|
||||||
- 'var/spack/repos/builtin/packages/libgcrypt/**'
|
|
||||||
- 'var/spack/repos/builtin/packages/libgpg-error/**'
|
|
||||||
- 'var/spack/repos/builtin/packages/libksba/**'
|
|
||||||
- 'var/spack/repos/builtin/packages/npth/**'
|
|
||||||
- 'var/spack/repos/builtin/packages/pinentry/**'
|
|
||||||
- 'lib/spack/**'
|
- 'lib/spack/**'
|
||||||
- 'share/spack/**'
|
- 'share/spack/**'
|
||||||
- '.github/workflows/bootstrap.yml'
|
- '.github/workflows/bootstrap.yml'
|
||||||
@@ -67,53 +72,14 @@ jobs:
|
|||||||
needs: [ prechecks, changes ]
|
needs: [ prechecks, changes ]
|
||||||
uses: ./.github/workflows/bootstrap.yml
|
uses: ./.github/workflows/bootstrap.yml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
unit-tests:
|
unit-tests:
|
||||||
if: ${{ github.repository == 'spack/spack' && needs.changes.outputs.core == 'true' }}
|
if: ${{ github.repository == 'spack/spack' && needs.changes.outputs.core == 'true' }}
|
||||||
needs: [ prechecks, changes ]
|
needs: [ prechecks, changes ]
|
||||||
uses: ./.github/workflows/unit_tests.yaml
|
uses: ./.github/workflows/unit_tests.yaml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
all:
|
||||||
prechecks:
|
needs: [ unit-tests, bootstrap ]
|
||||||
needs: [ changes ]
|
|
||||||
uses: ./.github/workflows/valid-style.yml
|
|
||||||
secrets: inherit
|
|
||||||
with:
|
|
||||||
with_coverage: ${{ needs.changes.outputs.core }}
|
|
||||||
|
|
||||||
all-prechecks:
|
|
||||||
needs: [ prechecks ]
|
|
||||||
if: ${{ always() }}
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Success
|
- name: Success
|
||||||
run: |
|
run: "true"
|
||||||
if [ "${{ needs.prechecks.result }}" == "failure" ] || [ "${{ needs.prechecks.result }}" == "canceled" ]; then
|
|
||||||
echo "Unit tests failed."
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
coverage:
|
|
||||||
needs: [ unit-tests, prechecks ]
|
|
||||||
uses: ./.github/workflows/coverage.yml
|
|
||||||
secrets: inherit
|
|
||||||
|
|
||||||
all:
|
|
||||||
needs: [ unit-tests, coverage, bootstrap ]
|
|
||||||
if: ${{ always() }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
# See https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#needs-context
|
|
||||||
steps:
|
|
||||||
- name: Status summary
|
|
||||||
run: |
|
|
||||||
if [ "${{ needs.unit-tests.result }}" == "failure" ] || [ "${{ needs.unit-tests.result }}" == "canceled" ]; then
|
|
||||||
echo "Unit tests failed."
|
|
||||||
exit 1
|
|
||||||
elif [ "${{ needs.bootstrap.result }}" == "failure" ] || [ "${{ needs.bootstrap.result }}" == "canceled" ]; then
|
|
||||||
echo "Bootstrap tests failed."
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
35
.github/workflows/coverage.yml
vendored
35
.github/workflows/coverage.yml
vendored
@@ -1,35 +0,0 @@
|
|||||||
name: coverage
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
# Upload coverage reports to codecov once as a single bundle
|
|
||||||
upload:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
|
||||||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
|
|
||||||
with:
|
|
||||||
python-version: '3.11'
|
|
||||||
cache: 'pip'
|
|
||||||
|
|
||||||
- name: Install python dependencies
|
|
||||||
run: pip install -r .github/workflows/requirements/coverage/requirements.txt
|
|
||||||
|
|
||||||
- name: Download coverage artifact files
|
|
||||||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
|
|
||||||
with:
|
|
||||||
pattern: coverage-*
|
|
||||||
path: coverage
|
|
||||||
merge-multiple: true
|
|
||||||
|
|
||||||
- run: ls -la coverage
|
|
||||||
- run: coverage combine -a coverage/.coverage*
|
|
||||||
- run: coverage xml
|
|
||||||
|
|
||||||
- name: "Upload coverage report to CodeCov"
|
|
||||||
uses: codecov/codecov-action@05f5a9cfad807516dbbef9929c4a42df3eb78766
|
|
||||||
with:
|
|
||||||
verbose: true
|
|
||||||
fail_ci_if_error: false
|
|
8
.github/workflows/install_spack.sh
vendored
Executable file
8
.github/workflows/install_spack.sh
vendored
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
. share/spack/setup-env.sh
|
||||||
|
echo -e "config:\n build_jobs: 2" > etc/spack/config.yaml
|
||||||
|
spack config add "packages:all:target:[x86_64]"
|
||||||
|
spack compiler find
|
||||||
|
spack compiler info apple-clang
|
||||||
|
spack debug report
|
||||||
|
spack solve zlib
|
4
.github/workflows/nightly-win-builds.yml
vendored
4
.github/workflows/nightly-win-builds.yml
vendored
@@ -14,10 +14,10 @@ jobs:
|
|||||||
build-paraview-deps:
|
build-paraview-deps:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
|
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: 3.9
|
||||||
- name: Install Python packages
|
- name: Install Python packages
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
coverage==7.6.1
|
|
@@ -1,7 +0,0 @@
|
|||||||
black==24.10.0
|
|
||||||
clingo==5.7.1
|
|
||||||
flake8==7.1.1
|
|
||||||
isort==5.13.2
|
|
||||||
mypy==1.8.0
|
|
||||||
types-six==1.17.0.20241205
|
|
||||||
vermin==1.6.0
|
|
@@ -1,3 +1,5 @@
|
|||||||
|
# (c) 2022 Lawrence Livermore National Laboratory
|
||||||
|
|
||||||
git config --global user.email "spack@example.com"
|
git config --global user.email "spack@example.com"
|
||||||
git config --global user.name "Test User"
|
git config --global user.name "Test User"
|
||||||
git config --global core.longpaths true
|
git config --global core.longpaths true
|
7
.github/workflows/style/requirements.txt
vendored
Normal file
7
.github/workflows/style/requirements.txt
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
black==24.4.2
|
||||||
|
clingo==5.7.1
|
||||||
|
flake8==7.0.0
|
||||||
|
isort==5.13.2
|
||||||
|
mypy==1.8.0
|
||||||
|
types-six==1.16.21.9
|
||||||
|
vermin==1.6.0
|
156
.github/workflows/unit_tests.yaml
vendored
156
.github/workflows/unit_tests.yaml
vendored
@@ -14,36 +14,47 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-22.04]
|
||||||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
|
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
|
||||||
|
concretizer: ['clingo']
|
||||||
on_develop:
|
on_develop:
|
||||||
- ${{ github.ref == 'refs/heads/develop' }}
|
- ${{ github.ref == 'refs/heads/develop' }}
|
||||||
include:
|
include:
|
||||||
|
- python-version: '3.11'
|
||||||
|
os: ubuntu-20.04
|
||||||
|
concretizer: original
|
||||||
|
on_develop: ${{ github.ref == 'refs/heads/develop' }}
|
||||||
- python-version: '3.6'
|
- python-version: '3.6'
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
on_develop: ${{ github.ref == 'refs/heads/develop' }}
|
concretizer: clingo
|
||||||
- python-version: '3.7'
|
|
||||||
os: ubuntu-22.04
|
|
||||||
on_develop: ${{ github.ref == 'refs/heads/develop' }}
|
on_develop: ${{ github.ref == 'refs/heads/develop' }}
|
||||||
exclude:
|
exclude:
|
||||||
|
- python-version: '3.7'
|
||||||
|
concretizer: 'clingo'
|
||||||
|
os: ubuntu-22.04
|
||||||
|
on_develop: false
|
||||||
- python-version: '3.8'
|
- python-version: '3.8'
|
||||||
os: ubuntu-latest
|
concretizer: 'clingo'
|
||||||
|
os: ubuntu-22.04
|
||||||
on_develop: false
|
on_develop: false
|
||||||
- python-version: '3.9'
|
- python-version: '3.9'
|
||||||
os: ubuntu-latest
|
concretizer: 'clingo'
|
||||||
|
os: ubuntu-22.04
|
||||||
on_develop: false
|
on_develop: false
|
||||||
- python-version: '3.10'
|
- python-version: '3.10'
|
||||||
os: ubuntu-latest
|
concretizer: 'clingo'
|
||||||
|
os: ubuntu-22.04
|
||||||
on_develop: false
|
on_develop: false
|
||||||
- python-version: '3.11'
|
- python-version: '3.11'
|
||||||
os: ubuntu-latest
|
concretizer: 'clingo'
|
||||||
|
os: ubuntu-22.04
|
||||||
on_develop: false
|
on_develop: false
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
|
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Install System packages
|
- name: Install System packages
|
||||||
@@ -52,13 +63,7 @@ jobs:
|
|||||||
# Needed for unit tests
|
# Needed for unit tests
|
||||||
sudo apt-get -y install \
|
sudo apt-get -y install \
|
||||||
coreutils cvs gfortran graphviz gnupg2 mercurial ninja-build \
|
coreutils cvs gfortran graphviz gnupg2 mercurial ninja-build \
|
||||||
cmake bison libbison-dev subversion
|
cmake bison libbison-dev kcov
|
||||||
# On ubuntu 24.04, kcov was removed. It may come back in some future Ubuntu
|
|
||||||
- name: Set up Homebrew
|
|
||||||
id: set-up-homebrew
|
|
||||||
uses: Homebrew/actions/setup-homebrew@40e9946c182a64b3db1bf51be0dcb915f7802aa9
|
|
||||||
- name: Install kcov with brew
|
|
||||||
run: "brew install kcov"
|
|
||||||
- name: Install Python packages
|
- name: Install Python packages
|
||||||
run: |
|
run: |
|
||||||
pip install --upgrade pip setuptools pytest pytest-xdist pytest-cov
|
pip install --upgrade pip setuptools pytest pytest-xdist pytest-cov
|
||||||
@@ -67,7 +72,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
# Need this for the git tests to succeed.
|
# Need this for the git tests to succeed.
|
||||||
git --version
|
git --version
|
||||||
. .github/workflows/bin/setup_git.sh
|
. .github/workflows/setup_git.sh
|
||||||
- name: Bootstrap clingo
|
- name: Bootstrap clingo
|
||||||
if: ${{ matrix.concretizer == 'clingo' }}
|
if: ${{ matrix.concretizer == 'clingo' }}
|
||||||
env:
|
env:
|
||||||
@@ -80,38 +85,32 @@ jobs:
|
|||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
env:
|
env:
|
||||||
SPACK_PYTHON: python
|
SPACK_PYTHON: python
|
||||||
|
SPACK_TEST_SOLVER: ${{ matrix.concretizer }}
|
||||||
SPACK_TEST_PARALLEL: 2
|
SPACK_TEST_PARALLEL: 2
|
||||||
COVERAGE: true
|
COVERAGE: true
|
||||||
COVERAGE_FILE: coverage/.coverage-${{ matrix.os }}-python${{ matrix.python-version }}
|
|
||||||
UNIT_TEST_COVERAGE: ${{ matrix.python-version == '3.11' }}
|
UNIT_TEST_COVERAGE: ${{ matrix.python-version == '3.11' }}
|
||||||
run: |
|
run: |
|
||||||
share/spack/qa/run-unit-tests
|
share/spack/qa/run-unit-tests
|
||||||
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b
|
- uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be
|
||||||
with:
|
with:
|
||||||
name: coverage-${{ matrix.os }}-python${{ matrix.python-version }}
|
flags: unittests,linux,${{ matrix.concretizer }}
|
||||||
path: coverage
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
include-hidden-files: true
|
verbose: true
|
||||||
# Test shell integration
|
# Test shell integration
|
||||||
shell:
|
shell:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
|
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
- name: Install System packages
|
- name: Install System packages
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get -y update
|
sudo apt-get -y update
|
||||||
# Needed for shell tests
|
# Needed for shell tests
|
||||||
sudo apt-get install -y coreutils csh zsh tcsh fish dash bash subversion
|
sudo apt-get install -y coreutils kcov csh zsh tcsh fish dash bash
|
||||||
# On ubuntu 24.04, kcov was removed. It may come back in some future Ubuntu
|
|
||||||
- name: Set up Homebrew
|
|
||||||
id: set-up-homebrew
|
|
||||||
uses: Homebrew/actions/setup-homebrew@40e9946c182a64b3db1bf51be0dcb915f7802aa9
|
|
||||||
- name: Install kcov with brew
|
|
||||||
run: "brew install kcov"
|
|
||||||
- name: Install Python packages
|
- name: Install Python packages
|
||||||
run: |
|
run: |
|
||||||
pip install --upgrade pip setuptools pytest coverage[toml] pytest-xdist
|
pip install --upgrade pip setuptools pytest coverage[toml] pytest-xdist
|
||||||
@@ -119,17 +118,17 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
# Need this for the git tests to succeed.
|
# Need this for the git tests to succeed.
|
||||||
git --version
|
git --version
|
||||||
. .github/workflows/bin/setup_git.sh
|
. .github/workflows/setup_git.sh
|
||||||
- name: Run shell tests
|
- name: Run shell tests
|
||||||
env:
|
env:
|
||||||
COVERAGE: true
|
COVERAGE: true
|
||||||
run: |
|
run: |
|
||||||
share/spack/qa/run-shell-tests
|
share/spack/qa/run-shell-tests
|
||||||
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b
|
- uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be
|
||||||
with:
|
with:
|
||||||
name: coverage-shell
|
flags: shelltests,linux
|
||||||
path: coverage
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
include-hidden-files: true
|
verbose: true
|
||||||
|
|
||||||
# Test RHEL8 UBI with platform Python. This job is run
|
# Test RHEL8 UBI with platform Python. This job is run
|
||||||
# only on PRs modifying core Spack
|
# only on PRs modifying core Spack
|
||||||
@@ -140,15 +139,15 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
dnf install -y \
|
dnf install -y \
|
||||||
bzip2 curl gcc-c++ gcc gcc-gfortran git gnupg2 gzip \
|
bzip2 curl file gcc-c++ gcc gcc-gfortran git gnupg2 gzip \
|
||||||
make patch tcl unzip which xz
|
make patch tcl unzip which xz
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
|
||||||
- name: Setup repo and non-root user
|
- name: Setup repo and non-root user
|
||||||
run: |
|
run: |
|
||||||
git --version
|
git --version
|
||||||
git config --global --add safe.directory '*'
|
git config --global --add safe.directory /__w/spack/spack
|
||||||
git fetch --unshallow
|
git fetch --unshallow
|
||||||
. .github/workflows/bin/setup_git.sh
|
. .github/workflows/setup_git.sh
|
||||||
useradd spack-test
|
useradd spack-test
|
||||||
chown -R spack-test .
|
chown -R spack-test .
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
@@ -159,39 +158,38 @@ jobs:
|
|||||||
spack unit-test -k 'not cvs and not svn and not hg' -x --verbose
|
spack unit-test -k 'not cvs and not svn and not hg' -x --verbose
|
||||||
# Test for the clingo based solver (using clingo-cffi)
|
# Test for the clingo based solver (using clingo-cffi)
|
||||||
clingo-cffi:
|
clingo-cffi:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
|
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
|
||||||
with:
|
with:
|
||||||
python-version: '3.13'
|
python-version: '3.11'
|
||||||
- name: Install System packages
|
- name: Install System packages
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get -y update
|
sudo apt-get -y update
|
||||||
sudo apt-get -y install coreutils gfortran graphviz gnupg2
|
sudo apt-get -y install coreutils cvs gfortran graphviz gnupg2 mercurial ninja-build kcov
|
||||||
- name: Install Python packages
|
- name: Install Python packages
|
||||||
run: |
|
run: |
|
||||||
pip install --upgrade pip setuptools pytest coverage[toml] pytest-cov clingo
|
pip install --upgrade pip setuptools pytest coverage[toml] pytest-cov clingo pytest-xdist
|
||||||
pip install --upgrade flake8 "isort>=4.3.5" "mypy>=0.900" "click" "black"
|
pip install --upgrade flake8 "isort>=4.3.5" "mypy>=0.900" "click" "black"
|
||||||
|
- name: Setup git configuration
|
||||||
|
run: |
|
||||||
|
# Need this for the git tests to succeed.
|
||||||
|
git --version
|
||||||
|
. .github/workflows/setup_git.sh
|
||||||
- name: Run unit tests (full suite with coverage)
|
- name: Run unit tests (full suite with coverage)
|
||||||
env:
|
env:
|
||||||
COVERAGE: true
|
COVERAGE: true
|
||||||
COVERAGE_FILE: coverage/.coverage-clingo-cffi
|
SPACK_TEST_SOLVER: clingo
|
||||||
run: |
|
run: |
|
||||||
. share/spack/setup-env.sh
|
share/spack/qa/run-unit-tests
|
||||||
spack bootstrap disable spack-install
|
- uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be
|
||||||
spack bootstrap disable github-actions-v0.5
|
|
||||||
spack bootstrap disable github-actions-v0.6
|
|
||||||
spack bootstrap status
|
|
||||||
spack solve zlib
|
|
||||||
spack unit-test --verbose --cov --cov-config=pyproject.toml --cov-report=xml:coverage.xml lib/spack/spack/test/concretization/core.py
|
|
||||||
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b
|
|
||||||
with:
|
with:
|
||||||
name: coverage-clingo-cffi
|
flags: unittests,linux,clingo
|
||||||
path: coverage
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
include-hidden-files: true
|
verbose: true
|
||||||
# Run unit tests on MacOS
|
# Run unit tests on MacOS
|
||||||
macos:
|
macos:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
@@ -200,10 +198,10 @@ jobs:
|
|||||||
os: [macos-13, macos-14]
|
os: [macos-13, macos-14]
|
||||||
python-version: ["3.11"]
|
python-version: ["3.11"]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
|
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Install Python packages
|
- name: Install Python packages
|
||||||
@@ -212,24 +210,24 @@ jobs:
|
|||||||
pip install --upgrade pytest coverage[toml] pytest-xdist pytest-cov
|
pip install --upgrade pytest coverage[toml] pytest-xdist pytest-cov
|
||||||
- name: Setup Homebrew packages
|
- name: Setup Homebrew packages
|
||||||
run: |
|
run: |
|
||||||
brew install dash fish gcc gnupg kcov
|
brew install dash fish gcc gnupg2 kcov
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
env:
|
env:
|
||||||
|
SPACK_TEST_SOLVER: clingo
|
||||||
SPACK_TEST_PARALLEL: 4
|
SPACK_TEST_PARALLEL: 4
|
||||||
COVERAGE_FILE: coverage/.coverage-${{ matrix.os }}-python${{ matrix.python-version }}
|
|
||||||
run: |
|
run: |
|
||||||
git --version
|
git --version
|
||||||
. .github/workflows/bin/setup_git.sh
|
. .github/workflows/setup_git.sh
|
||||||
. share/spack/setup-env.sh
|
. share/spack/setup-env.sh
|
||||||
$(which spack) bootstrap disable spack-install
|
$(which spack) bootstrap disable spack-install
|
||||||
$(which spack) solve zlib
|
$(which spack) solve zlib
|
||||||
common_args=(--dist loadfile --tx '4*popen//python=./bin/spack-tmpconfig python -u ./bin/spack python' -x)
|
common_args=(--dist loadfile --tx '4*popen//python=./bin/spack-tmpconfig python -u ./bin/spack python' -x)
|
||||||
$(which spack) unit-test --verbose --cov --cov-config=pyproject.toml --cov-report=xml:coverage.xml "${common_args[@]}"
|
$(which spack) unit-test --verbose --cov --cov-config=pyproject.toml --cov-report=xml:coverage.xml "${common_args[@]}"
|
||||||
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b
|
- uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be
|
||||||
with:
|
with:
|
||||||
name: coverage-${{ matrix.os }}-python${{ matrix.python-version }}
|
flags: unittests,macos
|
||||||
path: coverage
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
include-hidden-files: true
|
verbose: true
|
||||||
# Run unit tests on Windows
|
# Run unit tests on Windows
|
||||||
windows:
|
windows:
|
||||||
defaults:
|
defaults:
|
||||||
@@ -238,10 +236,10 @@ jobs:
|
|||||||
powershell Invoke-Expression -Command "./share/spack/qa/windows_test_setup.ps1"; {0}
|
powershell Invoke-Expression -Command "./share/spack/qa/windows_test_setup.ps1"; {0}
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
|
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: 3.9
|
||||||
- name: Install Python packages
|
- name: Install Python packages
|
||||||
@@ -249,15 +247,15 @@ jobs:
|
|||||||
python -m pip install --upgrade pip pywin32 setuptools pytest-cov clingo
|
python -m pip install --upgrade pip pywin32 setuptools pytest-cov clingo
|
||||||
- name: Create local develop
|
- name: Create local develop
|
||||||
run: |
|
run: |
|
||||||
./.github/workflows/bin/setup_git.ps1
|
./.github/workflows/setup_git.ps1
|
||||||
- name: Unit Test
|
- name: Unit Test
|
||||||
env:
|
|
||||||
COVERAGE_FILE: coverage/.coverage-windows
|
|
||||||
run: |
|
run: |
|
||||||
spack unit-test -x --verbose --cov --cov-config=pyproject.toml
|
spack unit-test -x --verbose --cov --cov-config=pyproject.toml
|
||||||
./share/spack/qa/validate_last_exit.ps1
|
./share/spack/qa/validate_last_exit.ps1
|
||||||
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b
|
coverage combine -a
|
||||||
|
coverage xml
|
||||||
|
- uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c
|
||||||
with:
|
with:
|
||||||
name: coverage-windows
|
flags: unittests,windows
|
||||||
path: coverage
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
include-hidden-files: true
|
verbose: true
|
||||||
|
103
.github/workflows/valid-style.yml
vendored
103
.github/workflows/valid-style.yml
vendored
@@ -13,19 +13,20 @@ concurrency:
|
|||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Validate that the code can be run on all the Python versions supported by Spack
|
# Validate that the code can be run on all the Python versions
|
||||||
|
# supported by Spack
|
||||||
validate:
|
validate:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
|
||||||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
|
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
cache: 'pip'
|
cache: 'pip'
|
||||||
- name: Install Python Packages
|
- name: Install Python Packages
|
||||||
run: |
|
run: |
|
||||||
pip install --upgrade pip setuptools
|
pip install --upgrade pip setuptools
|
||||||
pip install -r .github/workflows/requirements/style/requirements.txt
|
pip install -r .github/workflows/style/requirements.txt
|
||||||
- name: vermin (Spack's Core)
|
- name: vermin (Spack's Core)
|
||||||
run: vermin --backport importlib --backport argparse --violations --backport typing -t=3.6- -vvv lib/spack/spack/ lib/spack/llnl/ bin/
|
run: vermin --backport importlib --backport argparse --violations --backport typing -t=3.6- -vvv lib/spack/spack/ lib/spack/llnl/ bin/
|
||||||
- name: vermin (Repositories)
|
- name: vermin (Repositories)
|
||||||
@@ -34,22 +35,22 @@ jobs:
|
|||||||
style:
|
style:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
|
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
cache: 'pip'
|
cache: 'pip'
|
||||||
- name: Install Python packages
|
- name: Install Python packages
|
||||||
run: |
|
run: |
|
||||||
pip install --upgrade pip setuptools
|
pip install --upgrade pip setuptools
|
||||||
pip install -r .github/workflows/requirements/style/requirements.txt
|
pip install -r .github/workflows/style/requirements.txt
|
||||||
- name: Setup git configuration
|
- name: Setup git configuration
|
||||||
run: |
|
run: |
|
||||||
# Need this for the git tests to succeed.
|
# Need this for the git tests to succeed.
|
||||||
git --version
|
git --version
|
||||||
. .github/workflows/bin/setup_git.sh
|
. .github/workflows/setup_git.sh
|
||||||
- name: Run style tests
|
- name: Run style tests
|
||||||
run: |
|
run: |
|
||||||
share/spack/qa/run-style-tests
|
share/spack/qa/run-style-tests
|
||||||
@@ -69,13 +70,13 @@ jobs:
|
|||||||
dnf install -y \
|
dnf install -y \
|
||||||
bzip2 curl file gcc-c++ gcc gcc-gfortran git gnupg2 gzip \
|
bzip2 curl file gcc-c++ gcc gcc-gfortran git gnupg2 gzip \
|
||||||
make patch tcl unzip which xz
|
make patch tcl unzip which xz
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
|
||||||
- name: Setup repo and non-root user
|
- name: Setup repo and non-root user
|
||||||
run: |
|
run: |
|
||||||
git --version
|
git --version
|
||||||
git config --global --add safe.directory '*'
|
git config --global --add safe.directory /__w/spack/spack
|
||||||
git fetch --unshallow
|
git fetch --unshallow
|
||||||
. .github/workflows/bin/setup_git.sh
|
. .github/workflows/setup_git.sh
|
||||||
useradd spack-test
|
useradd spack-test
|
||||||
chown -R spack-test .
|
chown -R spack-test .
|
||||||
- name: Bootstrap Spack development environment
|
- name: Bootstrap Spack development environment
|
||||||
@@ -84,83 +85,5 @@ jobs:
|
|||||||
source share/spack/setup-env.sh
|
source share/spack/setup-env.sh
|
||||||
spack debug report
|
spack debug report
|
||||||
spack -d bootstrap now --dev
|
spack -d bootstrap now --dev
|
||||||
spack -d style -t black
|
spack style -t black
|
||||||
spack unit-test -V
|
spack unit-test -V
|
||||||
# Check we don't make the situation with circular imports worse
|
|
||||||
import-check:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: julia-actions/setup-julia@v2
|
|
||||||
with:
|
|
||||||
version: '1.10'
|
|
||||||
- uses: julia-actions/cache@v2
|
|
||||||
|
|
||||||
# PR: use the base of the PR as the old commit
|
|
||||||
- name: Checkout PR base commit
|
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
|
||||||
with:
|
|
||||||
ref: ${{ github.event.pull_request.base.sha }}
|
|
||||||
path: old
|
|
||||||
# not a PR: use the previous commit as the old commit
|
|
||||||
- name: Checkout previous commit
|
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
|
||||||
with:
|
|
||||||
fetch-depth: 2
|
|
||||||
path: old
|
|
||||||
- name: Checkout previous commit
|
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
run: git -C old reset --hard HEAD^
|
|
||||||
|
|
||||||
- name: Checkout new commit
|
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
|
||||||
with:
|
|
||||||
path: new
|
|
||||||
- name: Install circular import checker
|
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
|
||||||
with:
|
|
||||||
repository: haampie/circular-import-fighter
|
|
||||||
ref: b5d6ce9be35f602cca7d5a6aa0259fca10639cca
|
|
||||||
path: circular-import-fighter
|
|
||||||
- name: Install dependencies
|
|
||||||
working-directory: circular-import-fighter
|
|
||||||
run: make -j dependencies
|
|
||||||
- name: Problematic imports before
|
|
||||||
working-directory: circular-import-fighter
|
|
||||||
run: make SPACK_ROOT=../old SUFFIX=.old
|
|
||||||
- name: Problematic imports after
|
|
||||||
working-directory: circular-import-fighter
|
|
||||||
run: make SPACK_ROOT=../new SUFFIX=.new
|
|
||||||
- name: Compare import cycles
|
|
||||||
working-directory: circular-import-fighter
|
|
||||||
run: |
|
|
||||||
edges_before="$(head -n1 solution.old)"
|
|
||||||
edges_after="$(head -n1 solution.new)"
|
|
||||||
if [ "$edges_after" -gt "$edges_before" ]; then
|
|
||||||
printf '\033[1;31mImport check failed: %s imports need to be deleted, ' "$edges_after"
|
|
||||||
printf 'previously this was %s\033[0m\n' "$edges_before"
|
|
||||||
printf 'Compare \033[1;97m"Problematic imports before"\033[0m and '
|
|
||||||
printf '\033[1;97m"Problematic imports after"\033[0m.\n'
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
printf '\033[1;32mImport check passed: %s <= %s\033[0m\n' "$edges_after" "$edges_before"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Further style checks from pylint
|
|
||||||
pylint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
|
|
||||||
with:
|
|
||||||
python-version: '3.13'
|
|
||||||
cache: 'pip'
|
|
||||||
- name: Install Python packages
|
|
||||||
run: |
|
|
||||||
pip install --upgrade pip setuptools pylint
|
|
||||||
- name: Pylint (Spack Core)
|
|
||||||
run: |
|
|
||||||
pylint -j 4 --disable=all --enable=unspecified-encoding --ignore-paths=lib/spack/external lib
|
|
||||||
|
49
CHANGELOG.md
49
CHANGELOG.md
@@ -1,3 +1,40 @@
|
|||||||
|
# v0.22.5 (2025-02-21)
|
||||||
|
|
||||||
|
## Bugfixes
|
||||||
|
- Continue to mark non-roots as implicitly installed on partial env installs (#47183)
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
- v0.22.4 is skipped to do an error in the release process
|
||||||
|
|
||||||
|
# v0.22.3 (2024-11-18)
|
||||||
|
|
||||||
|
## Bugfixes
|
||||||
|
- Forward compatibility with Python 3.13 (#46775, #46983, #47035, #47175)
|
||||||
|
- `archspec` was updated to v0.2.5 (#46503, #46958)
|
||||||
|
- Fix path to Spack in `spack env depfile` makefile (#46966)
|
||||||
|
- Fix `glibc` detection in Chinese locales (#47434)
|
||||||
|
- Fix pickle round-trip of specs propagating variants (#47351)
|
||||||
|
- Fix a bug where concurrent spack install commands would not always update explicits correctly
|
||||||
|
(#47358)
|
||||||
|
- Fix a bug where autopush would run before all post install hooks modifying the install prefix
|
||||||
|
had run (#47329)
|
||||||
|
- Fix `spack find -u` (#47102)
|
||||||
|
- Fix a bug where sometimes the wrong Python interpreter was used for build dependencies such as
|
||||||
|
`py-setuptools` (#46980)
|
||||||
|
- Fix default config errors found by `spack audit externals` (#47308)
|
||||||
|
- Fix duplicate printing of external roots in installer (#44917)
|
||||||
|
- Fix modules schema in `compilers.yaml` (#47197)
|
||||||
|
- Reduce the size of generated YAML for Gitlab CI (#44995)
|
||||||
|
- Handle missing metadata file gracefully in bootstrap (#47278)
|
||||||
|
- Show underlying errors on fetch failure (#45714)
|
||||||
|
- Recognize `.` and `..` as paths instead of names in buildcache commands (#47105)
|
||||||
|
- Documentation and style (#46991, #47107, #47110, #47111, #47346, #47307, #47309, #47328, #47160,
|
||||||
|
#47402, #47557, #46709, #47080)
|
||||||
|
- Tests and CI fixes (#47165, #46711)
|
||||||
|
|
||||||
|
## Package updates
|
||||||
|
- ffmpeg: fix hash of patch (#45574)
|
||||||
|
|
||||||
# v0.22.2 (2024-09-21)
|
# v0.22.2 (2024-09-21)
|
||||||
|
|
||||||
## Bugfixes
|
## Bugfixes
|
||||||
@@ -60,6 +97,7 @@
|
|||||||
- suite-sparse: improve setting of the `libs` property (#44214)
|
- suite-sparse: improve setting of the `libs` property (#44214)
|
||||||
- netlib-lapack: provide blas and lapack together (#44981)
|
- netlib-lapack: provide blas and lapack together (#44981)
|
||||||
|
|
||||||
|
|
||||||
# v0.22.0 (2024-05-12)
|
# v0.22.0 (2024-05-12)
|
||||||
|
|
||||||
`v0.22.0` is a major feature release.
|
`v0.22.0` is a major feature release.
|
||||||
@@ -380,15 +418,6 @@
|
|||||||
* 344 committers to packages
|
* 344 committers to packages
|
||||||
* 45 committers to core
|
* 45 committers to core
|
||||||
|
|
||||||
# v0.21.3 (2024-10-02)
|
|
||||||
|
|
||||||
## Bugfixes
|
|
||||||
- Forward compatibility with Spack 0.23 packages with language dependencies (#45205, #45191)
|
|
||||||
- Forward compatibility with `urllib` from Python 3.12.6+ (#46453, #46483)
|
|
||||||
- Bump `archspec` to 0.2.5-dev for better aarch64 and Windows support (#42854, #44005,
|
|
||||||
#45721, #46445)
|
|
||||||
- Support macOS Sequoia (#45018, #45127, #43862)
|
|
||||||
- CI and test maintenance (#42909, #42728, #46711, #41943, #43363)
|
|
||||||
|
|
||||||
# v0.21.2 (2024-03-01)
|
# v0.21.2 (2024-03-01)
|
||||||
|
|
||||||
@@ -419,7 +448,7 @@
|
|||||||
- spack graph: fix coloring with environments (#41240)
|
- spack graph: fix coloring with environments (#41240)
|
||||||
- spack info: sort variants in --variants-by-name (#41389)
|
- spack info: sort variants in --variants-by-name (#41389)
|
||||||
- Spec.format: error on old style format strings (#41934)
|
- Spec.format: error on old style format strings (#41934)
|
||||||
- ASP-based solver:
|
- ASP-based solver:
|
||||||
- fix infinite recursion when computing concretization errors (#41061)
|
- fix infinite recursion when computing concretization errors (#41061)
|
||||||
- don't error for type mismatch on preferences (#41138)
|
- don't error for type mismatch on preferences (#41138)
|
||||||
- don't emit spurious debug output (#41218)
|
- don't emit spurious debug output (#41218)
|
||||||
|
11
COPYRIGHT
11
COPYRIGHT
@@ -8,9 +8,8 @@ or http://www.apache.org/licenses/LICENSE-2.0) or the MIT license,
|
|||||||
Copyrights and patents in the Spack project are retained by contributors.
|
Copyrights and patents in the Spack project are retained by contributors.
|
||||||
No copyright assignment is required to contribute to Spack.
|
No copyright assignment is required to contribute to Spack.
|
||||||
|
|
||||||
Spack was originally developed in 2013 by Lawrence Livermore National
|
Spack was originally distributed under the LGPL-2.1 license. Consent from
|
||||||
Security, LLC. It was originally distributed under the LGPL-2.1 license.
|
contributors to relicense to Apache-2.0/MIT is documented at
|
||||||
Consent from contributors to relicense to Apache-2.0/MIT is documented at
|
|
||||||
https://github.com/spack/spack/issues/9137.
|
https://github.com/spack/spack/issues/9137.
|
||||||
|
|
||||||
|
|
||||||
@@ -103,6 +102,6 @@ PackageName: sbang
|
|||||||
PackageHomePage: https://github.com/spack/sbang
|
PackageHomePage: https://github.com/spack/sbang
|
||||||
PackageLicenseDeclared: Apache-2.0 OR MIT
|
PackageLicenseDeclared: Apache-2.0 OR MIT
|
||||||
|
|
||||||
PackageName: typing_extensions
|
PackageName: six
|
||||||
PackageHomePage: https://pypi.org/project/typing-extensions/
|
PackageHomePage: https://pypi.python.org/pypi/six
|
||||||
PackageLicenseDeclared: Python-2.0
|
PackageLicenseDeclared: MIT
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) Spack Project Developers.
|
Copyright (c) 2013-2024 LLNS, LLC and other Spack Project Developers.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
13
README.md
13
README.md
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
Spack is a multi-platform package manager that builds and installs
|
Spack is a multi-platform package manager that builds and installs
|
||||||
multiple versions and configurations of software. It works on Linux,
|
multiple versions and configurations of software. It works on Linux,
|
||||||
macOS, Windows, and many supercomputers. Spack is non-destructive: installing a
|
macOS, and many supercomputers. Spack is non-destructive: installing a
|
||||||
new version of a package does not break existing installations, so many
|
new version of a package does not break existing installations, so many
|
||||||
configurations of the same package can coexist.
|
configurations of the same package can coexist.
|
||||||
|
|
||||||
@@ -46,18 +46,13 @@ See the
|
|||||||
[Feature Overview](https://spack.readthedocs.io/en/latest/features.html)
|
[Feature Overview](https://spack.readthedocs.io/en/latest/features.html)
|
||||||
for examples and highlights.
|
for examples and highlights.
|
||||||
|
|
||||||
To install spack and your first package, make sure you have Python & Git.
|
To install spack and your first package, make sure you have Python.
|
||||||
Then:
|
Then:
|
||||||
|
|
||||||
$ git clone -c feature.manyFiles=true --depth=2 https://github.com/spack/spack.git
|
$ git clone -c feature.manyFiles=true https://github.com/spack/spack.git
|
||||||
$ cd spack/bin
|
$ cd spack/bin
|
||||||
$ ./spack install zlib
|
$ ./spack install zlib
|
||||||
|
|
||||||
> [!TIP]
|
|
||||||
> `-c feature.manyFiles=true` improves git's performance on repositories with 1,000+ files.
|
|
||||||
>
|
|
||||||
> `--depth=2` prunes the git history to reduce the size of the Spack installation.
|
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
@@ -70,7 +65,7 @@ Tutorial
|
|||||||
----------------
|
----------------
|
||||||
|
|
||||||
We maintain a
|
We maintain a
|
||||||
[**hands-on tutorial**](https://spack-tutorial.readthedocs.io/).
|
[**hands-on tutorial**](https://spack.readthedocs.io/en/latest/tutorial.html).
|
||||||
It covers basic to advanced usage, packaging, developer features, and large HPC
|
It covers basic to advanced usage, packaging, developer features, and large HPC
|
||||||
deployments. You can do all of the exercises on your own laptop using a
|
deployments. You can do all of the exercises on your own laptop using a
|
||||||
Docker container.
|
Docker container.
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
import subprocess
|
import subprocess
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Copyright sbang project developers. See COPYRIGHT file for details.
|
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
# sbang project developers. See the top-level COPYRIGHT file for details.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,7 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- python -*-
|
# -*- python -*-
|
||||||
#
|
#
|
||||||
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
@@ -21,4 +22,4 @@
|
|||||||
#
|
#
|
||||||
# This is compatible across platforms.
|
# This is compatible across platforms.
|
||||||
#
|
#
|
||||||
exec spack python "$@"
|
exec /usr/bin/env spack python "$@"
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
:: Copyright Spack Project Developers. See COPYRIGHT file for details.
|
:: Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
:: Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
::
|
::
|
||||||
:: SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
:: SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
::#######################################################################
|
::#######################################################################
|
||||||
@@ -187,27 +188,25 @@ if NOT "%_sp_args%"=="%_sp_args:--help=%" (
|
|||||||
goto :end_switch
|
goto :end_switch
|
||||||
|
|
||||||
:case_load
|
:case_load
|
||||||
if NOT defined _sp_args (
|
:: If args contain --sh, --csh, or -h/--help: just execute.
|
||||||
exit /B 0
|
if defined _sp_args (
|
||||||
)
|
if NOT "%_sp_args%"=="%_sp_args:--help=%" (
|
||||||
|
goto :default_case
|
||||||
:: If args contain --bat, or -h/--help: just execute.
|
) else if NOT "%_sp_args%"=="%_sp_args:-h=%" (
|
||||||
if NOT "%_sp_args%"=="%_sp_args:--help=%" (
|
goto :default_case
|
||||||
goto :default_case
|
) else if NOT "%_sp_args%"=="%_sp_args:--bat=%" (
|
||||||
) else if NOT "%_sp_args%"=="%_sp_args:-h=%" (
|
goto :default_case
|
||||||
goto :default_case
|
)
|
||||||
) else if NOT "%_sp_args%"=="%_sp_args:--bat=%" (
|
|
||||||
goto :default_case
|
|
||||||
) else if NOT "%_sp_args%"=="%_sp_args:--list=%" (
|
|
||||||
goto :default_case
|
|
||||||
)
|
)
|
||||||
|
|
||||||
for /f "tokens=* USEBACKQ" %%I in (
|
for /f "tokens=* USEBACKQ" %%I in (
|
||||||
`python "%spack%" %_sp_flags% %_sp_subcommand% --bat %_sp_args%`
|
`python "%spack%" %_sp_flags% %_sp_subcommand% --bat %_sp_args%`) do %%I
|
||||||
) do %%I
|
|
||||||
|
|
||||||
goto :end_switch
|
goto :end_switch
|
||||||
|
|
||||||
|
:case_unload
|
||||||
|
goto :case_load
|
||||||
|
|
||||||
:default_case
|
:default_case
|
||||||
python "%spack%" %_sp_flags% %_sp_subcommand% %_sp_args%
|
python "%spack%" %_sp_flags% %_sp_subcommand% %_sp_args%
|
||||||
goto :end_switch
|
goto :end_switch
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
# #######################################################################
|
# #######################################################################
|
||||||
|
@@ -1,11 +1,71 @@
|
|||||||
@ECHO OFF
|
@ECHO OFF
|
||||||
|
setlocal EnableDelayedExpansion
|
||||||
:: (c) 2021 Lawrence Livermore National Laboratory
|
:: (c) 2021 Lawrence Livermore National Laboratory
|
||||||
:: To use this file independently of Spack's installer, execute this script in its directory, or add the
|
:: To use this file independently of Spack's installer, execute this script in its directory, or add the
|
||||||
:: associated bin directory to your PATH. Invoke to launch Spack Shell.
|
:: associated bin directory to your PATH. Invoke to launch Spack Shell.
|
||||||
::
|
::
|
||||||
:: source_dir/spack/bin/spack_cmd.bat
|
:: source_dir/spack/bin/spack_cmd.bat
|
||||||
::
|
::
|
||||||
|
pushd %~dp0..
|
||||||
|
set SPACK_ROOT=%CD%
|
||||||
|
pushd %CD%\..
|
||||||
|
set spackinstdir=%CD%
|
||||||
|
popd
|
||||||
|
|
||||||
call "%~dp0..\share\spack\setup-env.bat"
|
|
||||||
pushd %SPACK_ROOT%
|
:: Check if Python is on the PATH
|
||||||
%comspec% /K
|
if not defined python_pf_ver (
|
||||||
|
(for /f "delims=" %%F in ('where python.exe') do (
|
||||||
|
set "python_pf_ver=%%F"
|
||||||
|
goto :found_python
|
||||||
|
) ) 2> NUL
|
||||||
|
)
|
||||||
|
:found_python
|
||||||
|
if not defined python_pf_ver (
|
||||||
|
:: If not, look for Python from the Spack installer
|
||||||
|
:get_builtin
|
||||||
|
(for /f "tokens=*" %%g in ('dir /b /a:d "!spackinstdir!\Python*"') do (
|
||||||
|
set "python_ver=%%g")) 2> NUL
|
||||||
|
|
||||||
|
if not defined python_ver (
|
||||||
|
echo Python was not found on your system.
|
||||||
|
echo Please install Python or add Python to your PATH.
|
||||||
|
) else (
|
||||||
|
set "py_path=!spackinstdir!\!python_ver!"
|
||||||
|
set "py_exe=!py_path!\python.exe"
|
||||||
|
)
|
||||||
|
goto :exitpoint
|
||||||
|
) else (
|
||||||
|
:: Python is already on the path
|
||||||
|
set "py_exe=!python_pf_ver!"
|
||||||
|
(for /F "tokens=* USEBACKQ" %%F in (
|
||||||
|
`"!py_exe!" --version`) do (set "output=%%F")) 2>NUL
|
||||||
|
if not "!output:Microsoft Store=!"=="!output!" goto :get_builtin
|
||||||
|
goto :exitpoint
|
||||||
|
)
|
||||||
|
:exitpoint
|
||||||
|
|
||||||
|
set "PATH=%SPACK_ROOT%\bin\;%PATH%"
|
||||||
|
if defined py_path (
|
||||||
|
set "PATH=%py_path%;%PATH%"
|
||||||
|
)
|
||||||
|
|
||||||
|
if defined py_exe (
|
||||||
|
"%py_exe%" "%SPACK_ROOT%\bin\haspywin.py"
|
||||||
|
)
|
||||||
|
|
||||||
|
set "EDITOR=notepad"
|
||||||
|
|
||||||
|
DOSKEY spacktivate=spack env activate $*
|
||||||
|
|
||||||
|
@echo **********************************************************************
|
||||||
|
@echo ** Spack Package Manager
|
||||||
|
@echo **********************************************************************
|
||||||
|
|
||||||
|
IF "%1"=="" GOTO CONTINUE
|
||||||
|
set
|
||||||
|
GOTO:EOF
|
||||||
|
|
||||||
|
:continue
|
||||||
|
set PROMPT=[spack] %PROMPT%
|
||||||
|
%comspec% /k
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -9,15 +9,15 @@ bootstrap:
|
|||||||
# may not be able to bootstrap all the software that Spack needs,
|
# may not be able to bootstrap all the software that Spack needs,
|
||||||
# depending on its type.
|
# depending on its type.
|
||||||
sources:
|
sources:
|
||||||
- name: github-actions-v0.6
|
- name: 'github-actions-v0.5'
|
||||||
metadata: $spack/share/spack/bootstrap/github-actions-v0.6
|
|
||||||
- name: github-actions-v0.5
|
|
||||||
metadata: $spack/share/spack/bootstrap/github-actions-v0.5
|
metadata: $spack/share/spack/bootstrap/github-actions-v0.5
|
||||||
- name: spack-install
|
- name: 'github-actions-v0.4'
|
||||||
|
metadata: $spack/share/spack/bootstrap/github-actions-v0.4
|
||||||
|
- name: 'spack-install'
|
||||||
metadata: $spack/share/spack/bootstrap/spack-install
|
metadata: $spack/share/spack/bootstrap/spack-install
|
||||||
trusted:
|
trusted:
|
||||||
# By default we trust bootstrapping from sources and from binaries
|
# By default we trust bootstrapping from sources and from binaries
|
||||||
# produced on Github via the workflow
|
# produced on Github via the workflow
|
||||||
github-actions-v0.6: true
|
|
||||||
github-actions-v0.5: true
|
github-actions-v0.5: true
|
||||||
|
github-actions-v0.4: true
|
||||||
spack-install: true
|
spack-install: true
|
||||||
|
@@ -39,8 +39,7 @@ concretizer:
|
|||||||
# Option to deal with possible duplicate nodes (i.e. different nodes from the same package) in the DAG.
|
# Option to deal with possible duplicate nodes (i.e. different nodes from the same package) in the DAG.
|
||||||
duplicates:
|
duplicates:
|
||||||
# "none": allows a single node for any package in the DAG.
|
# "none": allows a single node for any package in the DAG.
|
||||||
# "minimal": allows the duplication of 'build-tools' nodes only
|
# "minimal": allows the duplication of 'build-tools' nodes only (e.g. py-setuptools, cmake etc.)
|
||||||
# (e.g. py-setuptools, cmake etc.)
|
|
||||||
# "full" (experimental): allows separation of the entire build-tool stack (e.g. the entire "cmake" subDAG)
|
# "full" (experimental): allows separation of the entire build-tool stack (e.g. the entire "cmake" subDAG)
|
||||||
strategy: minimal
|
strategy: minimal
|
||||||
# Option to specify compatibility between operating systems for reuse of compilers and packages
|
# Option to specify compatibility between operating systems for reuse of compilers and packages
|
||||||
@@ -48,18 +47,3 @@ concretizer:
|
|||||||
# it can reuse. Note this is a directional compatibility so mutual compatibility between two OS's
|
# it can reuse. Note this is a directional compatibility so mutual compatibility between two OS's
|
||||||
# requires two entries i.e. os_compatible: {sonoma: [monterey], monterey: [sonoma]}
|
# requires two entries i.e. os_compatible: {sonoma: [monterey], monterey: [sonoma]}
|
||||||
os_compatible: {}
|
os_compatible: {}
|
||||||
|
|
||||||
# Option to specify whether to support splicing. Splicing allows for
|
|
||||||
# the relinking of concrete package dependencies in order to better
|
|
||||||
# reuse already built packages with ABI compatible dependencies
|
|
||||||
splice:
|
|
||||||
explicit: []
|
|
||||||
automatic: false
|
|
||||||
# Maximum time, in seconds, allowed for the 'solve' phase. If set to 0, there is no time limit.
|
|
||||||
timeout: 0
|
|
||||||
# If set to true, exceeding the timeout will always result in a concretization error. If false,
|
|
||||||
# the best (suboptimal) model computed before the timeout is used.
|
|
||||||
#
|
|
||||||
# Setting this to false yields unreproducible results, so we advise to use that value only
|
|
||||||
# for debugging purposes (e.g. check which constraints can help Spack concretize faster).
|
|
||||||
error_on_timeout: true
|
|
||||||
|
@@ -115,6 +115,12 @@ config:
|
|||||||
suppress_gpg_warnings: false
|
suppress_gpg_warnings: false
|
||||||
|
|
||||||
|
|
||||||
|
# If set to true, Spack will attempt to build any compiler on the spec
|
||||||
|
# that is not already available. If set to False, Spack will only use
|
||||||
|
# compilers already configured in compilers.yaml
|
||||||
|
install_missing_compilers: false
|
||||||
|
|
||||||
|
|
||||||
# If set to true, Spack will always check checksums after downloading
|
# If set to true, Spack will always check checksums after downloading
|
||||||
# archives. If false, Spack skips the checksum step.
|
# archives. If false, Spack skips the checksum step.
|
||||||
checksum: true
|
checksum: true
|
||||||
@@ -164,6 +170,23 @@ config:
|
|||||||
# If set to true, Spack will use ccache to cache C compiles.
|
# If set to true, Spack will use ccache to cache C compiles.
|
||||||
ccache: false
|
ccache: false
|
||||||
|
|
||||||
|
|
||||||
|
# The concretization algorithm to use in Spack. Options are:
|
||||||
|
#
|
||||||
|
# 'clingo': Uses a logic solver under the hood to solve DAGs with full
|
||||||
|
# backtracking and optimization for user preferences. Spack will
|
||||||
|
# try to bootstrap the logic solver, if not already available.
|
||||||
|
#
|
||||||
|
# 'original': Spack's original greedy, fixed-point concretizer. This
|
||||||
|
# algorithm can make decisions too early and will not backtrack
|
||||||
|
# sufficiently for many specs. This will soon be deprecated in
|
||||||
|
# favor of clingo.
|
||||||
|
#
|
||||||
|
# See `concretizer.yaml` for more settings you can fine-tune when
|
||||||
|
# using clingo.
|
||||||
|
concretizer: clingo
|
||||||
|
|
||||||
|
|
||||||
# How long to wait to lock the Spack installation database. This lock is used
|
# How long to wait to lock the Spack installation database. This lock is used
|
||||||
# when Spack needs to manage its own package metadata and all operations are
|
# when Spack needs to manage its own package metadata and all operations are
|
||||||
# expected to complete within the default time limit. The timeout should
|
# expected to complete within the default time limit. The timeout should
|
||||||
@@ -194,12 +217,6 @@ config:
|
|||||||
# executables with many dependencies, in particular on slow filesystems.
|
# executables with many dependencies, in particular on slow filesystems.
|
||||||
bind: false
|
bind: false
|
||||||
|
|
||||||
# Controls the handling of missing dynamic libraries after installation.
|
|
||||||
# Options are ignore (default), warn, or error. If set to error, the
|
|
||||||
# installation fails if installed binaries reference dynamic libraries that
|
|
||||||
# are not found in their specified rpaths.
|
|
||||||
missing_library_policy: ignore
|
|
||||||
|
|
||||||
|
|
||||||
# Set to 'false' to allow installation on filesystems that doesn't allow setgid bit
|
# Set to 'false' to allow installation on filesystems that doesn't allow setgid bit
|
||||||
# manipulation by unprivileged user (e.g. AFS)
|
# manipulation by unprivileged user (e.g. AFS)
|
||||||
|
16
etc/spack/defaults/cray/modules.yaml
Normal file
16
etc/spack/defaults/cray/modules.yaml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# -------------------------------------------------------------------------
|
||||||
|
# This is the default configuration for Spack's module file generation.
|
||||||
|
#
|
||||||
|
# Settings here are versioned with Spack and are intended to provide
|
||||||
|
# sensible defaults out of the box. Spack maintainers should edit this
|
||||||
|
# file to keep it current.
|
||||||
|
#
|
||||||
|
# Users can override these settings by editing the following files.
|
||||||
|
#
|
||||||
|
# Per-spack-instance settings (overrides defaults):
|
||||||
|
# $SPACK_ROOT/etc/spack/modules.yaml
|
||||||
|
#
|
||||||
|
# Per-user settings (overrides default and site settings):
|
||||||
|
# ~/.spack/modules.yaml
|
||||||
|
# -------------------------------------------------------------------------
|
||||||
|
modules: {}
|
3
etc/spack/defaults/linux/packages.yaml
Normal file
3
etc/spack/defaults/linux/packages.yaml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
packages:
|
||||||
|
iconv:
|
||||||
|
require: [libiconv]
|
@@ -20,14 +20,11 @@ packages:
|
|||||||
awk: [gawk]
|
awk: [gawk]
|
||||||
armci: [armcimpi]
|
armci: [armcimpi]
|
||||||
blas: [openblas, amdblis]
|
blas: [openblas, amdblis]
|
||||||
c: [gcc]
|
|
||||||
cxx: [gcc]
|
|
||||||
D: [ldc]
|
D: [ldc]
|
||||||
daal: [intel-oneapi-daal]
|
daal: [intel-oneapi-daal]
|
||||||
elf: [elfutils]
|
elf: [elfutils]
|
||||||
fftw-api: [fftw, amdfftw]
|
fftw-api: [fftw, amdfftw]
|
||||||
flame: [libflame, amdlibflame]
|
flame: [libflame, amdlibflame]
|
||||||
fortran: [gcc]
|
|
||||||
fortran-rt: [gcc-runtime, intel-oneapi-runtime]
|
fortran-rt: [gcc-runtime, intel-oneapi-runtime]
|
||||||
fuse: [libfuse]
|
fuse: [libfuse]
|
||||||
gl: [glx, osmesa]
|
gl: [glx, osmesa]
|
||||||
@@ -64,7 +61,6 @@ packages:
|
|||||||
tbb: [intel-tbb]
|
tbb: [intel-tbb]
|
||||||
unwind: [libunwind]
|
unwind: [libunwind]
|
||||||
uuid: [util-linux-uuid, libuuid]
|
uuid: [util-linux-uuid, libuuid]
|
||||||
wasi-sdk: [wasi-sdk-prebuilt]
|
|
||||||
xxd: [xxd-standalone, vim]
|
xxd: [xxd-standalone, vim]
|
||||||
yacc: [bison, byacc]
|
yacc: [bison, byacc]
|
||||||
ziglang: [zig]
|
ziglang: [zig]
|
||||||
@@ -72,15 +68,3 @@ packages:
|
|||||||
permissions:
|
permissions:
|
||||||
read: world
|
read: world
|
||||||
write: user
|
write: user
|
||||||
cray-mpich:
|
|
||||||
buildable: false
|
|
||||||
cray-mvapich2:
|
|
||||||
buildable: false
|
|
||||||
egl:
|
|
||||||
buildable: false
|
|
||||||
fujitsu-mpi:
|
|
||||||
buildable: false
|
|
||||||
hpcx-mpi:
|
|
||||||
buildable: false
|
|
||||||
spectrum-mpi:
|
|
||||||
buildable: false
|
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
config:
|
config:
|
||||||
locks: false
|
locks: false
|
||||||
|
concretizer: clingo
|
||||||
build_stage::
|
build_stage::
|
||||||
- '$spack/.staging'
|
- '$spack/.staging'
|
||||||
stage_name: '{name}-{version}-{hash:7}'
|
stage_name: '{name}-{version}-{hash:7}'
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
@@ -1174,17 +1175,6 @@ unspecified version, but packages can depend on other packages with
|
|||||||
could depend on ``mpich@1.2:`` if it can only build with version
|
could depend on ``mpich@1.2:`` if it can only build with version
|
||||||
``1.2`` or higher of ``mpich``.
|
``1.2`` or higher of ``mpich``.
|
||||||
|
|
||||||
.. note:: Windows Spec Syntax Caveats
|
|
||||||
Windows has a few idiosyncrasies when it comes to the Spack spec syntax and the use of certain shells
|
|
||||||
Spack's spec dependency syntax uses the carat (``^``) character, however this is an escape string in CMD
|
|
||||||
so it must be escaped with an additional carat (i.e. ``^^``).
|
|
||||||
CMD also will attempt to interpret strings with ``=`` characters in them. Any spec including this symbol
|
|
||||||
must double quote the string.
|
|
||||||
|
|
||||||
Note: All of these issues are unique to CMD, they can be avoided by using Powershell.
|
|
||||||
|
|
||||||
For more context on these caveats see the related issues: `carat <https://github.com/spack/spack/issues/42833>`_ and `equals <https://github.com/spack/spack/issues/43348>`_
|
|
||||||
|
|
||||||
Below are more details about the specifiers that you can add to specs.
|
Below are more details about the specifiers that you can add to specs.
|
||||||
|
|
||||||
.. _version-specifier:
|
.. _version-specifier:
|
||||||
@@ -1358,10 +1348,6 @@ For example, for the ``stackstart`` variant:
|
|||||||
mpileaks stackstart==4 # variant will be propagated to dependencies
|
mpileaks stackstart==4 # variant will be propagated to dependencies
|
||||||
mpileaks stackstart=4 # only mpileaks will have this variant value
|
mpileaks stackstart=4 # only mpileaks will have this variant value
|
||||||
|
|
||||||
Spack also allows variants to be propagated from a package that does
|
|
||||||
not have that variant.
|
|
||||||
|
|
||||||
|
|
||||||
^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^
|
||||||
Compiler Flags
|
Compiler Flags
|
||||||
^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^
|
||||||
@@ -1447,12 +1433,22 @@ the reserved keywords ``platform``, ``os`` and ``target``:
|
|||||||
$ spack install libelf os=ubuntu18.04
|
$ spack install libelf os=ubuntu18.04
|
||||||
$ spack install libelf target=broadwell
|
$ spack install libelf target=broadwell
|
||||||
|
|
||||||
|
or together by using the reserved keyword ``arch``:
|
||||||
|
|
||||||
|
.. code-block:: console
|
||||||
|
|
||||||
|
$ spack install libelf arch=cray-CNL10-haswell
|
||||||
|
|
||||||
Normally users don't have to bother specifying the architecture if they
|
Normally users don't have to bother specifying the architecture if they
|
||||||
are installing software for their current host, as in that case the
|
are installing software for their current host, as in that case the
|
||||||
values will be detected automatically. If you need fine-grained control
|
values will be detected automatically. If you need fine-grained control
|
||||||
over which packages use which targets (or over *all* packages' default
|
over which packages use which targets (or over *all* packages' default
|
||||||
target), see :ref:`package-preferences`.
|
target), see :ref:`package-preferences`.
|
||||||
|
|
||||||
|
.. admonition:: Cray machines
|
||||||
|
|
||||||
|
The situation is a little bit different for Cray machines and a detailed
|
||||||
|
explanation on how the architecture can be set on them can be found at :ref:`cray-support`
|
||||||
|
|
||||||
.. _support-for-microarchitectures:
|
.. _support-for-microarchitectures:
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
@@ -264,30 +265,25 @@ infrastructure, or to cache Spack built binaries in Github Actions and
|
|||||||
GitLab CI.
|
GitLab CI.
|
||||||
|
|
||||||
To get started, configure an OCI mirror using ``oci://`` as the scheme,
|
To get started, configure an OCI mirror using ``oci://`` as the scheme,
|
||||||
and optionally specify variables that hold the username and password (or
|
and optionally specify a username and password (or personal access token):
|
||||||
personal access token) for the registry:
|
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ spack mirror add --oci-username-variable REGISTRY_USER \
|
$ spack mirror add --oci-username username --oci-password password my_registry oci://example.com/my_image
|
||||||
--oci-password-variable REGISTRY_TOKEN \
|
|
||||||
my_registry oci://example.com/my_image
|
|
||||||
|
|
||||||
Spack follows the naming conventions of Docker, with Dockerhub as the default
|
Spack follows the naming conventions of Docker, with Dockerhub as the default
|
||||||
registry. To use Dockerhub, you can omit the registry domain:
|
registry. To use Dockerhub, you can omit the registry domain:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ spack mirror add ... my_registry oci://username/my_image
|
$ spack mirror add --oci-username username --oci-password password my_registry oci://username/my_image
|
||||||
|
|
||||||
From here, you can use the mirror as any other build cache:
|
From here, you can use the mirror as any other build cache:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ export REGISTRY_USER=...
|
|
||||||
$ export REGISTRY_TOKEN=...
|
|
||||||
$ spack buildcache push my_registry <specs...> # push to the registry
|
$ spack buildcache push my_registry <specs...> # push to the registry
|
||||||
$ spack install <specs...> # or install from the registry
|
$ spack install <specs...> # install from the registry
|
||||||
|
|
||||||
A unique feature of buildcaches on top of OCI registries is that it's incredibly
|
A unique feature of buildcaches on top of OCI registries is that it's incredibly
|
||||||
easy to generate get a runnable container image with the binaries installed. This
|
easy to generate get a runnable container image with the binaries installed. This
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
@@ -165,106 +166,3 @@ while `py-numpy` still needs an older version:
|
|||||||
|
|
||||||
Up to Spack v0.20 ``duplicates:strategy:none`` was the default (and only) behavior. From Spack v0.21 the
|
Up to Spack v0.20 ``duplicates:strategy:none`` was the default (and only) behavior. From Spack v0.21 the
|
||||||
default behavior is ``duplicates:strategy:minimal``.
|
default behavior is ``duplicates:strategy:minimal``.
|
||||||
|
|
||||||
--------
|
|
||||||
Splicing
|
|
||||||
--------
|
|
||||||
|
|
||||||
The ``splice`` key covers config attributes for splicing specs in the solver.
|
|
||||||
|
|
||||||
"Splicing" is a method for replacing a dependency with another spec
|
|
||||||
that provides the same package or virtual. There are two types of
|
|
||||||
splices, referring to different behaviors for shared dependencies
|
|
||||||
between the root spec and the new spec replacing a dependency:
|
|
||||||
"transitive" and "intransitive". A "transitive" splice is one that
|
|
||||||
resolves all conflicts by taking the dependency from the new node. An
|
|
||||||
"intransitive" splice is one that resolves all conflicts by taking the
|
|
||||||
dependency from the original root. From a theory perspective, hybrid
|
|
||||||
splices are possible but are not modeled by Spack.
|
|
||||||
|
|
||||||
All spliced specs retain a ``build_spec`` attribute that points to the
|
|
||||||
original Spec before any splice occurred. The ``build_spec`` for a
|
|
||||||
non-spliced spec is itself.
|
|
||||||
|
|
||||||
The figure below shows examples of transitive and intransitive splices:
|
|
||||||
|
|
||||||
.. figure:: images/splices.png
|
|
||||||
:align: center
|
|
||||||
|
|
||||||
The concretizer can be configured to explicitly splice particular
|
|
||||||
replacements for a target spec. Splicing will allow the user to make
|
|
||||||
use of generically built public binary caches, while swapping in
|
|
||||||
highly optimized local builds for performance critical components
|
|
||||||
and/or components that interact closely with the specific hardware
|
|
||||||
details of the system. The most prominent candidate for splicing is
|
|
||||||
MPI providers. MPI packages have relatively well-understood ABI
|
|
||||||
characteristics, and most High Performance Computing facilities deploy
|
|
||||||
highly optimized MPI packages tailored to their particular
|
|
||||||
hardware. The following config block configures Spack to replace
|
|
||||||
whatever MPI provider each spec was concretized to use with the
|
|
||||||
particular package of ``mpich`` with the hash that begins ``abcdef``.
|
|
||||||
|
|
||||||
.. code-block:: yaml
|
|
||||||
|
|
||||||
concretizer:
|
|
||||||
splice:
|
|
||||||
explicit:
|
|
||||||
- target: mpi
|
|
||||||
replacement: mpich/abcdef
|
|
||||||
transitive: false
|
|
||||||
|
|
||||||
.. warning::
|
|
||||||
|
|
||||||
When configuring an explicit splice, you as the user take on the
|
|
||||||
responsibility for ensuring ABI compatibility between the specs
|
|
||||||
matched by the target and the replacement you provide. If they are
|
|
||||||
not compatible, Spack will not warn you and your application will
|
|
||||||
fail to run.
|
|
||||||
|
|
||||||
The ``target`` field of an explicit splice can be any abstract
|
|
||||||
spec. The ``replacement`` field must be a spec that includes the hash
|
|
||||||
of a concrete spec, and the replacement must either be the same
|
|
||||||
package as the target, provide the virtual that is the target, or
|
|
||||||
provide a virtual that the target provides. The ``transitive`` field
|
|
||||||
is optional -- by default, splices will be transitive.
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
With explicit splices configured, it is possible for Spack to
|
|
||||||
concretize to a spec that does not satisfy the input. For example,
|
|
||||||
with the config above ``hdf5 ^mvapich2`` will concretize to user
|
|
||||||
``mpich/abcdef`` instead of ``mvapich2`` as the MPI provider. Spack
|
|
||||||
will warn the user in this case, but will not fail the
|
|
||||||
concretization.
|
|
||||||
|
|
||||||
.. _automatic_splicing:
|
|
||||||
|
|
||||||
^^^^^^^^^^^^^^^^^^
|
|
||||||
Automatic Splicing
|
|
||||||
^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
The Spack solver can be configured to do automatic splicing for
|
|
||||||
ABI-compatible packages. Automatic splices are enabled in the concretizer
|
|
||||||
config section
|
|
||||||
|
|
||||||
.. code-block:: yaml
|
|
||||||
|
|
||||||
concretizer:
|
|
||||||
splice:
|
|
||||||
automatic: True
|
|
||||||
|
|
||||||
Packages can include ABI-compatibility information using the
|
|
||||||
``can_splice`` directive. See :ref:`the packaging
|
|
||||||
guide<abi_compatibility>` for instructions on specifying ABI
|
|
||||||
compatibility using the ``can_splice`` directive.
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
The ``can_splice`` directive is experimental and may be changed in
|
|
||||||
future versions.
|
|
||||||
|
|
||||||
When automatic splicing is enabled, the concretizer will combine any
|
|
||||||
number of ABI-compatible specs if possible to reuse installed packages
|
|
||||||
and packages available from binary caches. The end result of these
|
|
||||||
specs is equivalent to a series of transitive/intransitive splices,
|
|
||||||
but the series may be non-obvious.
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
@@ -146,15 +147,6 @@ example, the ``bash`` shell is used to run the ``autogen.sh`` script.
|
|||||||
def autoreconf(self, spec, prefix):
|
def autoreconf(self, spec, prefix):
|
||||||
which("bash")("autogen.sh")
|
which("bash")("autogen.sh")
|
||||||
|
|
||||||
If the ``package.py`` has build instructions in a separate
|
|
||||||
:ref:`builder class <multiple_build_systems>`, the signature for a phase changes slightly:
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
class AutotoolsBuilder(AutotoolsBuilder):
|
|
||||||
def autoreconf(self, pkg, spec, prefix):
|
|
||||||
which("bash")("autogen.sh")
|
|
||||||
|
|
||||||
"""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""
|
||||||
patching configure or Makefile.in files
|
patching configure or Makefile.in files
|
||||||
"""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
@@ -129,19 +130,14 @@ before or after a particular phase. For example, in ``perl``, we see:
|
|||||||
|
|
||||||
@run_after("install")
|
@run_after("install")
|
||||||
def install_cpanm(self):
|
def install_cpanm(self):
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
maker = make
|
|
||||||
cpan_dir = join_path("cpanm", "cpanm")
|
if spec.satisfies("+cpanm"):
|
||||||
if sys.platform == "win32":
|
with working_dir(join_path("cpanm", "cpanm")):
|
||||||
maker = nmake
|
perl = spec["perl"].command
|
||||||
cpan_dir = join_path(self.stage.source_path, cpan_dir)
|
perl("Makefile.PL")
|
||||||
cpan_dir = windows_sfn(cpan_dir)
|
make()
|
||||||
if "+cpanm" in spec:
|
make("install")
|
||||||
with working_dir(cpan_dir):
|
|
||||||
perl = spec["perl"].command
|
|
||||||
perl("Makefile.PL")
|
|
||||||
maker()
|
|
||||||
maker("install")
|
|
||||||
|
|
||||||
This extra step automatically installs ``cpanm`` in addition to the
|
This extra step automatically installs ``cpanm`` in addition to the
|
||||||
base Perl installation.
|
base Perl installation.
|
||||||
@@ -180,14 +176,8 @@ In the ``perl`` package, we can see:
|
|||||||
|
|
||||||
@run_after("build")
|
@run_after("build")
|
||||||
@on_package_attributes(run_tests=True)
|
@on_package_attributes(run_tests=True)
|
||||||
def build_test(self):
|
def test(self):
|
||||||
if sys.platform == "win32":
|
make("test")
|
||||||
win32_dir = os.path.join(self.stage.source_path, "win32")
|
|
||||||
win32_dir = windows_sfn(win32_dir)
|
|
||||||
with working_dir(win32_dir):
|
|
||||||
nmake("test", ignore_quotes=True)
|
|
||||||
else:
|
|
||||||
make("test")
|
|
||||||
|
|
||||||
As you can guess, this runs ``make test`` *after* building the package,
|
As you can guess, this runs ``make test`` *after* building the package,
|
||||||
if and only if testing is requested. Again, this is not specific to
|
if and only if testing is requested. Again, this is not specific to
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
@@ -24,7 +25,7 @@ use Spack to build packages with the tools.
|
|||||||
The Spack Python class ``IntelOneapiPackage`` is a base class that is
|
The Spack Python class ``IntelOneapiPackage`` is a base class that is
|
||||||
used by ``IntelOneapiCompilers``, ``IntelOneapiMkl``,
|
used by ``IntelOneapiCompilers``, ``IntelOneapiMkl``,
|
||||||
``IntelOneapiTbb`` and other classes to implement the oneAPI
|
``IntelOneapiTbb`` and other classes to implement the oneAPI
|
||||||
packages. Search for ``oneAPI`` at `packages.spack.io <https://packages.spack.io>`_ for the full
|
packages. Search for ``oneAPI`` at `<packages.spack.io>`_ for the full
|
||||||
list of available oneAPI packages, or use::
|
list of available oneAPI packages, or use::
|
||||||
|
|
||||||
spack list -d oneAPI
|
spack list -d oneAPI
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
@@ -24,14 +25,6 @@ QMake does not appear to have a standardized way of specifying
|
|||||||
the installation directory, so you may have to set environment
|
the installation directory, so you may have to set environment
|
||||||
variables or edit ``*.pro`` files to get things working properly.
|
variables or edit ``*.pro`` files to get things working properly.
|
||||||
|
|
||||||
QMake packages will depend on the virtual ``qmake`` package which
|
|
||||||
is provided by multiple versions of Qt: ``qt`` provides Qt up to
|
|
||||||
Qt5, and ``qt-base`` provides Qt from version Qt6 onwards. This
|
|
||||||
split was motivated by the desire to split the single Qt package
|
|
||||||
into its components to allow for more fine-grained installation.
|
|
||||||
To depend on a specific version, refer to the documentation on
|
|
||||||
:ref:`virtual-dependencies`.
|
|
||||||
|
|
||||||
^^^^^^
|
^^^^^^
|
||||||
Phases
|
Phases
|
||||||
^^^^^^
|
^^^^^^
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
@@ -48,14 +49,14 @@ following phases:
|
|||||||
#. ``install`` - install the package
|
#. ``install`` - install the package
|
||||||
|
|
||||||
Package developers often add unit tests that can be invoked with
|
Package developers often add unit tests that can be invoked with
|
||||||
``scons test`` or ``scons check``. Spack provides a ``build_test`` method
|
``scons test`` or ``scons check``. Spack provides a ``test`` method
|
||||||
to handle this. Since we don't know which one the package developer
|
to handle this. Since we don't know which one the package developer
|
||||||
chose, the ``build_test`` method does nothing by default, but can be easily
|
chose, the ``test`` method does nothing by default, but can be easily
|
||||||
overridden like so:
|
overridden like so:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
def build_test(self):
|
def test(self):
|
||||||
scons("check")
|
scons("check")
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
@@ -10,8 +11,7 @@ Chaining Spack Installations (upstreams.yaml)
|
|||||||
|
|
||||||
You can point your Spack installation to another installation to use any
|
You can point your Spack installation to another installation to use any
|
||||||
packages that are installed there. To register the other Spack instance,
|
packages that are installed there. To register the other Spack instance,
|
||||||
you can add it as an entry to ``upstreams.yaml`` at any of the
|
you can add it as an entry to ``upstreams.yaml``:
|
||||||
:ref:`configuration-scopes`:
|
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
@@ -22,8 +22,7 @@ you can add it as an entry to ``upstreams.yaml`` at any of the
|
|||||||
install_tree: /path/to/another/spack/opt/spack
|
install_tree: /path/to/another/spack/opt/spack
|
||||||
|
|
||||||
``install_tree`` must point to the ``opt/spack`` directory inside of the
|
``install_tree`` must point to the ``opt/spack`` directory inside of the
|
||||||
Spack base directory, or the location of the ``install_tree`` defined
|
Spack base directory.
|
||||||
in :ref:`config.yaml <config-yaml>`.
|
|
||||||
|
|
||||||
Once the upstream Spack instance has been added, ``spack find`` will
|
Once the upstream Spack instance has been added, ``spack find`` will
|
||||||
automatically check the upstream instance when querying installed packages,
|
automatically check the upstream instance when querying installed packages,
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
@@ -205,24 +206,17 @@ def setup(sphinx):
|
|||||||
("py:class", "six.moves.urllib.parse.ParseResult"),
|
("py:class", "six.moves.urllib.parse.ParseResult"),
|
||||||
("py:class", "TextIO"),
|
("py:class", "TextIO"),
|
||||||
("py:class", "hashlib._Hash"),
|
("py:class", "hashlib._Hash"),
|
||||||
("py:class", "concurrent.futures._base.Executor"),
|
|
||||||
# Spack classes that are private and we don't want to expose
|
# Spack classes that are private and we don't want to expose
|
||||||
("py:class", "spack.provider_index._IndexBase"),
|
("py:class", "spack.provider_index._IndexBase"),
|
||||||
("py:class", "spack.repo._PrependFileLoader"),
|
("py:class", "spack.repo._PrependFileLoader"),
|
||||||
("py:class", "spack.build_systems._checks.BuilderWithDefaults"),
|
("py:class", "spack.build_systems._checks.BaseBuilder"),
|
||||||
# Spack classes that intersphinx is unable to resolve
|
# Spack classes that intersphinx is unable to resolve
|
||||||
("py:class", "spack.version.StandardVersion"),
|
("py:class", "spack.version.StandardVersion"),
|
||||||
("py:class", "spack.spec.DependencySpec"),
|
("py:class", "spack.spec.DependencySpec"),
|
||||||
("py:class", "spack.spec.ArchSpec"),
|
|
||||||
("py:class", "spack.spec.InstallStatus"),
|
("py:class", "spack.spec.InstallStatus"),
|
||||||
("py:class", "spack.spec.SpecfileReaderBase"),
|
("py:class", "spack.spec.SpecfileReaderBase"),
|
||||||
("py:class", "spack.install_test.Pb"),
|
("py:class", "spack.install_test.Pb"),
|
||||||
("py:class", "spack.filesystem_view.SimpleFilesystemView"),
|
("py:class", "spack.filesystem_view.SimpleFilesystemView"),
|
||||||
("py:class", "spack.traverse.EdgeAndDepth"),
|
|
||||||
("py:class", "archspec.cpu.microarchitecture.Microarchitecture"),
|
|
||||||
("py:class", "spack.compiler.CompilerCache"),
|
|
||||||
# TypeVar that is not handled correctly
|
|
||||||
("py:class", "llnl.util.lang.T"),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
# The reST default role (used for this markup: `text`) to use for all documents.
|
# The reST default role (used for this markup: `text`) to use for all documents.
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
@@ -280,7 +281,7 @@ When spack queries for configuration parameters, it searches in
|
|||||||
higher-precedence scopes first. So, settings in a higher-precedence file
|
higher-precedence scopes first. So, settings in a higher-precedence file
|
||||||
can override those with the same key in a lower-precedence one. For
|
can override those with the same key in a lower-precedence one. For
|
||||||
list-valued settings, Spack *prepends* higher-precedence settings to
|
list-valued settings, Spack *prepends* higher-precedence settings to
|
||||||
lower-precedence settings. Completely ignoring lower-precedence configuration
|
lower-precedence settings. Completely ignoring higher-level configuration
|
||||||
options is supported with the ``::`` notation for keys (see
|
options is supported with the ``::`` notation for keys (see
|
||||||
:ref:`config-overrides` below).
|
:ref:`config-overrides` below).
|
||||||
|
|
||||||
@@ -510,7 +511,6 @@ Spack understands over a dozen special variables. These are:
|
|||||||
* ``$target_family``. The target family for the current host, as
|
* ``$target_family``. The target family for the current host, as
|
||||||
detected by ArchSpec. E.g. ``x86_64`` or ``aarch64``.
|
detected by ArchSpec. E.g. ``x86_64`` or ``aarch64``.
|
||||||
* ``$date``: the current date in the format YYYY-MM-DD
|
* ``$date``: the current date in the format YYYY-MM-DD
|
||||||
* ``$spack_short_version``: the Spack version truncated to the first components.
|
|
||||||
|
|
||||||
|
|
||||||
Note that, as with shell variables, you can write these as ``$varname``
|
Note that, as with shell variables, you can write these as ``$varname``
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
@@ -37,11 +38,9 @@ just have to configure and OCI registry and run ``spack buildcache push``.
|
|||||||
spack -e . install
|
spack -e . install
|
||||||
|
|
||||||
# Configure the registry
|
# Configure the registry
|
||||||
spack -e . mirror add --oci-username-variable REGISTRY_USER \
|
spack -e . mirror add --oci-username ... --oci-password ... container-registry oci://example.com/name/image
|
||||||
--oci-password-variable REGISTRY_TOKEN \
|
|
||||||
container-registry oci://example.com/name/image
|
|
||||||
|
|
||||||
# Push the image (do set REGISTRY_USER and REGISTRY_TOKEN)
|
# Push the image
|
||||||
spack -e . buildcache push --update-index --base-image ubuntu:22.04 --tag my_env container-registry
|
spack -e . buildcache push --update-index --base-image ubuntu:22.04 --tag my_env container-registry
|
||||||
|
|
||||||
The resulting container image can then be run as follows:
|
The resulting container image can then be run as follows:
|
||||||
@@ -204,9 +203,12 @@ The OS that are currently supported are summarized in the table below:
|
|||||||
* - Ubuntu 24.04
|
* - Ubuntu 24.04
|
||||||
- ``ubuntu:24.04``
|
- ``ubuntu:24.04``
|
||||||
- ``spack/ubuntu-noble``
|
- ``spack/ubuntu-noble``
|
||||||
* - CentOS Stream9
|
* - CentOS 7
|
||||||
- ``quay.io/centos/centos:stream9``
|
- ``centos:7``
|
||||||
- ``spack/centos-stream9``
|
- ``spack/centos7``
|
||||||
|
* - CentOS Stream
|
||||||
|
- ``quay.io/centos/centos:stream``
|
||||||
|
- ``spack/centos-stream``
|
||||||
* - openSUSE Leap
|
* - openSUSE Leap
|
||||||
- ``opensuse/leap``
|
- ``opensuse/leap``
|
||||||
- ``spack/leap15``
|
- ``spack/leap15``
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
@@ -315,215 +316,6 @@ documentation tests to make sure there are no errors. Documentation changes can
|
|||||||
in some obfuscated warning messages. If you don't understand what they mean, feel free
|
in some obfuscated warning messages. If you don't understand what they mean, feel free
|
||||||
to ask when you submit your PR.
|
to ask when you submit your PR.
|
||||||
|
|
||||||
.. _spack-builders-and-pipelines:
|
|
||||||
|
|
||||||
^^^^^^^^^
|
|
||||||
GitLab CI
|
|
||||||
^^^^^^^^^
|
|
||||||
|
|
||||||
""""""""""""""""""
|
|
||||||
Build Cache Stacks
|
|
||||||
""""""""""""""""""
|
|
||||||
|
|
||||||
Spack welcomes the contribution of software stacks of interest to the community. These
|
|
||||||
stacks are used to test package recipes and generate publicly available build caches.
|
|
||||||
Spack uses GitLab CI for managing the orchestration of build jobs.
|
|
||||||
|
|
||||||
GitLab Entry Point
|
|
||||||
~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Add stack entrypoint to the ``share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml``. There
|
|
||||||
are two stages required for each new stack, the generation stage and the build stage.
|
|
||||||
|
|
||||||
The generate stage is defined using the job template ``.generate`` configured with
|
|
||||||
environment variables defining the name of the stack in ``SPACK_CI_STACK_NAME`` and the
|
|
||||||
platform (``SPACK_TARGET_PLATFORM``) and architecture (``SPACK_TARGET_ARCH``) configuration,
|
|
||||||
and the tags associated with the class of runners to build on.
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
The ``SPACK_CI_STACK_NAME`` must match the name of the directory containing the
|
|
||||||
stacks ``spack.yaml``.
|
|
||||||
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
The platform and architecture variables are specified in order to select the
|
|
||||||
correct configurations from the generic configurations used in Spack CI. The
|
|
||||||
configurations currently available are:
|
|
||||||
|
|
||||||
* ``.cray_rhel_zen4``
|
|
||||||
* ``.cray_sles_zen4``
|
|
||||||
* ``.darwin_aarch64``
|
|
||||||
* ``.darwin_x86_64``
|
|
||||||
* ``.linux_aarch64``
|
|
||||||
* ``.linux_icelake``
|
|
||||||
* ``.linux_neoverse_n1``
|
|
||||||
* ``.linux_neoverse_v1``
|
|
||||||
* ``.linux_neoverse_v2``
|
|
||||||
* ``.linux_power``
|
|
||||||
* ``.linux_skylake``
|
|
||||||
* ``.linux_x86_64``
|
|
||||||
* ``.linux_x86_64_v4``
|
|
||||||
|
|
||||||
New configurations can be added to accommodate new platforms and architectures.
|
|
||||||
|
|
||||||
|
|
||||||
The build stage is defined as a trigger job that consumes the GitLab CI pipeline generated in
|
|
||||||
the generate stage for this stack. Build stage jobs use the ``.build`` job template which
|
|
||||||
handles the basic configuration.
|
|
||||||
|
|
||||||
An example entry point for a new stack called ``my-super-cool-stack``
|
|
||||||
|
|
||||||
.. code-block:: yaml
|
|
||||||
|
|
||||||
.my-super-cool-stack:
|
|
||||||
extends: [ ".linux_x86_64_v3" ]
|
|
||||||
variables:
|
|
||||||
SPACK_CI_STACK_NAME: my-super-cool-stack
|
|
||||||
tags: [ "all", "tags", "your", "job", "needs"]
|
|
||||||
|
|
||||||
my-super-cool-stack-generate:
|
|
||||||
extends: [ ".generate", ".my-super-cool-stack" ]
|
|
||||||
image: my-super-cool-stack-image:0.0.1
|
|
||||||
|
|
||||||
my-super-cool-stack-build:
|
|
||||||
extends: [ ".build", ".my-super-cool-stack" ]
|
|
||||||
trigger:
|
|
||||||
include:
|
|
||||||
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
|
|
||||||
job: my-super-cool-stack-generate
|
|
||||||
strategy: depend
|
|
||||||
needs:
|
|
||||||
- artifacts: True
|
|
||||||
job: my-super-cool-stack-generate
|
|
||||||
|
|
||||||
|
|
||||||
Stack Configuration
|
|
||||||
~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
The stack configuration is a spack environment file with two additional sections added.
|
|
||||||
Stack configurations should be located in ``share/spack/gitlab/cloud_pipelines/stacks/<stack_name>/spack.yaml``.
|
|
||||||
|
|
||||||
The ``ci`` section is generally used to define stack specific mappings such as image or tags.
|
|
||||||
For more information on what can go into the ``ci`` section refer to the docs on pipelines.
|
|
||||||
|
|
||||||
The ``cdash`` section is used for defining where to upload the results of builds. Spack configures
|
|
||||||
most of the details for posting pipeline results to
|
|
||||||
`cdash.spack.io <https://cdash.spack.io/index.php?project=Spack+Testing>`_. The only
|
|
||||||
requirement in the stack configuration is to define a ``build-group`` that is unique,
|
|
||||||
this is usually the long name of the stack.
|
|
||||||
|
|
||||||
An example stack that builds ``zlib``.
|
|
||||||
|
|
||||||
.. code-block:: yaml
|
|
||||||
|
|
||||||
spack:
|
|
||||||
view: false
|
|
||||||
packages:
|
|
||||||
all:
|
|
||||||
require: ["%gcc", "target=x86_64_v3"]
|
|
||||||
specs:
|
|
||||||
- zlib
|
|
||||||
|
|
||||||
ci:
|
|
||||||
pipeline-gen
|
|
||||||
- build-job:
|
|
||||||
image: my-super-cool-stack-image:0.0.1
|
|
||||||
|
|
||||||
cdash:
|
|
||||||
build-group: My Super Cool Stack
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
The ``image`` used in the ``*-generate`` job must match exactly the ``image`` used in the ``build-job``.
|
|
||||||
When the images do not match the build job may fail.
|
|
||||||
|
|
||||||
|
|
||||||
"""""""""""""""""""
|
|
||||||
Registering Runners
|
|
||||||
"""""""""""""""""""
|
|
||||||
|
|
||||||
Contributing computational resources to Spack's CI build farm is one way to help expand the
|
|
||||||
capabilities and offerings of the public Spack build caches. Currently, Spack utilizes linux runners
|
|
||||||
from AWS, Google, and the University of Oregon (UO).
|
|
||||||
|
|
||||||
Runners require three key peices:
|
|
||||||
* Runner Registration Token
|
|
||||||
* Accurate tags
|
|
||||||
* OIDC Authentication script
|
|
||||||
* GPG keys
|
|
||||||
|
|
||||||
|
|
||||||
Minimum GitLab Runner Version: ``16.1.0``
|
|
||||||
`Intallation instructions <https://docs.gitlab.com/runner/install/>`_
|
|
||||||
|
|
||||||
Registration Token
|
|
||||||
~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
The first step to contribute new runners is to open an issue in the `spack infrastructure <https://github.com/spack/spack-infrastructure/issues/new?assignees=&labels=runner-registration&projects=&template=runner_registration.yml>`_
|
|
||||||
project. This will be reported to the spack infrastructure team who will guide users through the process
|
|
||||||
of registering new runners for Spack CI.
|
|
||||||
|
|
||||||
The information needed to register a runner is the motivation for the new resources, a semi-detailed description of
|
|
||||||
the runner, and finallly the point of contact for maintaining the software on the runner.
|
|
||||||
|
|
||||||
The point of contact will then work with the infrastruture team to obtain runner registration token(s) for interacting with
|
|
||||||
with Spack's GitLab instance. Once the runner is active, this point of contact will also be responsible for updating the
|
|
||||||
GitLab runner software to keep pace with Spack's Gitlab.
|
|
||||||
|
|
||||||
Tagging
|
|
||||||
~~~~~~~
|
|
||||||
|
|
||||||
In the initial stages of runner registration it is important to **exclude** the special tag ``spack``. This will prevent
|
|
||||||
the new runner(s) from being picked up for production CI jobs while it is configured and evaluated. Once it is determined
|
|
||||||
that the runner is ready for production use the ``spack`` tag will be added.
|
|
||||||
|
|
||||||
Because gitlab has no concept of tag exclustion, runners that provide specialized resource also require specialized tags.
|
|
||||||
For example, a basic CPU only x86_64 runner may have a tag ``x86_64`` associated with it. However, a runner containing an
|
|
||||||
CUDA capable GPU may have the tag ``x86_64-cuda`` to denote that it should only be used for packages that will benefit from
|
|
||||||
a CUDA capable resource.
|
|
||||||
|
|
||||||
OIDC
|
|
||||||
~~~~
|
|
||||||
|
|
||||||
Spack runners use OIDC authentication for connecting to the appropriate AWS bucket
|
|
||||||
which is used for coordinating the communication of binaries between build jobs. In
|
|
||||||
order to configure OIDC authentication, Spack CI runners use a python script with minimal
|
|
||||||
dependencies. This script can be configured for runners as seen here using the ``pre_build_script``.
|
|
||||||
|
|
||||||
.. code-block:: toml
|
|
||||||
|
|
||||||
[[runners]]
|
|
||||||
pre_build_script = """
|
|
||||||
echo 'Executing Spack pre-build setup script'
|
|
||||||
|
|
||||||
for cmd in "${PY3:-}" python3 python; do
|
|
||||||
if command -v > /dev/null "$cmd"; then
|
|
||||||
export PY3="$(command -v "$cmd")"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -z "${PY3:-}" ]; then
|
|
||||||
echo "Unable to find python3 executable"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
$PY3 -c "import urllib.request;urllib.request.urlretrieve('https://raw.githubusercontent.com/spack/spack-infrastructure/main/scripts/gitlab_runner_pre_build/pre_build.py', 'pre_build.py')"
|
|
||||||
$PY3 pre_build.py > envvars
|
|
||||||
|
|
||||||
. ./envvars
|
|
||||||
rm -f envvars
|
|
||||||
unset GITLAB_OIDC_TOKEN
|
|
||||||
"""
|
|
||||||
|
|
||||||
GPG Keys
|
|
||||||
~~~~~~~~
|
|
||||||
|
|
||||||
Runners that may be utilized for ``protected`` CI require the registration of an intermediate signing key that
|
|
||||||
can be used to sign packages. For more information on package signing read :ref:`key_architecture`.
|
|
||||||
|
|
||||||
--------
|
--------
|
||||||
Coverage
|
Coverage
|
||||||
--------
|
--------
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
@@ -177,8 +178,12 @@ Spec-related modules
|
|||||||
Contains :class:`~spack.spec.Spec`. Also implements most of the logic for concretization
|
Contains :class:`~spack.spec.Spec`. Also implements most of the logic for concretization
|
||||||
of specs.
|
of specs.
|
||||||
|
|
||||||
:mod:`spack.spec_parser`
|
:mod:`spack.parser`
|
||||||
Contains :class:`~spack.spec_parser.SpecParser` and functions related to parsing specs.
|
Contains :class:`~spack.parser.SpecParser` and functions related to parsing specs.
|
||||||
|
|
||||||
|
:mod:`spack.concretize`
|
||||||
|
Contains :class:`~spack.concretize.Concretizer` implementation,
|
||||||
|
which allows site administrators to change Spack's :ref:`concretization-policies`.
|
||||||
|
|
||||||
:mod:`spack.version`
|
:mod:`spack.version`
|
||||||
Implements a simple :class:`~spack.version.Version` class with simple
|
Implements a simple :class:`~spack.version.Version` class with simple
|
||||||
@@ -332,9 +337,13 @@ inserting them at different places in the spack code base. Whenever a hook
|
|||||||
type triggers by way of a function call, we find all the hooks of that type,
|
type triggers by way of a function call, we find all the hooks of that type,
|
||||||
and run them.
|
and run them.
|
||||||
|
|
||||||
Spack defines hooks by way of a module in the ``lib/spack/spack/hooks`` directory.
|
Spack defines hooks by way of a module at ``lib/spack/spack/hooks`` where we can define
|
||||||
This module has to be registered in ``__init__.py`` so that Spack is aware of it.
|
types of hooks in the ``__init__.py``, and then python files in that folder
|
||||||
This section will cover the basic kind of hooks, and how to write them.
|
can use hook functions. The files are automatically parsed, so if you write
|
||||||
|
a new file for some integration (e.g., ``lib/spack/spack/hooks/myintegration.py``
|
||||||
|
you can then write hook functions in that file that will be automatically detected,
|
||||||
|
and run whenever your hook is called. This section will cover the basic kind
|
||||||
|
of hooks, and how to write them.
|
||||||
|
|
||||||
^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^
|
||||||
Types of Hooks
|
Types of Hooks
|
||||||
|
@@ -1,59 +1,53 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
.. _environments:
|
.. _environments:
|
||||||
|
|
||||||
=====================================
|
=========================
|
||||||
Environments (spack.yaml, spack.lock)
|
Environments (spack.yaml)
|
||||||
=====================================
|
=========================
|
||||||
|
|
||||||
An environment is used to group a set of specs intended for some purpose
|
An environment is used to group together a set of specs for the
|
||||||
to be built, rebuilt, and deployed in a coherent fashion. Environments
|
purpose of building, rebuilding and deploying in a coherent fashion.
|
||||||
define aspects of the installation of the software, such as:
|
Environments provide a number of advantages over the *à la carte*
|
||||||
|
approach of building and loading individual Spack modules:
|
||||||
|
|
||||||
#. *which* specs to install;
|
#. Environments separate the steps of (a) choosing what to
|
||||||
#. *how* those specs are configured; and
|
install, (b) concretizing, and (c) installing. This allows
|
||||||
#. *where* the concretized software will be installed.
|
Environments to remain stable and repeatable, even if Spack packages
|
||||||
|
are upgraded: specs are only re-concretized when the user
|
||||||
Aggregating this information into an environment for processing has advantages
|
explicitly asks for it. It is even possible to reliably
|
||||||
over the *à la carte* approach of building and loading individual Spack modules.
|
transport environments between different computers running
|
||||||
|
different versions of Spack!
|
||||||
With environments, you concretize, install, or load (activate) all of the
|
#. Environments allow several specs to be built at once; a more robust
|
||||||
specs with a single command. Concretization fully configures the specs
|
solution than ad-hoc scripts making multiple calls to ``spack
|
||||||
and dependencies of the environment in preparation for installing the
|
install``.
|
||||||
software. This is a more robust solution than ad-hoc installation scripts.
|
#. An Environment that is built as a whole can be loaded as a whole
|
||||||
And you can share an environment or even re-use it on a different computer.
|
into the user environment. An Environment can be built to maintain
|
||||||
|
a filesystem view of its packages, and the environment can load
|
||||||
Environment definitions, especially *how* specs are configured, allow the
|
that view into the user environment at activation time. Spack can
|
||||||
software to remain stable and repeatable even when Spack packages are upgraded. Changes are only picked up when the environment is explicitly re-concretized.
|
also generate a script to load all modules related to an
|
||||||
|
environment.
|
||||||
Defining *where* specs are installed supports a filesystem view of the
|
|
||||||
environment. Yet Spack maintains a single installation of the software that
|
|
||||||
can be re-used across multiple environments.
|
|
||||||
|
|
||||||
Activating an environment determines *when* all of the associated (and
|
|
||||||
installed) specs are loaded so limits the software loaded to those specs
|
|
||||||
actually needed by the environment. Spack can even generate a script to
|
|
||||||
load all modules related to an environment.
|
|
||||||
|
|
||||||
Other packaging systems also provide environments that are similar in
|
Other packaging systems also provide environments that are similar in
|
||||||
some ways to Spack environments; for example, `Conda environments
|
some ways to Spack environments; for example, `Conda environments
|
||||||
<https://conda.io/docs/user-guide/tasks/manage-environments.html>`_ or
|
<https://conda.io/docs/user-guide/tasks/manage-environments.html>`_ or
|
||||||
`Python Virtual Environments
|
`Python Virtual Environments
|
||||||
<https://docs.python.org/3/tutorial/venv.html>`_. Spack environments
|
<https://docs.python.org/3/tutorial/venv.html>`_. Spack environments
|
||||||
provide some distinctive features though:
|
provide some distinctive features:
|
||||||
|
|
||||||
#. A spec installed "in" an environment is no different from the same
|
#. A spec installed "in" an environment is no different from the same
|
||||||
spec installed anywhere else in Spack.
|
spec installed anywhere else in Spack. Environments are assembled
|
||||||
#. Spack environments may contain more than one spec of the same
|
simply by collecting together a set of specs.
|
||||||
|
#. Spack Environments may contain more than one spec of the same
|
||||||
package.
|
package.
|
||||||
|
|
||||||
Spack uses a "manifest and lock" model similar to `Bundler gemfiles
|
Spack uses a "manifest and lock" model similar to `Bundler gemfiles
|
||||||
<https://bundler.io/man/gemfile.5.html>`_ and other package managers.
|
<https://bundler.io/man/gemfile.5.html>`_ and other package
|
||||||
The environment's user input file (or manifest), is named ``spack.yaml``.
|
managers. The user input file is named ``spack.yaml`` and the lock
|
||||||
The lock file, which contains the fully configured and concretized specs,
|
file is named ``spack.lock``
|
||||||
is named ``spack.lock``.
|
|
||||||
|
|
||||||
.. _environments-using:
|
.. _environments-using:
|
||||||
|
|
||||||
@@ -74,60 +68,55 @@ An environment is created by:
|
|||||||
|
|
||||||
$ spack env create myenv
|
$ spack env create myenv
|
||||||
|
|
||||||
The directory ``$SPACK_ROOT/var/spack/environments/myenv`` is created
|
Spack then creates the directory ``var/spack/environments/myenv``.
|
||||||
to manage the environment.
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
All managed environments by default are stored in the
|
All managed environments by default are stored in the ``var/spack/environments`` folder.
|
||||||
``$SPACK_ROOT/var/spack/environments`` folder. This location can be changed
|
This location can be changed by setting the ``environments_root`` variable in ``config.yaml``.
|
||||||
by setting the ``environments_root`` variable in ``config.yaml``.
|
|
||||||
|
|
||||||
Spack creates the file ``spack.yaml``, hidden directory ``.spack-env``, and
|
In the ``var/spack/environments/myenv`` directory, Spack creates the
|
||||||
``spack.lock`` file under ``$SPACK_ROOT/var/spack/environments/myenv``. User
|
file ``spack.yaml`` and the hidden directory ``.spack-env``.
|
||||||
interaction occurs through the ``spack.yaml`` file and the Spack commands
|
|
||||||
that affect it. Metadata and, by default, the view are stored in the
|
Spack stores metadata in the ``.spack-env`` directory. User
|
||||||
``.spack-env`` directory. When the environment is concretized, Spack creates
|
interaction will occur through the ``spack.yaml`` file and the Spack
|
||||||
the ``spack.lock`` file with the fully configured specs and dependencies for
|
commands that affect it. When the environment is concretized, Spack
|
||||||
|
will create a file ``spack.lock`` with the concrete information for
|
||||||
the environment.
|
the environment.
|
||||||
|
|
||||||
The ``.spack-env`` subdirectory also contains:
|
In addition to being the default location for the view associated with
|
||||||
|
an Environment, the ``.spack-env`` directory also contains:
|
||||||
|
|
||||||
* ``repo/``: A subdirectory acting as the repo consisting of the Spack
|
* ``repo/``: A repo consisting of the Spack packages used in this
|
||||||
packages used in the environment. It allows the environment to build
|
environment. This allows the environment to build the same, in
|
||||||
the same, in theory, even on different versions of Spack with different
|
theory, even on different versions of Spack with different
|
||||||
packages!
|
packages!
|
||||||
* ``logs/``: A subdirectory containing the build logs for the packages
|
* ``logs/``: A directory containing the build logs for the packages
|
||||||
in this environment.
|
in this Environment.
|
||||||
|
|
||||||
Spack Environments can also be created from either the user input, or
|
Spack Environments can also be created from either a manifest file
|
||||||
manifest, file or the lockfile. Create an environment from a manifest using:
|
(usually but not necessarily named, ``spack.yaml``) or a lockfile.
|
||||||
|
To create an Environment from a manifest:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ spack env create myenv spack.yaml
|
$ spack env create myenv spack.yaml
|
||||||
|
|
||||||
The resulting environment is guaranteed to have the same root specs as
|
To create an Environment from a ``spack.lock`` lockfile:
|
||||||
the original but may concretize differently in the presence of different
|
|
||||||
explicit or default configuration settings (e.g., a different version of
|
|
||||||
Spack or for a different user account).
|
|
||||||
|
|
||||||
Create an environment from a ``spack.lock`` file using:
|
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ spack env create myenv spack.lock
|
$ spack env create myenv spack.lock
|
||||||
|
|
||||||
The resulting environment, when on the same or a compatible machine, is
|
Either of these commands can also take a full path to the
|
||||||
guaranteed to initially have the same concrete specs as the original.
|
initialization file.
|
||||||
|
|
||||||
.. note::
|
A Spack Environment created from a ``spack.yaml`` manifest is
|
||||||
|
guaranteed to have the same root specs as the original Environment,
|
||||||
Environment creation also accepts a full path to the file.
|
but may concretize differently. A Spack Environment created from a
|
||||||
|
``spack.lock`` lockfile is guaranteed to have the same concrete specs
|
||||||
If the path is not under the ``$SPACK_ROOT/var/spack/environments``
|
as the original Environment. Either may obviously then differ as the
|
||||||
directory then the source is referred to as an
|
user modifies it.
|
||||||
:ref:`independent environment <independent_environments>`.
|
|
||||||
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
Activating an Environment
|
Activating an Environment
|
||||||
@@ -140,7 +129,7 @@ To activate an environment, use the following command:
|
|||||||
$ spack env activate myenv
|
$ spack env activate myenv
|
||||||
|
|
||||||
By default, the ``spack env activate`` will load the view associated
|
By default, the ``spack env activate`` will load the view associated
|
||||||
with the environment into the user environment. The ``-v,
|
with the Environment into the user environment. The ``-v,
|
||||||
--with-view`` argument ensures this behavior, and the ``-V,
|
--with-view`` argument ensures this behavior, and the ``-V,
|
||||||
--without-view`` argument activates the environment without changing
|
--without-view`` argument activates the environment without changing
|
||||||
the user environment variables.
|
the user environment variables.
|
||||||
@@ -153,11 +142,8 @@ user's prompt to begin with the environment name in brackets.
|
|||||||
$ spack env activate -p myenv
|
$ spack env activate -p myenv
|
||||||
[myenv] $ ...
|
[myenv] $ ...
|
||||||
|
|
||||||
The ``activate`` command can also be used to create a new environment, if it is
|
The ``activate`` command can also be used to create a new environment if it does not already
|
||||||
not already defined, by adding the ``--create`` flag. Managed and independent
|
exist.
|
||||||
environments can both be created using the same flags that `spack env create`
|
|
||||||
accepts. If an environment already exists then spack will simply activate it
|
|
||||||
and ignore the create-specific flags.
|
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
@@ -182,50 +168,49 @@ or the shortcut alias
|
|||||||
If the environment was activated with its view, deactivating the
|
If the environment was activated with its view, deactivating the
|
||||||
environment will remove the view from the user environment.
|
environment will remove the view from the user environment.
|
||||||
|
|
||||||
.. _independent_environments:
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
Anonymous Environments
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
Apart from managed environments, Spack also supports anonymous environments.
|
||||||
Independent Environments
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
Independent environments can be located in any directory outside of Spack.
|
Anonymous environments can be placed in any directory of choice.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
When uninstalling packages, Spack asks the user to confirm the removal of packages
|
When uninstalling packages, Spack asks the user to confirm the removal of packages
|
||||||
that are still used in a managed environment. This is not the case for independent
|
that are still used in a managed environment. This is not the case for anonymous
|
||||||
environments.
|
environments.
|
||||||
|
|
||||||
To create an independent environment, use one of the following commands:
|
To create an anonymous environment, use one of the following commands:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ spack env create --dir my_env
|
$ spack env create --dir my_env
|
||||||
$ spack env create ./my_env
|
$ spack env create ./my_env
|
||||||
|
|
||||||
As a shorthand, you can also create an independent environment upon activation if it does not
|
As a shorthand, you can also create an anonymous environment upon activation if it does not
|
||||||
already exist:
|
already exist:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ spack env activate --create ./my_env
|
$ spack env activate --create ./my_env
|
||||||
|
|
||||||
For convenience, Spack can also place an independent environment in a temporary directory for you:
|
For convenience, Spack can also place an anonymous environment in a temporary directory for you:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ spack env activate --temp
|
$ spack env activate --temp
|
||||||
|
|
||||||
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
Environment-Aware Commands
|
Environment Sensitive Commands
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Spack commands are environment-aware. For example, the ``find``
|
Spack commands are environment sensitive. For example, the ``find``
|
||||||
command shows only the specs in the active environment if an
|
command shows only the specs in the active Environment if an
|
||||||
environment has been activated. Otherwise it shows all specs in
|
Environment has been activated. Similarly, the ``install`` and
|
||||||
the Spack instance. The same rule applies to the ``install`` and
|
``uninstall`` commands act on the active environment.
|
||||||
``uninstall`` commands.
|
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
@@ -270,33 +255,32 @@ the Spack instance. The same rule applies to the ``install`` and
|
|||||||
|
|
||||||
|
|
||||||
Note that when we installed the abstract spec ``zlib@1.2.8``, it was
|
Note that when we installed the abstract spec ``zlib@1.2.8``, it was
|
||||||
presented as a root of the environment. All explicitly installed
|
presented as a root of the Environment. All explicitly installed
|
||||||
packages will be listed as roots of the environment.
|
packages will be listed as roots of the Environment.
|
||||||
|
|
||||||
All of the Spack commands that act on the list of installed specs are
|
All of the Spack commands that act on the list of installed specs are
|
||||||
environment-aware in this way, including ``install``,
|
Environment-sensitive in this way, including ``install``,
|
||||||
``uninstall``, ``find``, ``extensions``, etcetera. In the
|
``uninstall``, ``find``, ``extensions``, and more. In the
|
||||||
:ref:`environment-configuration` section we will discuss
|
:ref:`environment-configuration` section we will discuss
|
||||||
environment-aware commands further.
|
Environment-sensitive commands further.
|
||||||
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^
|
||||||
Adding Abstract Specs
|
Adding Abstract Specs
|
||||||
^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
An abstract spec is the user-specified spec before Spack applies
|
An abstract spec is the user-specified spec before Spack has applied
|
||||||
defaults or dependency information.
|
any defaults or dependency information.
|
||||||
|
|
||||||
Users can add abstract specs to an environment using the ``spack add``
|
Users can add abstract specs to an Environment using the ``spack add``
|
||||||
command. The most important component of an environment is a list of
|
command. The most important component of an Environment is a list of
|
||||||
abstract specs.
|
abstract specs.
|
||||||
|
|
||||||
Adding a spec adds it as a root spec of the environment in the user
|
Adding a spec adds to the manifest (the ``spack.yaml`` file), which is
|
||||||
input file (``spack.yaml``). It does not affect the concrete specs
|
used to define the roots of the Environment, but does not affect the
|
||||||
in the lock file (``spack.lock``) and it does not install the spec.
|
concrete specs in the lockfile, nor does it install the spec.
|
||||||
|
|
||||||
The ``spack add`` command is environment-aware. It adds the spec to the
|
The ``spack add`` command is environment aware. It adds to the
|
||||||
currently active environment. An error is generated if there isn't an
|
currently active environment. All environment aware commands can also
|
||||||
active environment. All environment-aware commands can also
|
|
||||||
be called using the ``spack -e`` flag to specify the environment.
|
be called using the ``spack -e`` flag to specify the environment.
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
@@ -316,11 +300,11 @@ or
|
|||||||
Concretizing
|
Concretizing
|
||||||
^^^^^^^^^^^^
|
^^^^^^^^^^^^
|
||||||
|
|
||||||
Once user specs have been added to an environment, they can be concretized.
|
Once some user specs have been added to an environment, they can be concretized.
|
||||||
There are three different modes of operation to concretize an environment,
|
There are at the moment three different modes of operation to concretize an environment,
|
||||||
explained in detail in :ref:`environments_concretization_config`.
|
which are explained in details in :ref:`environments_concretization_config`.
|
||||||
Regardless of which mode of operation is chosen, the following
|
Regardless of which mode of operation has been chosen, the following
|
||||||
command will ensure all of the root specs are concretized according to the
|
command will ensure all the root specs are concretized according to the
|
||||||
constraints that are prescribed in the configuration:
|
constraints that are prescribed in the configuration:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
@@ -329,15 +313,16 @@ constraints that are prescribed in the configuration:
|
|||||||
|
|
||||||
In the case of specs that are not concretized together, the command
|
In the case of specs that are not concretized together, the command
|
||||||
above will concretize only the specs that were added and not yet
|
above will concretize only the specs that were added and not yet
|
||||||
concretized. Forcing a re-concretization of all of the specs can be done
|
concretized. Forcing a re-concretization of all the specs can be done
|
||||||
by adding the ``-f`` option:
|
instead with this command:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
[myenv]$ spack concretize -f
|
[myenv]$ spack concretize -f
|
||||||
|
|
||||||
Without the option, Spack guarantees that already concretized specs are
|
When the ``-f`` flag is not used to reconcretize all specs, Spack
|
||||||
unchanged in the environment.
|
guarantees that already concretized specs are unchanged in the
|
||||||
|
environment.
|
||||||
|
|
||||||
The ``concretize`` command does not install any packages. For packages
|
The ``concretize`` command does not install any packages. For packages
|
||||||
that have already been installed outside of the environment, the
|
that have already been installed outside of the environment, the
|
||||||
@@ -370,16 +355,16 @@ installed specs using the ``-c`` (``--concretized``) flag.
|
|||||||
Installing an Environment
|
Installing an Environment
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
In addition to adding individual specs to an environment, one
|
In addition to installing individual specs into an Environment, one
|
||||||
can install the entire environment at once using the command
|
can install the entire Environment at once using the command
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
[myenv]$ spack install
|
[myenv]$ spack install
|
||||||
|
|
||||||
If the environment has been concretized, Spack will install the
|
If the Environment has been concretized, Spack will install the
|
||||||
concretized specs. Otherwise, ``spack install`` will concretize
|
concretized specs. Otherwise, ``spack install`` will first concretize
|
||||||
the environment before installing the concretized specs.
|
the Environment and then install the concretized specs.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
@@ -400,17 +385,17 @@ the environment before installing the concretized specs.
|
|||||||
|
|
||||||
|
|
||||||
As it installs, ``spack install`` creates symbolic links in the
|
As it installs, ``spack install`` creates symbolic links in the
|
||||||
``logs/`` directory in the environment, allowing for easy inspection
|
``logs/`` directory in the Environment, allowing for easy inspection
|
||||||
of build logs related to that environment. The ``spack install``
|
of build logs related to that environment. The ``spack install``
|
||||||
command also stores a Spack repo containing the ``package.py`` file
|
command also stores a Spack repo containing the ``package.py`` file
|
||||||
used at install time for each package in the ``repos/`` directory in
|
used at install time for each package in the ``repos/`` directory in
|
||||||
the environment.
|
the Environment.
|
||||||
|
|
||||||
The ``--no-add`` option can be used in a concrete environment to tell
|
The ``--no-add`` option can be used in a concrete environment to tell
|
||||||
spack to install specs already present in the environment but not to
|
spack to install specs already present in the environment but not to
|
||||||
add any new root specs to the environment. For root specs provided
|
add any new root specs to the environment. For root specs provided
|
||||||
to ``spack install`` on the command line, ``--no-add`` is the default,
|
to ``spack install`` on the command line, ``--no-add`` is the default,
|
||||||
while for dependency specs, it is optional. In other
|
while for dependency specs on the other hand, it is optional. In other
|
||||||
words, if there is an unambiguous match in the active concrete environment
|
words, if there is an unambiguous match in the active concrete environment
|
||||||
for a root spec provided to ``spack install`` on the command line, spack
|
for a root spec provided to ``spack install`` on the command line, spack
|
||||||
does not require you to specify the ``--no-add`` option to prevent the spec
|
does not require you to specify the ``--no-add`` option to prevent the spec
|
||||||
@@ -424,22 +409,12 @@ Developing Packages in a Spack Environment
|
|||||||
|
|
||||||
The ``spack develop`` command allows one to develop Spack packages in
|
The ``spack develop`` command allows one to develop Spack packages in
|
||||||
an environment. It requires a spec containing a concrete version, and
|
an environment. It requires a spec containing a concrete version, and
|
||||||
will configure Spack to install the package from local source.
|
will configure Spack to install the package from local source. By
|
||||||
If a version is not provided from the command line interface then spack
|
default, it will also clone the package to a subdirectory in the
|
||||||
will automatically pick the highest version the package has defined.
|
environment. This package will have a special variant ``dev_path``
|
||||||
This means any infinity versions (``develop``, ``main``, ``stable``) will be
|
|
||||||
preferred in this selection process.
|
|
||||||
By default, ``spack develop`` will also clone the package to a subdirectory in the
|
|
||||||
environment for the local source. This package will have a special variant ``dev_path``
|
|
||||||
set, and Spack will ensure the package and its dependents are rebuilt
|
set, and Spack will ensure the package and its dependents are rebuilt
|
||||||
any time the environment is installed if the package's local source
|
any time the environment is installed if the package's local source
|
||||||
code has been modified. Spack's native implementation to check for modifications
|
code has been modified. Spack ensures that all instances of a
|
||||||
is to check if ``mtime`` is newer than the installation.
|
|
||||||
A custom check can be created by overriding the ``detect_dev_src_change`` method
|
|
||||||
in your package class. This is particularly useful for projects using custom spack repo's
|
|
||||||
to drive development and want to optimize performance.
|
|
||||||
|
|
||||||
Spack ensures that all instances of a
|
|
||||||
developed package in the environment are concretized to match the
|
developed package in the environment are concretized to match the
|
||||||
version (and other constraints) passed as the spec argument to the
|
version (and other constraints) passed as the spec argument to the
|
||||||
``spack develop`` command.
|
``spack develop`` command.
|
||||||
@@ -449,7 +424,7 @@ also be used as valid concrete versions (see :ref:`version-specifier`).
|
|||||||
This means that for a package ``foo``, ``spack develop foo@git.main`` will clone
|
This means that for a package ``foo``, ``spack develop foo@git.main`` will clone
|
||||||
the ``main`` branch of the package, and ``spack install`` will install from
|
the ``main`` branch of the package, and ``spack install`` will install from
|
||||||
that git clone if ``foo`` is in the environment.
|
that git clone if ``foo`` is in the environment.
|
||||||
Further development on ``foo`` can be tested by re-installing the environment,
|
Further development on ``foo`` can be tested by reinstalling the environment,
|
||||||
and eventually committed and pushed to the upstream git repo.
|
and eventually committed and pushed to the upstream git repo.
|
||||||
|
|
||||||
If the package being developed supports out-of-source builds then users can use the
|
If the package being developed supports out-of-source builds then users can use the
|
||||||
@@ -634,7 +609,7 @@ manipulate configuration inline in the ``spack.yaml`` file.
|
|||||||
Inline configurations
|
Inline configurations
|
||||||
^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Inline environment-scope configuration is done using the same yaml
|
Inline Environment-scope configuration is done using the same yaml
|
||||||
format as standard Spack configuration scopes, covered in the
|
format as standard Spack configuration scopes, covered in the
|
||||||
:ref:`configuration` section. Each section is contained under a
|
:ref:`configuration` section. Each section is contained under a
|
||||||
top-level yaml object with it's name. For example, a ``spack.yaml``
|
top-level yaml object with it's name. For example, a ``spack.yaml``
|
||||||
@@ -659,7 +634,7 @@ Included configurations
|
|||||||
|
|
||||||
Spack environments allow an ``include`` heading in their yaml
|
Spack environments allow an ``include`` heading in their yaml
|
||||||
schema. This heading pulls in external configuration files and applies
|
schema. This heading pulls in external configuration files and applies
|
||||||
them to the environment.
|
them to the Environment.
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
@@ -672,9 +647,6 @@ them to the environment.
|
|||||||
Environments can include files or URLs. File paths can be relative or
|
Environments can include files or URLs. File paths can be relative or
|
||||||
absolute. URLs include the path to the text for individual files or
|
absolute. URLs include the path to the text for individual files or
|
||||||
can be the path to a directory containing configuration files.
|
can be the path to a directory containing configuration files.
|
||||||
Spack supports ``file``, ``http``, ``https`` and ``ftp`` protocols (or
|
|
||||||
schemes). Spack-specific, environment and user path variables may be
|
|
||||||
used in these paths. See :ref:`config-file-variables` for more information.
|
|
||||||
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
Configuration precedence
|
Configuration precedence
|
||||||
@@ -689,7 +661,7 @@ have higher precedence, as the included configs are applied in reverse order.
|
|||||||
Manually Editing the Specs List
|
Manually Editing the Specs List
|
||||||
-------------------------------
|
-------------------------------
|
||||||
|
|
||||||
The list of abstract/root specs in the environment is maintained in
|
The list of abstract/root specs in the Environment is maintained in
|
||||||
the ``spack.yaml`` manifest under the heading ``specs``.
|
the ``spack.yaml`` manifest under the heading ``specs``.
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
@@ -797,7 +769,7 @@ evaluates to the cross-product of those specs. Spec matrices also
|
|||||||
contain an ``excludes`` directive, which eliminates certain
|
contain an ``excludes`` directive, which eliminates certain
|
||||||
combinations from the evaluated result.
|
combinations from the evaluated result.
|
||||||
|
|
||||||
The following two environment manifests are identical:
|
The following two Environment manifests are identical:
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
@@ -872,7 +844,7 @@ files are identical.
|
|||||||
In short files like the example, it may be easier to simply list the
|
In short files like the example, it may be easier to simply list the
|
||||||
included specs. However for more complicated examples involving many
|
included specs. However for more complicated examples involving many
|
||||||
packages across many toolchains, separately factored lists make
|
packages across many toolchains, separately factored lists make
|
||||||
environments substantially more manageable.
|
Environments substantially more manageable.
|
||||||
|
|
||||||
Additionally, the ``-l`` option to the ``spack add`` command allows
|
Additionally, the ``-l`` option to the ``spack add`` command allows
|
||||||
one to add to named lists in the definitions section of the manifest
|
one to add to named lists in the definitions section of the manifest
|
||||||
@@ -891,7 +863,7 @@ named list ``compilers`` is ``['%gcc', '%clang', '%intel']`` on
|
|||||||
spack:
|
spack:
|
||||||
definitions:
|
definitions:
|
||||||
- compilers: ['%gcc', '%clang']
|
- compilers: ['%gcc', '%clang']
|
||||||
- when: arch.satisfies('target=x86_64:')
|
- when: arch.satisfies('x86_64:')
|
||||||
compilers: ['%intel']
|
compilers: ['%intel']
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
@@ -959,89 +931,37 @@ This allows for a much-needed reduction in redundancy between packages
|
|||||||
and constraints.
|
and constraints.
|
||||||
|
|
||||||
|
|
||||||
-----------------
|
----------------
|
||||||
Environment Views
|
Filesystem Views
|
||||||
-----------------
|
----------------
|
||||||
|
|
||||||
Spack Environments can have an associated filesystem view, which is a directory
|
Spack Environments can define filesystem views, which provide a direct access point
|
||||||
with a more traditional structure ``<view>/bin``, ``<view>/lib``, ``<view>/include``
|
for software similar to the directory hierarchy that might exist under ``/usr/local``.
|
||||||
in which all files of the installed packages are linked.
|
Filesystem views are updated every time the environment is written out to the lock
|
||||||
|
file ``spack.lock``, so the concrete environment and the view are always compatible.
|
||||||
By default a view is created for each environment, thanks to the ``view: true``
|
The files of the view's installed packages are brought into the view by symbolic or
|
||||||
option in the ``spack.yaml`` manifest file:
|
hard links, referencing the original Spack installation, or by copy.
|
||||||
|
|
||||||
.. code-block:: yaml
|
|
||||||
|
|
||||||
spack:
|
|
||||||
specs: [perl, python]
|
|
||||||
view: true
|
|
||||||
|
|
||||||
The view is created in a hidden directory ``.spack-env/view`` relative to the environment.
|
|
||||||
If you've used ``spack env activate``, you may have already interacted with this view. Spack
|
|
||||||
prepends its ``<view>/bin`` dir to ``PATH`` when the environment is activated, so that
|
|
||||||
you can directly run executables from all installed packages in the environment.
|
|
||||||
|
|
||||||
Views are highly customizable: you can control where they are put, modify their structure,
|
|
||||||
include and exclude specs, change how files are linked, and you can even generate multiple
|
|
||||||
views for a single environment.
|
|
||||||
|
|
||||||
.. _configuring_environment_views:
|
.. _configuring_environment_views:
|
||||||
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
Minimal view configuration
|
Configuration in ``spack.yaml``
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
The minimal configuration
|
The Spack Environment manifest file has a top-level keyword
|
||||||
|
``view``. Each entry under that heading is a **view descriptor**, headed
|
||||||
.. code-block:: yaml
|
by a name. Any number of views may be defined under the ``view`` heading.
|
||||||
|
The view descriptor contains the root of the view, and
|
||||||
spack:
|
optionally the projections for the view, ``select`` and
|
||||||
# ...
|
``exclude`` lists for the view and link information via ``link`` and
|
||||||
view: true
|
|
||||||
|
|
||||||
lets Spack generate a single view with default settings under the
|
|
||||||
``.spack-env/view`` directory of the environment.
|
|
||||||
|
|
||||||
Another short way to configure a view is to specify just where to put it:
|
|
||||||
|
|
||||||
.. code-block:: yaml
|
|
||||||
|
|
||||||
spack:
|
|
||||||
# ...
|
|
||||||
view: /path/to/view
|
|
||||||
|
|
||||||
Views can also be disabled by setting ``view: false``.
|
|
||||||
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
Advanced view configuration
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
One or more **view descriptors** can be defined under ``view``, keyed by a name.
|
|
||||||
The example from the previous section with ``view: /path/to/view`` is equivalent
|
|
||||||
to defining a view descriptor named ``default`` with a ``root`` attribute:
|
|
||||||
|
|
||||||
.. code-block:: yaml
|
|
||||||
|
|
||||||
spack:
|
|
||||||
# ...
|
|
||||||
view:
|
|
||||||
default: # name of the view
|
|
||||||
root: /path/to/view # view descriptor attribute
|
|
||||||
|
|
||||||
The ``default`` view descriptor name is special: when you ``spack env activate`` your
|
|
||||||
environment, this view will be used to update (among other things) your ``PATH``
|
|
||||||
variable.
|
|
||||||
|
|
||||||
View descriptors must contain the root of the view, and optionally projections,
|
|
||||||
``select`` and ``exclude`` lists and link information via ``link`` and
|
|
||||||
``link_type``.
|
``link_type``.
|
||||||
|
|
||||||
As a more advanced example, in the following manifest
|
For example, in the following manifest
|
||||||
file snippet we define a view named ``mpis``, rooted at
|
file snippet we define a view named ``mpis``, rooted at
|
||||||
``/path/to/view`` in which all projections use the package name,
|
``/path/to/view`` in which all projections use the package name,
|
||||||
version, and compiler name to determine the path for a given
|
version, and compiler name to determine the path for a given
|
||||||
package. This view selects all packages that depend on MPI, and
|
package. This view selects all packages that depend on MPI, and
|
||||||
excludes those built with the GCC compiler at version 18.5.
|
excludes those built with the PGI compiler at version 18.5.
|
||||||
The root specs with their (transitive) link and run type dependencies
|
The root specs with their (transitive) link and run type dependencies
|
||||||
will be put in the view due to the ``link: all`` option,
|
will be put in the view due to the ``link: all`` option,
|
||||||
and the files in the view will be symlinks to the spack install
|
and the files in the view will be symlinks to the spack install
|
||||||
@@ -1055,7 +975,7 @@ directories.
|
|||||||
mpis:
|
mpis:
|
||||||
root: /path/to/view
|
root: /path/to/view
|
||||||
select: [^mpi]
|
select: [^mpi]
|
||||||
exclude: ['%gcc@18.5']
|
exclude: ['%pgi@18.5']
|
||||||
projections:
|
projections:
|
||||||
all: '{name}/{version}-{compiler.name}'
|
all: '{name}/{version}-{compiler.name}'
|
||||||
link: all
|
link: all
|
||||||
@@ -1081,14 +1001,63 @@ of ``hardlink`` or ``copy``.
|
|||||||
when the environment is not activated, and linked libraries will be located
|
when the environment is not activated, and linked libraries will be located
|
||||||
*outside* of the view thanks to rpaths.
|
*outside* of the view thanks to rpaths.
|
||||||
|
|
||||||
|
|
||||||
|
There are two shorthands for environments with a single view. If the
|
||||||
|
environment at ``/path/to/env`` has a single view, with a root at
|
||||||
|
``/path/to/env/.spack-env/view``, with default selection and exclusion
|
||||||
|
and the default projection, we can put ``view: True`` in the
|
||||||
|
environment manifest. Similarly, if the environment has a view with a
|
||||||
|
different root, but default selection, exclusion, and projections, the
|
||||||
|
manifest can say ``view: /path/to/view``. These views are
|
||||||
|
automatically named ``default``, so that
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
spack:
|
||||||
|
# ...
|
||||||
|
view: True
|
||||||
|
|
||||||
|
is equivalent to
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
spack:
|
||||||
|
# ...
|
||||||
|
view:
|
||||||
|
default:
|
||||||
|
root: .spack-env/view
|
||||||
|
|
||||||
|
and
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
spack:
|
||||||
|
# ...
|
||||||
|
view: /path/to/view
|
||||||
|
|
||||||
|
is equivalent to
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
spack:
|
||||||
|
# ...
|
||||||
|
view:
|
||||||
|
default:
|
||||||
|
root: /path/to/view
|
||||||
|
|
||||||
|
By default, Spack environments are configured with ``view: True`` in
|
||||||
|
the manifest. Environments can be configured without views using
|
||||||
|
``view: False``. For backwards compatibility reasons, environments
|
||||||
|
with no ``view`` key are treated the same as ``view: True``.
|
||||||
|
|
||||||
From the command line, the ``spack env create`` command takes an
|
From the command line, the ``spack env create`` command takes an
|
||||||
argument ``--with-view [PATH]`` that sets the path for a single, default
|
argument ``--with-view [PATH]`` that sets the path for a single, default
|
||||||
view. If no path is specified, the default path is used (``view:
|
view. If no path is specified, the default path is used (``view:
|
||||||
true``). The argument ``--without-view`` can be used to create an
|
True``). The argument ``--without-view`` can be used to create an
|
||||||
environment without any view configured.
|
environment without any view configured.
|
||||||
|
|
||||||
The ``spack env view`` command can be used to change the manage views
|
The ``spack env view`` command can be used to change the manage views
|
||||||
of an environment. The subcommand ``spack env view enable`` will add a
|
of an Environment. The subcommand ``spack env view enable`` will add a
|
||||||
view named ``default`` to an environment. It takes an optional
|
view named ``default`` to an environment. It takes an optional
|
||||||
argument to specify the path for the new default view. The subcommand
|
argument to specify the path for the new default view. The subcommand
|
||||||
``spack env view disable`` will remove the view named ``default`` from
|
``spack env view disable`` will remove the view named ``default`` from
|
||||||
@@ -1150,18 +1119,11 @@ the projection under ``all`` before reaching those entries.
|
|||||||
Activating environment views
|
Activating environment views
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
The ``spack env activate <env>`` has two effects:
|
The ``spack env activate`` command will put the default view for the
|
||||||
|
environment into the user's path, in addition to activating the
|
||||||
1. It activates the environment so that further Spack commands such
|
environment for Spack commands. The arguments ``-v,--with-view`` and
|
||||||
as ``spack install`` will run in the context of the environment.
|
``-V,--without-view`` can be used to tune this behavior. The default
|
||||||
2. It activates the view so that environment variables such as
|
behavior is to activate with the environment view if there is one.
|
||||||
``PATH`` are updated to include the view.
|
|
||||||
|
|
||||||
Without further arguments, the ``default`` view of the environment is
|
|
||||||
activated. If a view with a different name has to be activated,
|
|
||||||
``spack env activate --with-view <name> <env>`` can be
|
|
||||||
used instead. You can also activate the environment without modifying
|
|
||||||
further environment variables using ``--without-view``.
|
|
||||||
|
|
||||||
The environment variables affected by the ``spack env activate``
|
The environment variables affected by the ``spack env activate``
|
||||||
command and the paths that are used to update them are determined by
|
command and the paths that are used to update them are determined by
|
||||||
@@ -1184,8 +1146,8 @@ relevant variable if the path exists. For this reason, it is not
|
|||||||
recommended to use non-default projections with the default view of an
|
recommended to use non-default projections with the default view of an
|
||||||
environment.
|
environment.
|
||||||
|
|
||||||
The ``spack env deactivate`` command will remove the active view of
|
The ``spack env deactivate`` command will remove the default view of
|
||||||
the Spack environment from the user's environment variables.
|
the environment from the user's path.
|
||||||
|
|
||||||
|
|
||||||
.. _env-generate-depfile:
|
.. _env-generate-depfile:
|
||||||
@@ -1256,7 +1218,7 @@ gets installed and is available for use in the ``env`` target.
|
|||||||
$(SPACK) -e . env depfile -o $@ --make-prefix spack
|
$(SPACK) -e . env depfile -o $@ --make-prefix spack
|
||||||
|
|
||||||
env: spack/env
|
env: spack/env
|
||||||
$(info environment installed!)
|
$(info Environment installed!)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf spack.lock env.mk spack/
|
rm -rf spack.lock env.mk spack/
|
||||||
@@ -1344,7 +1306,7 @@ index once every package is pushed. Note how this target uses the generated
|
|||||||
example/push/%: example/install/%
|
example/push/%: example/install/%
|
||||||
@mkdir -p $(dir $@)
|
@mkdir -p $(dir $@)
|
||||||
$(info About to push $(SPEC) to a buildcache)
|
$(info About to push $(SPEC) to a buildcache)
|
||||||
$(SPACK) -e . buildcache push --only=package $(BUILDCACHE_DIR) /$(HASH)
|
$(SPACK) -e . buildcache push --allow-root --only=package $(BUILDCACHE_DIR) /$(HASH)
|
||||||
@touch $@
|
@touch $@
|
||||||
|
|
||||||
push: $(addprefix example/push/,$(example/SPACK_PACKAGE_IDS))
|
push: $(addprefix example/push/,$(example/SPACK_PACKAGE_IDS))
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
@@ -34,7 +35,7 @@ A build matrix showing which packages are working on which systems is shown belo
|
|||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
apt update
|
apt update
|
||||||
apt install bzip2 ca-certificates g++ gcc gfortran git gzip lsb-release patch python3 tar unzip xz-utils zstd
|
apt install bzip2 ca-certificates file g++ gcc gfortran git gzip lsb-release patch python3 tar unzip xz-utils zstd
|
||||||
|
|
||||||
.. tab-item:: RHEL
|
.. tab-item:: RHEL
|
||||||
|
|
||||||
@@ -60,15 +61,10 @@ Getting Spack is easy. You can clone it from the `github repository
|
|||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ git clone -c feature.manyFiles=true --depth=2 https://github.com/spack/spack.git
|
$ git clone -c feature.manyFiles=true https://github.com/spack/spack.git
|
||||||
|
|
||||||
This will create a directory called ``spack``.
|
This will create a directory called ``spack``.
|
||||||
|
|
||||||
.. note::
|
|
||||||
``-c feature.manyFiles=true`` improves git's performance on repositories with 1,000+ files.
|
|
||||||
|
|
||||||
``--depth=2`` prunes the git history to reduce the size of the Spack installation.
|
|
||||||
|
|
||||||
.. _shell-support:
|
.. _shell-support:
|
||||||
|
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
@@ -147,22 +143,20 @@ The first time you concretize a spec, Spack will bootstrap automatically:
|
|||||||
--------------------------------
|
--------------------------------
|
||||||
zlib@1.2.13%gcc@9.4.0+optimize+pic+shared build_system=makefile arch=linux-ubuntu20.04-icelake
|
zlib@1.2.13%gcc@9.4.0+optimize+pic+shared build_system=makefile arch=linux-ubuntu20.04-icelake
|
||||||
|
|
||||||
The default bootstrap behavior is to use pre-built binaries. You can verify the
|
|
||||||
active bootstrap repositories with:
|
|
||||||
|
|
||||||
.. command-output:: spack bootstrap list
|
|
||||||
|
|
||||||
If for security concerns you cannot bootstrap ``clingo`` from pre-built
|
If for security concerns you cannot bootstrap ``clingo`` from pre-built
|
||||||
binaries, you have to disable fetching the binaries we generated with Github Actions.
|
binaries, you have to disable fetching the binaries we generated with Github Actions.
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ spack bootstrap disable github-actions-v0.6
|
$ spack bootstrap disable github-actions-v0.4
|
||||||
==> "github-actions-v0.6" is now disabled and will not be used for bootstrapping
|
==> "github-actions-v0.4" is now disabled and will not be used for bootstrapping
|
||||||
$ spack bootstrap disable github-actions-v0.5
|
$ spack bootstrap disable github-actions-v0.3
|
||||||
==> "github-actions-v0.5" is now disabled and will not be used for bootstrapping
|
==> "github-actions-v0.3" is now disabled and will not be used for bootstrapping
|
||||||
|
|
||||||
|
You can verify that the new settings are effective with:
|
||||||
|
|
||||||
|
.. command-output:: spack bootstrap list
|
||||||
|
|
||||||
You can verify that the new settings are effective with ``spack bootstrap list``.
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
@@ -284,6 +278,10 @@ compilers`` or ``spack compiler list``:
|
|||||||
intel@14.0.1 intel@13.0.1 intel@12.1.2 intel@10.1
|
intel@14.0.1 intel@13.0.1 intel@12.1.2 intel@10.1
|
||||||
-- clang -------------------------------------------------------
|
-- clang -------------------------------------------------------
|
||||||
clang@3.4 clang@3.3 clang@3.2 clang@3.1
|
clang@3.4 clang@3.3 clang@3.2 clang@3.1
|
||||||
|
-- pgi ---------------------------------------------------------
|
||||||
|
pgi@14.3-0 pgi@13.2-0 pgi@12.1-0 pgi@10.9-0 pgi@8.0-1
|
||||||
|
pgi@13.10-0 pgi@13.1-1 pgi@11.10-0 pgi@10.2-0 pgi@7.1-3
|
||||||
|
pgi@13.6-0 pgi@12.8-0 pgi@11.1-0 pgi@9.0-4 pgi@7.0-6
|
||||||
|
|
||||||
Any of these compilers can be used to build Spack packages. More on
|
Any of these compilers can be used to build Spack packages. More on
|
||||||
how this is done is in :ref:`sec-specs`.
|
how this is done is in :ref:`sec-specs`.
|
||||||
@@ -803,6 +801,65 @@ flags to the ``icc`` command:
|
|||||||
spec: intel@15.0.24.4.9.3
|
spec: intel@15.0.24.4.9.3
|
||||||
|
|
||||||
|
|
||||||
|
^^^
|
||||||
|
PGI
|
||||||
|
^^^
|
||||||
|
|
||||||
|
PGI comes with two sets of compilers for C++ and Fortran,
|
||||||
|
distinguishable by their names. "Old" compilers:
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
cc: /soft/pgi/15.10/linux86-64/15.10/bin/pgcc
|
||||||
|
cxx: /soft/pgi/15.10/linux86-64/15.10/bin/pgCC
|
||||||
|
f77: /soft/pgi/15.10/linux86-64/15.10/bin/pgf77
|
||||||
|
fc: /soft/pgi/15.10/linux86-64/15.10/bin/pgf90
|
||||||
|
|
||||||
|
"New" compilers:
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
cc: /soft/pgi/15.10/linux86-64/15.10/bin/pgcc
|
||||||
|
cxx: /soft/pgi/15.10/linux86-64/15.10/bin/pgc++
|
||||||
|
f77: /soft/pgi/15.10/linux86-64/15.10/bin/pgfortran
|
||||||
|
fc: /soft/pgi/15.10/linux86-64/15.10/bin/pgfortran
|
||||||
|
|
||||||
|
Older installations of PGI contains just the old compilers; whereas
|
||||||
|
newer installations contain the old and the new. The new compiler is
|
||||||
|
considered preferable, as some packages
|
||||||
|
(``hdf``) will not build with the old compiler.
|
||||||
|
|
||||||
|
When auto-detecting a PGI compiler, there are cases where Spack will
|
||||||
|
find the old compilers, when you really want it to find the new
|
||||||
|
compilers. It is best to check this ``compilers.yaml``; and if the old
|
||||||
|
compilers are being used, change ``pgf77`` and ``pgf90`` to
|
||||||
|
``pgfortran``.
|
||||||
|
|
||||||
|
Other issues:
|
||||||
|
|
||||||
|
* There are reports that some packages will not build with PGI,
|
||||||
|
including ``libpciaccess`` and ``openssl``. A workaround is to
|
||||||
|
build these packages with another compiler and then use them as
|
||||||
|
dependencies for PGI-build packages. For example:
|
||||||
|
|
||||||
|
.. code-block:: console
|
||||||
|
|
||||||
|
$ spack install openmpi%pgi ^libpciaccess%gcc
|
||||||
|
|
||||||
|
|
||||||
|
* PGI requires a license to use; see :ref:`licensed-compilers` for more
|
||||||
|
information on installation.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
It is believed the problem with HDF 4 is that everything is
|
||||||
|
compiled with the ``F77`` compiler, but at some point some Fortran
|
||||||
|
90 code slipped in there. So compilers that can handle both FORTRAN
|
||||||
|
77 and Fortran 90 (``gfortran``, ``pgfortran``, etc) are fine. But
|
||||||
|
compilers specific to one or the other (``pgf77``, ``pgf90``) won't
|
||||||
|
work.
|
||||||
|
|
||||||
|
|
||||||
^^^
|
^^^
|
||||||
NAG
|
NAG
|
||||||
^^^
|
^^^
|
||||||
@@ -1307,6 +1364,187 @@ This will write the private key to the file `dinosaur.priv`.
|
|||||||
or for help on an issue or the Spack slack.
|
or for help on an issue or the Spack slack.
|
||||||
|
|
||||||
|
|
||||||
|
.. _cray-support:
|
||||||
|
|
||||||
|
-------------
|
||||||
|
Spack on Cray
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Spack differs slightly when used on a Cray system. The architecture spec
|
||||||
|
can differentiate between the front-end and back-end processor and operating system.
|
||||||
|
For example, on Edison at NERSC, the back-end target processor
|
||||||
|
is "Ivy Bridge", so you can specify to use the back-end this way:
|
||||||
|
|
||||||
|
.. code-block:: console
|
||||||
|
|
||||||
|
$ spack install zlib target=ivybridge
|
||||||
|
|
||||||
|
You can also use the operating system to build against the back-end:
|
||||||
|
|
||||||
|
.. code-block:: console
|
||||||
|
|
||||||
|
$ spack install zlib os=CNL10
|
||||||
|
|
||||||
|
Notice that the name includes both the operating system name and the major
|
||||||
|
version number concatenated together.
|
||||||
|
|
||||||
|
Alternatively, if you want to build something for the front-end,
|
||||||
|
you can specify the front-end target processor. The processor for a login node
|
||||||
|
on Edison is "Sandy bridge" so we specify on the command line like so:
|
||||||
|
|
||||||
|
.. code-block:: console
|
||||||
|
|
||||||
|
$ spack install zlib target=sandybridge
|
||||||
|
|
||||||
|
And the front-end operating system is:
|
||||||
|
|
||||||
|
.. code-block:: console
|
||||||
|
|
||||||
|
$ spack install zlib os=SuSE11
|
||||||
|
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
Cray compiler detection
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Spack can detect compilers using two methods. For the front-end, we treat
|
||||||
|
everything the same. The difference lies in back-end compiler detection.
|
||||||
|
Back-end compiler detection is made via the Tcl module avail command.
|
||||||
|
Once it detects the compiler it writes the appropriate PrgEnv and compiler
|
||||||
|
module name to compilers.yaml and sets the paths to each compiler with Cray\'s
|
||||||
|
compiler wrapper names (i.e. cc, CC, ftn). During build time, Spack will load
|
||||||
|
the correct PrgEnv and compiler module and will call appropriate wrapper.
|
||||||
|
|
||||||
|
The compilers.yaml config file will also differ. There is a
|
||||||
|
modules section that is filled with the compiler's Programming Environment
|
||||||
|
and module name. On other systems, this field is empty []:
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
- compiler:
|
||||||
|
modules:
|
||||||
|
- PrgEnv-intel
|
||||||
|
- intel/15.0.109
|
||||||
|
|
||||||
|
As mentioned earlier, the compiler paths will look different on a Cray system.
|
||||||
|
Since most compilers are invoked using cc, CC and ftn, the paths for each
|
||||||
|
compiler are replaced with their respective Cray compiler wrapper names:
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
paths:
|
||||||
|
cc: cc
|
||||||
|
cxx: CC
|
||||||
|
f77: ftn
|
||||||
|
fc: ftn
|
||||||
|
|
||||||
|
As opposed to an explicit path to the compiler executable. This allows Spack
|
||||||
|
to call the Cray compiler wrappers during build time.
|
||||||
|
|
||||||
|
For more on compiler configuration, check out :ref:`compiler-config`.
|
||||||
|
|
||||||
|
Spack sets the default Cray link type to dynamic, to better match other
|
||||||
|
other platforms. Individual packages can enable static linking (which is the
|
||||||
|
default outside of Spack on cray systems) using the ``-static`` flag.
|
||||||
|
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
Setting defaults and using Cray modules
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
If you want to use default compilers for each PrgEnv and also be able
|
||||||
|
to load cray external modules, you will need to set up a ``packages.yaml``.
|
||||||
|
|
||||||
|
Here's an example of an external configuration for cray modules:
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
packages:
|
||||||
|
mpich:
|
||||||
|
externals:
|
||||||
|
- spec: "mpich@7.3.1%gcc@5.2.0 arch=cray_xc-haswell-CNL10"
|
||||||
|
modules:
|
||||||
|
- cray-mpich
|
||||||
|
- spec: "mpich@7.3.1%intel@16.0.0.109 arch=cray_xc-haswell-CNL10"
|
||||||
|
modules:
|
||||||
|
- cray-mpich
|
||||||
|
all:
|
||||||
|
providers:
|
||||||
|
mpi: [mpich]
|
||||||
|
|
||||||
|
This tells Spack that for whatever package that depends on mpi, load the
|
||||||
|
cray-mpich module into the environment. You can then be able to use whatever
|
||||||
|
environment variables, libraries, etc, that are brought into the environment
|
||||||
|
via module load.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
For Cray-provided packages, it is best to use ``modules:`` instead of ``prefix:``
|
||||||
|
in ``packages.yaml``, because the Cray Programming Environment heavily relies on
|
||||||
|
modules (e.g., loading the ``cray-mpich`` module adds MPI libraries to the
|
||||||
|
compiler wrapper link line).
|
||||||
|
|
||||||
|
You can set the default compiler that Spack can use for each compiler type.
|
||||||
|
If you want to use the Cray defaults, then set them under ``all:`` in packages.yaml.
|
||||||
|
In the compiler field, set the compiler specs in your order of preference.
|
||||||
|
Whenever you build with that compiler type, Spack will concretize to that version.
|
||||||
|
|
||||||
|
Here is an example of a full packages.yaml used at NERSC
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
packages:
|
||||||
|
mpich:
|
||||||
|
externals:
|
||||||
|
- spec: "mpich@7.3.1%gcc@5.2.0 arch=cray_xc-CNL10-ivybridge"
|
||||||
|
modules:
|
||||||
|
- cray-mpich
|
||||||
|
- spec: "mpich@7.3.1%intel@16.0.0.109 arch=cray_xc-SuSE11-ivybridge"
|
||||||
|
modules:
|
||||||
|
- cray-mpich
|
||||||
|
buildable: False
|
||||||
|
netcdf:
|
||||||
|
externals:
|
||||||
|
- spec: "netcdf@4.3.3.1%gcc@5.2.0 arch=cray_xc-CNL10-ivybridge"
|
||||||
|
modules:
|
||||||
|
- cray-netcdf
|
||||||
|
- spec: "netcdf@4.3.3.1%intel@16.0.0.109 arch=cray_xc-CNL10-ivybridge"
|
||||||
|
modules:
|
||||||
|
- cray-netcdf
|
||||||
|
buildable: False
|
||||||
|
hdf5:
|
||||||
|
externals:
|
||||||
|
- spec: "hdf5@1.8.14%gcc@5.2.0 arch=cray_xc-CNL10-ivybridge"
|
||||||
|
modules:
|
||||||
|
- cray-hdf5
|
||||||
|
- spec: "hdf5@1.8.14%intel@16.0.0.109 arch=cray_xc-CNL10-ivybridge"
|
||||||
|
modules:
|
||||||
|
- cray-hdf5
|
||||||
|
buildable: False
|
||||||
|
all:
|
||||||
|
compiler: [gcc@5.2.0, intel@16.0.0.109]
|
||||||
|
providers:
|
||||||
|
mpi: [mpich]
|
||||||
|
|
||||||
|
Here we tell spack that whenever we want to build with gcc use version 5.2.0 or
|
||||||
|
if we want to build with intel compilers, use version 16.0.0.109. We add a spec
|
||||||
|
for each compiler type for each cray modules. This ensures that for each
|
||||||
|
compiler on our system we can use that external module.
|
||||||
|
|
||||||
|
For more on external packages check out the section :ref:`sec-external-packages`.
|
||||||
|
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
Using Linux containers on Cray machines
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Spack uses environment variables particular to the Cray programming
|
||||||
|
environment to determine which systems are Cray platforms. These
|
||||||
|
environment variables may be propagated into containers that are not
|
||||||
|
using the Cray programming environment.
|
||||||
|
|
||||||
|
To ensure that Spack does not autodetect the Cray programming
|
||||||
|
environment, unset the environment variable ``MODULEPATH``. This
|
||||||
|
will cause Spack to treat a linux container on a Cray system as a base
|
||||||
|
linux distro.
|
||||||
|
|
||||||
.. _windows_support:
|
.. _windows_support:
|
||||||
|
|
||||||
----------------
|
----------------
|
||||||
@@ -1327,7 +1565,6 @@ Required:
|
|||||||
* Microsoft Visual Studio
|
* Microsoft Visual Studio
|
||||||
* Python
|
* Python
|
||||||
* Git
|
* Git
|
||||||
* 7z
|
|
||||||
|
|
||||||
Optional:
|
Optional:
|
||||||
* Intel Fortran (needed for some packages)
|
* Intel Fortran (needed for some packages)
|
||||||
@@ -1393,13 +1630,6 @@ as the project providing Git support on Windows. This is additionally the recomm
|
|||||||
for installing Git on Windows, a link to which can be found above. Spack requires the
|
for installing Git on Windows, a link to which can be found above. Spack requires the
|
||||||
utilities vendored by this project.
|
utilities vendored by this project.
|
||||||
|
|
||||||
"""
|
|
||||||
7zip
|
|
||||||
"""
|
|
||||||
|
|
||||||
A tool for extracting ``.xz`` files is required for extracting source tarballs. The latest 7zip
|
|
||||||
can be located at https://sourceforge.net/projects/sevenzip/.
|
|
||||||
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
Step 2: Install and setup Spack
|
Step 2: Install and setup Spack
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
@@ -1426,14 +1656,16 @@ in a Windows CMD prompt.
|
|||||||
Step 3: Run and configure Spack
|
Step 3: Run and configure Spack
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
On Windows, Spack supports both primary native shells, Powershell and the traditional command prompt.
|
To use Spack, run ``bin\spack_cmd.bat`` (you may need to Run as Administrator) from the top-level spack
|
||||||
To use Spack, pick your favorite shell, and run ``bin\spack_cmd.bat`` or ``share/spack/setup-env.ps1``
|
directory. This will provide a Windows command prompt with an environment properly set up with Spack
|
||||||
(you may need to Run as Administrator) from the top-level spack
|
and its prerequisites. If you receive a warning message that Python is not in your ``PATH``
|
||||||
directory. This will provide a Spack enabled shell. If you receive a warning message that Python is not in your ``PATH``
|
|
||||||
(which may happen if you installed Python from the website and not the Windows Store) add the location
|
(which may happen if you installed Python from the website and not the Windows Store) add the location
|
||||||
of the Python executable to your ``PATH`` now. You can permanently add Python to your ``PATH`` variable
|
of the Python executable to your ``PATH`` now. You can permanently add Python to your ``PATH`` variable
|
||||||
by using the ``Edit the system environment variables`` utility in Windows Control Panel.
|
by using the ``Edit the system environment variables`` utility in Windows Control Panel.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
Alternatively, Powershell can be used in place of CMD
|
||||||
|
|
||||||
To configure Spack, first run the following command inside the Spack console:
|
To configure Spack, first run the following command inside the Spack console:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
@@ -1498,7 +1730,7 @@ and not tabs, so ensure that this is the case when editing one directly.
|
|||||||
|
|
||||||
.. note:: Cygwin
|
.. note:: Cygwin
|
||||||
The use of Cygwin is not officially supported by Spack and is not tested.
|
The use of Cygwin is not officially supported by Spack and is not tested.
|
||||||
However Spack will not prevent this, so use if choosing to use Spack
|
However Spack will not throw an error, so use if choosing to use Spack
|
||||||
with Cygwin, know that no functionality is garunteed.
|
with Cygwin, know that no functionality is garunteed.
|
||||||
|
|
||||||
^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^
|
||||||
@@ -1512,12 +1744,21 @@ Spack console via:
|
|||||||
|
|
||||||
spack install cpuinfo
|
spack install cpuinfo
|
||||||
|
|
||||||
If in the previous step, you did not have CMake or Ninja installed, running the command above should install both packages
|
If in the previous step, you did not have CMake or Ninja installed, running the command above should bootstrap both packages
|
||||||
|
|
||||||
.. note:: Spec Syntax Caveats
|
"""""""""""""""""""""""""""
|
||||||
Windows has a few idiosyncrasies when it comes to the Spack spec syntax and the use of certain shells
|
Windows Compatible Packages
|
||||||
See the Spack spec syntax doc for more information
|
"""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
Not all spack packages currently have Windows support. Some are inherently incompatible with the
|
||||||
|
platform, and others simply have yet to be ported. To view the current set of packages with Windows
|
||||||
|
support, the list command should be used via `spack list -t windows`. If there's a package you'd like
|
||||||
|
to install on Windows but is not in that list, feel free to reach out to request the port or contribute
|
||||||
|
the port yourself.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
This is by no means a comprehensive list, some packages may have ports that were not tagged
|
||||||
|
while others may just work out of the box on Windows and have not been tagged as such.
|
||||||
|
|
||||||
^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^
|
||||||
For developers
|
For developers
|
||||||
@@ -1527,3 +1768,6 @@ The intent is to provide a Windows installer that will automatically set up
|
|||||||
Python, Git, and Spack, instead of requiring the user to do so manually.
|
Python, Git, and Spack, instead of requiring the user to do so manually.
|
||||||
Instructions for creating the installer are at
|
Instructions for creating the installer are at
|
||||||
https://github.com/spack/spack/blob/develop/lib/spack/spack/cmd/installer/README.md
|
https://github.com/spack/spack/blob/develop/lib/spack/spack/cmd/installer/README.md
|
||||||
|
|
||||||
|
Alternatively a pre-built copy of the Windows installer is available as an artifact of Spack's Windows CI
|
||||||
|
available at each run of the CI on develop or any PR.
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 358 KiB |
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
@@ -34,15 +35,10 @@ package:
|
|||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ git clone -c feature.manyFiles=true --depth=2 https://github.com/spack/spack.git
|
$ git clone -c feature.manyFiles=true https://github.com/spack/spack.git
|
||||||
$ cd spack/bin
|
$ cd spack/bin
|
||||||
$ ./spack install libelf
|
$ ./spack install libelf
|
||||||
|
|
||||||
.. note::
|
|
||||||
``-c feature.manyFiles=true`` improves git's performance on repositories with 1,000+ files.
|
|
||||||
|
|
||||||
``--depth=2`` prunes the git history to reduce the size of the Spack installation.
|
|
||||||
|
|
||||||
If you're new to spack and want to start using it, see :doc:`getting_started`,
|
If you're new to spack and want to start using it, see :doc:`getting_started`,
|
||||||
or refer to the full manual below.
|
or refer to the full manual below.
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
@@ -456,11 +457,11 @@ For instance, the following config options,
|
|||||||
tcl:
|
tcl:
|
||||||
all:
|
all:
|
||||||
suffixes:
|
suffixes:
|
||||||
^python@3: 'python{^python.version}'
|
^python@3.12: 'python-3.12'
|
||||||
^openblas: 'openblas'
|
^openblas: 'openblas'
|
||||||
|
|
||||||
will add a ``python-3.12.1`` version string to any packages compiled with
|
will add a ``python-3.12`` version string to any packages compiled with
|
||||||
Python matching the spec, ``python@3``. This is useful to know which
|
Python matching the spec, ``python@3.12``. This is useful to know which
|
||||||
version of Python a set of Python extensions is associated with. Likewise, the
|
version of Python a set of Python extensions is associated with. Likewise, the
|
||||||
``openblas`` string is attached to any program that has openblas in the spec,
|
``openblas`` string is attached to any program that has openblas in the spec,
|
||||||
most likely via the ``+blas`` variant specification.
|
most likely via the ``+blas`` variant specification.
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
@@ -58,7 +59,7 @@ Functional Example
|
|||||||
------------------
|
------------------
|
||||||
|
|
||||||
The simplest fully functional standalone example of a working pipeline can be
|
The simplest fully functional standalone example of a working pipeline can be
|
||||||
examined live at this example `project <https://gitlab.com/spack/pipeline-quickstart>`_
|
examined live at this example `project <https://gitlab.com/scott.wittenburg/spack-pipeline-demo>`_
|
||||||
on gitlab.com.
|
on gitlab.com.
|
||||||
|
|
||||||
Here's the ``.gitlab-ci.yml`` file from that example that builds and runs the
|
Here's the ``.gitlab-ci.yml`` file from that example that builds and runs the
|
||||||
@@ -66,46 +67,39 @@ pipeline:
|
|||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
stages: [ "generate", "build" ]
|
stages: [generate, build]
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
SPACK_REPOSITORY: "https://github.com/spack/spack.git"
|
SPACK_REPO: https://github.com/scottwittenburg/spack.git
|
||||||
SPACK_REF: "develop-2024-10-06"
|
SPACK_REF: pipelines-reproducible-builds
|
||||||
SPACK_USER_CONFIG_PATH: ${CI_PROJECT_DIR}
|
|
||||||
SPACK_BACKTRACE: 1
|
|
||||||
|
|
||||||
generate-pipeline:
|
generate-pipeline:
|
||||||
tags:
|
|
||||||
- saas-linux-small-amd64
|
|
||||||
stage: generate
|
stage: generate
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
image:
|
image:
|
||||||
name: ghcr.io/spack/ubuntu20.04-runner-x86_64:2023-01-01
|
name: ghcr.io/scottwittenburg/ecpe4s-ubuntu18.04-runner-x86_64:2020-09-01
|
||||||
script:
|
entrypoint: [""]
|
||||||
- git clone ${SPACK_REPOSITORY}
|
before_script:
|
||||||
- cd spack && git checkout ${SPACK_REF} && cd ../
|
- git clone ${SPACK_REPO}
|
||||||
|
- pushd spack && git checkout ${SPACK_REF} && popd
|
||||||
- . "./spack/share/spack/setup-env.sh"
|
- . "./spack/share/spack/setup-env.sh"
|
||||||
- spack --version
|
script:
|
||||||
- spack env activate --without-view .
|
- spack env activate --without-view .
|
||||||
- spack -d -v --color=always
|
- spack -d ci generate
|
||||||
ci generate
|
|
||||||
--check-index-only
|
|
||||||
--artifacts-root "${CI_PROJECT_DIR}/jobs_scratch_dir"
|
--artifacts-root "${CI_PROJECT_DIR}/jobs_scratch_dir"
|
||||||
--output-file "${CI_PROJECT_DIR}/jobs_scratch_dir/cloud-ci-pipeline.yml"
|
--output-file "${CI_PROJECT_DIR}/jobs_scratch_dir/pipeline.yml"
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- "${CI_PROJECT_DIR}/jobs_scratch_dir"
|
- "${CI_PROJECT_DIR}/jobs_scratch_dir"
|
||||||
|
|
||||||
build-pipeline:
|
build-jobs:
|
||||||
stage: build
|
stage: build
|
||||||
trigger:
|
trigger:
|
||||||
include:
|
include:
|
||||||
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
|
- artifact: "jobs_scratch_dir/pipeline.yml"
|
||||||
job: generate-pipeline
|
job: generate-pipeline
|
||||||
strategy: depend
|
strategy: depend
|
||||||
needs:
|
|
||||||
- artifacts: True
|
|
||||||
job: generate-pipeline
|
|
||||||
|
|
||||||
|
|
||||||
The key thing to note above is that there are two jobs: The first job to run,
|
The key thing to note above is that there are two jobs: The first job to run,
|
||||||
``generate-pipeline``, runs the ``spack ci generate`` command to generate a
|
``generate-pipeline``, runs the ``spack ci generate`` command to generate a
|
||||||
@@ -120,93 +114,82 @@ And here's the spack environment built by the pipeline represented as a
|
|||||||
spack:
|
spack:
|
||||||
view: false
|
view: false
|
||||||
concretizer:
|
concretizer:
|
||||||
unify: true
|
unify: false
|
||||||
reuse: false
|
|
||||||
|
|
||||||
definitions:
|
definitions:
|
||||||
- pkgs:
|
- pkgs:
|
||||||
- zlib
|
- zlib
|
||||||
- bzip2 ~debug
|
- bzip2
|
||||||
- compiler:
|
- arch:
|
||||||
- '%gcc'
|
- '%gcc@7.5.0 arch=linux-ubuntu18.04-x86_64'
|
||||||
|
|
||||||
specs:
|
specs:
|
||||||
- matrix:
|
- matrix:
|
||||||
- - $pkgs
|
- - $pkgs
|
||||||
- - $compiler
|
- - $arch
|
||||||
|
|
||||||
|
mirrors: { "mirror": "s3://spack-public/mirror" }
|
||||||
|
|
||||||
ci:
|
ci:
|
||||||
target: gitlab
|
enable-artifacts-buildcache: True
|
||||||
|
rebuild-index: False
|
||||||
pipeline-gen:
|
pipeline-gen:
|
||||||
- any-job:
|
- any-job:
|
||||||
tags:
|
|
||||||
- saas-linux-small-amd64
|
|
||||||
image:
|
|
||||||
name: ghcr.io/spack/ubuntu20.04-runner-x86_64:2023-01-01
|
|
||||||
before_script:
|
before_script:
|
||||||
- git clone ${SPACK_REPOSITORY}
|
- git clone ${SPACK_REPO}
|
||||||
- cd spack && git checkout ${SPACK_REF} && cd ../
|
- pushd spack && git checkout ${SPACK_CHECKOUT_VERSION} && popd
|
||||||
- . "./spack/share/spack/setup-env.sh"
|
- . "./spack/share/spack/setup-env.sh"
|
||||||
- spack --version
|
- build-job:
|
||||||
- export SPACK_USER_CONFIG_PATH=${CI_PROJECT_DIR}
|
tags: [docker]
|
||||||
- spack config blame mirrors
|
image:
|
||||||
|
name: ghcr.io/scottwittenburg/ecpe4s-ubuntu18.04-runner-x86_64:2020-09-01
|
||||||
|
entrypoint: [""]
|
||||||
|
|
||||||
|
|
||||||
|
The elements of this file important to spack ci pipelines are described in more
|
||||||
|
detail below, but there are a couple of things to note about the above working
|
||||||
|
example:
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
The use of ``reuse: false`` in spack environments used for pipelines is
|
There is no ``script`` attribute specified for here. The reason for this is
|
||||||
almost always what you want, as without it your pipelines will not rebuild
|
Spack CI will automatically generate reasonable default scripts. More
|
||||||
packages even if package hashes have changed. This is due to the concretizer
|
detail on what is in these scripts can be found below.
|
||||||
strongly preferring known hashes when ``reuse: true``.
|
|
||||||
|
|
||||||
The ``ci`` section in the above environment file contains the bare minimum
|
Also notice the ``before_script`` section. It is required when using any of the
|
||||||
configuration required for ``spack ci generate`` to create a working pipeline.
|
default scripts to source the ``setup-env.sh`` script in order to inform
|
||||||
The ``target: gitlab`` tells spack that the desired pipeline output is for
|
the default scripts where to find the ``spack`` executable.
|
||||||
gitlab. However, this isn't strictly required, as currently gitlab is the
|
|
||||||
only possible output format for pipelines. The ``pipeline-gen`` section
|
|
||||||
contains the key information needed to specify attributes for the generated
|
|
||||||
jobs. Notice that it contains a list which has only a single element in
|
|
||||||
this case. In real pipelines it will almost certainly have more elements,
|
|
||||||
and in those cases, order is important: spack starts at the bottom of the
|
|
||||||
list and works upwards when applying attributes.
|
|
||||||
|
|
||||||
But in this simple case, we use only the special key ``any-job`` to
|
Normally ``enable-artifacts-buildcache`` is not recommended in production as it
|
||||||
indicate that spack should apply the specified attributes (``tags``, ``image``,
|
results in large binary artifacts getting transferred back and forth between
|
||||||
and ``before_script``) to any job it generates. This includes jobs for
|
gitlab and the runners. But in this example on gitlab.com where there is no
|
||||||
building/pushing all packages, a ``rebuild-index`` job at the end of the
|
shared, persistent file system, and where no secrets are stored for giving
|
||||||
pipeline, as well as any ``noop`` jobs that might be needed by gitlab when
|
permission to write to an S3 bucket, ``enabled-buildcache-artifacts`` is the only
|
||||||
no rebuilds are required.
|
way to propagate binaries from jobs to their dependents.
|
||||||
|
|
||||||
Something to note is that in this simple case, we rely on spack to
|
Also, it is usually a good idea to let the pipeline generate a final "rebuild the
|
||||||
generate a reasonable script for the package build jobs (it just creates
|
buildcache index" job, so that subsequent pipeline generation can quickly determine
|
||||||
a script that invokes ``spack ci rebuild``).
|
which specs are up to date and which need to be rebuilt (it's a good idea for other
|
||||||
|
reasons as well, but those are out of scope for this discussion). In this case we
|
||||||
|
have disabled it (using ``rebuild-index: False``) because the index would only be
|
||||||
|
generated in the artifacts mirror anyway, and consequently would not be available
|
||||||
|
during subsequent pipeline runs.
|
||||||
|
|
||||||
Another thing to note is the use of the ``SPACK_USER_CONFIG_DIR`` environment
|
.. note::
|
||||||
variable in any generated jobs. The purpose of this is to make spack
|
With the addition of reproducible builds (#22887) a previously working
|
||||||
aware of one final file in the example, the one that contains the mirror
|
pipeline will require some changes:
|
||||||
configuration. This file, ``mirrors.yaml`` looks like this:
|
|
||||||
|
|
||||||
.. code-block:: yaml
|
* In the build-jobs, the environment location changed.
|
||||||
|
This will typically show as a ``KeyError`` in the failing job. Be sure to
|
||||||
|
point to ``${SPACK_CONCRETE_ENV_DIR}``.
|
||||||
|
|
||||||
mirrors:
|
* When using ``include`` in your environment, be sure to make the included
|
||||||
buildcache-destination:
|
files available in the build jobs. This means adding those files to the
|
||||||
url: oci://registry.gitlab.com/spack/pipeline-quickstart
|
artifact directory. Those files will also be missing in the reproducibility
|
||||||
binary: true
|
artifact.
|
||||||
access_pair:
|
|
||||||
id_variable: CI_REGISTRY_USER
|
|
||||||
secret_variable: CI_REGISTRY_PASSWORD
|
|
||||||
|
|
||||||
|
* Because the location of the environment changed, including files with
|
||||||
Note the name of the mirror is ``buildcache-destination``, which is required
|
relative path may have to be adapted to work both in the project context
|
||||||
as of Spack 0.23 (see below for more information). The mirror url simply
|
(generation job) and in the concrete env dir context (build job).
|
||||||
points to the container registry associated with the project, while
|
|
||||||
``id_variable`` and ``secret_variable`` refer to to environment variables
|
|
||||||
containing the access credentials for the mirror.
|
|
||||||
|
|
||||||
When spack builds packages for this example project, they will be pushed to
|
|
||||||
the project container registry, where they will be available for subsequent
|
|
||||||
jobs to install as dependencies, or for other pipelines to use to build runnable
|
|
||||||
container images.
|
|
||||||
|
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
Spack commands supporting pipelines
|
Spack commands supporting pipelines
|
||||||
@@ -270,6 +253,17 @@ can easily happen if it is not updated frequently, this behavior ensures that
|
|||||||
spack has a way to know for certain about the status of any concrete spec on
|
spack has a way to know for certain about the status of any concrete spec on
|
||||||
the remote mirror, but can slow down pipeline generation significantly.
|
the remote mirror, but can slow down pipeline generation significantly.
|
||||||
|
|
||||||
|
The ``--optimize`` argument is experimental and runs the generated pipeline
|
||||||
|
document through a series of optimization passes designed to reduce the size
|
||||||
|
of the generated file.
|
||||||
|
|
||||||
|
The ``--dependencies`` is also experimental and disables what in Gitlab is
|
||||||
|
referred to as DAG scheduling, internally using the ``dependencies`` keyword
|
||||||
|
rather than ``needs`` to list dependency jobs. The drawback of using this option
|
||||||
|
is that before any job can begin, all jobs in previous stages must first
|
||||||
|
complete. The benefit is that Gitlab allows more dependencies to be listed
|
||||||
|
when using ``dependencies`` instead of ``needs``.
|
||||||
|
|
||||||
The optional ``--output-file`` argument should be an absolute path (including
|
The optional ``--output-file`` argument should be an absolute path (including
|
||||||
file name) to the generated pipeline, and if not given, the default is
|
file name) to the generated pipeline, and if not given, the default is
|
||||||
``./.gitlab-ci.yml``.
|
``./.gitlab-ci.yml``.
|
||||||
@@ -434,6 +428,15 @@ configuration with a ``script`` attribute. Specifying a signing job without a sc
|
|||||||
does not create a signing job and the job configuration attributes will be ignored.
|
does not create a signing job and the job configuration attributes will be ignored.
|
||||||
Signing jobs are always assigned the runner tags ``aws``, ``protected``, and ``notary``.
|
Signing jobs are always assigned the runner tags ``aws``, ``protected``, and ``notary``.
|
||||||
|
|
||||||
|
^^^^^^^^^^^^^^^^^
|
||||||
|
Cleanup (cleanup)
|
||||||
|
^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
When using ``temporary-storage-url-prefix`` the cleanup job will destroy the mirror
|
||||||
|
created for the associated Gitlab pipeline. Cleanup jobs do not allow modifying the
|
||||||
|
script, but do expect that the spack command is in the path and require a
|
||||||
|
``before_script`` to be specified that sources the ``setup-env.sh`` script.
|
||||||
|
|
||||||
.. _noop_jobs:
|
.. _noop_jobs:
|
||||||
|
|
||||||
^^^^^^^^^^^^
|
^^^^^^^^^^^^
|
||||||
@@ -600,77 +603,6 @@ the attributes will be merged starting from the bottom match going up to the top
|
|||||||
|
|
||||||
In the case that no match is found in a submapping section, no additional attributes will be applied.
|
In the case that no match is found in a submapping section, no additional attributes will be applied.
|
||||||
|
|
||||||
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
Dynamic Mapping Sections
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
For large scale CI where cost optimization is required, dynamic mapping allows for the use of real-time
|
|
||||||
mapping schemes served by a web service. This type of mapping does not support the ``-remove`` type
|
|
||||||
behavior, but it does follow the rest of the merge rules for configurations.
|
|
||||||
|
|
||||||
The dynamic mapping service needs to implement a single REST API interface for getting
|
|
||||||
requests ``GET <URL>[:PORT][/PATH]?spec=<pkg_name@pkg_version +variant1+variant2%compiler@compiler_version>``.
|
|
||||||
|
|
||||||
example request.
|
|
||||||
|
|
||||||
.. code-block::
|
|
||||||
|
|
||||||
https://my-dyn-mapping.spack.io/allocation?spec=zlib-ng@2.1.6 +compat+opt+shared+pic+new_strategies arch=linux-ubuntu20.04-x86_64_v3%gcc@12.0.0
|
|
||||||
|
|
||||||
|
|
||||||
With an example response the updates kubernetes request variables, overrides the max retries for gitlab,
|
|
||||||
and prepends a note about the modifications made by the my-dyn-mapping.spack.io service.
|
|
||||||
|
|
||||||
.. code-block::
|
|
||||||
|
|
||||||
200 OK
|
|
||||||
|
|
||||||
{
|
|
||||||
"variables":
|
|
||||||
{
|
|
||||||
"KUBERNETES_CPU_REQUEST": "500m",
|
|
||||||
"KUBERNETES_MEMORY_REQUEST": "2G",
|
|
||||||
},
|
|
||||||
"retry": { "max:": "1"}
|
|
||||||
"script+:":
|
|
||||||
[
|
|
||||||
"echo \"Job modified by my-dyn-mapping.spack.io\""
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
The ci.yaml configuration section takes the URL endpoint as well as a number of options to configure how responses are handled.
|
|
||||||
|
|
||||||
It is possible to specify a list of allowed and ignored configuration attributes under ``allow`` and ``ignore``
|
|
||||||
respectively. It is also possible to configure required attributes under ``required`` section.
|
|
||||||
|
|
||||||
Options to configure the client timeout and SSL verification using the ``timeout`` and ``verify_ssl`` options.
|
|
||||||
By default, the ``timeout`` is set to the option in ``config:timeout`` and ``veryify_ssl`` is set the the option in ``config::verify_ssl``.
|
|
||||||
|
|
||||||
Passing header parameters to the request can be achieved through the ``header`` section. The values of the variables passed to the
|
|
||||||
header may be environment variables that are expanded at runtime, such as a private token configured on the runner.
|
|
||||||
|
|
||||||
Here is an example configuration pointing to ``my-dyn-mapping.spack.io/allocation``.
|
|
||||||
|
|
||||||
|
|
||||||
.. code-block:: yaml
|
|
||||||
|
|
||||||
ci:
|
|
||||||
- dynamic-mapping:
|
|
||||||
endpoint: my-dyn-mapping.spack.io/allocation
|
|
||||||
timeout: 10
|
|
||||||
verify_ssl: True
|
|
||||||
header:
|
|
||||||
PRIVATE_TOKEN: ${MY_PRIVATE_TOKEN}
|
|
||||||
MY_CONFIG: "fuzz_allocation:false"
|
|
||||||
allow:
|
|
||||||
- variables
|
|
||||||
ignore:
|
|
||||||
- script
|
|
||||||
require: []
|
|
||||||
|
|
||||||
|
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
Bootstrapping
|
Bootstrapping
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
@@ -742,13 +674,26 @@ build the package.
|
|||||||
|
|
||||||
When including a bootstrapping phase as in the example above, the result is that
|
When including a bootstrapping phase as in the example above, the result is that
|
||||||
the bootstrapped compiler packages will be pushed to the binary mirror (and the
|
the bootstrapped compiler packages will be pushed to the binary mirror (and the
|
||||||
local artifacts mirror) before the actual release specs are built.
|
local artifacts mirror) before the actual release specs are built. In this case,
|
||||||
|
the jobs corresponding to subsequent release specs are configured to
|
||||||
|
``install_missing_compilers``, so that if spack is asked to install a package
|
||||||
|
with a compiler it doesn't know about, it can be quickly installed from the
|
||||||
|
binary mirror first.
|
||||||
|
|
||||||
Since bootstrapping compilers is optional, those items can be left out of the
|
Since bootstrapping compilers is optional, those items can be left out of the
|
||||||
environment/stack file, and in that case no bootstrapping will be done (only the
|
environment/stack file, and in that case no bootstrapping will be done (only the
|
||||||
specs will be staged for building) and the runners will be expected to already
|
specs will be staged for building) and the runners will be expected to already
|
||||||
have all needed compilers installed and configured for spack to use.
|
have all needed compilers installed and configured for spack to use.
|
||||||
|
|
||||||
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
Pipeline Buildcache
|
||||||
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The ``enable-artifacts-buildcache`` key
|
||||||
|
takes a boolean and determines whether the pipeline uses artifacts to store and
|
||||||
|
pass along the buildcaches from one stage to the next (the default if you don't
|
||||||
|
provide this option is ``False``).
|
||||||
|
|
||||||
^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^
|
||||||
Broken Specs URL
|
Broken Specs URL
|
||||||
^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
@@ -475,3 +476,9 @@ implemented using Python's built-in `sys.path
|
|||||||
:py:mod:`spack.repo` module implements a custom `Python importer
|
:py:mod:`spack.repo` module implements a custom `Python importer
|
||||||
<https://docs.python.org/2/library/imp.html>`_.
|
<https://docs.python.org/2/library/imp.html>`_.
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
|
||||||
|
The mechanism for extending packages is not yet extensively tested,
|
||||||
|
and extending packages across repositories imposes inter-repo
|
||||||
|
dependencies, which may be hard to manage. Use this feature at your
|
||||||
|
own risk, but let us know if you have a use case for it.
|
||||||
|
@@ -1,13 +1,13 @@
|
|||||||
sphinx==8.1.3
|
sphinx==7.2.6
|
||||||
sphinxcontrib-programoutput==0.18
|
sphinxcontrib-programoutput==0.17
|
||||||
sphinx_design==0.6.1
|
sphinx_design==0.5.0
|
||||||
sphinx-rtd-theme==3.0.2
|
sphinx-rtd-theme==2.0.0
|
||||||
python-levenshtein==0.26.1
|
python-levenshtein==0.25.1
|
||||||
docutils==0.21.2
|
docutils==0.20.1
|
||||||
pygments==2.18.0
|
pygments==2.17.2
|
||||||
urllib3==2.3.0
|
urllib3==2.2.1
|
||||||
pytest==8.3.4
|
pytest==8.2.0
|
||||||
isort==5.13.2
|
isort==5.13.2
|
||||||
black==24.10.0
|
black==24.4.2
|
||||||
flake8==7.1.1
|
flake8==7.0.0
|
||||||
mypy==1.11.1
|
mypy==1.10.0
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
.. Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
@@ -8,6 +8,7 @@ unzip, , , Compress/Decompress archives
|
|||||||
bzip2, , , Compress/Decompress archives
|
bzip2, , , Compress/Decompress archives
|
||||||
xz, , , Compress/Decompress archives
|
xz, , , Compress/Decompress archives
|
||||||
zstd, , Optional, Compress/Decompress archives
|
zstd, , Optional, Compress/Decompress archives
|
||||||
|
file, , , Create/Use Buildcaches
|
||||||
lsb-release, , , Linux: identify operating system version
|
lsb-release, , , Linux: identify operating system version
|
||||||
gnupg2, , , Sign/Verify Buildcaches
|
gnupg2, , , Sign/Verify Buildcaches
|
||||||
git, , , Manage Software Repositories
|
git, , , Manage Software Repositories
|
||||||
|
|
337
lib/spack/env/cc
vendored
337
lib/spack/env/cc
vendored
@@ -1,7 +1,8 @@
|
|||||||
#!/bin/sh -f
|
#!/bin/sh -f
|
||||||
# shellcheck disable=SC2034 # evals in this script fool shellcheck
|
# shellcheck disable=SC2034 # evals in this script fool shellcheck
|
||||||
#
|
#
|
||||||
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
@@ -100,9 +101,10 @@ setsep() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
# prepend LISTNAME ELEMENT
|
# prepend LISTNAME ELEMENT [SEP]
|
||||||
#
|
#
|
||||||
# Prepend ELEMENT to the list stored in the variable LISTNAME.
|
# Prepend ELEMENT to the list stored in the variable LISTNAME,
|
||||||
|
# assuming the list is separated by SEP.
|
||||||
# Handles empty lists and single-element lists.
|
# Handles empty lists and single-element lists.
|
||||||
prepend() {
|
prepend() {
|
||||||
varname="$1"
|
varname="$1"
|
||||||
@@ -172,46 +174,6 @@ preextend() {
|
|||||||
unset IFS
|
unset IFS
|
||||||
}
|
}
|
||||||
|
|
||||||
execute() {
|
|
||||||
# dump the full command if the caller supplies SPACK_TEST_COMMAND=dump-args
|
|
||||||
if [ -n "${SPACK_TEST_COMMAND=}" ]; then
|
|
||||||
case "$SPACK_TEST_COMMAND" in
|
|
||||||
dump-args)
|
|
||||||
IFS="$lsep"
|
|
||||||
for arg in $full_command_list; do
|
|
||||||
echo "$arg"
|
|
||||||
done
|
|
||||||
unset IFS
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
dump-env-*)
|
|
||||||
var=${SPACK_TEST_COMMAND#dump-env-}
|
|
||||||
eval "printf '%s\n' \"\$0: \$var: \$$var\""
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
die "Unknown test command: '$SPACK_TEST_COMMAND'"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# Write the input and output commands to debug logs if it's asked for.
|
|
||||||
#
|
|
||||||
if [ "$SPACK_DEBUG" = TRUE ]; then
|
|
||||||
input_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_DEBUG_LOG_ID.in.log"
|
|
||||||
output_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_DEBUG_LOG_ID.out.log"
|
|
||||||
echo "[$mode] $command $input_command" >> "$input_log"
|
|
||||||
IFS="$lsep"
|
|
||||||
echo "[$mode] "$full_command_list >> "$output_log"
|
|
||||||
unset IFS
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Execute the full command, preserving spaces with IFS set
|
|
||||||
# to the alarm bell separator.
|
|
||||||
IFS="$lsep"; exec $full_command_list
|
|
||||||
exit
|
|
||||||
}
|
|
||||||
|
|
||||||
# Fail with a clear message if the input contains any bell characters.
|
# Fail with a clear message if the input contains any bell characters.
|
||||||
if eval "[ \"\${*#*${lsep}}\" != \"\$*\" ]"; then
|
if eval "[ \"\${*#*${lsep}}\" != \"\$*\" ]"; then
|
||||||
die "Compiler command line contains our separator ('${lsep}'). Cannot parse."
|
die "Compiler command line contains our separator ('${lsep}'). Cannot parse."
|
||||||
@@ -236,36 +198,6 @@ esac
|
|||||||
}
|
}
|
||||||
"
|
"
|
||||||
|
|
||||||
# path_list functions. Path_lists have 3 parts: spack_store_<list>, <list> and system_<list>,
|
|
||||||
# which are used to prioritize paths when assembling the final command line.
|
|
||||||
|
|
||||||
# init_path_lists LISTNAME
|
|
||||||
# Set <LISTNAME>, spack_store_<LISTNAME>, and system_<LISTNAME> to "".
|
|
||||||
init_path_lists() {
|
|
||||||
eval "spack_store_$1=\"\""
|
|
||||||
eval "$1=\"\""
|
|
||||||
eval "system_$1=\"\""
|
|
||||||
}
|
|
||||||
|
|
||||||
# assign_path_lists LISTNAME1 LISTNAME2
|
|
||||||
# Copy contents of LISTNAME2 into LISTNAME1, for each path_list prefix.
|
|
||||||
assign_path_lists() {
|
|
||||||
eval "spack_store_$1=\"\${spack_store_$2}\""
|
|
||||||
eval "$1=\"\${$2}\""
|
|
||||||
eval "system_$1=\"\${system_$2}\""
|
|
||||||
}
|
|
||||||
|
|
||||||
# append_path_lists LISTNAME ELT
|
|
||||||
# Append the provided ELT to the appropriate list, based on the result of path_order().
|
|
||||||
append_path_lists() {
|
|
||||||
path_order "$2"
|
|
||||||
case $? in
|
|
||||||
0) eval "append spack_store_$1 \"\$2\"" ;;
|
|
||||||
1) eval "append $1 \"\$2\"" ;;
|
|
||||||
2) eval "append system_$1 \"\$2\"" ;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
# Check if optional parameters are defined
|
# Check if optional parameters are defined
|
||||||
# If we aren't asking for debug flags, don't add them
|
# If we aren't asking for debug flags, don't add them
|
||||||
if [ -z "${SPACK_ADD_DEBUG_FLAGS:-}" ]; then
|
if [ -z "${SPACK_ADD_DEBUG_FLAGS:-}" ]; then
|
||||||
@@ -299,17 +231,12 @@ fi
|
|||||||
# ld link
|
# ld link
|
||||||
# ccld compile & link
|
# ccld compile & link
|
||||||
|
|
||||||
# Note. SPACK_ALWAYS_XFLAGS are applied for all compiler invocations,
|
|
||||||
# including version checks (SPACK_XFLAGS variants are not applied
|
|
||||||
# for version checks).
|
|
||||||
command="${0##*/}"
|
command="${0##*/}"
|
||||||
comp="CC"
|
comp="CC"
|
||||||
vcheck_flags=""
|
|
||||||
case "$command" in
|
case "$command" in
|
||||||
cpp)
|
cpp)
|
||||||
mode=cpp
|
mode=cpp
|
||||||
debug_flags="-g"
|
debug_flags="-g"
|
||||||
vcheck_flags="${SPACK_ALWAYS_CPPFLAGS}"
|
|
||||||
;;
|
;;
|
||||||
cc|c89|c99|gcc|clang|armclang|icc|icx|pgcc|nvc|xlc|xlc_r|fcc|amdclang|cl.exe|craycc)
|
cc|c89|c99|gcc|clang|armclang|icc|icx|pgcc|nvc|xlc|xlc_r|fcc|amdclang|cl.exe|craycc)
|
||||||
command="$SPACK_CC"
|
command="$SPACK_CC"
|
||||||
@@ -317,7 +244,6 @@ case "$command" in
|
|||||||
comp="CC"
|
comp="CC"
|
||||||
lang_flags=C
|
lang_flags=C
|
||||||
debug_flags="-g"
|
debug_flags="-g"
|
||||||
vcheck_flags="${SPACK_ALWAYS_CFLAGS}"
|
|
||||||
;;
|
;;
|
||||||
c++|CC|g++|clang++|armclang++|icpc|icpx|pgc++|nvc++|xlc++|xlc++_r|FCC|amdclang++|crayCC)
|
c++|CC|g++|clang++|armclang++|icpc|icpx|pgc++|nvc++|xlc++|xlc++_r|FCC|amdclang++|crayCC)
|
||||||
command="$SPACK_CXX"
|
command="$SPACK_CXX"
|
||||||
@@ -325,7 +251,6 @@ case "$command" in
|
|||||||
comp="CXX"
|
comp="CXX"
|
||||||
lang_flags=CXX
|
lang_flags=CXX
|
||||||
debug_flags="-g"
|
debug_flags="-g"
|
||||||
vcheck_flags="${SPACK_ALWAYS_CXXFLAGS}"
|
|
||||||
;;
|
;;
|
||||||
ftn|f90|fc|f95|gfortran|flang|armflang|ifort|ifx|pgfortran|nvfortran|xlf90|xlf90_r|nagfor|frt|amdflang|crayftn)
|
ftn|f90|fc|f95|gfortran|flang|armflang|ifort|ifx|pgfortran|nvfortran|xlf90|xlf90_r|nagfor|frt|amdflang|crayftn)
|
||||||
command="$SPACK_FC"
|
command="$SPACK_FC"
|
||||||
@@ -333,7 +258,6 @@ case "$command" in
|
|||||||
comp="FC"
|
comp="FC"
|
||||||
lang_flags=F
|
lang_flags=F
|
||||||
debug_flags="-g"
|
debug_flags="-g"
|
||||||
vcheck_flags="${SPACK_ALWAYS_FFLAGS}"
|
|
||||||
;;
|
;;
|
||||||
f77|xlf|xlf_r|pgf77)
|
f77|xlf|xlf_r|pgf77)
|
||||||
command="$SPACK_F77"
|
command="$SPACK_F77"
|
||||||
@@ -341,7 +265,6 @@ case "$command" in
|
|||||||
comp="F77"
|
comp="F77"
|
||||||
lang_flags=F
|
lang_flags=F
|
||||||
debug_flags="-g"
|
debug_flags="-g"
|
||||||
vcheck_flags="${SPACK_ALWAYS_FFLAGS}"
|
|
||||||
;;
|
;;
|
||||||
ld|ld.gold|ld.lld)
|
ld|ld.gold|ld.lld)
|
||||||
mode=ld
|
mode=ld
|
||||||
@@ -442,11 +365,7 @@ unset IFS
|
|||||||
export PATH="$new_dirs"
|
export PATH="$new_dirs"
|
||||||
|
|
||||||
if [ "$mode" = vcheck ]; then
|
if [ "$mode" = vcheck ]; then
|
||||||
full_command_list="$command"
|
exec "${command}" "$@"
|
||||||
args="$@"
|
|
||||||
extend full_command_list vcheck_flags
|
|
||||||
extend full_command_list args
|
|
||||||
execute
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Darwin's linker has a -r argument that merges object files together.
|
# Darwin's linker has a -r argument that merges object files together.
|
||||||
@@ -498,7 +417,12 @@ input_command="$*"
|
|||||||
parse_Wl() {
|
parse_Wl() {
|
||||||
while [ $# -ne 0 ]; do
|
while [ $# -ne 0 ]; do
|
||||||
if [ "$wl_expect_rpath" = yes ]; then
|
if [ "$wl_expect_rpath" = yes ]; then
|
||||||
append_path_lists return_rpath_dirs_list "$1"
|
path_order "$1"
|
||||||
|
case $? in
|
||||||
|
0) append return_spack_store_rpath_dirs_list "$1" ;;
|
||||||
|
1) append return_rpath_dirs_list "$1" ;;
|
||||||
|
2) append return_system_rpath_dirs_list "$1" ;;
|
||||||
|
esac
|
||||||
wl_expect_rpath=no
|
wl_expect_rpath=no
|
||||||
else
|
else
|
||||||
case "$1" in
|
case "$1" in
|
||||||
@@ -507,14 +431,24 @@ parse_Wl() {
|
|||||||
if [ -z "$arg" ]; then
|
if [ -z "$arg" ]; then
|
||||||
shift; continue
|
shift; continue
|
||||||
fi
|
fi
|
||||||
append_path_lists return_rpath_dirs_list "$arg"
|
path_order "$arg"
|
||||||
|
case $? in
|
||||||
|
0) append return_spack_store_rpath_dirs_list "$arg" ;;
|
||||||
|
1) append return_rpath_dirs_list "$arg" ;;
|
||||||
|
2) append return_system_rpath_dirs_list "$arg" ;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
--rpath=*)
|
--rpath=*)
|
||||||
arg="${1#--rpath=}"
|
arg="${1#--rpath=}"
|
||||||
if [ -z "$arg" ]; then
|
if [ -z "$arg" ]; then
|
||||||
shift; continue
|
shift; continue
|
||||||
fi
|
fi
|
||||||
append_path_lists return_rpath_dirs_list "$arg"
|
path_order "$arg"
|
||||||
|
case $? in
|
||||||
|
0) append return_spack_store_rpath_dirs_list "$arg" ;;
|
||||||
|
1) append return_rpath_dirs_list "$arg" ;;
|
||||||
|
2) append return_system_rpath_dirs_list "$arg" ;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
-rpath|--rpath)
|
-rpath|--rpath)
|
||||||
wl_expect_rpath=yes
|
wl_expect_rpath=yes
|
||||||
@@ -522,7 +456,8 @@ parse_Wl() {
|
|||||||
"$dtags_to_strip")
|
"$dtags_to_strip")
|
||||||
;;
|
;;
|
||||||
-Wl)
|
-Wl)
|
||||||
# Nested -Wl,-Wl means we're in NAG compiler territory. We don't support it.
|
# Nested -Wl,-Wl means we're in NAG compiler territory, we don't support
|
||||||
|
# it.
|
||||||
return 1
|
return 1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@@ -541,10 +476,21 @@ categorize_arguments() {
|
|||||||
return_other_args_list=""
|
return_other_args_list=""
|
||||||
return_isystem_was_used=""
|
return_isystem_was_used=""
|
||||||
|
|
||||||
init_path_lists return_isystem_include_dirs_list
|
return_isystem_spack_store_include_dirs_list=""
|
||||||
init_path_lists return_include_dirs_list
|
return_isystem_system_include_dirs_list=""
|
||||||
init_path_lists return_lib_dirs_list
|
return_isystem_include_dirs_list=""
|
||||||
init_path_lists return_rpath_dirs_list
|
|
||||||
|
return_spack_store_include_dirs_list=""
|
||||||
|
return_system_include_dirs_list=""
|
||||||
|
return_include_dirs_list=""
|
||||||
|
|
||||||
|
return_spack_store_lib_dirs_list=""
|
||||||
|
return_system_lib_dirs_list=""
|
||||||
|
return_lib_dirs_list=""
|
||||||
|
|
||||||
|
return_spack_store_rpath_dirs_list=""
|
||||||
|
return_system_rpath_dirs_list=""
|
||||||
|
return_rpath_dirs_list=""
|
||||||
|
|
||||||
# Global state for keeping track of -Wl,-rpath -Wl,/path
|
# Global state for keeping track of -Wl,-rpath -Wl,/path
|
||||||
wl_expect_rpath=no
|
wl_expect_rpath=no
|
||||||
@@ -610,17 +556,32 @@ categorize_arguments() {
|
|||||||
arg="${1#-isystem}"
|
arg="${1#-isystem}"
|
||||||
return_isystem_was_used=true
|
return_isystem_was_used=true
|
||||||
if [ -z "$arg" ]; then shift; arg="$1"; fi
|
if [ -z "$arg" ]; then shift; arg="$1"; fi
|
||||||
append_path_lists return_isystem_include_dirs_list "$arg"
|
path_order "$arg"
|
||||||
|
case $? in
|
||||||
|
0) append return_isystem_spack_store_include_dirs_list "$arg" ;;
|
||||||
|
1) append return_isystem_include_dirs_list "$arg" ;;
|
||||||
|
2) append return_isystem_system_include_dirs_list "$arg" ;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
-I*)
|
-I*)
|
||||||
arg="${1#-I}"
|
arg="${1#-I}"
|
||||||
if [ -z "$arg" ]; then shift; arg="$1"; fi
|
if [ -z "$arg" ]; then shift; arg="$1"; fi
|
||||||
append_path_lists return_include_dirs_list "$arg"
|
path_order "$arg"
|
||||||
|
case $? in
|
||||||
|
0) append return_spack_store_include_dirs_list "$arg" ;;
|
||||||
|
1) append return_include_dirs_list "$arg" ;;
|
||||||
|
2) append return_system_include_dirs_list "$arg" ;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
-L*)
|
-L*)
|
||||||
arg="${1#-L}"
|
arg="${1#-L}"
|
||||||
if [ -z "$arg" ]; then shift; arg="$1"; fi
|
if [ -z "$arg" ]; then shift; arg="$1"; fi
|
||||||
append_path_lists return_lib_dirs_list "$arg"
|
path_order "$arg"
|
||||||
|
case $? in
|
||||||
|
0) append return_spack_store_lib_dirs_list "$arg" ;;
|
||||||
|
1) append return_lib_dirs_list "$arg" ;;
|
||||||
|
2) append return_system_lib_dirs_list "$arg" ;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
-l*)
|
-l*)
|
||||||
# -loopopt=0 is generated erroneously in autoconf <= 2.69,
|
# -loopopt=0 is generated erroneously in autoconf <= 2.69,
|
||||||
@@ -653,17 +614,32 @@ categorize_arguments() {
|
|||||||
break
|
break
|
||||||
elif [ "$xlinker_expect_rpath" = yes ]; then
|
elif [ "$xlinker_expect_rpath" = yes ]; then
|
||||||
# Register the path of -Xlinker -rpath <other args> -Xlinker <path>
|
# Register the path of -Xlinker -rpath <other args> -Xlinker <path>
|
||||||
append_path_lists return_rpath_dirs_list "$1"
|
path_order "$1"
|
||||||
|
case $? in
|
||||||
|
0) append return_spack_store_rpath_dirs_list "$1" ;;
|
||||||
|
1) append return_rpath_dirs_list "$1" ;;
|
||||||
|
2) append return_system_rpath_dirs_list "$1" ;;
|
||||||
|
esac
|
||||||
xlinker_expect_rpath=no
|
xlinker_expect_rpath=no
|
||||||
else
|
else
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-rpath=*)
|
-rpath=*)
|
||||||
arg="${1#-rpath=}"
|
arg="${1#-rpath=}"
|
||||||
append_path_lists return_rpath_dirs_list "$arg"
|
path_order "$arg"
|
||||||
|
case $? in
|
||||||
|
0) append return_spack_store_rpath_dirs_list "$arg" ;;
|
||||||
|
1) append return_rpath_dirs_list "$arg" ;;
|
||||||
|
2) append return_system_rpath_dirs_list "$arg" ;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
--rpath=*)
|
--rpath=*)
|
||||||
arg="${1#--rpath=}"
|
arg="${1#--rpath=}"
|
||||||
append_path_lists return_rpath_dirs_list "$arg"
|
path_order "$arg"
|
||||||
|
case $? in
|
||||||
|
0) append return_spack_store_rpath_dirs_list "$arg" ;;
|
||||||
|
1) append return_rpath_dirs_list "$arg" ;;
|
||||||
|
2) append return_system_rpath_dirs_list "$arg" ;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
-rpath|--rpath)
|
-rpath|--rpath)
|
||||||
xlinker_expect_rpath=yes
|
xlinker_expect_rpath=yes
|
||||||
@@ -680,36 +656,7 @@ categorize_arguments() {
|
|||||||
"$dtags_to_strip")
|
"$dtags_to_strip")
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# if mode is not ld, we can just add to other args
|
append return_other_args_list "$1"
|
||||||
if [ "$mode" != "ld" ]; then
|
|
||||||
append return_other_args_list "$1"
|
|
||||||
shift
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
# if we're in linker mode, we need to parse raw RPATH args
|
|
||||||
case "$1" in
|
|
||||||
-rpath=*)
|
|
||||||
arg="${1#-rpath=}"
|
|
||||||
append_path_lists return_rpath_dirs_list "$arg"
|
|
||||||
;;
|
|
||||||
--rpath=*)
|
|
||||||
arg="${1#--rpath=}"
|
|
||||||
append_path_lists return_rpath_dirs_list "$arg"
|
|
||||||
;;
|
|
||||||
-rpath|--rpath)
|
|
||||||
if [ $# -eq 1 ]; then
|
|
||||||
# -rpath without value: let the linker raise an error.
|
|
||||||
append return_other_args_list "$1"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
shift
|
|
||||||
append_path_lists return_rpath_dirs_list "$1"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
append return_other_args_list "$1"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
@@ -731,10 +678,21 @@ categorize_arguments() {
|
|||||||
|
|
||||||
categorize_arguments "$@"
|
categorize_arguments "$@"
|
||||||
|
|
||||||
assign_path_lists isystem_include_dirs_list return_isystem_include_dirs_list
|
spack_store_include_dirs_list="$return_spack_store_include_dirs_list"
|
||||||
assign_path_lists include_dirs_list return_include_dirs_list
|
system_include_dirs_list="$return_system_include_dirs_list"
|
||||||
assign_path_lists lib_dirs_list return_lib_dirs_list
|
include_dirs_list="$return_include_dirs_list"
|
||||||
assign_path_lists rpath_dirs_list return_rpath_dirs_list
|
|
||||||
|
spack_store_lib_dirs_list="$return_spack_store_lib_dirs_list"
|
||||||
|
system_lib_dirs_list="$return_system_lib_dirs_list"
|
||||||
|
lib_dirs_list="$return_lib_dirs_list"
|
||||||
|
|
||||||
|
spack_store_rpath_dirs_list="$return_spack_store_rpath_dirs_list"
|
||||||
|
system_rpath_dirs_list="$return_system_rpath_dirs_list"
|
||||||
|
rpath_dirs_list="$return_rpath_dirs_list"
|
||||||
|
|
||||||
|
isystem_spack_store_include_dirs_list="$return_isystem_spack_store_include_dirs_list"
|
||||||
|
isystem_system_include_dirs_list="$return_isystem_system_include_dirs_list"
|
||||||
|
isystem_include_dirs_list="$return_isystem_include_dirs_list"
|
||||||
|
|
||||||
isystem_was_used="$return_isystem_was_used"
|
isystem_was_used="$return_isystem_was_used"
|
||||||
other_args_list="$return_other_args_list"
|
other_args_list="$return_other_args_list"
|
||||||
@@ -764,7 +722,6 @@ case "$mode" in
|
|||||||
cc|ccld)
|
cc|ccld)
|
||||||
case $lang_flags in
|
case $lang_flags in
|
||||||
F)
|
F)
|
||||||
extend spack_flags_list SPACK_ALWAYS_FFLAGS
|
|
||||||
extend spack_flags_list SPACK_FFLAGS
|
extend spack_flags_list SPACK_FFLAGS
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -774,7 +731,6 @@ esac
|
|||||||
# C preprocessor flags come before any C/CXX flags
|
# C preprocessor flags come before any C/CXX flags
|
||||||
case "$mode" in
|
case "$mode" in
|
||||||
cpp|as|cc|ccld)
|
cpp|as|cc|ccld)
|
||||||
extend spack_flags_list SPACK_ALWAYS_CPPFLAGS
|
|
||||||
extend spack_flags_list SPACK_CPPFLAGS
|
extend spack_flags_list SPACK_CPPFLAGS
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -785,11 +741,9 @@ case "$mode" in
|
|||||||
cc|ccld)
|
cc|ccld)
|
||||||
case $lang_flags in
|
case $lang_flags in
|
||||||
C)
|
C)
|
||||||
extend spack_flags_list SPACK_ALWAYS_CFLAGS
|
|
||||||
extend spack_flags_list SPACK_CFLAGS
|
extend spack_flags_list SPACK_CFLAGS
|
||||||
;;
|
;;
|
||||||
CXX)
|
CXX)
|
||||||
extend spack_flags_list SPACK_ALWAYS_CXXFLAGS
|
|
||||||
extend spack_flags_list SPACK_CXXFLAGS
|
extend spack_flags_list SPACK_CXXFLAGS
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -810,10 +764,21 @@ IFS="$lsep"
|
|||||||
categorize_arguments $spack_flags_list
|
categorize_arguments $spack_flags_list
|
||||||
unset IFS
|
unset IFS
|
||||||
|
|
||||||
assign_path_lists spack_flags_isystem_include_dirs_list return_isystem_include_dirs_list
|
spack_flags_isystem_spack_store_include_dirs_list="$return_isystem_spack_store_include_dirs_list"
|
||||||
assign_path_lists spack_flags_include_dirs_list return_include_dirs_list
|
spack_flags_isystem_system_include_dirs_list="$return_isystem_system_include_dirs_list"
|
||||||
assign_path_lists spack_flags_lib_dirs_list return_lib_dirs_list
|
spack_flags_isystem_include_dirs_list="$return_isystem_include_dirs_list"
|
||||||
assign_path_lists spack_flags_rpath_dirs_list return_rpath_dirs_list
|
|
||||||
|
spack_flags_spack_store_include_dirs_list="$return_spack_store_include_dirs_list"
|
||||||
|
spack_flags_system_include_dirs_list="$return_system_include_dirs_list"
|
||||||
|
spack_flags_include_dirs_list="$return_include_dirs_list"
|
||||||
|
|
||||||
|
spack_flags_spack_store_lib_dirs_list="$return_spack_store_lib_dirs_list"
|
||||||
|
spack_flags_system_lib_dirs_list="$return_system_lib_dirs_list"
|
||||||
|
spack_flags_lib_dirs_list="$return_lib_dirs_list"
|
||||||
|
|
||||||
|
spack_flags_spack_store_rpath_dirs_list="$return_spack_store_rpath_dirs_list"
|
||||||
|
spack_flags_system_rpath_dirs_list="$return_system_rpath_dirs_list"
|
||||||
|
spack_flags_rpath_dirs_list="$return_rpath_dirs_list"
|
||||||
|
|
||||||
spack_flags_isystem_was_used="$return_isystem_was_used"
|
spack_flags_isystem_was_used="$return_isystem_was_used"
|
||||||
spack_flags_other_args_list="$return_other_args_list"
|
spack_flags_other_args_list="$return_other_args_list"
|
||||||
@@ -872,7 +837,7 @@ esac
|
|||||||
case "$mode" in
|
case "$mode" in
|
||||||
cpp|cc|as|ccld)
|
cpp|cc|as|ccld)
|
||||||
if [ "$spack_flags_isystem_was_used" = "true" ] || [ "$isystem_was_used" = "true" ]; then
|
if [ "$spack_flags_isystem_was_used" = "true" ] || [ "$isystem_was_used" = "true" ]; then
|
||||||
extend spack_store_isystem_include_dirs_list SPACK_STORE_INCLUDE_DIRS
|
extend isystem_spack_store_include_dirs_list SPACK_STORE_INCLUDE_DIRS
|
||||||
extend isystem_include_dirs_list SPACK_INCLUDE_DIRS
|
extend isystem_include_dirs_list SPACK_INCLUDE_DIRS
|
||||||
else
|
else
|
||||||
extend spack_store_include_dirs_list SPACK_STORE_INCLUDE_DIRS
|
extend spack_store_include_dirs_list SPACK_STORE_INCLUDE_DIRS
|
||||||
@@ -888,63 +853,64 @@ args_list="$flags_list"
|
|||||||
|
|
||||||
# Include search paths partitioned by (in store, non-sytem, system)
|
# Include search paths partitioned by (in store, non-sytem, system)
|
||||||
# NOTE: adding ${lsep} to the prefix here turns every added element into two
|
# NOTE: adding ${lsep} to the prefix here turns every added element into two
|
||||||
extend args_list spack_store_spack_flags_include_dirs_list -I
|
extend args_list spack_flags_spack_store_include_dirs_list -I
|
||||||
extend args_list spack_store_include_dirs_list -I
|
extend args_list spack_store_include_dirs_list -I
|
||||||
|
|
||||||
extend args_list spack_flags_include_dirs_list -I
|
extend args_list spack_flags_include_dirs_list -I
|
||||||
extend args_list include_dirs_list -I
|
extend args_list include_dirs_list -I
|
||||||
|
|
||||||
extend args_list spack_store_spack_flags_isystem_include_dirs_list "-isystem${lsep}"
|
extend args_list spack_flags_isystem_spack_store_include_dirs_list "-isystem${lsep}"
|
||||||
extend args_list spack_store_isystem_include_dirs_list "-isystem${lsep}"
|
extend args_list isystem_spack_store_include_dirs_list "-isystem${lsep}"
|
||||||
|
|
||||||
extend args_list spack_flags_isystem_include_dirs_list "-isystem${lsep}"
|
extend args_list spack_flags_isystem_include_dirs_list "-isystem${lsep}"
|
||||||
extend args_list isystem_include_dirs_list "-isystem${lsep}"
|
extend args_list isystem_include_dirs_list "-isystem${lsep}"
|
||||||
|
|
||||||
extend args_list system_spack_flags_include_dirs_list -I
|
extend args_list spack_flags_system_include_dirs_list -I
|
||||||
extend args_list system_include_dirs_list -I
|
extend args_list system_include_dirs_list -I
|
||||||
|
|
||||||
extend args_list system_spack_flags_isystem_include_dirs_list "-isystem${lsep}"
|
extend args_list spack_flags_isystem_system_include_dirs_list "-isystem${lsep}"
|
||||||
extend args_list system_isystem_include_dirs_list "-isystem${lsep}"
|
extend args_list isystem_system_include_dirs_list "-isystem${lsep}"
|
||||||
|
|
||||||
# Library search paths partitioned by (in store, non-sytem, system)
|
# Library search paths partitioned by (in store, non-sytem, system)
|
||||||
extend args_list spack_store_spack_flags_lib_dirs_list "-L"
|
extend args_list spack_flags_spack_store_lib_dirs_list "-L"
|
||||||
extend args_list spack_store_lib_dirs_list "-L"
|
extend args_list spack_store_lib_dirs_list "-L"
|
||||||
|
|
||||||
extend args_list spack_flags_lib_dirs_list "-L"
|
extend args_list spack_flags_lib_dirs_list "-L"
|
||||||
extend args_list lib_dirs_list "-L"
|
extend args_list lib_dirs_list "-L"
|
||||||
|
|
||||||
extend args_list system_spack_flags_lib_dirs_list "-L"
|
extend args_list spack_flags_system_lib_dirs_list "-L"
|
||||||
extend args_list system_lib_dirs_list "-L"
|
extend args_list system_lib_dirs_list "-L"
|
||||||
|
|
||||||
# RPATHs arguments
|
# RPATHs arguments
|
||||||
rpath_prefix=""
|
|
||||||
case "$mode" in
|
case "$mode" in
|
||||||
ccld)
|
ccld)
|
||||||
if [ -n "$dtags_to_add" ] ; then
|
if [ -n "$dtags_to_add" ] ; then
|
||||||
append args_list "$linker_arg$dtags_to_add"
|
append args_list "$linker_arg$dtags_to_add"
|
||||||
fi
|
fi
|
||||||
rpath_prefix="$rpath"
|
extend args_list spack_flags_spack_store_rpath_dirs_list "$rpath"
|
||||||
|
extend args_list spack_store_rpath_dirs_list "$rpath"
|
||||||
|
|
||||||
|
extend args_list spack_flags_rpath_dirs_list "$rpath"
|
||||||
|
extend args_list rpath_dirs_list "$rpath"
|
||||||
|
|
||||||
|
extend args_list spack_flags_system_rpath_dirs_list "$rpath"
|
||||||
|
extend args_list system_rpath_dirs_list "$rpath"
|
||||||
;;
|
;;
|
||||||
ld)
|
ld)
|
||||||
if [ -n "$dtags_to_add" ] ; then
|
if [ -n "$dtags_to_add" ] ; then
|
||||||
append args_list "$dtags_to_add"
|
append args_list "$dtags_to_add"
|
||||||
fi
|
fi
|
||||||
rpath_prefix="-rpath${lsep}"
|
extend args_list spack_flags_spack_store_rpath_dirs_list "-rpath${lsep}"
|
||||||
|
extend args_list spack_store_rpath_dirs_list "-rpath${lsep}"
|
||||||
|
|
||||||
|
extend args_list spack_flags_rpath_dirs_list "-rpath${lsep}"
|
||||||
|
extend args_list rpath_dirs_list "-rpath${lsep}"
|
||||||
|
|
||||||
|
extend args_list spack_flags_system_rpath_dirs_list "-rpath${lsep}"
|
||||||
|
extend args_list system_rpath_dirs_list "-rpath${lsep}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# if mode is ccld or ld, extend RPATH lists with the prefix determined above
|
|
||||||
if [ -n "$rpath_prefix" ]; then
|
|
||||||
extend args_list spack_store_spack_flags_rpath_dirs_list "$rpath_prefix"
|
|
||||||
extend args_list spack_store_rpath_dirs_list "$rpath_prefix"
|
|
||||||
|
|
||||||
extend args_list spack_flags_rpath_dirs_list "$rpath_prefix"
|
|
||||||
extend args_list rpath_dirs_list "$rpath_prefix"
|
|
||||||
|
|
||||||
extend args_list system_spack_flags_rpath_dirs_list "$rpath_prefix"
|
|
||||||
extend args_list system_rpath_dirs_list "$rpath_prefix"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Other arguments from the input command
|
# Other arguments from the input command
|
||||||
extend args_list other_args_list
|
extend args_list other_args_list
|
||||||
extend args_list spack_flags_other_args_list
|
extend args_list spack_flags_other_args_list
|
||||||
@@ -967,4 +933,39 @@ if [ -n "$SPACK_CCACHE_BINARY" ]; then
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
execute
|
# dump the full command if the caller supplies SPACK_TEST_COMMAND=dump-args
|
||||||
|
if [ -n "${SPACK_TEST_COMMAND=}" ]; then
|
||||||
|
case "$SPACK_TEST_COMMAND" in
|
||||||
|
dump-args)
|
||||||
|
IFS="$lsep"
|
||||||
|
for arg in $full_command_list; do
|
||||||
|
echo "$arg"
|
||||||
|
done
|
||||||
|
unset IFS
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
dump-env-*)
|
||||||
|
var=${SPACK_TEST_COMMAND#dump-env-}
|
||||||
|
eval "printf '%s\n' \"\$0: \$var: \$$var\""
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
die "Unknown test command: '$SPACK_TEST_COMMAND'"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Write the input and output commands to debug logs if it's asked for.
|
||||||
|
#
|
||||||
|
if [ "$SPACK_DEBUG" = TRUE ]; then
|
||||||
|
input_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_DEBUG_LOG_ID.in.log"
|
||||||
|
output_log="$SPACK_DEBUG_LOG_DIR/spack-cc-$SPACK_DEBUG_LOG_ID.out.log"
|
||||||
|
echo "[$mode] $command $input_command" >> "$input_log"
|
||||||
|
IFS="$lsep"
|
||||||
|
echo "[$mode] "$full_command_list >> "$output_log"
|
||||||
|
unset IFS
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Execute the full command, preserving spaces with IFS set
|
||||||
|
# to the alarm bell separator.
|
||||||
|
IFS="$lsep"; exec $full_command_list
|
||||||
|
3
lib/spack/external/__init__.py
vendored
3
lib/spack/external/__init__.py
vendored
@@ -1,4 +1,5 @@
|
|||||||
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
24
lib/spack/external/_vendoring/distro/distro.py
vendored
24
lib/spack/external/_vendoring/distro/distro.py
vendored
@@ -1265,29 +1265,27 @@ def _distro_release_info(self) -> Dict[str, str]:
|
|||||||
match = _DISTRO_RELEASE_BASENAME_PATTERN.match(basename)
|
match = _DISTRO_RELEASE_BASENAME_PATTERN.match(basename)
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
with os.scandir(self.etc_dir) as it:
|
basenames = [
|
||||||
etc_files = [
|
basename
|
||||||
p.path for p in it
|
for basename in os.listdir(self.etc_dir)
|
||||||
if p.is_file() and p.name not in _DISTRO_RELEASE_IGNORE_BASENAMES
|
if basename not in _DISTRO_RELEASE_IGNORE_BASENAMES
|
||||||
]
|
and os.path.isfile(os.path.join(self.etc_dir, basename))
|
||||||
|
]
|
||||||
# We sort for repeatability in cases where there are multiple
|
# We sort for repeatability in cases where there are multiple
|
||||||
# distro specific files; e.g. CentOS, Oracle, Enterprise all
|
# distro specific files; e.g. CentOS, Oracle, Enterprise all
|
||||||
# containing `redhat-release` on top of their own.
|
# containing `redhat-release` on top of their own.
|
||||||
etc_files.sort()
|
basenames.sort()
|
||||||
except OSError:
|
except OSError:
|
||||||
# This may occur when /etc is not readable but we can't be
|
# This may occur when /etc is not readable but we can't be
|
||||||
# sure about the *-release files. Check common entries of
|
# sure about the *-release files. Check common entries of
|
||||||
# /etc for information. If they turn out to not be there the
|
# /etc for information. If they turn out to not be there the
|
||||||
# error is handled in `_parse_distro_release_file()`.
|
# error is handled in `_parse_distro_release_file()`.
|
||||||
etc_files = [
|
basenames = _DISTRO_RELEASE_BASENAMES
|
||||||
os.path.join(self.etc_dir, basename)
|
for basename in basenames:
|
||||||
for basename in _DISTRO_RELEASE_BASENAMES
|
match = _DISTRO_RELEASE_BASENAME_PATTERN.match(basename)
|
||||||
]
|
|
||||||
|
|
||||||
for filepath in etc_files:
|
|
||||||
match = _DISTRO_RELEASE_BASENAME_PATTERN.match(os.path.basename(filepath))
|
|
||||||
if match is None:
|
if match is None:
|
||||||
continue
|
continue
|
||||||
|
filepath = os.path.join(self.etc_dir, basename)
|
||||||
distro_info = self._parse_distro_release_file(filepath)
|
distro_info = self._parse_distro_release_file(filepath)
|
||||||
# The name is always present if the pattern matches.
|
# The name is always present if the pattern matches.
|
||||||
if "name" not in distro_info:
|
if "name" not in distro_info:
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user