Compare commits
1 Commits
develop-20
...
hs/revert/
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a660d78670 |
3
.gitattributes
vendored
3
.gitattributes
vendored
@@ -1,3 +1,4 @@
|
|||||||
*.py diff=python
|
*.py diff=python
|
||||||
|
*.lp linguist-language=Prolog
|
||||||
lib/spack/external/* linguist-vendored
|
lib/spack/external/* linguist-vendored
|
||||||
*.bat text eol=crlf
|
*.bat text eol=crlf
|
1
.github/workflows/audit.yaml
vendored
1
.github/workflows/audit.yaml
vendored
@@ -59,6 +59,7 @@ jobs:
|
|||||||
- 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
|
||||||
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
|
spack -d audit configs
|
||||||
|
2
.github/workflows/bootstrap.yml
vendored
2
.github/workflows/bootstrap.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
|||||||
dnf install -y \
|
dnf install -y \
|
||||||
bzip2 curl file gcc-c++ gcc gcc-gfortran git gzip \
|
bzip2 curl file gcc-c++ gcc gcc-gfortran git gzip \
|
||||||
make patch unzip which xz python3 python3-devel tree \
|
make patch unzip which xz python3 python3-devel tree \
|
||||||
cmake bison bison-devel libstdc++-static gawk
|
cmake bison bison-devel libstdc++-static
|
||||||
- name: Setup OpenSUSE
|
- name: Setup OpenSUSE
|
||||||
if: ${{ matrix.image == 'opensuse/leap:latest' }}
|
if: ${{ matrix.image == 'opensuse/leap:latest' }}
|
||||||
run: |
|
run: |
|
||||||
|
17
.github/workflows/ci.yaml
vendored
17
.github/workflows/ci.yaml
vendored
@@ -9,7 +9,6 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- develop
|
- develop
|
||||||
- releases/**
|
- releases/**
|
||||||
merge_group:
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ci-${{github.ref}}-${{github.event.pull_request.number || github.run_number}}
|
group: ci-${{github.ref}}-${{github.event.pull_request.number || github.run_number}}
|
||||||
@@ -26,17 +25,13 @@ jobs:
|
|||||||
packages: ${{ steps.filter.outputs.packages }}
|
packages: ${{ steps.filter.outputs.packages }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
if: ${{ github.event_name == 'push' || github.event_name == 'merge_group' }}
|
if: ${{ github.event_name == 'push' }}
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
# For pull requests it's not necessary to checkout the code
|
# For pull requests it's not necessary to checkout the code
|
||||||
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
|
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
|
||||||
id: filter
|
id: filter
|
||||||
with:
|
with:
|
||||||
# For merge group events, compare against the target branch (main)
|
|
||||||
base: ${{ github.event_name == 'merge_group' && github.event.merge_group.base_ref || '' }}
|
|
||||||
# For merge group events, use the merge group head ref
|
|
||||||
ref: ${{ github.event_name == 'merge_group' && github.event.merge_group.head_sha || github.ref }}
|
|
||||||
# See https://github.com/dorny/paths-filter/issues/56 for the syntax used below
|
# See https://github.com/dorny/paths-filter/issues/56 for the syntax used below
|
||||||
# Don't run if we only modified packages in the
|
# Don't run if we only modified packages in the
|
||||||
# built-in repository or documentation
|
# built-in repository or documentation
|
||||||
@@ -81,11 +76,10 @@ jobs:
|
|||||||
|
|
||||||
prechecks:
|
prechecks:
|
||||||
needs: [ changes ]
|
needs: [ changes ]
|
||||||
uses: ./.github/workflows/prechecks.yml
|
uses: ./.github/workflows/valid-style.yml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
with_coverage: ${{ needs.changes.outputs.core }}
|
with_coverage: ${{ needs.changes.outputs.core }}
|
||||||
with_packages: ${{ needs.changes.outputs.packages }}
|
|
||||||
|
|
||||||
import-check:
|
import-check:
|
||||||
needs: [ changes ]
|
needs: [ changes ]
|
||||||
@@ -99,7 +93,7 @@ jobs:
|
|||||||
- name: Success
|
- name: Success
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ needs.prechecks.result }}" == "failure" ] || [ "${{ needs.prechecks.result }}" == "canceled" ]; then
|
if [ "${{ needs.prechecks.result }}" == "failure" ] || [ "${{ needs.prechecks.result }}" == "canceled" ]; then
|
||||||
echo "Unit tests failed."
|
echo "Unit tests failed."
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
exit 0
|
exit 0
|
||||||
@@ -107,7 +101,6 @@ jobs:
|
|||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
needs: [ unit-tests, prechecks ]
|
needs: [ unit-tests, prechecks ]
|
||||||
if: ${{ needs.changes.outputs.core }}
|
|
||||||
uses: ./.github/workflows/coverage.yml
|
uses: ./.github/workflows/coverage.yml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
@@ -120,10 +113,10 @@ jobs:
|
|||||||
- name: Status summary
|
- name: Status summary
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ needs.unit-tests.result }}" == "failure" ] || [ "${{ needs.unit-tests.result }}" == "canceled" ]; then
|
if [ "${{ needs.unit-tests.result }}" == "failure" ] || [ "${{ needs.unit-tests.result }}" == "canceled" ]; then
|
||||||
echo "Unit tests failed."
|
echo "Unit tests failed."
|
||||||
exit 1
|
exit 1
|
||||||
elif [ "${{ needs.bootstrap.result }}" == "failure" ] || [ "${{ needs.bootstrap.result }}" == "canceled" ]; then
|
elif [ "${{ needs.bootstrap.result }}" == "failure" ] || [ "${{ needs.bootstrap.result }}" == "canceled" ]; then
|
||||||
echo "Bootstrap tests failed."
|
echo "Bootstrap tests failed."
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
exit 0
|
exit 0
|
||||||
|
@@ -1,8 +1,7 @@
|
|||||||
black==25.1.0
|
black==25.1.0
|
||||||
clingo==5.8.0
|
clingo==5.7.1
|
||||||
flake8==7.2.0
|
flake8==7.1.2
|
||||||
isort==6.0.1
|
isort==6.0.1
|
||||||
mypy==1.15.0
|
mypy==1.15.0
|
||||||
types-six==1.17.0.20250403
|
types-six==1.17.0.20250304
|
||||||
vermin==1.6.0
|
vermin==1.6.0
|
||||||
pylint==3.3.6
|
|
||||||
|
3
.github/workflows/unit_tests.yaml
vendored
3
.github/workflows/unit_tests.yaml
vendored
@@ -19,6 +19,9 @@ jobs:
|
|||||||
on_develop:
|
on_develop:
|
||||||
- ${{ github.ref == 'refs/heads/develop' }}
|
- ${{ github.ref == 'refs/heads/develop' }}
|
||||||
include:
|
include:
|
||||||
|
- python-version: '3.6'
|
||||||
|
os: ubuntu-20.04
|
||||||
|
on_develop: ${{ github.ref == 'refs/heads/develop' }}
|
||||||
- python-version: '3.7'
|
- python-version: '3.7'
|
||||||
os: ubuntu-22.04
|
os: ubuntu-22.04
|
||||||
on_develop: ${{ github.ref == 'refs/heads/develop' }}
|
on_develop: ${{ github.ref == 'refs/heads/develop' }}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
name: prechecks
|
name: style
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
@@ -6,9 +6,6 @@ on:
|
|||||||
with_coverage:
|
with_coverage:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
with_packages:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: style-${{github.ref}}-${{github.event.pull_request.number || github.run_number}}
|
group: style-${{github.ref}}-${{github.event.pull_request.number || github.run_number}}
|
||||||
@@ -25,56 +22,43 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: '3.13'
|
python-version: '3.13'
|
||||||
cache: 'pip'
|
cache: 'pip'
|
||||||
cache-dependency-path: '.github/workflows/requirements/style/requirements.txt'
|
|
||||||
- name: Install Python Packages
|
- name: Install Python Packages
|
||||||
run: |
|
run: |
|
||||||
|
pip install --upgrade pip setuptools
|
||||||
pip install -r .github/workflows/requirements/style/requirements.txt
|
pip install -r .github/workflows/requirements/style/requirements.txt
|
||||||
- name: vermin (Spack's Core)
|
- name: vermin (Spack's Core)
|
||||||
run: |
|
run: vermin --backport importlib --backport argparse --violations --backport typing -t=3.6- -vvv lib/spack/spack/ lib/spack/llnl/ bin/
|
||||||
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)
|
||||||
run: |
|
run: vermin --backport importlib --backport argparse --violations --backport typing -t=3.6- -vvv var/spack/repos
|
||||||
vermin --backport importlib --backport argparse --violations --backport typing -t=3.6- -vvv var/spack/repos
|
|
||||||
|
|
||||||
# Run style checks on the files that have been changed
|
# Run style checks on the files that have been changed
|
||||||
style:
|
style:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
with:
|
with:
|
||||||
fetch-depth: 2
|
fetch-depth: 0
|
||||||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
|
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
|
||||||
with:
|
with:
|
||||||
python-version: '3.13'
|
python-version: '3.13'
|
||||||
cache: 'pip'
|
cache: 'pip'
|
||||||
cache-dependency-path: '.github/workflows/requirements/style/requirements.txt'
|
|
||||||
- name: Install Python packages
|
- name: Install Python packages
|
||||||
run: |
|
run: |
|
||||||
|
pip install --upgrade pip setuptools
|
||||||
pip install -r .github/workflows/requirements/style/requirements.txt
|
pip install -r .github/workflows/requirements/style/requirements.txt
|
||||||
|
- name: Setup git configuration
|
||||||
|
run: |
|
||||||
|
# Need this for the git tests to succeed.
|
||||||
|
git --version
|
||||||
|
. .github/workflows/bin/setup_git.sh
|
||||||
- name: Run style tests
|
- name: Run style tests
|
||||||
run: |
|
run: |
|
||||||
bin/spack style --base HEAD^1
|
share/spack/qa/run-style-tests
|
||||||
bin/spack license verify
|
|
||||||
pylint -j $(nproc) --disable=all --enable=unspecified-encoding --ignore-paths=lib/spack/external lib
|
|
||||||
|
|
||||||
audit:
|
audit:
|
||||||
uses: ./.github/workflows/audit.yaml
|
uses: ./.github/workflows/audit.yaml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
with_coverage: ${{ inputs.with_coverage }}
|
with_coverage: ${{ inputs.with_coverage }}
|
||||||
python_version: '3.13'
|
python_version: '3.13'
|
||||||
|
|
||||||
verify-checksums:
|
|
||||||
if: ${{ inputs.with_packages == 'true' }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
|
||||||
with:
|
|
||||||
fetch-depth: 2
|
|
||||||
- name: Verify Added Checksums
|
|
||||||
run: |
|
|
||||||
bin/spack ci verify-versions HEAD^1 HEAD
|
|
||||||
|
|
||||||
# Check that spack can bootstrap the development environment on Python 3.6 - RHEL8
|
# Check that spack can bootstrap the development environment on Python 3.6 - RHEL8
|
||||||
bootstrap-dev-rhel8:
|
bootstrap-dev-rhel8:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -102,3 +86,21 @@ jobs:
|
|||||||
spack -d bootstrap now --dev
|
spack -d bootstrap now --dev
|
||||||
spack -d style -t black
|
spack -d style -t black
|
||||||
spack unit-test -V
|
spack unit-test -V
|
||||||
|
|
||||||
|
# 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
|
34
README.md
34
README.md
@@ -46,42 +46,18 @@ 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.
|
||||||
|
|
||||||
Installation
|
To install spack and your first package, make sure you have Python & Git.
|
||||||
----------------
|
|
||||||
|
|
||||||
To install spack, first make sure you have Python & Git.
|
|
||||||
Then:
|
Then:
|
||||||
|
|
||||||
```bash
|
$ git clone -c feature.manyFiles=true --depth=2 https://github.com/spack/spack.git
|
||||||
git clone -c feature.manyFiles=true --depth=2 https://github.com/spack/spack.git
|
$ cd spack/bin
|
||||||
```
|
$ ./spack install zlib
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>What are <code>manyFiles=true</code> and <code>--depth=2</code>?</summary>
|
|
||||||
<br>
|
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
> `-c feature.manyFiles=true` improves git's performance on repositories with 1,000+ files.
|
> `-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.
|
> `--depth=2` prunes the git history to reduce the size of the Spack installation.
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# For bash/zsh/sh
|
|
||||||
. spack/share/spack/setup-env.sh
|
|
||||||
|
|
||||||
# For tcsh/csh
|
|
||||||
source spack/share/spack/setup-env.csh
|
|
||||||
|
|
||||||
# For fish
|
|
||||||
. spack/share/spack/setup-env.fish
|
|
||||||
```
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Now you're ready to install a package!
|
|
||||||
spack install zlib-ng
|
|
||||||
```
|
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
@@ -19,7 +19,7 @@ config:
|
|||||||
install_tree:
|
install_tree:
|
||||||
root: $spack/opt/spack
|
root: $spack/opt/spack
|
||||||
projections:
|
projections:
|
||||||
all: "{architecture.platform}-{architecture.target}/{name}-{version}-{hash}"
|
all: "{architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}"
|
||||||
# install_tree can include an optional padded length (int or boolean)
|
# install_tree can include an optional padded length (int or boolean)
|
||||||
# default is False (do not pad)
|
# default is False (do not pad)
|
||||||
# if padded_length is True, Spack will pad as close to the system max path
|
# if padded_length is True, Spack will pad as close to the system max path
|
||||||
@@ -90,9 +90,10 @@ config:
|
|||||||
misc_cache: $user_cache_path/cache
|
misc_cache: $user_cache_path/cache
|
||||||
|
|
||||||
|
|
||||||
# Abort downloads after this many seconds if not data is received.
|
# Timeout in seconds used for downloading sources etc. This only applies
|
||||||
# Setting this to 0 will disable the timeout.
|
# to the connection phase and can be increased for slow connections or
|
||||||
connect_timeout: 30
|
# servers. 0 means no timeout.
|
||||||
|
connect_timeout: 10
|
||||||
|
|
||||||
|
|
||||||
# If this is false, tools like curl that use SSL will not verify
|
# If this is false, tools like curl that use SSL will not verify
|
||||||
|
@@ -15,18 +15,17 @@
|
|||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
packages:
|
packages:
|
||||||
all:
|
all:
|
||||||
|
compiler:
|
||||||
|
- apple-clang
|
||||||
|
- clang
|
||||||
|
- gcc
|
||||||
providers:
|
providers:
|
||||||
c: [apple-clang, llvm, gcc]
|
|
||||||
cxx: [apple-clang, llvm, gcc]
|
|
||||||
elf: [libelf]
|
elf: [libelf]
|
||||||
fortran: [gcc]
|
|
||||||
fuse: [macfuse]
|
fuse: [macfuse]
|
||||||
gl: [apple-gl]
|
gl: [apple-gl]
|
||||||
glu: [apple-glu]
|
glu: [apple-glu]
|
||||||
unwind: [apple-libunwind]
|
unwind: [apple-libunwind]
|
||||||
uuid: [apple-libuuid]
|
uuid: [apple-libuuid]
|
||||||
apple-clang:
|
|
||||||
buildable: false
|
|
||||||
apple-gl:
|
apple-gl:
|
||||||
buildable: false
|
buildable: false
|
||||||
externals:
|
externals:
|
||||||
@@ -51,12 +50,3 @@ packages:
|
|||||||
# although the version number used here isn't critical
|
# although the version number used here isn't critical
|
||||||
- spec: apple-libuuid@1353.100.2
|
- spec: apple-libuuid@1353.100.2
|
||||||
prefix: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
|
prefix: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
|
||||||
c:
|
|
||||||
prefer:
|
|
||||||
- apple-clang
|
|
||||||
cxx:
|
|
||||||
prefer:
|
|
||||||
- apple-clang
|
|
||||||
fortran:
|
|
||||||
prefer:
|
|
||||||
- gcc
|
|
||||||
|
@@ -15,18 +15,19 @@
|
|||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
packages:
|
packages:
|
||||||
all:
|
all:
|
||||||
|
compiler: [gcc, clang, oneapi, xl, nag, fj, aocc]
|
||||||
providers:
|
providers:
|
||||||
awk: [gawk]
|
awk: [gawk]
|
||||||
armci: [armcimpi]
|
armci: [armcimpi]
|
||||||
blas: [openblas, amdblis]
|
blas: [openblas, amdblis]
|
||||||
c: [gcc, llvm, intel-oneapi-compilers]
|
c: [gcc]
|
||||||
cxx: [gcc, llvm, intel-oneapi-compilers]
|
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, llvm, intel-oneapi-compilers]
|
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]
|
||||||
@@ -72,8 +73,6 @@ packages:
|
|||||||
permissions:
|
permissions:
|
||||||
read: world
|
read: world
|
||||||
write: user
|
write: user
|
||||||
cce:
|
|
||||||
buildable: false
|
|
||||||
cray-fftw:
|
cray-fftw:
|
||||||
buildable: false
|
buildable: false
|
||||||
cray-libsci:
|
cray-libsci:
|
||||||
@@ -88,23 +87,13 @@ packages:
|
|||||||
buildable: false
|
buildable: false
|
||||||
essl:
|
essl:
|
||||||
buildable: false
|
buildable: false
|
||||||
fj:
|
|
||||||
buildable: false
|
|
||||||
fujitsu-mpi:
|
fujitsu-mpi:
|
||||||
buildable: false
|
buildable: false
|
||||||
fujitsu-ssl2:
|
fujitsu-ssl2:
|
||||||
buildable: false
|
buildable: false
|
||||||
glibc:
|
|
||||||
buildable: false
|
|
||||||
hpcx-mpi:
|
hpcx-mpi:
|
||||||
buildable: false
|
buildable: false
|
||||||
iconv:
|
|
||||||
prefer: [libiconv]
|
|
||||||
mpt:
|
mpt:
|
||||||
buildable: false
|
buildable: false
|
||||||
musl:
|
|
||||||
buildable: false
|
|
||||||
spectrum-mpi:
|
spectrum-mpi:
|
||||||
buildable: false
|
buildable: false
|
||||||
xl:
|
|
||||||
buildable: false
|
|
||||||
|
@@ -15,13 +15,8 @@
|
|||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
packages:
|
packages:
|
||||||
all:
|
all:
|
||||||
|
compiler:
|
||||||
|
- msvc
|
||||||
providers:
|
providers:
|
||||||
c : [msvc]
|
|
||||||
cxx: [msvc]
|
|
||||||
mpi: [msmpi]
|
mpi: [msmpi]
|
||||||
gl: [wgl]
|
gl: [wgl]
|
||||||
mpi:
|
|
||||||
require:
|
|
||||||
- one_of: [msmpi]
|
|
||||||
msvc:
|
|
||||||
buildable: false
|
|
||||||
|
@@ -1291,61 +1291,55 @@ based on site policies.
|
|||||||
Variants
|
Variants
|
||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
|
|
||||||
Variants are named options associated with a particular package and are
|
Variants are named options associated with a particular package. They are
|
||||||
typically used to enable or disable certain features at build time. They
|
optional, as each package must provide default values for each variant it
|
||||||
are optional, as each package must provide default values for each variant
|
makes available. Variants can be specified using
|
||||||
it makes available.
|
a flexible parameter syntax ``name=<value>``. For example,
|
||||||
|
``spack install mercury debug=True`` will install mercury built with debug
|
||||||
The names of variants available for a particular package depend on
|
flags. The names of particular variants available for a package depend on
|
||||||
what was provided by the package author. ``spack info <package>`` will
|
what was provided by the package author. ``spack info <package>`` will
|
||||||
provide information on what build variants are available.
|
provide information on what build variants are available.
|
||||||
|
|
||||||
There are different types of variants:
|
For compatibility with earlier versions, variants which happen to be
|
||||||
|
boolean in nature can be specified by a syntax that represents turning
|
||||||
|
options on and off. For example, in the previous spec we could have
|
||||||
|
supplied ``mercury +debug`` with the same effect of enabling the debug
|
||||||
|
compile time option for the libelf package.
|
||||||
|
|
||||||
1. Boolean variants. Typically used to enable or disable a feature at
|
Depending on the package a variant may have any default value. For
|
||||||
compile time. For example, a package might have a ``debug`` variant that
|
``mercury`` here, ``debug`` is ``False`` by default, and we turned it on
|
||||||
can be explicitly enabled with ``+debug`` and disabled with ``~debug``.
|
with ``debug=True`` or ``+debug``. If a variant is ``True`` by default
|
||||||
2. Single-valued variants. Often used to set defaults. For example, a package
|
you can turn it off by either adding ``-name`` or ``~name`` to the spec.
|
||||||
might have a ``compression`` variant that determines the default
|
|
||||||
compression algorithm, which users could set to ``compression=gzip`` or
|
|
||||||
``compression=zstd``.
|
|
||||||
3. Multi-valued variants. A package might have a ``fabrics`` variant that
|
|
||||||
determines which network fabrics to support. Users could set this to
|
|
||||||
``fabrics=verbs,ofi`` to enable both InfiniBand verbs and OpenFabrics
|
|
||||||
interfaces. The values are separated by commas.
|
|
||||||
|
|
||||||
The meaning of ``fabrics=verbs,ofi`` is to enable *at least* the specified
|
There are two syntaxes here because, depending on context, ``~`` and
|
||||||
fabrics, but other fabrics may be enabled as well. If the intent is to
|
``-`` may mean different things. In most shells, the following will
|
||||||
enable *only* the specified fabrics, then the ``fabrics:=verbs,ofi``
|
result in the shell performing home directory substitution:
|
||||||
syntax should be used with the ``:=`` operator.
|
|
||||||
|
|
||||||
.. note::
|
.. code-block:: sh
|
||||||
|
|
||||||
In certain shells, the the ``~`` character is expanded to the home
|
mpileaks ~debug # shell may try to substitute this!
|
||||||
directory. To avoid these issues, avoid whitespace between the package
|
mpileaks~debug # use this instead
|
||||||
name and the variant:
|
|
||||||
|
|
||||||
.. code-block:: sh
|
If there is a user called ``debug``, the ``~`` will be incorrectly
|
||||||
|
expanded. In this situation, you would want to write ``libelf
|
||||||
|
-debug``. However, ``-`` can be ambiguous when included after a
|
||||||
|
package name without spaces:
|
||||||
|
|
||||||
mpileaks ~debug # shell may try to substitute this!
|
.. code-block:: sh
|
||||||
mpileaks~debug # use this instead
|
|
||||||
|
|
||||||
Alternatively, you can use the ``-`` character to disable a variant,
|
mpileaks-debug # wrong!
|
||||||
but be aware that this requires a space between the package name and
|
mpileaks -debug # right
|
||||||
the variant:
|
|
||||||
|
|
||||||
.. code-block:: sh
|
Spack allows the ``-`` character to be part of package names, so the
|
||||||
|
above will be interpreted as a request for the ``mpileaks-debug``
|
||||||
|
package, not a request for ``mpileaks`` built without ``debug``
|
||||||
|
options. In this scenario, you should write ``mpileaks~debug`` to
|
||||||
|
avoid ambiguity.
|
||||||
|
|
||||||
mpileaks-debug # wrong: refers to a package named "mpileaks-debug"
|
When spack normalizes specs, it prints them out with no spaces boolean
|
||||||
mpileaks -debug # right: refers to a package named mpileaks with debug disabled
|
variants using the backwards compatibility syntax and uses only ``~``
|
||||||
|
for disabled boolean variants. The ``-`` and spaces on the command
|
||||||
As a last resort, ``debug=False`` can also be used to disable a boolean variant.
|
line are provided for convenience and legibility.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"""""""""""""""""""""""""""""""""""
|
|
||||||
Variant propagation to dependencies
|
|
||||||
"""""""""""""""""""""""""""""""""""
|
|
||||||
|
|
||||||
Spack allows variants to propagate their value to the package's
|
Spack allows variants to propagate their value to the package's
|
||||||
dependency by using ``++``, ``--``, and ``~~`` for boolean variants.
|
dependency by using ``++``, ``--``, and ``~~`` for boolean variants.
|
||||||
@@ -1415,29 +1409,27 @@ that executables will run without the need to set ``LD_LIBRARY_PATH``.
|
|||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
packages:
|
compilers:
|
||||||
gcc:
|
- compiler:
|
||||||
externals:
|
spec: gcc@4.9.3
|
||||||
- spec: gcc@4.9.3
|
paths:
|
||||||
prefix: /opt/gcc
|
cc: /opt/gcc/bin/gcc
|
||||||
extra_attributes:
|
c++: /opt/gcc/bin/g++
|
||||||
compilers:
|
f77: /opt/gcc/bin/gfortran
|
||||||
c: /opt/gcc/bin/gcc
|
fc: /opt/gcc/bin/gfortran
|
||||||
cxx: /opt/gcc/bin/g++
|
environment:
|
||||||
fortran: /opt/gcc/bin/gfortran
|
unset:
|
||||||
environment:
|
- BAD_VARIABLE
|
||||||
unset:
|
set:
|
||||||
- BAD_VARIABLE
|
GOOD_VARIABLE_NUM: 1
|
||||||
set:
|
GOOD_VARIABLE_STR: good
|
||||||
GOOD_VARIABLE_NUM: 1
|
prepend_path:
|
||||||
GOOD_VARIABLE_STR: good
|
PATH: /path/to/binutils
|
||||||
prepend_path:
|
append_path:
|
||||||
PATH: /path/to/binutils
|
LD_LIBRARY_PATH: /opt/gcc/lib
|
||||||
append_path:
|
extra_rpaths:
|
||||||
LD_LIBRARY_PATH: /opt/gcc/lib
|
- /path/to/some/compiler/runtime/directory
|
||||||
extra_rpaths:
|
- /path/to/some/other/compiler/runtime/directory
|
||||||
- /path/to/some/compiler/runtime/directory
|
|
||||||
- /path/to/some/other/compiler/runtime/directory
|
|
||||||
|
|
||||||
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
@@ -63,6 +63,7 @@ on these ideas for each distinct build system that Spack supports:
|
|||||||
build_systems/cudapackage
|
build_systems/cudapackage
|
||||||
build_systems/custompackage
|
build_systems/custompackage
|
||||||
build_systems/inteloneapipackage
|
build_systems/inteloneapipackage
|
||||||
|
build_systems/intelpackage
|
||||||
build_systems/rocmpackage
|
build_systems/rocmpackage
|
||||||
build_systems/sourceforgepackage
|
build_systems/sourceforgepackage
|
||||||
|
|
||||||
|
@@ -33,6 +33,9 @@ For more information on a specific package, do::
|
|||||||
|
|
||||||
spack info --all <package-name>
|
spack info --all <package-name>
|
||||||
|
|
||||||
|
Intel no longer releases new versions of Parallel Studio, which can be
|
||||||
|
used in Spack via the :ref:`intelpackage`. All of its components can
|
||||||
|
now be found in oneAPI.
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
========
|
========
|
||||||
@@ -47,8 +50,34 @@ Install the oneAPI compilers::
|
|||||||
|
|
||||||
spack install intel-oneapi-compilers
|
spack install intel-oneapi-compilers
|
||||||
|
|
||||||
|
Add the compilers to your ``compilers.yaml`` so spack can use them::
|
||||||
|
|
||||||
To build the ``patchelf`` Spack package with ``icx``, do::
|
spack compiler add `spack location -i intel-oneapi-compilers`/compiler/latest/bin
|
||||||
|
|
||||||
|
Verify that the compilers are available::
|
||||||
|
|
||||||
|
spack compiler list
|
||||||
|
|
||||||
|
Note that 2024 and later releases do not include ``icc``. Before 2024,
|
||||||
|
the package layout was different::
|
||||||
|
|
||||||
|
spack compiler add `spack location -i intel-oneapi-compilers`/compiler/latest/linux/bin/intel64
|
||||||
|
spack compiler add `spack location -i intel-oneapi-compilers`/compiler/latest/linux/bin
|
||||||
|
|
||||||
|
The ``intel-oneapi-compilers`` package includes 2 families of
|
||||||
|
compilers:
|
||||||
|
|
||||||
|
* ``intel``: ``icc``, ``icpc``, ``ifort``. Intel's *classic*
|
||||||
|
compilers. 2024 and later releases contain ``ifort``, but not
|
||||||
|
``icc`` and ``icpc``.
|
||||||
|
* ``oneapi``: ``icx``, ``icpx``, ``ifx``. Intel's new generation of
|
||||||
|
compilers based on LLVM.
|
||||||
|
|
||||||
|
To build the ``patchelf`` Spack package with ``icc``, do::
|
||||||
|
|
||||||
|
spack install patchelf%intel
|
||||||
|
|
||||||
|
To build with with ``icx``, do ::
|
||||||
|
|
||||||
spack install patchelf%oneapi
|
spack install patchelf%oneapi
|
||||||
|
|
||||||
@@ -63,6 +92,15 @@ Install the oneAPI compilers::
|
|||||||
|
|
||||||
spack install intel-oneapi-compilers
|
spack install intel-oneapi-compilers
|
||||||
|
|
||||||
|
Add the compilers to your ``compilers.yaml`` so Spack can use them::
|
||||||
|
|
||||||
|
spack compiler add `spack location -i intel-oneapi-compilers`/compiler/latest/bin
|
||||||
|
spack compiler add `spack location -i intel-oneapi-compilers`/compiler/latest/bin
|
||||||
|
|
||||||
|
Verify that the compilers are available::
|
||||||
|
|
||||||
|
spack compiler list
|
||||||
|
|
||||||
Clone `spack-configs <https://github.com/spack/spack-configs>`_ repo and activate Intel oneAPI CPU environment::
|
Clone `spack-configs <https://github.com/spack/spack-configs>`_ repo and activate Intel oneAPI CPU environment::
|
||||||
|
|
||||||
git clone https://github.com/spack/spack-configs
|
git clone https://github.com/spack/spack-configs
|
||||||
@@ -111,7 +149,7 @@ Compilers
|
|||||||
---------
|
---------
|
||||||
|
|
||||||
To use the compilers, add some information about the installation to
|
To use the compilers, add some information about the installation to
|
||||||
``packages.yaml``. For most users, it is sufficient to do::
|
``compilers.yaml``. For most users, it is sufficient to do::
|
||||||
|
|
||||||
spack compiler add /opt/intel/oneapi/compiler/latest/bin
|
spack compiler add /opt/intel/oneapi/compiler/latest/bin
|
||||||
|
|
||||||
@@ -119,7 +157,7 @@ Adapt the paths above if you did not install the tools in the default
|
|||||||
location. After adding the compilers, using them is the same
|
location. After adding the compilers, using them is the same
|
||||||
as if you had installed the ``intel-oneapi-compilers`` package.
|
as if you had installed the ``intel-oneapi-compilers`` package.
|
||||||
Another option is to manually add the configuration to
|
Another option is to manually add the configuration to
|
||||||
``packages.yaml`` as described in :ref:`Compiler configuration
|
``compilers.yaml`` as described in :ref:`Compiler configuration
|
||||||
<compiler-config>`.
|
<compiler-config>`.
|
||||||
|
|
||||||
Before 2024, the directory structure was different::
|
Before 2024, the directory structure was different::
|
||||||
@@ -162,5 +200,15 @@ You can also use Spack-installed libraries. For example::
|
|||||||
Will update your environment CPATH, LIBRARY_PATH, and other
|
Will update your environment CPATH, LIBRARY_PATH, and other
|
||||||
environment variables for building an application with oneMKL.
|
environment variables for building an application with oneMKL.
|
||||||
|
|
||||||
|
More information
|
||||||
|
================
|
||||||
|
|
||||||
|
This section describes basic use of oneAPI, especially if it has
|
||||||
|
changed compared to Parallel Studio. See :ref:`intelpackage` for more
|
||||||
|
information on :ref:`intel-virtual-packages`,
|
||||||
|
:ref:`intel-unrelated-packages`,
|
||||||
|
:ref:`intel-integrating-external-libraries`, and
|
||||||
|
:ref:`using-mkl-tips`.
|
||||||
|
|
||||||
|
|
||||||
.. _`Intel installers`: https://software.intel.com/content/www/us/en/develop/documentation/installation-guide-for-intel-oneapi-toolkits-linux/top.html
|
.. _`Intel installers`: https://software.intel.com/content/www/us/en/develop/documentation/installation-guide-for-intel-oneapi-toolkits-linux/top.html
|
||||||
|
1077
lib/spack/docs/build_systems/intelpackage.rst
Normal file
1077
lib/spack/docs/build_systems/intelpackage.rst
Normal file
File diff suppressed because it is too large
Load Diff
@@ -91,7 +91,7 @@ there are any other variables you need to set, you can do this in the
|
|||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
def setup_build_environment(self, env: EnvironmentModifications) -> None:
|
def setup_build_environment(self, env):
|
||||||
env.set("PREFIX", prefix)
|
env.set("PREFIX", prefix)
|
||||||
env.set("BLASLIB", spec["blas"].libs.ld_flags)
|
env.set("BLASLIB", spec["blas"].libs.ld_flags)
|
||||||
|
|
||||||
|
@@ -12,7 +12,8 @@ The ``ROCmPackage`` is not a build system but a helper package. Like ``CudaPacka
|
|||||||
it provides standard variants, dependencies, and conflicts to facilitate building
|
it provides standard variants, dependencies, and conflicts to facilitate building
|
||||||
packages using GPUs though for AMD in this case.
|
packages using GPUs though for AMD in this case.
|
||||||
|
|
||||||
You can find the source for this package (and suggestions for setting up your ``packages.yaml`` file) at
|
You can find the source for this package (and suggestions for setting up your
|
||||||
|
``compilers.yaml`` and ``packages.yaml`` files) at
|
||||||
`<https://github.com/spack/spack/blob/develop/lib/spack/spack/build_systems/rocm.py>`__.
|
`<https://github.com/spack/spack/blob/develop/lib/spack/spack/build_systems/rocm.py>`__.
|
||||||
|
|
||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
|
@@ -225,10 +225,8 @@ def setup(sphinx):
|
|||||||
("py:class", "llnl.util.lang.T"),
|
("py:class", "llnl.util.lang.T"),
|
||||||
("py:class", "llnl.util.lang.KT"),
|
("py:class", "llnl.util.lang.KT"),
|
||||||
("py:class", "llnl.util.lang.VT"),
|
("py:class", "llnl.util.lang.VT"),
|
||||||
("py:class", "llnl.util.lang.ClassPropertyType"),
|
|
||||||
("py:obj", "llnl.util.lang.KT"),
|
("py:obj", "llnl.util.lang.KT"),
|
||||||
("py:obj", "llnl.util.lang.VT"),
|
("py:obj", "llnl.util.lang.VT"),
|
||||||
("py:obj", "llnl.util.lang.ClassPropertyType"),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
# 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.
|
||||||
|
@@ -125,8 +125,6 @@ are stored in ``$spack/var/spack/cache``. These are stored indefinitely
|
|||||||
by default. Can be purged with :ref:`spack clean --downloads
|
by default. Can be purged with :ref:`spack clean --downloads
|
||||||
<cmd-spack-clean>`.
|
<cmd-spack-clean>`.
|
||||||
|
|
||||||
.. _Misc Cache:
|
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
``misc_cache``
|
``misc_cache``
|
||||||
--------------------
|
--------------------
|
||||||
@@ -148,16 +146,15 @@ this can expose you to attacks. Use at your own risk.
|
|||||||
``ssl_certs``
|
``ssl_certs``
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
Path to custom certificats for SSL verification. The value can be a
|
Path to custom certificats for SSL verification. The value can be a
|
||||||
filesytem path, or an environment variable that expands to an absolute file path.
|
filesytem path, or an environment variable that expands to an absolute file path.
|
||||||
The default value is set to the environment variable ``SSL_CERT_FILE``
|
The default value is set to the environment variable ``SSL_CERT_FILE``
|
||||||
to use the same syntax used by many other applications that automatically
|
to use the same syntax used by many other applications that automatically
|
||||||
detect custom certificates.
|
detect custom certificates.
|
||||||
When ``url_fetch_method:curl`` the ``config:ssl_certs`` should resolve to
|
When ``url_fetch_method:curl`` the ``config:ssl_certs`` should resolve to
|
||||||
a single file. Spack will then set the environment variable ``CURL_CA_BUNDLE``
|
a single file. Spack will then set the environment variable ``CURL_CA_BUNDLE``
|
||||||
in the subprocess calling ``curl``. If additional ``curl`` arguments are required,
|
in the subprocess calling ``curl``.
|
||||||
they can be set in the config, e.g. ``url_fetch_method:'curl -k -q'``.
|
If ``url_fetch_method:urllib`` then files and directories are supported i.e.
|
||||||
If ``url_fetch_method:urllib`` then files and directories are supported i.e.
|
|
||||||
``config:ssl_certs:$SSL_CERT_FILE`` or ``config:ssl_certs:$SSL_CERT_DIR``
|
``config:ssl_certs:$SSL_CERT_FILE`` or ``config:ssl_certs:$SSL_CERT_DIR``
|
||||||
will work.
|
will work.
|
||||||
In all cases the expanded path must be absolute for Spack to use the certificates.
|
In all cases the expanded path must be absolute for Spack to use the certificates.
|
||||||
@@ -337,52 +334,3 @@ create a new alias called ``inst`` that will always call ``install -v``:
|
|||||||
|
|
||||||
aliases:
|
aliases:
|
||||||
inst: install -v
|
inst: install -v
|
||||||
|
|
||||||
-------------------------------
|
|
||||||
``concretization_cache:enable``
|
|
||||||
-------------------------------
|
|
||||||
|
|
||||||
When set to ``true``, Spack will utilize a cache of solver outputs from
|
|
||||||
successful concretization runs. When enabled, Spack will check the concretization
|
|
||||||
cache prior to running the solver. If a previous request to solve a given
|
|
||||||
problem is present in the cache, Spack will load the concrete specs and other
|
|
||||||
solver data from the cache rather than running the solver. Specs not previously
|
|
||||||
concretized will be added to the cache on a successful solve. The cache additionally
|
|
||||||
holds solver statistics, so commands like ``spack solve`` will still return information
|
|
||||||
about the run that produced a given solver result.
|
|
||||||
|
|
||||||
This cache is a subcache of the :ref:`Misc Cache` and as such will be cleaned when the Misc
|
|
||||||
Cache is cleaned.
|
|
||||||
|
|
||||||
When ``false`` or ommitted, all concretization requests will be performed from scatch
|
|
||||||
|
|
||||||
----------------------------
|
|
||||||
``concretization_cache:url``
|
|
||||||
----------------------------
|
|
||||||
|
|
||||||
Path to the location where Spack will root the concretization cache. Currently this only supports
|
|
||||||
paths on the local filesystem.
|
|
||||||
|
|
||||||
Default location is under the :ref:`Misc Cache` at: ``$misc_cache/concretization``
|
|
||||||
|
|
||||||
------------------------------------
|
|
||||||
``concretization_cache:entry_limit``
|
|
||||||
------------------------------------
|
|
||||||
|
|
||||||
Sets a limit on the number of concretization results that Spack will cache. The limit is evaluated
|
|
||||||
after each concretization run; if Spack has stored more results than the limit allows, the
|
|
||||||
oldest concretization results are pruned until 10% of the limit has been removed.
|
|
||||||
|
|
||||||
Setting this value to 0 disables the automatic pruning. It is expected users will be
|
|
||||||
responsible for maintaining this cache.
|
|
||||||
|
|
||||||
-----------------------------------
|
|
||||||
``concretization_cache:size_limit``
|
|
||||||
-----------------------------------
|
|
||||||
|
|
||||||
Sets a limit on the size of the concretization cache in bytes. The limit is evaluated
|
|
||||||
after each concretization run; if Spack has stored more results than the limit allows, the
|
|
||||||
oldest concretization results are pruned until 10% of the limit has been removed.
|
|
||||||
|
|
||||||
Setting this value to 0 disables the automatic pruning. It is expected users will be
|
|
||||||
responsible for maintaining this cache.
|
|
||||||
|
@@ -11,7 +11,7 @@ Configuration Files
|
|||||||
Spack has many configuration files. Here is a quick list of them, in
|
Spack has many configuration files. Here is a quick list of them, in
|
||||||
case you want to skip directly to specific docs:
|
case you want to skip directly to specific docs:
|
||||||
|
|
||||||
* :ref:`packages.yaml <compiler-config>`
|
* :ref:`compilers.yaml <compiler-config>`
|
||||||
* :ref:`concretizer.yaml <concretizer-options>`
|
* :ref:`concretizer.yaml <concretizer-options>`
|
||||||
* :ref:`config.yaml <config-yaml>`
|
* :ref:`config.yaml <config-yaml>`
|
||||||
* :ref:`include.yaml <include-yaml>`
|
* :ref:`include.yaml <include-yaml>`
|
||||||
@@ -46,12 +46,6 @@ Each Spack configuration file is nested under a top-level section
|
|||||||
corresponding to its name. So, ``config.yaml`` starts with ``config:``,
|
corresponding to its name. So, ``config.yaml`` starts with ``config:``,
|
||||||
``mirrors.yaml`` starts with ``mirrors:``, etc.
|
``mirrors.yaml`` starts with ``mirrors:``, etc.
|
||||||
|
|
||||||
.. tip::
|
|
||||||
|
|
||||||
Validation and autocompletion of Spack config files can be enabled in
|
|
||||||
your editor with the YAML language server. See `spack/schemas
|
|
||||||
<https://github.com/spack/schemas>`_ for more information.
|
|
||||||
|
|
||||||
.. _configuration-scopes:
|
.. _configuration-scopes:
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
@@ -101,7 +95,7 @@ are six configuration scopes. From lowest to highest:
|
|||||||
precedence over all other scopes.
|
precedence over all other scopes.
|
||||||
|
|
||||||
Each configuration directory may contain several configuration files,
|
Each configuration directory may contain several configuration files,
|
||||||
such as ``config.yaml``, ``packages.yaml``, or ``mirrors.yaml``. When
|
such as ``config.yaml``, ``compilers.yaml``, or ``mirrors.yaml``. When
|
||||||
configurations conflict, settings from higher-precedence scopes override
|
configurations conflict, settings from higher-precedence scopes override
|
||||||
lower-precedence settings.
|
lower-precedence settings.
|
||||||
|
|
||||||
|
@@ -1,34 +0,0 @@
|
|||||||
.. Copyright Spack Project Developers. See COPYRIGHT file for details.
|
|
||||||
|
|
||||||
SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
||||||
|
|
||||||
.. _env-vars-yaml:
|
|
||||||
|
|
||||||
=============================================
|
|
||||||
Environment Variable Settings (env_vars.yaml)
|
|
||||||
=============================================
|
|
||||||
|
|
||||||
Spack allows you to include shell environment variable modifications
|
|
||||||
for a spack environment by including an ``env_vars.yaml``. Environment
|
|
||||||
varaibles can be modified by setting, unsetting, appending, and prepending
|
|
||||||
variables in the shell environment.
|
|
||||||
The changes to the shell environment will take effect when the spack
|
|
||||||
environment is activated.
|
|
||||||
|
|
||||||
for example,
|
|
||||||
|
|
||||||
.. code-block:: yaml
|
|
||||||
|
|
||||||
env_vars:
|
|
||||||
set:
|
|
||||||
ENVAR_TO_SET_IN_ENV_LOAD: "FOO"
|
|
||||||
unset:
|
|
||||||
ENVAR_TO_UNSET_IN_ENV_LOAD:
|
|
||||||
prepend_path:
|
|
||||||
PATH_LIST: "path/to/prepend"
|
|
||||||
append_path:
|
|
||||||
PATH_LIST: "path/to/append"
|
|
||||||
remove_path:
|
|
||||||
PATH_LIST: "path/to/remove"
|
|
||||||
|
|
||||||
|
|
@@ -457,13 +457,6 @@ 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.
|
||||||
|
|
||||||
When working deep in the graph it is often desirable to have multiple specs marked
|
|
||||||
as ``develop`` so you don't have to restage and/or do full rebuilds each time you
|
|
||||||
call ``spack install``. The ``--recursive`` flag can be used in these scenarios
|
|
||||||
to ensure that all the dependents of the initial spec you provide are also marked
|
|
||||||
as develop specs. The ``--recursive`` flag requires a pre-concretized environment
|
|
||||||
so the graph can be traversed from the supplied spec all the way to the root specs.
|
|
||||||
|
|
||||||
For packages with ``git`` attributes, git branches, tags, and commits can
|
For packages with ``git`` attributes, git branches, tags, and commits can
|
||||||
also be used as valid concrete versions (see :ref:`version-specifier`).
|
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
|
||||||
@@ -667,11 +660,11 @@ a ``packages.yaml`` file) could contain:
|
|||||||
# ...
|
# ...
|
||||||
packages:
|
packages:
|
||||||
all:
|
all:
|
||||||
providers:
|
compiler: [intel]
|
||||||
mpi: [openmpi]
|
|
||||||
# ...
|
# ...
|
||||||
|
|
||||||
This configuration sets the default mpi provider to be openmpi.
|
This configuration sets the default compiler for all packages to
|
||||||
|
``intel``.
|
||||||
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
Included configurations
|
Included configurations
|
||||||
@@ -686,8 +679,7 @@ the environment.
|
|||||||
spack:
|
spack:
|
||||||
include:
|
include:
|
||||||
- environment/relative/path/to/config.yaml
|
- environment/relative/path/to/config.yaml
|
||||||
- path: https://github.com/path/to/raw/config/compilers.yaml
|
- https://github.com/path/to/raw/config/compilers.yaml
|
||||||
sha256: 26e871804a92cd07bb3d611b31b4156ae93d35b6a6d6e0ef3a67871fcb1d258b
|
|
||||||
- /absolute/path/to/packages.yaml
|
- /absolute/path/to/packages.yaml
|
||||||
- path: /path/to/$os/$target/environment
|
- path: /path/to/$os/$target/environment
|
||||||
optional: true
|
optional: true
|
||||||
@@ -701,11 +693,11 @@ with the ``optional`` clause and conditional with the ``when`` clause. (See
|
|||||||
|
|
||||||
Files are listed using paths to individual files or directories containing them.
|
Files are listed using paths to individual files or directories containing them.
|
||||||
Path entries may be absolute or relative to the environment or specified as
|
Path entries may be absolute or relative to the environment or specified as
|
||||||
URLs. URLs to individual files must link to the **raw** form of the file's
|
URLs. URLs to individual files need link to the **raw** form of the file's
|
||||||
contents (e.g., `GitHub
|
contents (e.g., `GitHub
|
||||||
<https://docs.github.com/en/repositories/working-with-files/using-files/viewing-and-understanding-files#viewing-or-copying-the-raw-file-content>`_
|
<https://docs.github.com/en/repositories/working-with-files/using-files/viewing-and-understanding-files#viewing-or-copying-the-raw-file-content>`_
|
||||||
or `GitLab
|
or `GitLab
|
||||||
<https://docs.gitlab.com/ee/api/repository_files.html#get-raw-file-from-repository>`_) **and** include a valid sha256 for the file.
|
<https://docs.gitlab.com/ee/api/repository_files.html#get-raw-file-from-repository>`_).
|
||||||
Only the ``file``, ``ftp``, ``http`` and ``https`` protocols (or schemes) are
|
Only the ``file``, ``ftp``, ``http`` and ``https`` protocols (or schemes) are
|
||||||
supported. Spack-specific, environment and user path variables can be used.
|
supported. Spack-specific, environment and user path variables can be used.
|
||||||
(See :ref:`config-file-variables` for more information.)
|
(See :ref:`config-file-variables` for more information.)
|
||||||
@@ -1000,28 +992,6 @@ For example, the following environment has three root packages:
|
|||||||
This allows for a much-needed reduction in redundancy between packages
|
This allows for a much-needed reduction in redundancy between packages
|
||||||
and constraints.
|
and constraints.
|
||||||
|
|
||||||
-------------------------------
|
|
||||||
Modifying Environment Variables
|
|
||||||
-------------------------------
|
|
||||||
|
|
||||||
Spack Environments can modify the active shell's environment variables when activated. The environment can be
|
|
||||||
configured to set, unset, prepend, or append using ``env_vars`` configuration in the ``spack.yaml`` or through config scopes
|
|
||||||
file:
|
|
||||||
|
|
||||||
.. code-block:: yaml
|
|
||||||
|
|
||||||
spack:
|
|
||||||
env_vars:
|
|
||||||
set:
|
|
||||||
ENVAR_TO_SET_IN_ENV_LOAD: "FOO"
|
|
||||||
unset:
|
|
||||||
ENVAR_TO_UNSET_IN_ENV_LOAD:
|
|
||||||
prepend_path:
|
|
||||||
PATH_LIST: "path/to/prepend"
|
|
||||||
append_path:
|
|
||||||
PATH_LIST: "path/to/append"
|
|
||||||
remove_path:
|
|
||||||
PATH_LIST: "path/to/remove"
|
|
||||||
|
|
||||||
-----------------
|
-----------------
|
||||||
Environment Views
|
Environment Views
|
||||||
|
161
lib/spack/docs/example_files/spack.yaml
Normal file
161
lib/spack/docs/example_files/spack.yaml
Normal file
@@ -0,0 +1,161 @@
|
|||||||
|
spack:
|
||||||
|
definitions:
|
||||||
|
- compiler-pkgs:
|
||||||
|
- 'llvm+clang@6.0.1 os=centos7'
|
||||||
|
- 'gcc@6.5.0 os=centos7'
|
||||||
|
- 'llvm+clang@6.0.1 os=ubuntu18.04'
|
||||||
|
- 'gcc@6.5.0 os=ubuntu18.04'
|
||||||
|
- pkgs:
|
||||||
|
- readline@7.0
|
||||||
|
# - xsdk@0.4.0
|
||||||
|
- compilers:
|
||||||
|
- '%gcc@5.5.0'
|
||||||
|
- '%gcc@6.5.0'
|
||||||
|
- '%gcc@7.3.0'
|
||||||
|
- '%clang@6.0.0'
|
||||||
|
- '%clang@6.0.1'
|
||||||
|
- oses:
|
||||||
|
- os=ubuntu18.04
|
||||||
|
- os=centos7
|
||||||
|
|
||||||
|
specs:
|
||||||
|
- matrix:
|
||||||
|
- [$pkgs]
|
||||||
|
- [$compilers]
|
||||||
|
- [$oses]
|
||||||
|
exclude:
|
||||||
|
- '%gcc@7.3.0 os=centos7'
|
||||||
|
- '%gcc@5.5.0 os=ubuntu18.04'
|
||||||
|
|
||||||
|
mirrors:
|
||||||
|
cloud_gitlab: https://mirror.spack.io
|
||||||
|
|
||||||
|
compilers:
|
||||||
|
# The .gitlab-ci.yml for this project picks a Docker container which does
|
||||||
|
# not have any compilers pre-built and ready to use, so we need to fake the
|
||||||
|
# existence of those here.
|
||||||
|
- compiler:
|
||||||
|
operating_system: centos7
|
||||||
|
modules: []
|
||||||
|
paths:
|
||||||
|
cc: /not/used
|
||||||
|
cxx: /not/used
|
||||||
|
f77: /not/used
|
||||||
|
fc: /not/used
|
||||||
|
spec: gcc@5.5.0
|
||||||
|
target: x86_64
|
||||||
|
- compiler:
|
||||||
|
operating_system: centos7
|
||||||
|
modules: []
|
||||||
|
paths:
|
||||||
|
cc: /not/used
|
||||||
|
cxx: /not/used
|
||||||
|
f77: /not/used
|
||||||
|
fc: /not/used
|
||||||
|
spec: gcc@6.5.0
|
||||||
|
target: x86_64
|
||||||
|
- compiler:
|
||||||
|
operating_system: centos7
|
||||||
|
modules: []
|
||||||
|
paths:
|
||||||
|
cc: /not/used
|
||||||
|
cxx: /not/used
|
||||||
|
f77: /not/used
|
||||||
|
fc: /not/used
|
||||||
|
spec: clang@6.0.0
|
||||||
|
target: x86_64
|
||||||
|
- compiler:
|
||||||
|
operating_system: centos7
|
||||||
|
modules: []
|
||||||
|
paths:
|
||||||
|
cc: /not/used
|
||||||
|
cxx: /not/used
|
||||||
|
f77: /not/used
|
||||||
|
fc: /not/used
|
||||||
|
spec: clang@6.0.1
|
||||||
|
target: x86_64
|
||||||
|
|
||||||
|
- compiler:
|
||||||
|
operating_system: ubuntu18.04
|
||||||
|
modules: []
|
||||||
|
paths:
|
||||||
|
cc: /not/used
|
||||||
|
cxx: /not/used
|
||||||
|
f77: /not/used
|
||||||
|
fc: /not/used
|
||||||
|
spec: clang@6.0.0
|
||||||
|
target: x86_64
|
||||||
|
- compiler:
|
||||||
|
operating_system: ubuntu18.04
|
||||||
|
modules: []
|
||||||
|
paths:
|
||||||
|
cc: /not/used
|
||||||
|
cxx: /not/used
|
||||||
|
f77: /not/used
|
||||||
|
fc: /not/used
|
||||||
|
spec: clang@6.0.1
|
||||||
|
target: x86_64
|
||||||
|
- compiler:
|
||||||
|
operating_system: ubuntu18.04
|
||||||
|
modules: []
|
||||||
|
paths:
|
||||||
|
cc: /not/used
|
||||||
|
cxx: /not/used
|
||||||
|
f77: /not/used
|
||||||
|
fc: /not/used
|
||||||
|
spec: gcc@6.5.0
|
||||||
|
target: x86_64
|
||||||
|
- compiler:
|
||||||
|
operating_system: ubuntu18.04
|
||||||
|
modules: []
|
||||||
|
paths:
|
||||||
|
cc: /not/used
|
||||||
|
cxx: /not/used
|
||||||
|
f77: /not/used
|
||||||
|
fc: /not/used
|
||||||
|
spec: gcc@7.3.0
|
||||||
|
target: x86_64
|
||||||
|
|
||||||
|
gitlab-ci:
|
||||||
|
bootstrap:
|
||||||
|
- name: compiler-pkgs
|
||||||
|
compiler-agnostic: true
|
||||||
|
mappings:
|
||||||
|
- # spack-cloud-ubuntu
|
||||||
|
match:
|
||||||
|
# these are specs, if *any* match the spec under consideration, this
|
||||||
|
# 'mapping' will be used to generate the CI job
|
||||||
|
- os=ubuntu18.04
|
||||||
|
runner-attributes:
|
||||||
|
# 'tags' and 'image' go directly onto the job, 'variables' will
|
||||||
|
# be added to what we already necessarily create for the job as
|
||||||
|
# a part of the CI workflow
|
||||||
|
tags:
|
||||||
|
- spack-k8s
|
||||||
|
image:
|
||||||
|
name: scottwittenburg/spack_builder_ubuntu_18.04
|
||||||
|
entrypoint: [""]
|
||||||
|
- # spack-cloud-centos
|
||||||
|
match:
|
||||||
|
# these are specs, if *any* match the spec under consideration, this
|
||||||
|
# 'mapping' will be used to generate the CI job
|
||||||
|
- 'os=centos7'
|
||||||
|
runner-attributes:
|
||||||
|
tags:
|
||||||
|
- spack-k8s
|
||||||
|
image:
|
||||||
|
name: scottwittenburg/spack_builder_centos_7
|
||||||
|
entrypoint: [""]
|
||||||
|
|
||||||
|
cdash:
|
||||||
|
build-group: Release Testing
|
||||||
|
url: http://cdash
|
||||||
|
project: Spack Testing
|
||||||
|
site: Spack Docker-Compose Workflow
|
||||||
|
|
||||||
|
repos: []
|
||||||
|
upstreams: {}
|
||||||
|
modules:
|
||||||
|
enable: []
|
||||||
|
packages: {}
|
||||||
|
config: {}
|
@@ -30,7 +30,7 @@ than always choosing the latest versions or default variants.
|
|||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
As a rule of thumb: requirements + constraints > strong preferences > reuse > preferences > defaults.
|
As a rule of thumb: requirements + constraints > reuse > preferences > defaults.
|
||||||
|
|
||||||
The following set of criteria (from lowest to highest precedence) explain
|
The following set of criteria (from lowest to highest precedence) explain
|
||||||
common cases where concretization output may seem surprising at first.
|
common cases where concretization output may seem surprising at first.
|
||||||
@@ -56,19 +56,7 @@ common cases where concretization output may seem surprising at first.
|
|||||||
concretizer:
|
concretizer:
|
||||||
reuse: dependencies # other options are 'true' and 'false'
|
reuse: dependencies # other options are 'true' and 'false'
|
||||||
|
|
||||||
3. :ref:`Strong preferences <package-strong-preferences>` configured in ``packages.yaml``
|
3. :ref:`Package requirements <package-requirements>` configured in ``packages.yaml``,
|
||||||
are higher priority than reuse, and can be used to strongly prefer a specific version
|
|
||||||
or variant, without erroring out if it's not possible. Strong preferences are specified
|
|
||||||
as follows:
|
|
||||||
|
|
||||||
.. code-block:: yaml
|
|
||||||
|
|
||||||
packages:
|
|
||||||
foo:
|
|
||||||
prefer:
|
|
||||||
- "@1.1: ~mpi"
|
|
||||||
|
|
||||||
4. :ref:`Package requirements <package-requirements>` configured in ``packages.yaml``,
|
|
||||||
and constraints from the command line as well as ``package.py`` files override all
|
and constraints from the command line as well as ``package.py`` files override all
|
||||||
of the above. Requirements are specified as follows:
|
of the above. Requirements are specified as follows:
|
||||||
|
|
||||||
@@ -78,8 +66,6 @@ common cases where concretization output may seem surprising at first.
|
|||||||
foo:
|
foo:
|
||||||
require:
|
require:
|
||||||
- "@1.2: +mpi"
|
- "@1.2: +mpi"
|
||||||
conflicts:
|
|
||||||
- "@1.4"
|
|
||||||
|
|
||||||
Requirements and constraints restrict the set of possible solutions, while reuse
|
Requirements and constraints restrict the set of possible solutions, while reuse
|
||||||
behavior and preferences influence what an optimal solution looks like.
|
behavior and preferences influence what an optimal solution looks like.
|
||||||
|
@@ -254,11 +254,12 @@ directory.
|
|||||||
Compiler configuration
|
Compiler configuration
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
Spack has the ability to build packages with multiple compilers and compiler versions.
|
Spack has the ability to build packages with multiple compilers and
|
||||||
Compilers can be made available to Spack by specifying them manually in ``packages.yaml``,
|
compiler versions. Compilers can be made available to Spack by
|
||||||
or automatically by running ``spack compiler find``.
|
specifying them manually in ``compilers.yaml`` or ``packages.yaml``,
|
||||||
For convenience, Spack will automatically detect compilers the first time it needs them,
|
or automatically by running ``spack compiler find``, but for
|
||||||
if none is available.
|
convenience Spack will automatically detect compilers the first time
|
||||||
|
it needs them.
|
||||||
|
|
||||||
.. _cmd-spack-compilers:
|
.. _cmd-spack-compilers:
|
||||||
|
|
||||||
@@ -273,11 +274,16 @@ compilers`` or ``spack compiler list``:
|
|||||||
|
|
||||||
$ spack compilers
|
$ spack compilers
|
||||||
==> Available compilers
|
==> Available compilers
|
||||||
-- gcc ubuntu20.04-x86_64 ---------------------------------------
|
-- gcc ---------------------------------------------------------
|
||||||
gcc@9.4.0 gcc@8.4.0 gcc@10.5.0
|
gcc@4.9.0 gcc@4.8.0 gcc@4.7.0 gcc@4.6.2 gcc@4.4.7
|
||||||
|
gcc@4.8.2 gcc@4.7.1 gcc@4.6.3 gcc@4.6.1 gcc@4.1.2
|
||||||
-- llvm ubuntu20.04-x86_64 --------------------------------------
|
-- intel -------------------------------------------------------
|
||||||
llvm@12.0.0 llvm@11.0.0 llvm@10.0.0
|
intel@15.0.0 intel@14.0.0 intel@13.0.0 intel@12.1.0 intel@10.0
|
||||||
|
intel@14.0.3 intel@13.1.1 intel@12.1.5 intel@12.0.4 intel@9.1
|
||||||
|
intel@14.0.2 intel@13.1.0 intel@12.1.3 intel@11.1
|
||||||
|
intel@14.0.1 intel@13.0.1 intel@12.1.2 intel@10.1
|
||||||
|
-- clang -------------------------------------------------------
|
||||||
|
clang@3.4 clang@3.3 clang@3.2 clang@3.1
|
||||||
|
|
||||||
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`.
|
||||||
@@ -296,22 +302,16 @@ An alias for ``spack compiler find``.
|
|||||||
``spack compiler find``
|
``spack compiler find``
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
If you do not see a compiler in the list shown by:
|
Lists the compilers currently available to Spack. If you do not see
|
||||||
|
a compiler in this list, but you want to use it with Spack, you can
|
||||||
|
simply run ``spack compiler find`` with the path to where the
|
||||||
|
compiler is installed. For example:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ spack compiler list
|
$ spack compiler find /usr/local/tools/ic-13.0.079
|
||||||
|
==> Added 1 new compiler to ~/.spack/linux/compilers.yaml
|
||||||
but you want to use it with Spack, you can simply run ``spack compiler find`` with the
|
intel@13.0.079
|
||||||
path to where the compiler is installed. For example:
|
|
||||||
|
|
||||||
.. code-block:: console
|
|
||||||
|
|
||||||
$ spack compiler find /opt/intel/oneapi/compiler/2025.1/bin/
|
|
||||||
==> Added 1 new compiler to /home/user/.spack/packages.yaml
|
|
||||||
intel-oneapi-compilers@2025.1.0
|
|
||||||
==> Compilers are defined in the following files:
|
|
||||||
/home/user/.spack/packages.yaml
|
|
||||||
|
|
||||||
Or you can run ``spack compiler find`` with no arguments to force
|
Or you can run ``spack compiler find`` with no arguments to force
|
||||||
auto-detection. This is useful if you do not know where compilers are
|
auto-detection. This is useful if you do not know where compilers are
|
||||||
@@ -322,7 +322,7 @@ installed, but you know that new compilers have been added to your
|
|||||||
|
|
||||||
$ module load gcc/4.9.0
|
$ module load gcc/4.9.0
|
||||||
$ spack compiler find
|
$ spack compiler find
|
||||||
==> Added 1 new compiler to /home/user/.spack/packages.yaml
|
==> Added 1 new compiler to ~/.spack/linux/compilers.yaml
|
||||||
gcc@4.9.0
|
gcc@4.9.0
|
||||||
|
|
||||||
This loads the environment module for gcc-4.9.0 to add it to
|
This loads the environment module for gcc-4.9.0 to add it to
|
||||||
@@ -331,7 +331,7 @@ This loads the environment module for gcc-4.9.0 to add it to
|
|||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
By default, spack does not fill in the ``modules:`` field in the
|
By default, spack does not fill in the ``modules:`` field in the
|
||||||
``packages.yaml`` file. If you are using a compiler from a
|
``compilers.yaml`` file. If you are using a compiler from a
|
||||||
module, then you should add this field manually.
|
module, then you should add this field manually.
|
||||||
See the section on :ref:`compilers-requiring-modules`.
|
See the section on :ref:`compilers-requiring-modules`.
|
||||||
|
|
||||||
@@ -341,82 +341,91 @@ This loads the environment module for gcc-4.9.0 to add it to
|
|||||||
``spack compiler info``
|
``spack compiler info``
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
If you want to see additional information on some specific compilers, you can run ``spack compiler info`` on it:
|
If you want to see specifics on a particular compiler, you can run
|
||||||
|
``spack compiler info`` on it:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ spack compiler info gcc
|
$ spack compiler info intel@15
|
||||||
gcc@=8.4.0 languages='c,c++,fortran' arch=linux-ubuntu20.04-x86_64:
|
intel@15.0.0:
|
||||||
prefix: /usr
|
paths:
|
||||||
compilers:
|
cc = /usr/local/bin/icc-15.0.090
|
||||||
c: /usr/bin/gcc-8
|
cxx = /usr/local/bin/icpc-15.0.090
|
||||||
cxx: /usr/bin/g++-8
|
f77 = /usr/local/bin/ifort-15.0.090
|
||||||
fortran: /usr/bin/gfortran-8
|
fc = /usr/local/bin/ifort-15.0.090
|
||||||
|
modules = []
|
||||||
|
operating_system = centos6
|
||||||
|
...
|
||||||
|
|
||||||
gcc@=9.4.0 languages='c,c++,fortran' arch=linux-ubuntu20.04-x86_64:
|
This shows which C, C++, and Fortran compilers were detected by Spack.
|
||||||
prefix: /usr
|
Notice also that we didn't have to be too specific about the
|
||||||
compilers:
|
version. We just said ``intel@15``, and information about the only
|
||||||
c: /usr/bin/gcc
|
matching Intel compiler was displayed.
|
||||||
cxx: /usr/bin/g++
|
|
||||||
fortran: /usr/bin/gfortran
|
|
||||||
|
|
||||||
gcc@=10.5.0 languages='c,c++,fortran' arch=linux-ubuntu20.04-x86_64:
|
|
||||||
prefix: /usr
|
|
||||||
compilers:
|
|
||||||
c: /usr/bin/gcc-10
|
|
||||||
cxx: /usr/bin/g++-10
|
|
||||||
fortran: /usr/bin/gfortran-10
|
|
||||||
|
|
||||||
This shows the details of the compilers that were detected by Spack.
|
|
||||||
Notice also that we didn't have to be too specific about the version. We just said ``gcc``, and we got information
|
|
||||||
about all the matching compilers.
|
|
||||||
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
Manual compiler configuration
|
Manual compiler configuration
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
If auto-detection fails, you can manually configure a compiler by editing your ``~/.spack/packages.yaml`` file.
|
If auto-detection fails, you can manually configure a compiler by
|
||||||
You can do this by running ``spack config edit packages``, which will open the file in
|
editing your ``~/.spack/<platform>/compilers.yaml`` file. You can do this by running
|
||||||
|
``spack config edit compilers``, which will open the file in
|
||||||
:ref:`your favorite editor <controlling-the-editor>`.
|
:ref:`your favorite editor <controlling-the-editor>`.
|
||||||
|
|
||||||
Each compiler has an "external" entry in the file with some ``extra_attributes``:
|
Each compiler configuration in the file looks like this:
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
packages:
|
compilers:
|
||||||
gcc:
|
- compiler:
|
||||||
externals:
|
modules: []
|
||||||
- spec: gcc@10.5.0 languages='c,c++,fortran'
|
operating_system: centos6
|
||||||
prefix: /usr
|
paths:
|
||||||
extra_attributes:
|
cc: /usr/local/bin/icc-15.0.024-beta
|
||||||
compilers:
|
cxx: /usr/local/bin/icpc-15.0.024-beta
|
||||||
c: /usr/bin/gcc-10
|
f77: /usr/local/bin/ifort-15.0.024-beta
|
||||||
cxx: /usr/bin/g++-10
|
fc: /usr/local/bin/ifort-15.0.024-beta
|
||||||
fortran: /usr/bin/gfortran-10
|
spec: intel@15.0.0
|
||||||
|
|
||||||
The compiler executables are listed under ``extra_attributes:compilers``, and are keyed by language.
|
For compilers that do not support Fortran (like ``clang``), put
|
||||||
Once you save the file, the configured compilers will show up in the list displayed by ``spack compilers``.
|
``None`` for ``f77`` and ``fc``:
|
||||||
|
|
||||||
You can also add compiler flags to manually configured compilers. These flags should be specified in the
|
.. code-block:: yaml
|
||||||
``flags`` section of the compiler specification. The valid flags are ``cflags``, ``cxxflags``, ``fflags``,
|
|
||||||
|
compilers:
|
||||||
|
- compiler:
|
||||||
|
modules: []
|
||||||
|
operating_system: centos6
|
||||||
|
paths:
|
||||||
|
cc: /usr/bin/clang
|
||||||
|
cxx: /usr/bin/clang++
|
||||||
|
f77: None
|
||||||
|
fc: None
|
||||||
|
spec: clang@3.3svn
|
||||||
|
|
||||||
|
Once you save the file, the configured compilers will show up in the
|
||||||
|
list displayed by ``spack compilers``.
|
||||||
|
|
||||||
|
You can also add compiler flags to manually configured compilers. These
|
||||||
|
flags should be specified in the ``flags`` section of the compiler
|
||||||
|
specification. The valid flags are ``cflags``, ``cxxflags``, ``fflags``,
|
||||||
``cppflags``, ``ldflags``, and ``ldlibs``. For example:
|
``cppflags``, ``ldflags``, and ``ldlibs``. For example:
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
packages:
|
compilers:
|
||||||
gcc:
|
- compiler:
|
||||||
externals:
|
modules: []
|
||||||
- spec: gcc@10.5.0 languages='c,c++,fortran'
|
operating_system: centos6
|
||||||
prefix: /usr
|
paths:
|
||||||
extra_attributes:
|
cc: /usr/bin/gcc
|
||||||
compilers:
|
cxx: /usr/bin/g++
|
||||||
c: /usr/bin/gcc-10
|
f77: /usr/bin/gfortran
|
||||||
cxx: /usr/bin/g++-10
|
fc: /usr/bin/gfortran
|
||||||
fortran: /usr/bin/gfortran-10
|
flags:
|
||||||
flags:
|
cflags: -O3 -fPIC
|
||||||
cflags: -O3 -fPIC
|
cxxflags: -O3 -fPIC
|
||||||
cxxflags: -O3 -fPIC
|
cppflags: -O3 -fPIC
|
||||||
cppflags: -O3 -fPIC
|
spec: gcc@4.7.2
|
||||||
|
|
||||||
These flags will be treated by spack as if they were entered from
|
These flags will be treated by spack as if they were entered from
|
||||||
the command line each time this compiler is used. The compiler wrappers
|
the command line each time this compiler is used. The compiler wrappers
|
||||||
@@ -431,44 +440,95 @@ These variables should be specified in the ``environment`` section of the compil
|
|||||||
specification. The operations available to modify the environment are ``set``, ``unset``,
|
specification. The operations available to modify the environment are ``set``, ``unset``,
|
||||||
``prepend_path``, ``append_path``, and ``remove_path``. For example:
|
``prepend_path``, ``append_path``, and ``remove_path``. For example:
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
compilers:
|
||||||
|
- compiler:
|
||||||
|
modules: []
|
||||||
|
operating_system: centos6
|
||||||
|
paths:
|
||||||
|
cc: /opt/intel/oneapi/compiler/latest/linux/bin/icx
|
||||||
|
cxx: /opt/intel/oneapi/compiler/latest/linux/bin/icpx
|
||||||
|
f77: /opt/intel/oneapi/compiler/latest/linux/bin/ifx
|
||||||
|
fc: /opt/intel/oneapi/compiler/latest/linux/bin/ifx
|
||||||
|
spec: oneapi@latest
|
||||||
|
environment:
|
||||||
|
set:
|
||||||
|
MKL_ROOT: "/path/to/mkl/root"
|
||||||
|
unset: # A list of environment variables to unset
|
||||||
|
- CC
|
||||||
|
prepend_path: # Similar for append|remove_path
|
||||||
|
LD_LIBRARY_PATH: /ld/paths/added/by/setvars/sh
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
Spack is in the process of moving compilers from a separate
|
||||||
|
attribute to be handled like all other packages. As part of this
|
||||||
|
process, the ``compilers.yaml`` section will eventually be replaced
|
||||||
|
by configuration in the ``packages.yaml`` section. This new
|
||||||
|
configuration is now available, although it is not yet the default
|
||||||
|
behavior.
|
||||||
|
|
||||||
|
Compilers can also be configured as external packages in the
|
||||||
|
``packages.yaml`` config file. Any external package for a compiler
|
||||||
|
(e.g. ``gcc`` or ``llvm``) will be treated as a configured compiler
|
||||||
|
assuming the paths to the compiler executables are determinable from
|
||||||
|
the prefix.
|
||||||
|
|
||||||
|
If the paths to the compiler executable are not determinable from the
|
||||||
|
prefix, you can add them to the ``extra_attributes`` field. Similarly,
|
||||||
|
all other fields from the compilers config can be added to the
|
||||||
|
``extra_attributes`` field for an external representing a compiler.
|
||||||
|
|
||||||
|
Note that the format for the ``paths`` field in the
|
||||||
|
``extra_attributes`` section is different than in the ``compilers``
|
||||||
|
config. For compilers configured as external packages, the section is
|
||||||
|
named ``compilers`` and the dictionary maps language names (``c``,
|
||||||
|
``cxx``, ``fortran``) to paths, rather than using the names ``cc``,
|
||||||
|
``fc``, and ``f77``.
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
intel-oneapi-compilers:
|
gcc:
|
||||||
externals:
|
external:
|
||||||
- spec: intel-oneapi-compilers@2025.1.0
|
- spec: gcc@12.2.0 arch=linux-rhel8-skylake
|
||||||
prefix: /opt/intel/oneapi
|
prefix: /usr
|
||||||
extra_attributes:
|
extra_attributes:
|
||||||
compilers:
|
|
||||||
c: /opt/intel/oneapi/compiler/2025.1/bin/icx
|
|
||||||
cxx: /opt/intel/oneapi/compiler/2025.1/bin/icpx
|
|
||||||
fortran: /opt/intel/oneapi/compiler/2025.1/bin/ifx
|
|
||||||
environment:
|
environment:
|
||||||
set:
|
set:
|
||||||
MKL_ROOT: "/path/to/mkl/root"
|
GCC_ROOT: /usr
|
||||||
unset: # A list of environment variables to unset
|
external:
|
||||||
- CC
|
- spec: llvm+clang@15.0.0 arch=linux-rhel8-skylake
|
||||||
prepend_path: # Similar for append|remove_path
|
prefix: /usr
|
||||||
LD_LIBRARY_PATH: /ld/paths/added/by/setvars/sh
|
extra_attributes:
|
||||||
|
compilers:
|
||||||
|
c: /usr/bin/clang-with-suffix
|
||||||
|
cxx: /usr/bin/clang++-with-extra-info
|
||||||
|
fortran: /usr/bin/gfortran
|
||||||
|
extra_rpaths:
|
||||||
|
- /usr/lib/llvm/
|
||||||
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
Build Your Own Compiler
|
Build Your Own Compiler
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
If you are particular about which compiler/version you use, you might wish to have Spack build it for you.
|
If you are particular about which compiler/version you use, you might
|
||||||
For example:
|
wish to have Spack build it for you. For example:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ spack install gcc@14+binutils
|
$ spack install gcc@4.9.3
|
||||||
|
|
||||||
Once the compiler is installed, you can start using it without additional configuration:
|
Once that has finished, you will need to add it to your
|
||||||
|
``compilers.yaml`` file. You can then set Spack to use it by default
|
||||||
|
by adding the following to your ``packages.yaml`` file:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: yaml
|
||||||
|
|
||||||
$ spack install hdf5~mpi %gcc@14
|
packages:
|
||||||
|
all:
|
||||||
The same holds true for compilers that are made available from buildcaches, when reusing them is allowed.
|
compiler: [gcc@4.9.3]
|
||||||
|
|
||||||
.. _compilers-requiring-modules:
|
.. _compilers-requiring-modules:
|
||||||
|
|
||||||
@@ -476,26 +536,30 @@ The same holds true for compilers that are made available from buildcaches, when
|
|||||||
Compilers Requiring Modules
|
Compilers Requiring Modules
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Many installed compilers will work regardless of the environment they are called with.
|
Many installed compilers will work regardless of the environment they
|
||||||
However, some installed compilers require environment variables to be set in order to run;
|
are called with. However, some installed compilers require
|
||||||
this is typical for Intel and other proprietary compilers.
|
``$LD_LIBRARY_PATH`` or other environment variables to be set in order
|
||||||
|
to run; this is typical for Intel and other proprietary compilers.
|
||||||
|
|
||||||
On typical HPC clusters, these environment modifications are usually delegated to some "module" system.
|
In such a case, you should tell Spack which module(s) to load in order
|
||||||
In such a case, you should tell Spack which module(s) to load in order to run the chosen compiler:
|
to run the chosen compiler (If the compiler does not come with a
|
||||||
|
module file, you might consider making one by hand). Spack will load
|
||||||
|
this module into the environment ONLY when the compiler is run, and
|
||||||
|
NOT in general for a package's ``install()`` method. See, for
|
||||||
|
example, this ``compilers.yaml`` file:
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
packages:
|
compilers:
|
||||||
gcc:
|
- compiler:
|
||||||
externals:
|
modules: [other/comp/gcc-5.3-sp3]
|
||||||
- spec: gcc@10.5.0 languages='c,c++,fortran'
|
operating_system: SuSE11
|
||||||
prefix: /opt/compilers
|
paths:
|
||||||
extra_attributes:
|
cc: /usr/local/other/SLES11.3/gcc/5.3.0/bin/gcc
|
||||||
compilers:
|
cxx: /usr/local/other/SLES11.3/gcc/5.3.0/bin/g++
|
||||||
c: /opt/compilers/bin/gcc-10
|
f77: /usr/local/other/SLES11.3/gcc/5.3.0/bin/gfortran
|
||||||
cxx: /opt/compilers/bin/g++-10
|
fc: /usr/local/other/SLES11.3/gcc/5.3.0/bin/gfortran
|
||||||
fortran: /opt/compilers/bin/gfortran-10
|
spec: gcc@5.3.0
|
||||||
modules: [gcc/10.5.0]
|
|
||||||
|
|
||||||
Some compilers require special environment settings to be loaded not just
|
Some compilers require special environment settings to be loaded not just
|
||||||
to run, but also to execute the code they build, breaking packages that
|
to run, but also to execute the code they build, breaking packages that
|
||||||
@@ -516,7 +580,7 @@ Licensed Compilers
|
|||||||
^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Some proprietary compilers require licensing to use. If you need to
|
Some proprietary compilers require licensing to use. If you need to
|
||||||
use a licensed compiler, the process is similar to a mix of
|
use a licensed compiler (eg, PGI), the process is similar to a mix of
|
||||||
build your own, plus modules:
|
build your own, plus modules:
|
||||||
|
|
||||||
#. Create a Spack package (if it doesn't exist already) to install
|
#. Create a Spack package (if it doesn't exist already) to install
|
||||||
@@ -526,21 +590,24 @@ build your own, plus modules:
|
|||||||
using Spack to load the module it just created, and running simple
|
using Spack to load the module it just created, and running simple
|
||||||
builds (eg: ``cc helloWorld.c && ./a.out``)
|
builds (eg: ``cc helloWorld.c && ./a.out``)
|
||||||
|
|
||||||
#. Add the newly-installed compiler to ``packages.yaml`` as shown above.
|
#. Add the newly-installed compiler to ``compilers.yaml`` as shown
|
||||||
|
above.
|
||||||
|
|
||||||
.. _mixed-toolchains:
|
.. _mixed-toolchains:
|
||||||
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^
|
||||||
Fortran compilers on macOS
|
Mixed Toolchains
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Modern compilers typically come with related compilers for C, C++ and
|
Modern compilers typically come with related compilers for C, C++ and
|
||||||
Fortran bundled together. When possible, results are best if the same
|
Fortran bundled together. When possible, results are best if the same
|
||||||
compiler is used for all languages.
|
compiler is used for all languages.
|
||||||
|
|
||||||
In some cases, this is not possible. For example, XCode on macOS provides no Fortran compilers.
|
In some cases, this is not possible. For example, starting with macOS El
|
||||||
The user is therefore forced to use a mixed toolchain: XCode-provided Clang for C/C++ and e.g.
|
Capitan (10.11), many packages no longer build with GCC, but XCode
|
||||||
GNU ``gfortran`` for Fortran.
|
provides no Fortran compilers. The user is therefore forced to use a
|
||||||
|
mixed toolchain: XCode-provided Clang for C/C++ and GNU ``gfortran`` for
|
||||||
|
Fortran.
|
||||||
|
|
||||||
#. You need to make sure that Xcode is installed. Run the following command:
|
#. You need to make sure that Xcode is installed. Run the following command:
|
||||||
|
|
||||||
@@ -593,25 +660,45 @@ GNU ``gfortran`` for Fortran.
|
|||||||
|
|
||||||
Note: the flag is ``-license``, not ``--license``.
|
Note: the flag is ``-license``, not ``--license``.
|
||||||
|
|
||||||
|
#. Run ``spack compiler find`` to locate Clang.
|
||||||
|
|
||||||
#. There are different ways to get ``gfortran`` on macOS. For example, you can
|
#. There are different ways to get ``gfortran`` on macOS. For example, you can
|
||||||
install GCC with Spack (``spack install gcc``), with Homebrew (``brew install
|
install GCC with Spack (``spack install gcc``), with Homebrew (``brew install
|
||||||
gcc``), or from a `DMG installer
|
gcc``), or from a `DMG installer
|
||||||
<https://github.com/fxcoudert/gfortran-for-macOS/releases>`_.
|
<https://github.com/fxcoudert/gfortran-for-macOS/releases>`_.
|
||||||
|
|
||||||
#. Run ``spack compiler find`` to locate both Apple-Clang and GCC.
|
#. The only thing left to do is to edit ``~/.spack/darwin/compilers.yaml`` to provide
|
||||||
|
the path to ``gfortran``:
|
||||||
|
|
||||||
Since languages in Spack are modeled as virtual packages, ``apple-clang`` will be used to provide
|
.. code-block:: yaml
|
||||||
C and C++, while GCC will be used for Fortran.
|
|
||||||
|
compilers:
|
||||||
|
- compiler:
|
||||||
|
# ...
|
||||||
|
paths:
|
||||||
|
cc: /usr/bin/clang
|
||||||
|
cxx: /usr/bin/clang++
|
||||||
|
f77: /path/to/bin/gfortran
|
||||||
|
fc: /path/to/bin/gfortran
|
||||||
|
spec: apple-clang@11.0.0
|
||||||
|
|
||||||
|
|
||||||
|
If you used Spack to install GCC, you can get the installation prefix by
|
||||||
|
``spack location -i gcc`` (this will only work if you have a single version
|
||||||
|
of GCC installed). Whereas for Homebrew, GCC is installed in
|
||||||
|
``/usr/local/Cellar/gcc/x.y.z``. With the DMG installer, the correct path
|
||||||
|
will be ``/usr/local/gfortran``.
|
||||||
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^
|
||||||
Compiler Verification
|
Compiler Verification
|
||||||
^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
You can verify that your compilers are configured properly by installing a simple package. For example:
|
You can verify that your compilers are configured properly by installing a
|
||||||
|
simple package. For example:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ spack install zlib-ng%gcc@5.3.0
|
$ spack install zlib%gcc@5.3.0
|
||||||
|
|
||||||
|
|
||||||
.. _vendor-specific-compiler-configuration:
|
.. _vendor-specific-compiler-configuration:
|
||||||
@@ -620,7 +707,9 @@ You can verify that your compilers are configured properly by installing a simpl
|
|||||||
Vendor-Specific Compiler Configuration
|
Vendor-Specific Compiler Configuration
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
|
|
||||||
This section provides details on how to get vendor-specific compilers working.
|
With Spack, things usually "just work" with GCC. Not so for other
|
||||||
|
compilers. This section provides details on how to get specific
|
||||||
|
compilers working.
|
||||||
|
|
||||||
^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^
|
||||||
Intel Compilers
|
Intel Compilers
|
||||||
@@ -642,8 +731,8 @@ compilers:
|
|||||||
you have installed from the ``PATH`` environment variable.
|
you have installed from the ``PATH`` environment variable.
|
||||||
|
|
||||||
If you want use a version of ``gcc`` or ``g++`` other than the default
|
If you want use a version of ``gcc`` or ``g++`` other than the default
|
||||||
version on your system, you need to use either the ``--gcc-install-dir``
|
version on your system, you need to use either the ``-gcc-name``
|
||||||
or ``--gcc-toolchain`` compiler option to specify the path to the version of
|
or ``-gxx-name`` compiler option to specify the path to the version of
|
||||||
``gcc`` or ``g++`` that you want to use."
|
``gcc`` or ``g++`` that you want to use."
|
||||||
|
|
||||||
-- `Intel Reference Guide <https://software.intel.com/en-us/node/522750>`_
|
-- `Intel Reference Guide <https://software.intel.com/en-us/node/522750>`_
|
||||||
@@ -651,12 +740,76 @@ compilers:
|
|||||||
Intel compilers may therefore be configured in one of two ways with
|
Intel compilers may therefore be configured in one of two ways with
|
||||||
Spack: using modules, or using compiler flags.
|
Spack: using modules, or using compiler flags.
|
||||||
|
|
||||||
|
""""""""""""""""""""""""""
|
||||||
|
Configuration with Modules
|
||||||
|
""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
One can control which GCC is seen by the Intel compiler with modules.
|
||||||
|
A module must be loaded both for the Intel Compiler (so it will run)
|
||||||
|
and GCC (so the compiler can find the intended GCC). The following
|
||||||
|
configuration in ``compilers.yaml`` illustrates this technique:
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
compilers:
|
||||||
|
- compiler:
|
||||||
|
modules: [gcc-4.9.3, intel-15.0.24]
|
||||||
|
operating_system: centos7
|
||||||
|
paths:
|
||||||
|
cc: /opt/intel-15.0.24/bin/icc-15.0.24-beta
|
||||||
|
cxx: /opt/intel-15.0.24/bin/icpc-15.0.24-beta
|
||||||
|
f77: /opt/intel-15.0.24/bin/ifort-15.0.24-beta
|
||||||
|
fc: /opt/intel-15.0.24/bin/ifort-15.0.24-beta
|
||||||
|
spec: intel@15.0.24.4.9.3
|
||||||
|
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
The version number on the Intel compiler is a combination of
|
||||||
|
the "native" Intel version number and the GNU compiler it is
|
||||||
|
targeting.
|
||||||
|
|
||||||
|
""""""""""""""""""""""""""
|
||||||
|
Command Line Configuration
|
||||||
|
""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
One can also control which GCC is seen by the Intel compiler by adding
|
||||||
|
flags to the ``icc`` command:
|
||||||
|
|
||||||
|
#. Identify the location of the compiler you just installed:
|
||||||
|
|
||||||
|
.. code-block:: console
|
||||||
|
|
||||||
|
$ spack location --install-dir gcc
|
||||||
|
~/spack/opt/spack/linux-centos7-x86_64/gcc-4.9.3-iy4rw...
|
||||||
|
|
||||||
|
#. Set up ``compilers.yaml``, for example:
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
compilers:
|
||||||
|
- compiler:
|
||||||
|
modules: [intel-15.0.24]
|
||||||
|
operating_system: centos7
|
||||||
|
paths:
|
||||||
|
cc: /opt/intel-15.0.24/bin/icc-15.0.24-beta
|
||||||
|
cxx: /opt/intel-15.0.24/bin/icpc-15.0.24-beta
|
||||||
|
f77: /opt/intel-15.0.24/bin/ifort-15.0.24-beta
|
||||||
|
fc: /opt/intel-15.0.24/bin/ifort-15.0.24-beta
|
||||||
|
flags:
|
||||||
|
cflags: -gcc-name ~/spack/opt/spack/linux-centos7-x86_64/gcc-4.9.3-iy4rw.../bin/gcc
|
||||||
|
cxxflags: -gxx-name ~/spack/opt/spack/linux-centos7-x86_64/gcc-4.9.3-iy4rw.../bin/g++
|
||||||
|
fflags: -gcc-name ~/spack/opt/spack/linux-centos7-x86_64/gcc-4.9.3-iy4rw.../bin/gcc
|
||||||
|
spec: intel@15.0.24.4.9.3
|
||||||
|
|
||||||
|
|
||||||
^^^
|
^^^
|
||||||
NAG
|
NAG
|
||||||
^^^
|
^^^
|
||||||
|
|
||||||
The Numerical Algorithms Group provides a licensed Fortran compiler.
|
The Numerical Algorithms Group provides a licensed Fortran compiler. Like Clang,
|
||||||
It is recommended to use GCC for your C/C++ compilers.
|
this requires you to set up a :ref:`mixed-toolchains`. It is recommended to use
|
||||||
|
GCC for your C/C++ compilers.
|
||||||
|
|
||||||
The NAG Fortran compilers are a bit more strict than other compilers, and many
|
The NAG Fortran compilers are a bit more strict than other compilers, and many
|
||||||
packages will fail to install with error messages like:
|
packages will fail to install with error messages like:
|
||||||
@@ -673,40 +826,44 @@ the command line:
|
|||||||
|
|
||||||
$ spack install openmpi fflags="-mismatch"
|
$ spack install openmpi fflags="-mismatch"
|
||||||
|
|
||||||
Or it can be set permanently in your ``packages.yaml``:
|
Or it can be set permanently in your ``compilers.yaml``:
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
packages:
|
- compiler:
|
||||||
nag:
|
modules: []
|
||||||
externals:
|
operating_system: centos6
|
||||||
- spec: nag@6.1
|
paths:
|
||||||
prefix: /opt/nag/bin
|
cc: /soft/spack/opt/spack/linux-x86_64/gcc-5.3.0/gcc-6.1.0-q2zosj3igepi3pjnqt74bwazmptr5gpj/bin/gcc
|
||||||
extra_attributes:
|
cxx: /soft/spack/opt/spack/linux-x86_64/gcc-5.3.0/gcc-6.1.0-q2zosj3igepi3pjnqt74bwazmptr5gpj/bin/g++
|
||||||
compilers:
|
f77: /soft/spack/opt/spack/linux-x86_64/gcc-4.4.7/nag-6.1-jt3h5hwt5myezgqguhfsan52zcskqene/bin/nagfor
|
||||||
fortran: /opt/nag/bin/nagfor
|
fc: /soft/spack/opt/spack/linux-x86_64/gcc-4.4.7/nag-6.1-jt3h5hwt5myezgqguhfsan52zcskqene/bin/nagfor
|
||||||
flags:
|
flags:
|
||||||
fflags: -mismatch
|
fflags: -mismatch
|
||||||
|
spec: nag@6.1
|
||||||
|
|
||||||
|
|
||||||
---------------
|
---------------
|
||||||
System Packages
|
System Packages
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
Once compilers are configured, one needs to determine which pre-installed system packages,
|
Once compilers are configured, one needs to determine which
|
||||||
if any, to use in builds. These are also configured in the ``~/.spack/packages.yaml`` file.
|
pre-installed system packages, if any, to use in builds. This is
|
||||||
For example, to use an OpenMPI installed in /opt/local, one would use:
|
configured in the file ``~/.spack/packages.yaml``. For example, to use
|
||||||
|
an OpenMPI installed in /opt/local, one would use:
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
openmpi:
|
openmpi:
|
||||||
buildable: False
|
externals:
|
||||||
externals:
|
- spec: openmpi@1.10.1
|
||||||
- spec: openmpi@1.10.1
|
prefix: /opt/local
|
||||||
prefix: /opt/local
|
buildable: False
|
||||||
|
|
||||||
In general, *Spack is easier to use and more reliable if it builds all of its own dependencies*.
|
In general, Spack is easier to use and more reliable if it builds all of
|
||||||
However, there are several packages for which one commonly needs to use system versions:
|
its own dependencies. However, there are several packages for which one
|
||||||
|
commonly needs to use system versions:
|
||||||
|
|
||||||
^^^
|
^^^
|
||||||
MPI
|
MPI
|
||||||
@@ -719,7 +876,8 @@ you are unlikely to get a working MPI from Spack. Instead, use an
|
|||||||
appropriate pre-installed MPI.
|
appropriate pre-installed MPI.
|
||||||
|
|
||||||
If you choose a pre-installed MPI, you should consider using the
|
If you choose a pre-installed MPI, you should consider using the
|
||||||
pre-installed compiler used to build that MPI.
|
pre-installed compiler used to build that MPI; see above on
|
||||||
|
``compilers.yaml``.
|
||||||
|
|
||||||
^^^^^^^
|
^^^^^^^
|
||||||
OpenSSL
|
OpenSSL
|
||||||
@@ -1283,9 +1441,9 @@ To configure Spack, first run the following command inside the Spack console:
|
|||||||
spack compiler find
|
spack compiler find
|
||||||
|
|
||||||
This creates a ``.staging`` directory in our Spack prefix, along with a ``windows`` subdirectory
|
This creates a ``.staging`` directory in our Spack prefix, along with a ``windows`` subdirectory
|
||||||
containing a ``packages.yaml`` file. On a fresh Windows install with the above packages
|
containing a ``compilers.yaml`` file. On a fresh Windows install with the above packages
|
||||||
installed, this command should only detect Microsoft Visual Studio and the Intel Fortran
|
installed, this command should only detect Microsoft Visual Studio and the Intel Fortran
|
||||||
compiler will be integrated within the first version of MSVC present in the ``packages.yaml``
|
compiler will be integrated within the first version of MSVC present in the ``compilers.yaml``
|
||||||
output.
|
output.
|
||||||
|
|
||||||
Spack provides a default ``config.yaml`` file for Windows that it will use unless overridden.
|
Spack provides a default ``config.yaml`` file for Windows that it will use unless overridden.
|
||||||
|
@@ -23,6 +23,7 @@ components for use by dependent packages:
|
|||||||
|
|
||||||
packages:
|
packages:
|
||||||
all:
|
all:
|
||||||
|
compiler: [rocmcc@=5.3.0]
|
||||||
variants: amdgpu_target=gfx90a
|
variants: amdgpu_target=gfx90a
|
||||||
hip:
|
hip:
|
||||||
buildable: false
|
buildable: false
|
||||||
@@ -69,15 +70,16 @@ This is in combination with the following compiler definition:
|
|||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
packages:
|
compilers:
|
||||||
llvm-amdgpu:
|
- compiler:
|
||||||
externals:
|
spec: rocmcc@=5.3.0
|
||||||
- spec: llvm-amdgpu@=5.3.0
|
paths:
|
||||||
prefix: /opt/rocm-5.3.0
|
cc: /opt/rocm-5.3.0/bin/amdclang
|
||||||
compilers:
|
cxx: /opt/rocm-5.3.0/bin/amdclang++
|
||||||
c: /opt/rocm-5.3.0/bin/amdclang
|
f77: null
|
||||||
cxx: /opt/rocm-5.3.0/bin/amdclang++
|
fc: /opt/rocm-5.3.0/bin/amdflang
|
||||||
fortran: null
|
operating_system: rhel8
|
||||||
|
target: x86_64
|
||||||
|
|
||||||
This includes the following considerations:
|
This includes the following considerations:
|
||||||
|
|
||||||
|
@@ -43,20 +43,6 @@ or specified as URLs. Only the ``file``, ``ftp``, ``http`` and ``https`` protoco
|
|||||||
schemes) are supported. Spack-specific, environment and user path variables
|
schemes) are supported. Spack-specific, environment and user path variables
|
||||||
can be used. (See :ref:`config-file-variables` for more information.)
|
can be used. (See :ref:`config-file-variables` for more information.)
|
||||||
|
|
||||||
A ``sha256`` is required for remote file URLs and must be specified as follows:
|
|
||||||
|
|
||||||
.. code-block:: yaml
|
|
||||||
|
|
||||||
include:
|
|
||||||
- path: https://github.com/path/to/raw/config/compilers.yaml
|
|
||||||
sha256: 26e871804a92cd07bb3d611b31b4156ae93d35b6a6d6e0ef3a67871fcb1d258b
|
|
||||||
|
|
||||||
Additionally, remote file URLs must link to the **raw** form of the file's
|
|
||||||
contents (e.g., `GitHub
|
|
||||||
<https://docs.github.com/en/repositories/working-with-files/using-files/viewing-and-understanding-files#viewing-or-copying-the-raw-file-content>`_
|
|
||||||
or `GitLab
|
|
||||||
<https://docs.gitlab.com/ee/api/repository_files.html#get-raw-file-from-repository>`_).
|
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
|
|
||||||
Recursive includes are not currently processed in a breadth-first manner
|
Recursive includes are not currently processed in a breadth-first manner
|
||||||
|
@@ -75,7 +75,6 @@ or refer to the full manual below.
|
|||||||
packages_yaml
|
packages_yaml
|
||||||
build_settings
|
build_settings
|
||||||
environments
|
environments
|
||||||
env_vars_yaml
|
|
||||||
containers
|
containers
|
||||||
mirrors
|
mirrors
|
||||||
module_file_support
|
module_file_support
|
||||||
|
@@ -128,7 +128,7 @@ depend on the spec:
|
|||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
def setup_run_environment(self, env: EnvironmentModifications) -> None:
|
def setup_run_environment(self, env):
|
||||||
if self.spec.satisfies("+foo"):
|
if self.spec.satisfies("+foo"):
|
||||||
env.set("FOO", "bar")
|
env.set("FOO", "bar")
|
||||||
|
|
||||||
@@ -142,7 +142,7 @@ For example, a simplified version of the ``python`` package could look like this
|
|||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
def setup_dependent_run_environment(self, env: EnvironmentModifications, dependent_spec: Spec) -> None:
|
def setup_dependent_run_environment(self, env, dependent_spec):
|
||||||
if dependent_spec.package.extends(self.spec):
|
if dependent_spec.package.extends(self.spec):
|
||||||
env.prepend_path("PYTHONPATH", dependent_spec.prefix.lib.python)
|
env.prepend_path("PYTHONPATH", dependent_spec.prefix.lib.python)
|
||||||
|
|
||||||
|
@@ -486,8 +486,6 @@ present. For instance with a configuration like:
|
|||||||
|
|
||||||
you will use ``mvapich2~cuda %gcc`` as an ``mpi`` provider.
|
you will use ``mvapich2~cuda %gcc`` as an ``mpi`` provider.
|
||||||
|
|
||||||
.. _package-strong-preferences:
|
|
||||||
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
Conflicts and strong preferences
|
Conflicts and strong preferences
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
@@ -557,13 +555,14 @@ preferences.
|
|||||||
FAQ: :ref:`Why does Spack pick particular versions and variants? <faq-concretizer-precedence>`
|
FAQ: :ref:`Why does Spack pick particular versions and variants? <faq-concretizer-precedence>`
|
||||||
|
|
||||||
|
|
||||||
The ``target`` and ``providers`` preferences
|
Most package preferences (``compilers``, ``target`` and ``providers``)
|
||||||
can only be set globally under the ``all`` section of ``packages.yaml``:
|
can only be set globally under the ``all`` section of ``packages.yaml``:
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
all:
|
all:
|
||||||
|
compiler: [gcc@12.2.0, clang@12:, oneapi@2023:]
|
||||||
target: [x86_64_v3]
|
target: [x86_64_v3]
|
||||||
providers:
|
providers:
|
||||||
mpi: [mvapich2, mpich, openmpi]
|
mpi: [mvapich2, mpich, openmpi]
|
||||||
|
@@ -330,7 +330,7 @@ that ``--tests`` is passed to ``spack ci rebuild`` as part of the
|
|||||||
- spack --version
|
- spack --version
|
||||||
- cd ${SPACK_CONCRETE_ENV_DIR}
|
- cd ${SPACK_CONCRETE_ENV_DIR}
|
||||||
- spack env activate --without-view .
|
- spack env activate --without-view .
|
||||||
- spack config add "config:install_tree:projections:${SPACK_JOB_SPEC_PKG_NAME}:'morepadding/{architecture.platform}-{architecture.target}/{name}-{version}-{hash}'"
|
- spack config add "config:install_tree:projections:${SPACK_JOB_SPEC_PKG_NAME}:'morepadding/{architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}'"
|
||||||
- mkdir -p ${SPACK_ARTIFACTS_ROOT}/user_data
|
- mkdir -p ${SPACK_ARTIFACTS_ROOT}/user_data
|
||||||
- if [[ -r /mnt/key/intermediate_ci_signing_key.gpg ]]; then spack gpg trust /mnt/key/intermediate_ci_signing_key.gpg; fi
|
- if [[ -r /mnt/key/intermediate_ci_signing_key.gpg ]]; then spack gpg trust /mnt/key/intermediate_ci_signing_key.gpg; fi
|
||||||
- if [[ -r /mnt/key/spack_public_key.gpg ]]; then spack gpg trust /mnt/key/spack_public_key.gpg; fi
|
- if [[ -r /mnt/key/spack_public_key.gpg ]]; then spack gpg trust /mnt/key/spack_public_key.gpg; fi
|
||||||
|
@@ -5,9 +5,9 @@ sphinx-rtd-theme==3.0.2
|
|||||||
python-levenshtein==0.27.1
|
python-levenshtein==0.27.1
|
||||||
docutils==0.21.2
|
docutils==0.21.2
|
||||||
pygments==2.19.1
|
pygments==2.19.1
|
||||||
urllib3==2.4.0
|
urllib3==2.3.0
|
||||||
pytest==8.3.5
|
pytest==8.3.5
|
||||||
isort==6.0.1
|
isort==6.0.1
|
||||||
black==25.1.0
|
black==25.1.0
|
||||||
flake8==7.2.0
|
flake8==7.1.2
|
||||||
mypy==1.11.1
|
mypy==1.11.1
|
||||||
|
1
lib/spack/env/aocc/clang
vendored
Symbolic link
1
lib/spack/env/aocc/clang
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/aocc/clang++
vendored
Symbolic link
1
lib/spack/env/aocc/clang++
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cpp
|
1
lib/spack/env/aocc/flang
vendored
Symbolic link
1
lib/spack/env/aocc/flang
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../fc
|
1
lib/spack/env/arm/armclang
vendored
Symbolic link
1
lib/spack/env/arm/armclang
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/arm/armclang++
vendored
Symbolic link
1
lib/spack/env/arm/armclang++
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/arm/armflang
vendored
Symbolic link
1
lib/spack/env/arm/armflang
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/c++
vendored
Symbolic link
1
lib/spack/env/c++
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
cc
|
1
lib/spack/env/c89
vendored
Symbolic link
1
lib/spack/env/c89
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
cc
|
1
lib/spack/env/c99
vendored
Symbolic link
1
lib/spack/env/c99
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
cc
|
1
lib/spack/env/case-insensitive/CC
vendored
Symbolic link
1
lib/spack/env/case-insensitive/CC
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
@@ -36,9 +36,15 @@ readonly lsep=''
|
|||||||
# the script runs. They are set by routines in spack.build_environment
|
# the script runs. They are set by routines in spack.build_environment
|
||||||
# as part of the package installation process.
|
# as part of the package installation process.
|
||||||
readonly params="\
|
readonly params="\
|
||||||
SPACK_COMPILER_WRAPPER_PATH
|
SPACK_ENV_PATH
|
||||||
SPACK_DEBUG_LOG_DIR
|
SPACK_DEBUG_LOG_DIR
|
||||||
SPACK_DEBUG_LOG_ID
|
SPACK_DEBUG_LOG_ID
|
||||||
|
SPACK_COMPILER_SPEC
|
||||||
|
SPACK_CC_RPATH_ARG
|
||||||
|
SPACK_CXX_RPATH_ARG
|
||||||
|
SPACK_F77_RPATH_ARG
|
||||||
|
SPACK_FC_RPATH_ARG
|
||||||
|
SPACK_LINKER_ARG
|
||||||
SPACK_SHORT_SPEC
|
SPACK_SHORT_SPEC
|
||||||
SPACK_SYSTEM_DIRS
|
SPACK_SYSTEM_DIRS
|
||||||
SPACK_MANAGED_DIRS"
|
SPACK_MANAGED_DIRS"
|
||||||
@@ -339,9 +345,6 @@ case "$command" in
|
|||||||
;;
|
;;
|
||||||
ld|ld.gold|ld.lld)
|
ld|ld.gold|ld.lld)
|
||||||
mode=ld
|
mode=ld
|
||||||
if [ -z "$SPACK_CC_RPATH_ARG" ]; then
|
|
||||||
comp="CXX"
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
die "Unknown compiler: $command"
|
die "Unknown compiler: $command"
|
||||||
@@ -396,12 +399,10 @@ fi
|
|||||||
#
|
#
|
||||||
dtags_to_add="${SPACK_DTAGS_TO_ADD}"
|
dtags_to_add="${SPACK_DTAGS_TO_ADD}"
|
||||||
dtags_to_strip="${SPACK_DTAGS_TO_STRIP}"
|
dtags_to_strip="${SPACK_DTAGS_TO_STRIP}"
|
||||||
|
linker_arg="${SPACK_LINKER_ARG}"
|
||||||
linker_arg="ERROR: LINKER ARG WAS NOT SET, MAYBE THE PACKAGE DOES NOT DEPEND ON ${comp}?"
|
|
||||||
eval "linker_arg=\${SPACK_${comp}_LINKER_ARG:?${linker_arg}}"
|
|
||||||
|
|
||||||
# Set up rpath variable according to language.
|
# Set up rpath variable according to language.
|
||||||
rpath="ERROR: RPATH ARG WAS NOT SET, MAYBE THE PACKAGE DOES NOT DEPEND ON ${comp}?"
|
rpath="ERROR: RPATH ARG WAS NOT SET"
|
||||||
eval "rpath=\${SPACK_${comp}_RPATH_ARG:?${rpath}}"
|
eval "rpath=\${SPACK_${comp}_RPATH_ARG:?${rpath}}"
|
||||||
|
|
||||||
# Dump the mode and exit if the command is dump-mode.
|
# Dump the mode and exit if the command is dump-mode.
|
||||||
@@ -410,6 +411,13 @@ if [ "$SPACK_TEST_COMMAND" = "dump-mode" ]; then
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If, say, SPACK_CC is set but SPACK_FC is not, we want to know. Compilers do not
|
||||||
|
# *have* to set up Fortran executables, so we need to tell the user when a build is
|
||||||
|
# about to attempt to use them unsuccessfully.
|
||||||
|
if [ -z "$command" ]; then
|
||||||
|
die "Compiler '$SPACK_COMPILER_SPEC' does not have a $language compiler configured."
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Filter '.' and Spack environment directories out of PATH so that
|
# Filter '.' and Spack environment directories out of PATH so that
|
||||||
# this script doesn't just call itself
|
# this script doesn't just call itself
|
||||||
@@ -418,7 +426,7 @@ new_dirs=""
|
|||||||
IFS=':'
|
IFS=':'
|
||||||
for dir in $PATH; do
|
for dir in $PATH; do
|
||||||
addpath=true
|
addpath=true
|
||||||
for spack_env_dir in $SPACK_COMPILER_WRAPPER_PATH; do
|
for spack_env_dir in $SPACK_ENV_PATH; do
|
||||||
case "${dir%%/}" in
|
case "${dir%%/}" in
|
||||||
"$spack_env_dir"|'.'|'')
|
"$spack_env_dir"|'.'|'')
|
||||||
addpath=false
|
addpath=false
|
||||||
@@ -779,17 +787,15 @@ case "$mode" in
|
|||||||
C)
|
C)
|
||||||
extend spack_flags_list SPACK_ALWAYS_CFLAGS
|
extend spack_flags_list SPACK_ALWAYS_CFLAGS
|
||||||
extend spack_flags_list SPACK_CFLAGS
|
extend spack_flags_list SPACK_CFLAGS
|
||||||
preextend flags_list SPACK_TARGET_ARGS_CC
|
|
||||||
;;
|
;;
|
||||||
CXX)
|
CXX)
|
||||||
extend spack_flags_list SPACK_ALWAYS_CXXFLAGS
|
extend spack_flags_list SPACK_ALWAYS_CXXFLAGS
|
||||||
extend spack_flags_list SPACK_CXXFLAGS
|
extend spack_flags_list SPACK_CXXFLAGS
|
||||||
preextend flags_list SPACK_TARGET_ARGS_CXX
|
|
||||||
;;
|
|
||||||
F)
|
|
||||||
preextend flags_list SPACK_TARGET_ARGS_FORTRAN
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# prepend target args
|
||||||
|
preextend flags_list SPACK_TARGET_ARGS
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
1
lib/spack/env/cce/case-insensitive/CC
vendored
Symbolic link
1
lib/spack/env/cce/case-insensitive/CC
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../../cc
|
1
lib/spack/env/cce/case-insensitive/crayCC
vendored
Symbolic link
1
lib/spack/env/cce/case-insensitive/crayCC
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../../cc
|
1
lib/spack/env/cce/cc
vendored
Symbolic link
1
lib/spack/env/cce/cc
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/cce/craycc
vendored
Symbolic link
1
lib/spack/env/cce/craycc
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/cce/crayftn
vendored
Symbolic link
1
lib/spack/env/cce/crayftn
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/cce/ftn
vendored
Symbolic link
1
lib/spack/env/cce/ftn
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/clang/clang
vendored
Symbolic link
1
lib/spack/env/clang/clang
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/clang/clang++
vendored
Symbolic link
1
lib/spack/env/clang/clang++
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/clang/flang
vendored
Symbolic link
1
lib/spack/env/clang/flang
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/clang/gfortran
vendored
Symbolic link
1
lib/spack/env/clang/gfortran
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/cpp
vendored
Symbolic link
1
lib/spack/env/cpp
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
cc
|
1
lib/spack/env/f77
vendored
Symbolic link
1
lib/spack/env/f77
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
cc
|
1
lib/spack/env/f90
vendored
Symbolic link
1
lib/spack/env/f90
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
cc
|
1
lib/spack/env/f95
vendored
Symbolic link
1
lib/spack/env/f95
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
cc
|
1
lib/spack/env/fc
vendored
Symbolic link
1
lib/spack/env/fc
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
cc
|
1
lib/spack/env/fj/case-insensitive/FCC
vendored
Symbolic link
1
lib/spack/env/fj/case-insensitive/FCC
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../../cc
|
1
lib/spack/env/fj/fcc
vendored
Symbolic link
1
lib/spack/env/fj/fcc
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/fj/frt
vendored
Symbolic link
1
lib/spack/env/fj/frt
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/ftn
vendored
Symbolic link
1
lib/spack/env/ftn
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
cc
|
1
lib/spack/env/gcc/g++
vendored
Symbolic link
1
lib/spack/env/gcc/g++
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/gcc/gcc
vendored
Symbolic link
1
lib/spack/env/gcc/gcc
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/gcc/gfortran
vendored
Symbolic link
1
lib/spack/env/gcc/gfortran
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/intel/icc
vendored
Symbolic link
1
lib/spack/env/intel/icc
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/intel/icpc
vendored
Symbolic link
1
lib/spack/env/intel/icpc
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/intel/ifort
vendored
Symbolic link
1
lib/spack/env/intel/ifort
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/ld
vendored
Symbolic link
1
lib/spack/env/ld
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
cc
|
1
lib/spack/env/ld.gold
vendored
Symbolic link
1
lib/spack/env/ld.gold
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
cc
|
1
lib/spack/env/ld.lld
vendored
Symbolic link
1
lib/spack/env/ld.lld
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
cc
|
1
lib/spack/env/nag/nagfor
vendored
Symbolic link
1
lib/spack/env/nag/nagfor
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/nvhpc/nvc
vendored
Symbolic link
1
lib/spack/env/nvhpc/nvc
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/nvhpc/nvc++
vendored
Symbolic link
1
lib/spack/env/nvhpc/nvc++
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/nvhpc/nvfortran
vendored
Symbolic link
1
lib/spack/env/nvhpc/nvfortran
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/oneapi/dpcpp
vendored
Symbolic link
1
lib/spack/env/oneapi/dpcpp
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/oneapi/icpx
vendored
Symbolic link
1
lib/spack/env/oneapi/icpx
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/oneapi/icx
vendored
Symbolic link
1
lib/spack/env/oneapi/icx
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/oneapi/ifx
vendored
Symbolic link
1
lib/spack/env/oneapi/ifx
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/pgi/pgc++
vendored
Symbolic link
1
lib/spack/env/pgi/pgc++
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/pgi/pgcc
vendored
Symbolic link
1
lib/spack/env/pgi/pgcc
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/pgi/pgfortran
vendored
Symbolic link
1
lib/spack/env/pgi/pgfortran
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/rocmcc/amdclang
vendored
Symbolic link
1
lib/spack/env/rocmcc/amdclang
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/rocmcc/amdclang++
vendored
Symbolic link
1
lib/spack/env/rocmcc/amdclang++
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cpp
|
1
lib/spack/env/rocmcc/amdflang
vendored
Symbolic link
1
lib/spack/env/rocmcc/amdflang
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../fc
|
1
lib/spack/env/xl/xlc
vendored
Symbolic link
1
lib/spack/env/xl/xlc
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/xl/xlc++
vendored
Symbolic link
1
lib/spack/env/xl/xlc++
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/xl/xlf
vendored
Symbolic link
1
lib/spack/env/xl/xlf
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/xl/xlf90
vendored
Symbolic link
1
lib/spack/env/xl/xlf90
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/xl_r/xlc++_r
vendored
Symbolic link
1
lib/spack/env/xl_r/xlc++_r
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/xl_r/xlc_r
vendored
Symbolic link
1
lib/spack/env/xl_r/xlc_r
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/xl_r/xlf90_r
vendored
Symbolic link
1
lib/spack/env/xl_r/xlf90_r
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
1
lib/spack/env/xl_r/xlf_r
vendored
Symbolic link
1
lib/spack/env/xl_r/xlf_r
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cc
|
13
lib/spack/external/__init__.py
vendored
13
lib/spack/external/__init__.py
vendored
@@ -11,7 +11,6 @@
|
|||||||
* Homepage: https://altgraph.readthedocs.io/en/latest/index.html
|
* Homepage: https://altgraph.readthedocs.io/en/latest/index.html
|
||||||
* Usage: dependency of macholib
|
* Usage: dependency of macholib
|
||||||
* Version: 0.17.3
|
* Version: 0.17.3
|
||||||
* License: MIT
|
|
||||||
|
|
||||||
archspec
|
archspec
|
||||||
--------
|
--------
|
||||||
@@ -19,7 +18,6 @@
|
|||||||
* Homepage: https://pypi.python.org/pypi/archspec
|
* Homepage: https://pypi.python.org/pypi/archspec
|
||||||
* Usage: Labeling, comparison and detection of microarchitectures
|
* Usage: Labeling, comparison and detection of microarchitectures
|
||||||
* Version: 0.2.5 (commit 38ce485258ffc4fc6dd6688f8dc90cb269478c47)
|
* Version: 0.2.5 (commit 38ce485258ffc4fc6dd6688f8dc90cb269478c47)
|
||||||
* License: Apache-2.0 or MIT
|
|
||||||
|
|
||||||
astunparse
|
astunparse
|
||||||
----------------
|
----------------
|
||||||
@@ -27,7 +25,6 @@
|
|||||||
* Homepage: https://github.com/simonpercivall/astunparse
|
* Homepage: https://github.com/simonpercivall/astunparse
|
||||||
* Usage: Unparsing Python ASTs for package hashes in Spack
|
* Usage: Unparsing Python ASTs for package hashes in Spack
|
||||||
* Version: 1.6.3 (plus modifications)
|
* Version: 1.6.3 (plus modifications)
|
||||||
* License: PSF-2.0
|
|
||||||
* Note: This is in ``spack.util.unparse`` because it's very heavily
|
* Note: This is in ``spack.util.unparse`` because it's very heavily
|
||||||
modified, and we want to track coverage for it.
|
modified, and we want to track coverage for it.
|
||||||
Specifically, we have modified this library to generate consistent unparsed ASTs
|
Specifically, we have modified this library to generate consistent unparsed ASTs
|
||||||
@@ -44,7 +41,6 @@
|
|||||||
* Homepage: https://github.com/python-attrs/attrs
|
* Homepage: https://github.com/python-attrs/attrs
|
||||||
* Usage: Needed by jsonschema.
|
* Usage: Needed by jsonschema.
|
||||||
* Version: 22.1.0
|
* Version: 22.1.0
|
||||||
* License: MIT
|
|
||||||
|
|
||||||
ctest_log_parser
|
ctest_log_parser
|
||||||
----------------
|
----------------
|
||||||
@@ -52,7 +48,6 @@
|
|||||||
* Homepage: https://github.com/Kitware/CMake/blob/master/Source/CTest/cmCTestBuildHandler.cxx
|
* Homepage: https://github.com/Kitware/CMake/blob/master/Source/CTest/cmCTestBuildHandler.cxx
|
||||||
* Usage: Functions to parse build logs and extract error messages.
|
* Usage: Functions to parse build logs and extract error messages.
|
||||||
* Version: Unversioned
|
* Version: Unversioned
|
||||||
* License: BSD-3-Clause
|
|
||||||
* Note: This is a homemade port of Kitware's CTest build handler.
|
* Note: This is a homemade port of Kitware's CTest build handler.
|
||||||
|
|
||||||
distro
|
distro
|
||||||
@@ -61,7 +56,6 @@
|
|||||||
* Homepage: https://pypi.python.org/pypi/distro
|
* Homepage: https://pypi.python.org/pypi/distro
|
||||||
* Usage: Provides a more stable linux distribution detection.
|
* Usage: Provides a more stable linux distribution detection.
|
||||||
* Version: 1.8.0
|
* Version: 1.8.0
|
||||||
* License: Apache-2.0
|
|
||||||
|
|
||||||
jinja2
|
jinja2
|
||||||
------
|
------
|
||||||
@@ -69,7 +63,6 @@
|
|||||||
* Homepage: https://pypi.python.org/pypi/Jinja2
|
* Homepage: https://pypi.python.org/pypi/Jinja2
|
||||||
* Usage: A modern and designer-friendly templating language for Python.
|
* Usage: A modern and designer-friendly templating language for Python.
|
||||||
* Version: 3.0.3 (last version supporting Python 3.6)
|
* Version: 3.0.3 (last version supporting Python 3.6)
|
||||||
* License: BSD-3-Clause
|
|
||||||
|
|
||||||
jsonschema
|
jsonschema
|
||||||
----------
|
----------
|
||||||
@@ -77,7 +70,6 @@
|
|||||||
* Homepage: https://pypi.python.org/pypi/jsonschema
|
* Homepage: https://pypi.python.org/pypi/jsonschema
|
||||||
* Usage: An implementation of JSON Schema for Python.
|
* Usage: An implementation of JSON Schema for Python.
|
||||||
* Version: 3.2.0 (last version before 2.7 and 3.6 support was dropped)
|
* Version: 3.2.0 (last version before 2.7 and 3.6 support was dropped)
|
||||||
* License: MIT
|
|
||||||
* Note: We don't include tests or benchmarks; just what Spack needs.
|
* Note: We don't include tests or benchmarks; just what Spack needs.
|
||||||
|
|
||||||
macholib
|
macholib
|
||||||
@@ -86,7 +78,6 @@
|
|||||||
* Homepage: https://macholib.readthedocs.io/en/latest/index.html#
|
* Homepage: https://macholib.readthedocs.io/en/latest/index.html#
|
||||||
* Usage: Manipulation of Mach-o binaries for relocating macOS buildcaches on Linux
|
* Usage: Manipulation of Mach-o binaries for relocating macOS buildcaches on Linux
|
||||||
* Version: 1.16.2
|
* Version: 1.16.2
|
||||||
* License: MIT
|
|
||||||
|
|
||||||
markupsafe
|
markupsafe
|
||||||
----------
|
----------
|
||||||
@@ -94,7 +85,6 @@
|
|||||||
* Homepage: https://pypi.python.org/pypi/MarkupSafe
|
* Homepage: https://pypi.python.org/pypi/MarkupSafe
|
||||||
* Usage: Implements a XML/HTML/XHTML Markup safe string for Python.
|
* Usage: Implements a XML/HTML/XHTML Markup safe string for Python.
|
||||||
* Version: 2.0.1 (last version supporting Python 3.6)
|
* Version: 2.0.1 (last version supporting Python 3.6)
|
||||||
* License: BSD-3-Clause
|
|
||||||
|
|
||||||
pyrsistent
|
pyrsistent
|
||||||
----------
|
----------
|
||||||
@@ -102,7 +92,6 @@
|
|||||||
* Homepage: http://github.com/tobgu/pyrsistent/
|
* Homepage: http://github.com/tobgu/pyrsistent/
|
||||||
* Usage: Needed by `jsonschema`
|
* Usage: Needed by `jsonschema`
|
||||||
* Version: 0.18.0
|
* Version: 0.18.0
|
||||||
* License: MIT
|
|
||||||
|
|
||||||
ruamel.yaml
|
ruamel.yaml
|
||||||
------
|
------
|
||||||
@@ -112,7 +101,6 @@
|
|||||||
actively maintained and has more features, including round-tripping
|
actively maintained and has more features, including round-tripping
|
||||||
comments read from config files.
|
comments read from config files.
|
||||||
* Version: 0.17.21
|
* Version: 0.17.21
|
||||||
* License: MIT
|
|
||||||
|
|
||||||
six
|
six
|
||||||
---
|
---
|
||||||
@@ -120,6 +108,5 @@
|
|||||||
* Homepage: https://pypi.python.org/pypi/six
|
* Homepage: https://pypi.python.org/pypi/six
|
||||||
* Usage: Python 2 and 3 compatibility utilities.
|
* Usage: Python 2 and 3 compatibility utilities.
|
||||||
* Version: 1.16.0
|
* Version: 1.16.0
|
||||||
* License: MIT
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
@@ -7,7 +7,6 @@
|
|||||||
import fnmatch
|
import fnmatch
|
||||||
import glob
|
import glob
|
||||||
import hashlib
|
import hashlib
|
||||||
import io
|
|
||||||
import itertools
|
import itertools
|
||||||
import numbers
|
import numbers
|
||||||
import os
|
import os
|
||||||
@@ -21,7 +20,6 @@
|
|||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from itertools import accumulate
|
from itertools import accumulate
|
||||||
from typing import (
|
from typing import (
|
||||||
IO,
|
|
||||||
Callable,
|
Callable,
|
||||||
Deque,
|
Deque,
|
||||||
Dict,
|
Dict,
|
||||||
@@ -764,7 +762,7 @@ def copy_tree(
|
|||||||
|
|
||||||
files = glob.glob(src)
|
files = glob.glob(src)
|
||||||
if not files:
|
if not files:
|
||||||
raise OSError("No such file or directory: '{0}'".format(src), errno.ENOENT)
|
raise OSError("No such file or directory: '{0}'".format(src))
|
||||||
|
|
||||||
# For Windows hard-links and junctions, the source path must exist to make a symlink. Add
|
# For Windows hard-links and junctions, the source path must exist to make a symlink. Add
|
||||||
# all symlinks to this list while traversing the tree, then when finished, make all
|
# all symlinks to this list while traversing the tree, then when finished, make all
|
||||||
@@ -2883,20 +2881,6 @@ def keep_modification_time(*filenames):
|
|||||||
os.utime(f, (os.path.getatime(f), mtime))
|
os.utime(f, (os.path.getatime(f), mtime))
|
||||||
|
|
||||||
|
|
||||||
@contextmanager
|
|
||||||
def temporary_file_position(stream):
|
|
||||||
orig_pos = stream.tell()
|
|
||||||
yield
|
|
||||||
stream.seek(orig_pos)
|
|
||||||
|
|
||||||
|
|
||||||
@contextmanager
|
|
||||||
def current_file_position(stream: IO[str], loc: int, relative_to=io.SEEK_CUR):
|
|
||||||
with temporary_file_position(stream):
|
|
||||||
stream.seek(loc, relative_to)
|
|
||||||
yield
|
|
||||||
|
|
||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
def temporary_dir(
|
def temporary_dir(
|
||||||
suffix: Optional[str] = None, prefix: Optional[str] = None, dir: Optional[str] = None
|
suffix: Optional[str] = None, prefix: Optional[str] = None, dir: Optional[str] = None
|
||||||
|
@@ -15,19 +15,7 @@
|
|||||||
import typing
|
import typing
|
||||||
import warnings
|
import warnings
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from typing import (
|
from typing import Callable, Dict, Iterable, List, Mapping, Optional, Tuple, TypeVar
|
||||||
Any,
|
|
||||||
Callable,
|
|
||||||
Dict,
|
|
||||||
Generic,
|
|
||||||
Iterable,
|
|
||||||
List,
|
|
||||||
Mapping,
|
|
||||||
Optional,
|
|
||||||
Tuple,
|
|
||||||
TypeVar,
|
|
||||||
Union,
|
|
||||||
)
|
|
||||||
|
|
||||||
# Ignore emacs backups when listing modules
|
# Ignore emacs backups when listing modules
|
||||||
ignore_modules = r"^\.#|~$"
|
ignore_modules = r"^\.#|~$"
|
||||||
@@ -85,7 +73,7 @@ def index_by(objects, *funcs):
|
|||||||
if isinstance(f, str):
|
if isinstance(f, str):
|
||||||
f = lambda x: getattr(x, funcs[0])
|
f = lambda x: getattr(x, funcs[0])
|
||||||
elif isinstance(f, tuple):
|
elif isinstance(f, tuple):
|
||||||
f = lambda x: tuple(getattr(x, p, None) for p in funcs[0])
|
f = lambda x: tuple(getattr(x, p) for p in funcs[0])
|
||||||
|
|
||||||
result = {}
|
result = {}
|
||||||
for o in objects:
|
for o in objects:
|
||||||
@@ -1028,8 +1016,11 @@ def _receive_forwarded(self, context: str, exc: Exception, tb: List[str]):
|
|||||||
def grouped_message(self, with_tracebacks: bool = True) -> str:
|
def grouped_message(self, with_tracebacks: bool = True) -> str:
|
||||||
"""Print out an error message coalescing all the forwarded errors."""
|
"""Print out an error message coalescing all the forwarded errors."""
|
||||||
each_exception_message = [
|
each_exception_message = [
|
||||||
"\n\t{0} raised {1}: {2}\n{3}".format(
|
"{0} raised {1}: {2}{3}".format(
|
||||||
context, exc.__class__.__name__, exc, f"\n{''.join(tb)}" if with_tracebacks else ""
|
context,
|
||||||
|
exc.__class__.__name__,
|
||||||
|
exc,
|
||||||
|
"\n{0}".format("".join(tb)) if with_tracebacks else "",
|
||||||
)
|
)
|
||||||
for context, exc, tb in self.exceptions
|
for context, exc, tb in self.exceptions
|
||||||
]
|
]
|
||||||
@@ -1059,28 +1050,19 @@ def __exit__(self, exc_type, exc_value, tb):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
ClassPropertyType = TypeVar("ClassPropertyType")
|
class classproperty:
|
||||||
|
|
||||||
|
|
||||||
class classproperty(Generic[ClassPropertyType]):
|
|
||||||
"""Non-data descriptor to evaluate a class-level property. The function that performs
|
"""Non-data descriptor to evaluate a class-level property. The function that performs
|
||||||
the evaluation is injected at creation time and takes an owner (i.e., the class that
|
the evaluation is injected at creation time and take an instance (could be None) and
|
||||||
originated the instance).
|
an owner (i.e. the class that originated the instance)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, callback: Callable[[Any], ClassPropertyType]) -> None:
|
def __init__(self, callback):
|
||||||
self.callback = callback
|
self.callback = callback
|
||||||
|
|
||||||
def __get__(self, instance, owner) -> ClassPropertyType:
|
def __get__(self, instance, owner):
|
||||||
return self.callback(owner)
|
return self.callback(owner)
|
||||||
|
|
||||||
|
|
||||||
#: A type alias that represents either a classproperty descriptor or a constant value of the same
|
|
||||||
#: type. This allows derived classes to override a computed class-level property with a constant
|
|
||||||
#: value while retaining type compatibility.
|
|
||||||
ClassProperty = Union[ClassPropertyType, classproperty[ClassPropertyType]]
|
|
||||||
|
|
||||||
|
|
||||||
class DeprecatedProperty:
|
class DeprecatedProperty:
|
||||||
"""Data descriptor to error or warn when a deprecated property is accessed.
|
"""Data descriptor to error or warn when a deprecated property is accessed.
|
||||||
|
|
||||||
|
@@ -1,20 +0,0 @@
|
|||||||
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
||||||
"""Alias names to convert legacy compilers to builtin packages and vice-versa"""
|
|
||||||
|
|
||||||
BUILTIN_TO_LEGACY_COMPILER = {
|
|
||||||
"llvm": "clang",
|
|
||||||
"intel-oneapi-compilers": "oneapi",
|
|
||||||
"llvm-amdgpu": "rocmcc",
|
|
||||||
"intel-oneapi-compilers-classic": "intel",
|
|
||||||
"acfl": "arm",
|
|
||||||
}
|
|
||||||
|
|
||||||
LEGACY_COMPILER_TO_BUILTIN = {
|
|
||||||
"clang": "llvm",
|
|
||||||
"oneapi": "intel-oneapi-compilers",
|
|
||||||
"rocmcc": "llvm-amdgpu",
|
|
||||||
"intel": "intel-oneapi-compilers-classic",
|
|
||||||
"arm": "acfl",
|
|
||||||
}
|
|
@@ -110,13 +110,6 @@ def __init__(self, root):
|
|||||||
self._write_transaction_impl = llnl.util.lang.nullcontext
|
self._write_transaction_impl = llnl.util.lang.nullcontext
|
||||||
self._read_transaction_impl = llnl.util.lang.nullcontext
|
self._read_transaction_impl = llnl.util.lang.nullcontext
|
||||||
|
|
||||||
def _handle_old_db_versions_read(self, check, db, *, reindex: bool):
|
|
||||||
if not self.is_readable():
|
|
||||||
raise spack_db.DatabaseNotReadableError(
|
|
||||||
f"cannot read buildcache v{self.db_version} at {self.root}"
|
|
||||||
)
|
|
||||||
return self._handle_current_version_read(check, db)
|
|
||||||
|
|
||||||
|
|
||||||
class FetchCacheError(Exception):
|
class FetchCacheError(Exception):
|
||||||
"""Error thrown when fetching the cache failed, usually a composite error list."""
|
"""Error thrown when fetching the cache failed, usually a composite error list."""
|
||||||
@@ -249,7 +242,7 @@ def _associate_built_specs_with_mirror(self, cache_key, mirror_url):
|
|||||||
self._index_file_cache.init_entry(cache_key)
|
self._index_file_cache.init_entry(cache_key)
|
||||||
cache_path = self._index_file_cache.cache_path(cache_key)
|
cache_path = self._index_file_cache.cache_path(cache_key)
|
||||||
with self._index_file_cache.read_transaction(cache_key):
|
with self._index_file_cache.read_transaction(cache_key):
|
||||||
db._read_from_file(pathlib.Path(cache_path))
|
db._read_from_file(cache_path)
|
||||||
except spack_db.InvalidDatabaseVersionError as e:
|
except spack_db.InvalidDatabaseVersionError as e:
|
||||||
tty.warn(
|
tty.warn(
|
||||||
f"you need a newer Spack version to read the buildcache index for the "
|
f"you need a newer Spack version to read the buildcache index for the "
|
||||||
|
@@ -234,6 +234,14 @@ def _root_spec(spec_str: str) -> str:
|
|||||||
# Add a compiler and platform requirement to the root spec.
|
# Add a compiler and platform requirement to the root spec.
|
||||||
platform = str(spack.platforms.host())
|
platform = str(spack.platforms.host())
|
||||||
|
|
||||||
|
if platform == "darwin":
|
||||||
|
spec_str += " %apple-clang"
|
||||||
|
elif platform == "windows":
|
||||||
|
spec_str += " %msvc"
|
||||||
|
elif platform == "linux":
|
||||||
|
spec_str += " %gcc"
|
||||||
|
elif platform == "freebsd":
|
||||||
|
spec_str += " %clang"
|
||||||
spec_str += f" platform={platform}"
|
spec_str += f" platform={platform}"
|
||||||
target = archspec.cpu.host().family
|
target = archspec.cpu.host().family
|
||||||
spec_str += f" target={target}"
|
spec_str += f" target={target}"
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user