Compare commits
182 Commits
bugfix/tra
...
features/e
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1b4ff30665 | ||
![]() |
c10797718a | ||
![]() |
81ea29b007 | ||
![]() |
d8666a7fdf | ||
![]() |
7c41bba6f8 | ||
![]() |
20e9fe3785 | ||
![]() |
401218b4f1 | ||
![]() |
adfc1c0896 | ||
![]() |
f4402c1cde | ||
![]() |
c1d6d93388 | ||
![]() |
e9012c7781 | ||
![]() |
59acfe4f0b | ||
![]() |
004ff9d4e2 | ||
![]() |
9d20be5fe5 | ||
![]() |
edc07dab27 | ||
![]() |
acde8ef104 | ||
![]() |
ed76966a3a | ||
![]() |
2015a51d1a | ||
![]() |
34b8fe827e | ||
![]() |
6f1ed9b2e4 | ||
![]() |
dd00f50943 | ||
![]() |
f0ec625321 | ||
![]() |
d406c371a8 | ||
![]() |
42d374a34d | ||
![]() |
d90e4fcc3d | ||
![]() |
a44fde9dc9 | ||
![]() |
9ac8841dab | ||
![]() |
a1f87638ec | ||
![]() |
3b55e0a65d | ||
![]() |
42667fe7fa | ||
![]() |
cd27611d2f | ||
![]() |
b111d2172e | ||
![]() |
055263fa3c | ||
![]() |
f34f207bdc | ||
![]() |
0c9f0fd40d | ||
![]() |
24d5b1e645 | ||
![]() |
616f7bcaef | ||
![]() |
dace0316a2 | ||
![]() |
3bb86418b8 | ||
![]() |
6f6489a2c7 | ||
![]() |
543b697df1 | ||
![]() |
042dc2e1d8 | ||
![]() |
f745e49d9a | ||
![]() |
eda21cdfba | ||
![]() |
bc8b026072 | ||
![]() |
0f84782fcc | ||
![]() |
43b86ce282 | ||
![]() |
d30698d9a8 | ||
![]() |
8e9efa86c8 | ||
![]() |
84faf5a6cf | ||
![]() |
9428749a3c | ||
![]() |
efdac68c28 | ||
![]() |
5398c31e82 | ||
![]() |
188168c476 | ||
![]() |
4af84ac208 | ||
![]() |
deb8b51098 | ||
![]() |
0d582b2ea9 | ||
![]() |
f88b01c34b | ||
![]() |
0533c6a1b8 | ||
![]() |
f73d5c2b0e | ||
![]() |
567d0ee455 | ||
![]() |
577df6f498 | ||
![]() |
8790efbcfe | ||
![]() |
212b1edb6b | ||
![]() |
d85a27f317 | ||
![]() |
5622afbfd1 | ||
![]() |
f345038317 | ||
![]() |
e43d4cfee0 | ||
![]() |
7070658e2a | ||
![]() |
fc4b032fb4 | ||
![]() |
8c97d8ad3f | ||
![]() |
26107fe6b2 | ||
![]() |
9278c0df21 | ||
![]() |
37e95713f4 | ||
![]() |
3ae8a3a517 | ||
![]() |
031af84e90 | ||
![]() |
7d4b65491d | ||
![]() |
3038d1e7cd | ||
![]() |
b2e6ef97ce | ||
![]() |
e55236ce5b | ||
![]() |
68dfd6ba6e | ||
![]() |
38d2459f94 | ||
![]() |
e309f367af | ||
![]() |
3b59c95323 | ||
![]() |
fddaeadff8 | ||
![]() |
c85eaf9dc5 | ||
![]() |
ddec7f8aec | ||
![]() |
f057d7154b | ||
![]() |
a102950d67 | ||
![]() |
783be9b350 | ||
![]() |
27c8135207 | ||
![]() |
77ce4701b9 | ||
![]() |
73ad3f729e | ||
![]() |
1e7a64ad85 | ||
![]() |
3a5864bcdb | ||
![]() |
7e13a7dccb | ||
![]() |
e3249fa155 | ||
![]() |
0c20760576 | ||
![]() |
7ee7995493 | ||
![]() |
ba1fac1c31 | ||
![]() |
b05f0ecb6f | ||
![]() |
d5c66b75c3 | ||
![]() |
98303d6956 | ||
![]() |
4622d638a6 | ||
![]() |
02023265fc | ||
![]() |
8a075998f8 | ||
![]() |
f2f48b1872 | ||
![]() |
168d63c447 | ||
![]() |
c25d4cbc1d | ||
![]() |
ccb07538f7 | ||
![]() |
1356b13b2f | ||
![]() |
935f862863 | ||
![]() |
9f6d9df302 | ||
![]() |
65d33c02a1 | ||
![]() |
40073e7b21 | ||
![]() |
752e02e2f2 | ||
![]() |
d717b3a33f | ||
![]() |
9817f24c9a | ||
![]() |
1f7c4b0557 | ||
![]() |
6c42d2b7f7 | ||
![]() |
8df036a5a5 | ||
![]() |
582ebee74c | ||
![]() |
1017b9ddde | ||
![]() |
80ae73119d | ||
![]() |
1d88f690a4 | ||
![]() |
fbb271d804 | ||
![]() |
d6aac873b7 | ||
![]() |
ab3ffd9361 | ||
![]() |
3b9454a5cc | ||
![]() |
c8eb0f9361 | ||
![]() |
fb0f14eb06 | ||
![]() |
e489ee4e2e | ||
![]() |
fcd49f2f08 | ||
![]() |
b3268c2703 | ||
![]() |
d1bfcfafe3 | ||
![]() |
490c9f5e16 | ||
![]() |
85628d1474 | ||
![]() |
720c34d18d | ||
![]() |
cd175377ca | ||
![]() |
b91ec05e13 | ||
![]() |
3bb15f420b | ||
![]() |
124a81df5b | ||
![]() |
d9472c083d | ||
![]() |
ac2a5ef4dd | ||
![]() |
ea210a6acf | ||
![]() |
afb3bef7af | ||
![]() |
b5b5881426 | ||
![]() |
76fc7915a8 | ||
![]() |
e7798b619b | ||
![]() |
8ecef12a20 | ||
![]() |
694292ebbf | ||
![]() |
7f18f6f8a1 | ||
![]() |
0b12a480eb | ||
![]() |
2d91a79af3 | ||
![]() |
72fcee7227 | ||
![]() |
d147ef231f | ||
![]() |
1c7af83d32 | ||
![]() |
b982dfc071 | ||
![]() |
c0da8a00fc | ||
![]() |
3f18f689d8 | ||
![]() |
9dc4553cf3 | ||
![]() |
9a99c94b75 | ||
![]() |
682f0b2a54 | ||
![]() |
dbab0c1ff5 | ||
![]() |
2bf95f5340 | ||
![]() |
55561405b8 | ||
![]() |
8eef458cea | ||
![]() |
64eea9d996 | ||
![]() |
60b4e2128b | ||
![]() |
2f8cea2792 | ||
![]() |
06f9bcf734 | ||
![]() |
ee2725762f | ||
![]() |
eace0a177c | ||
![]() |
80c7d74707 | ||
![]() |
a6f5bf821d | ||
![]() |
b214406253 | ||
![]() |
5b003d80e5 | ||
![]() |
185b2d3ee7 | ||
![]() |
71bb2a1899 | ||
![]() |
785c31b730 | ||
![]() |
175da4a88a | ||
![]() |
73fc1ef11c |
4
.github/workflows/audit.yaml
vendored
4
.github/workflows/audit.yaml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # @v2
|
||||
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # @v2
|
||||
- uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # @v2
|
||||
with:
|
||||
python-version: ${{inputs.python_version}}
|
||||
- name: Install Python packages
|
||||
@@ -38,7 +38,7 @@ jobs:
|
||||
run: |
|
||||
. share/spack/setup-env.sh
|
||||
$(which spack) audit packages
|
||||
- uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2 # @v2.1.0
|
||||
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # @v2.1.0
|
||||
if: ${{ inputs.with_coverage == 'true' }}
|
||||
with:
|
||||
flags: unittests,linux,audits
|
||||
|
31
.github/workflows/nightly-win-builds.yml
vendored
Normal file
31
.github/workflows/nightly-win-builds.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
name: Windows Paraview Nightly
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 2 * * *' # Run at 2 am
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell:
|
||||
powershell Invoke-Expression -Command "./share/spack/qa/windows_test_setup.ps1"; {0}
|
||||
|
||||
|
||||
jobs:
|
||||
build-paraview-deps:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0
|
||||
with:
|
||||
python-version: 3.9
|
||||
- name: Install Python packages
|
||||
run: |
|
||||
python -m pip install --upgrade pip six pywin32 setuptools coverage
|
||||
- name: Build Test
|
||||
run: |
|
||||
spack compiler find
|
||||
spack external find cmake ninja win-sdk win-wdk wgl msmpi
|
||||
spack -d install -y --cdash-upload-url https://cdash.spack.io/submit.php?project=Spack+on+Windows --cdash-track Nightly --only dependencies paraview
|
||||
exit 0
|
16
.github/workflows/unit_tests.yaml
vendored
16
.github/workflows/unit_tests.yaml
vendored
@@ -50,7 +50,7 @@ jobs:
|
||||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # @v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # @v2
|
||||
- uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # @v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install System packages
|
||||
@@ -87,7 +87,7 @@ jobs:
|
||||
UNIT_TEST_COVERAGE: ${{ matrix.python-version == '3.11' }}
|
||||
run: |
|
||||
share/spack/qa/run-unit-tests
|
||||
- uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2
|
||||
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
|
||||
with:
|
||||
flags: unittests,linux,${{ matrix.concretizer }}
|
||||
# Test shell integration
|
||||
@@ -97,7 +97,7 @@ jobs:
|
||||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # @v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # @v2
|
||||
- uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # @v2
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Install System packages
|
||||
@@ -118,7 +118,7 @@ jobs:
|
||||
COVERAGE: true
|
||||
run: |
|
||||
share/spack/qa/run-shell-tests
|
||||
- uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2
|
||||
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
|
||||
with:
|
||||
flags: shelltests,linux
|
||||
|
||||
@@ -155,7 +155,7 @@ jobs:
|
||||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # @v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # @v2
|
||||
- uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # @v2
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Install System packages
|
||||
@@ -176,7 +176,7 @@ jobs:
|
||||
SPACK_TEST_SOLVER: clingo
|
||||
run: |
|
||||
share/spack/qa/run-unit-tests
|
||||
- uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2 # @v2.1.0
|
||||
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # @v2.1.0
|
||||
with:
|
||||
flags: unittests,linux,clingo
|
||||
# Run unit tests on MacOS
|
||||
@@ -189,7 +189,7 @@ jobs:
|
||||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # @v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # @v2
|
||||
- uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # @v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install Python packages
|
||||
@@ -211,6 +211,6 @@ jobs:
|
||||
$(which spack) solve zlib
|
||||
common_args=(--dist loadfile --tx '4*popen//python=./bin/spack-tmpconfig python -u ./bin/spack python' -x)
|
||||
$(which spack) unit-test --cov --cov-config=pyproject.toml --cov-report=xml:coverage.xml "${common_args[@]}"
|
||||
- uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2
|
||||
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
|
||||
with:
|
||||
flags: unittests,macos
|
||||
|
4
.github/workflows/valid-style.yml
vendored
4
.github/workflows/valid-style.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # @v2
|
||||
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # @v2
|
||||
- uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # @v2
|
||||
with:
|
||||
python-version: '3.11'
|
||||
cache: 'pip'
|
||||
@@ -38,7 +38,7 @@ jobs:
|
||||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # @v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b # @v2
|
||||
- uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # @v2
|
||||
with:
|
||||
python-version: '3.11'
|
||||
cache: 'pip'
|
||||
|
10
.github/workflows/windows_python.yml
vendored
10
.github/workflows/windows_python.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b
|
||||
- uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0
|
||||
with:
|
||||
python-version: 3.9
|
||||
- name: Install Python packages
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
./share/spack/qa/validate_last_exit.ps1
|
||||
coverage combine -a
|
||||
coverage xml
|
||||
- uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2
|
||||
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
|
||||
with:
|
||||
flags: unittests,windows
|
||||
unit-tests-cmd:
|
||||
@@ -42,7 +42,7 @@ jobs:
|
||||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b
|
||||
- uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0
|
||||
with:
|
||||
python-version: 3.9
|
||||
- name: Install Python packages
|
||||
@@ -57,7 +57,7 @@ jobs:
|
||||
./share/spack/qa/validate_last_exit.ps1
|
||||
coverage combine -a
|
||||
coverage xml
|
||||
- uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2
|
||||
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
|
||||
with:
|
||||
flags: unittests,windows
|
||||
build-abseil:
|
||||
@@ -66,7 +66,7 @@ jobs:
|
||||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b
|
||||
- uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0
|
||||
with:
|
||||
python-version: 3.9
|
||||
- name: Install Python packages
|
||||
|
@@ -317,7 +317,7 @@ installed, but you know that new compilers have been added to your
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ module load gcc-4.9.0
|
||||
$ module load gcc/4.9.0
|
||||
$ spack compiler find
|
||||
==> Added 1 new compiler to ~/.spack/linux/compilers.yaml
|
||||
gcc@4.9.0
|
||||
|
@@ -35,27 +35,27 @@ showing lots of installed packages:
|
||||
$ module avail
|
||||
|
||||
--------------------------------------------------------------- ~/spack/share/spack/modules/linux-ubuntu14-x86_64 ---------------------------------------------------------------
|
||||
autoconf-2.69-gcc-4.8-qextxkq hwloc-1.11.6-gcc-6.3.0-akcisez m4-1.4.18-gcc-4.8-ev2znoc openblas-0.2.19-gcc-6.3.0-dhkmed6 py-setuptools-34.2.0-gcc-6.3.0-fadur4s
|
||||
automake-1.15-gcc-4.8-maqvukj isl-0.18-gcc-4.8-afi6taq m4-1.4.18-gcc-6.3.0-uppywnz openmpi-2.1.0-gcc-6.3.0-go2s4z5 py-six-1.10.0-gcc-6.3.0-p4dhkaw
|
||||
binutils-2.28-gcc-4.8-5s7c6rs libiconv-1.15-gcc-4.8-at46wg3 mawk-1.3.4-gcc-4.8-acjez57 openssl-1.0.2k-gcc-4.8-dkls5tk python-2.7.13-gcc-6.3.0-tyehea7
|
||||
bison-3.0.4-gcc-4.8-ek4luo5 libpciaccess-0.13.4-gcc-6.3.0-gmufnvh mawk-1.3.4-gcc-6.3.0-ostdoms openssl-1.0.2k-gcc-6.3.0-gxgr5or readline-7.0-gcc-4.8-xhufqhn
|
||||
bzip2-1.0.6-gcc-4.8-iffrxzn libsigsegv-2.11-gcc-4.8-pp2cvte mpc-1.0.3-gcc-4.8-g5mztc5 pcre-8.40-gcc-4.8-r5pbrxb readline-7.0-gcc-6.3.0-zzcyicg
|
||||
bzip2-1.0.6-gcc-6.3.0-bequudr libsigsegv-2.11-gcc-6.3.0-7enifnh mpfr-3.1.5-gcc-4.8-o7xm7az perl-5.24.1-gcc-4.8-dg5j65u sqlite-3.8.5-gcc-6.3.0-6zoruzj
|
||||
cmake-3.7.2-gcc-6.3.0-fowuuby libtool-2.4.6-gcc-4.8-7a523za mpich-3.2-gcc-6.3.0-dmvd3aw perl-5.24.1-gcc-6.3.0-6uzkpt6 tar-1.29-gcc-4.8-wse2ass
|
||||
curl-7.53.1-gcc-4.8-3fz46n6 libtool-2.4.6-gcc-6.3.0-n7zmbzt ncurses-6.0-gcc-4.8-dcpe7ia pkg-config-0.29.2-gcc-4.8-ib33t75 tcl-8.6.6-gcc-4.8-tfxzqbr
|
||||
expat-2.2.0-gcc-4.8-mrv6bd4 libxml2-2.9.4-gcc-4.8-ryzxnsu ncurses-6.0-gcc-6.3.0-ucbhcdy pkg-config-0.29.2-gcc-6.3.0-jpgubk3 util-macros-1.19.1-gcc-6.3.0-xorz2x2
|
||||
flex-2.6.3-gcc-4.8-yf345oo libxml2-2.9.4-gcc-6.3.0-rltzsdh netlib-lapack-3.6.1-gcc-6.3.0-js33dog py-appdirs-1.4.0-gcc-6.3.0-jxawmw7 xz-5.2.3-gcc-4.8-mew4log
|
||||
gcc-6.3.0-gcc-4.8-24puqve lmod-7.4.1-gcc-4.8-je4srhr netlib-scalapack-2.0.2-gcc-6.3.0-5aidk4l py-numpy-1.12.0-gcc-6.3.0-oemmoeu xz-5.2.3-gcc-6.3.0-3vqeuvb
|
||||
gettext-0.19.8.1-gcc-4.8-yymghlh lua-5.3.4-gcc-4.8-im75yaz netlib-scalapack-2.0.2-gcc-6.3.0-hjsemcn py-packaging-16.8-gcc-6.3.0-i2n3dtl zip-3.0-gcc-4.8-rwar22d
|
||||
gmp-6.1.2-gcc-4.8-5ub2wu5 lua-luafilesystem-1_6_3-gcc-4.8-wkey3nl netlib-scalapack-2.0.2-gcc-6.3.0-jva724b py-pyparsing-2.1.10-gcc-6.3.0-tbo6gmw zlib-1.2.11-gcc-4.8-pgxsxv7
|
||||
help2man-1.47.4-gcc-4.8-kcnqmau lua-luaposix-33.4.0-gcc-4.8-mdod2ry netlib-scalapack-2.0.2-gcc-6.3.0-rgqfr6d py-scipy-0.19.0-gcc-6.3.0-kr7nat4 zlib-1.2.11-gcc-6.3.0-7cqp6cj
|
||||
autoconf/2.69-gcc-4.8-qextxkq hwloc/1.11.6-gcc-6.3.0-akcisez m4/1.4.18-gcc-4.8-ev2znoc openblas/0.2.19-gcc-6.3.0-dhkmed6 py-setuptools/34.2.0-gcc-6.3.0-fadur4s
|
||||
automake/1.15-gcc-4.8-maqvukj isl/0.18-gcc-4.8-afi6taq m4/1.4.18-gcc-6.3.0-uppywnz openmpi/2.1.0-gcc-6.3.0-go2s4z5 py-six/1.10.0-gcc-6.3.0-p4dhkaw
|
||||
binutils/2.28-gcc-4.8-5s7c6rs libiconv/1.15-gcc-4.8-at46wg3 mawk/1.3.4-gcc-4.8-acjez57 openssl/1.0.2k-gcc-4.8-dkls5tk python/2.7.13-gcc-6.3.0-tyehea7
|
||||
bison/3.0.4-gcc-4.8-ek4luo5 libpciaccess/0.13.4-gcc-6.3.0-gmufnvh mawk/1.3.4-gcc-6.3.0-ostdoms openssl/1.0.2k-gcc-6.3.0-gxgr5or readline/7.0-gcc-4.8-xhufqhn
|
||||
bzip2/1.0.6-gcc-4.8-iffrxzn libsigsegv/2.11-gcc-4.8-pp2cvte mpc/1.0.3-gcc-4.8-g5mztc5 pcre/8.40-gcc-4.8-r5pbrxb readline/7.0-gcc-6.3.0-zzcyicg
|
||||
bzip2/1.0.6-gcc-6.3.0-bequudr libsigsegv/2.11-gcc-6.3.0-7enifnh mpfr/3.1.5-gcc-4.8-o7xm7az perl/5.24.1-gcc-4.8-dg5j65u sqlite/3.8.5-gcc-6.3.0-6zoruzj
|
||||
cmake/3.7.2-gcc-6.3.0-fowuuby libtool/2.4.6-gcc-4.8-7a523za mpich/3.2-gcc-6.3.0-dmvd3aw perl/5.24.1-gcc-6.3.0-6uzkpt6 tar/1.29-gcc-4.8-wse2ass
|
||||
curl/7.53.1-gcc-4.8-3fz46n6 libtool/2.4.6-gcc-6.3.0-n7zmbzt ncurses/6.0-gcc-4.8-dcpe7ia pkg-config/0.29.2-gcc-4.8-ib33t75 tcl/8.6.6-gcc-4.8-tfxzqbr
|
||||
expat/2.2.0-gcc-4.8-mrv6bd4 libxml2/2.9.4-gcc-4.8-ryzxnsu ncurses/6.0-gcc-6.3.0-ucbhcdy pkg-config/0.29.2-gcc-6.3.0-jpgubk3 util-macros/1.19.1-gcc-6.3.0-xorz2x2
|
||||
flex/2.6.3-gcc-4.8-yf345oo libxml2/2.9.4-gcc-6.3.0-rltzsdh netlib-lapack/3.6.1-gcc-6.3.0-js33dog py-appdirs/1.4.0-gcc-6.3.0-jxawmw7 xz/5.2.3-gcc-4.8-mew4log
|
||||
gcc/6.3.0-gcc-4.8-24puqve lmod/7.4.1-gcc-4.8-je4srhr netlib-scalapack/2.0.2-gcc-6.3.0-5aidk4l py-numpy/1.12.0-gcc-6.3.0-oemmoeu xz/5.2.3-gcc-6.3.0-3vqeuvb
|
||||
gettext/0.19.8.1-gcc-4.8-yymghlh lua/5.3.4-gcc-4.8-im75yaz netlib-scalapack/2.0.2-gcc-6.3.0-hjsemcn py-packaging/16.8-gcc-6.3.0-i2n3dtl zip/3.0-gcc-4.8-rwar22d
|
||||
gmp/6.1.2-gcc-4.8-5ub2wu5 lua-luafilesystem/1_6_3-gcc-4.8-wkey3nl netlib-scalapack/2.0.2-gcc-6.3.0-jva724b py-pyparsing/2.1.10-gcc-6.3.0-tbo6gmw zlib/1.2.11-gcc-4.8-pgxsxv7
|
||||
help2man/1.47.4-gcc-4.8-kcnqmau lua-luaposix/33.4.0-gcc-4.8-mdod2ry netlib-scalapack/2.0.2-gcc-6.3.0-rgqfr6d py-scipy/0.19.0-gcc-6.3.0-kr7nat4 zlib/1.2.11-gcc-6.3.0-7cqp6cj
|
||||
|
||||
The names should look familiar, as they resemble the output from ``spack find``.
|
||||
For example, you could type the following command to load the ``cmake`` module:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ module load cmake-3.7.2-gcc-6.3.0-fowuuby
|
||||
$ module load cmake/3.7.2-gcc-6.3.0-fowuuby
|
||||
|
||||
Neither of these is particularly pretty, easy to remember, or easy to
|
||||
type. Luckily, Spack offers many facilities for customizing the module
|
||||
@@ -779,35 +779,35 @@ cut-and-pasted into a shell script. For example:
|
||||
|
||||
$ spack module tcl loads --dependencies py-numpy git
|
||||
# bzip2@1.0.6%gcc@4.9.3=linux-x86_64
|
||||
module load bzip2-1.0.6-gcc-4.9.3-ktnrhkrmbbtlvnagfatrarzjojmkvzsx
|
||||
module load bzip2/1.0.6-gcc-4.9.3-ktnrhkrmbbtlvnagfatrarzjojmkvzsx
|
||||
# ncurses@6.0%gcc@4.9.3=linux-x86_64
|
||||
module load ncurses-6.0-gcc-4.9.3-kaazyneh3bjkfnalunchyqtygoe2mncv
|
||||
module load ncurses/6.0-gcc-4.9.3-kaazyneh3bjkfnalunchyqtygoe2mncv
|
||||
# zlib@1.2.8%gcc@4.9.3=linux-x86_64
|
||||
module load zlib-1.2.8-gcc-4.9.3-v3ufwaahjnviyvgjcelo36nywx2ufj7z
|
||||
module load zlib/1.2.8-gcc-4.9.3-v3ufwaahjnviyvgjcelo36nywx2ufj7z
|
||||
# sqlite@3.8.5%gcc@4.9.3=linux-x86_64
|
||||
module load sqlite-3.8.5-gcc-4.9.3-a3eediswgd5f3rmto7g3szoew5nhehbr
|
||||
module load sqlite/3.8.5-gcc-4.9.3-a3eediswgd5f3rmto7g3szoew5nhehbr
|
||||
# readline@6.3%gcc@4.9.3=linux-x86_64
|
||||
module load readline-6.3-gcc-4.9.3-se6r3lsycrwxyhreg4lqirp6xixxejh3
|
||||
module load readline/6.3-gcc-4.9.3-se6r3lsycrwxyhreg4lqirp6xixxejh3
|
||||
# python@3.5.1%gcc@4.9.3=linux-x86_64
|
||||
module load python-3.5.1-gcc-4.9.3-5q5rsrtjld4u6jiicuvtnx52m7tfhegi
|
||||
module load python/3.5.1-gcc-4.9.3-5q5rsrtjld4u6jiicuvtnx52m7tfhegi
|
||||
# py-setuptools@20.5%gcc@4.9.3=linux-x86_64
|
||||
module load py-setuptools-20.5-gcc-4.9.3-4qr2suj6p6glepnedmwhl4f62x64wxw2
|
||||
module load py-setuptools/20.5-gcc-4.9.3-4qr2suj6p6glepnedmwhl4f62x64wxw2
|
||||
# py-nose@1.3.7%gcc@4.9.3=linux-x86_64
|
||||
module load py-nose-1.3.7-gcc-4.9.3-pwhtjw2dvdvfzjwuuztkzr7b4l6zepli
|
||||
module load py-nose/1.3.7-gcc-4.9.3-pwhtjw2dvdvfzjwuuztkzr7b4l6zepli
|
||||
# openblas@0.2.17%gcc@4.9.3+shared=linux-x86_64
|
||||
module load openblas-0.2.17-gcc-4.9.3-pw6rmlom7apfsnjtzfttyayzc7nx5e7y
|
||||
module load openblas/0.2.17-gcc-4.9.3-pw6rmlom7apfsnjtzfttyayzc7nx5e7y
|
||||
# py-numpy@1.11.0%gcc@4.9.3+blas+lapack=linux-x86_64
|
||||
module load py-numpy-1.11.0-gcc-4.9.3-mulodttw5pcyjufva4htsktwty4qd52r
|
||||
module load py-numpy/1.11.0-gcc-4.9.3-mulodttw5pcyjufva4htsktwty4qd52r
|
||||
# curl@7.47.1%gcc@4.9.3=linux-x86_64
|
||||
module load curl-7.47.1-gcc-4.9.3-ohz3fwsepm3b462p5lnaquv7op7naqbi
|
||||
module load curl/7.47.1-gcc-4.9.3-ohz3fwsepm3b462p5lnaquv7op7naqbi
|
||||
# autoconf@2.69%gcc@4.9.3=linux-x86_64
|
||||
module load autoconf-2.69-gcc-4.9.3-bkibjqhgqm5e3o423ogfv2y3o6h2uoq4
|
||||
module load autoconf/2.69-gcc-4.9.3-bkibjqhgqm5e3o423ogfv2y3o6h2uoq4
|
||||
# cmake@3.5.0%gcc@4.9.3~doc+ncurses+openssl~qt=linux-x86_64
|
||||
module load cmake-3.5.0-gcc-4.9.3-x7xnsklmgwla3ubfgzppamtbqk5rwn7t
|
||||
module load cmake/3.5.0-gcc-4.9.3-x7xnsklmgwla3ubfgzppamtbqk5rwn7t
|
||||
# expat@2.1.0%gcc@4.9.3=linux-x86_64
|
||||
module load expat-2.1.0-gcc-4.9.3-6pkz2ucnk2e62imwakejjvbv6egncppd
|
||||
module load expat/2.1.0-gcc-4.9.3-6pkz2ucnk2e62imwakejjvbv6egncppd
|
||||
# git@2.8.0-rc2%gcc@4.9.3+curl+expat=linux-x86_64
|
||||
module load git-2.8.0-rc2-gcc-4.9.3-3bib4hqtnv5xjjoq5ugt3inblt4xrgkd
|
||||
module load git/2.8.0-rc2-gcc-4.9.3-3bib4hqtnv5xjjoq5ugt3inblt4xrgkd
|
||||
|
||||
The script may be further edited by removing unnecessary modules.
|
||||
|
||||
@@ -826,12 +826,12 @@ For example, consider the following on one system:
|
||||
.. code-block:: console
|
||||
|
||||
$ module avail
|
||||
linux-SuSE11-x86_64/antlr-2.7.7-gcc-5.3.0-bdpl46y
|
||||
linux-SuSE11-x86_64/antlr/2.7.7-gcc-5.3.0-bdpl46y
|
||||
|
||||
$ spack module tcl loads antlr # WRONG!
|
||||
# antlr@2.7.7%gcc@5.3.0~csharp+cxx~java~python arch=linux-SuSE11-x86_64
|
||||
module load antlr-2.7.7-gcc-5.3.0-bdpl46y
|
||||
module load antlr/2.7.7-gcc-5.3.0-bdpl46y
|
||||
|
||||
$ spack module tcl loads --prefix linux-SuSE11-x86_64/ antlr
|
||||
# antlr@2.7.7%gcc@5.3.0~csharp+cxx~java~python arch=linux-SuSE11-x86_64
|
||||
module load linux-SuSE11-x86_64/antlr-2.7.7-gcc-5.3.0-bdpl46y
|
||||
module load linux-SuSE11-x86_64/antlr/2.7.7-gcc-5.3.0-bdpl46y
|
||||
|
@@ -1373,7 +1373,7 @@ def long_message(self):
|
||||
test_log = join_path(os.path.dirname(self.log_name), spack_install_test_log)
|
||||
if os.path.isfile(test_log):
|
||||
out.write("\nSee test log for details:\n")
|
||||
out.write(" {0}n".format(test_log))
|
||||
out.write(" {0}\n".format(test_log))
|
||||
|
||||
return out.getvalue()
|
||||
|
||||
|
@@ -2,6 +2,7 @@
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
import collections.abc
|
||||
import os
|
||||
from typing import Tuple
|
||||
|
||||
@@ -13,21 +14,24 @@
|
||||
from .cmake import CMakeBuilder, CMakePackage
|
||||
|
||||
|
||||
def cmake_cache_path(name, value, comment=""):
|
||||
def cmake_cache_path(name, value, comment="", force=False):
|
||||
"""Generate a string for a cmake cache variable"""
|
||||
return 'set({0} "{1}" CACHE PATH "{2}")\n'.format(name, value, comment)
|
||||
force_str = " FORCE" if force else ""
|
||||
return 'set({0} "{1}" CACHE PATH "{2}"{3})\n'.format(name, value, comment, force_str)
|
||||
|
||||
|
||||
def cmake_cache_string(name, value, comment=""):
|
||||
def cmake_cache_string(name, value, comment="", force=False):
|
||||
"""Generate a string for a cmake cache variable"""
|
||||
return 'set({0} "{1}" CACHE STRING "{2}")\n'.format(name, value, comment)
|
||||
force_str = " FORCE" if force else ""
|
||||
return 'set({0} "{1}" CACHE STRING "{2}"{3})\n'.format(name, value, comment, force_str)
|
||||
|
||||
|
||||
def cmake_cache_option(name, boolean_value, comment=""):
|
||||
def cmake_cache_option(name, boolean_value, comment="", force=False):
|
||||
"""Generate a string for a cmake configuration option"""
|
||||
|
||||
value = "ON" if boolean_value else "OFF"
|
||||
return 'set({0} {1} CACHE BOOL "{2}")\n'.format(name, value, comment)
|
||||
force_str = " FORCE" if force else ""
|
||||
return 'set({0} {1} CACHE BOOL "{2}"{3})\n'.format(name, value, comment, force_str)
|
||||
|
||||
|
||||
class CachedCMakeBuilder(CMakeBuilder):
|
||||
@@ -63,6 +67,34 @@ def cache_name(self):
|
||||
def cache_path(self):
|
||||
return os.path.join(self.pkg.stage.source_path, self.cache_name)
|
||||
|
||||
# Implement a version of the define_from_variant for Cached packages
|
||||
def define_cmake_cache_from_variant(self, cmake_var, variant=None, comment=""):
|
||||
"""Return a Cached CMake field from the given variant's value.
|
||||
See define_from_variant in lib/spack/spack/build_systems/cmake.py package
|
||||
"""
|
||||
|
||||
if variant is None:
|
||||
variant = cmake_var.lower()
|
||||
|
||||
if variant not in self.pkg.variants:
|
||||
raise KeyError('"{0}" is not a variant of "{1}"'.format(variant, self.pkg.name))
|
||||
|
||||
if variant not in self.pkg.spec.variants:
|
||||
return ""
|
||||
|
||||
value = self.pkg.spec.variants[variant].value
|
||||
field = None
|
||||
if isinstance(value, bool):
|
||||
field = cmake_cache_option(cmake_var, value, comment)
|
||||
else:
|
||||
if isinstance(value, collections.abc.Sequence) and not isinstance(value, str):
|
||||
value = ";".join(str(v) for v in value)
|
||||
else:
|
||||
value = str(value)
|
||||
field = cmake_cache_string(cmake_var, value, comment)
|
||||
|
||||
return field
|
||||
|
||||
def initconfig_compiler_entries(self):
|
||||
# This will tell cmake to use the Spack compiler wrappers when run
|
||||
# through Spack, but use the underlying compiler when run outside of
|
||||
@@ -130,6 +162,17 @@ def initconfig_compiler_entries(self):
|
||||
libs_string = libs_format_string.format(lang)
|
||||
entries.append(cmake_cache_string(libs_string, libs_flags))
|
||||
|
||||
# Set the generator in the cached config
|
||||
if self.spec.satisfies("generator=make"):
|
||||
entries.append(cmake_cache_string("CMAKE_GENERATOR", "Unix Makefiles"))
|
||||
if self.spec.satisfies("generator=ninja"):
|
||||
entries.append(cmake_cache_string("CMAKE_GENERATOR", "Ninja"))
|
||||
entries.append(
|
||||
cmake_cache_string(
|
||||
"CMAKE_MAKE_PROGRAM", "{0}/ninja".format(spec["ninja"].prefix.bin)
|
||||
)
|
||||
)
|
||||
|
||||
return entries
|
||||
|
||||
def initconfig_mpi_entries(self):
|
||||
@@ -195,26 +238,57 @@ def initconfig_hardware_entries(self):
|
||||
"#------------------{0}\n".format("-" * 60),
|
||||
]
|
||||
|
||||
# Provide standard CMake arguments for dependent CachedCMakePackages
|
||||
if spec.satisfies("^cuda"):
|
||||
entries.append("#------------------{0}".format("-" * 30))
|
||||
entries.append("# Cuda")
|
||||
entries.append("#------------------{0}\n".format("-" * 30))
|
||||
|
||||
cudatoolkitdir = spec["cuda"].prefix
|
||||
entries.append(cmake_cache_path("CUDA_TOOLKIT_ROOT_DIR", cudatoolkitdir))
|
||||
cudacompiler = "${CUDA_TOOLKIT_ROOT_DIR}/bin/nvcc"
|
||||
entries.append(cmake_cache_path("CMAKE_CUDA_COMPILER", cudacompiler))
|
||||
entries.append(cmake_cache_path("CUDAToolkit_ROOT", cudatoolkitdir))
|
||||
entries.append(cmake_cache_path("CMAKE_CUDA_COMPILER", "${CUDAToolkit_ROOT}/bin/nvcc"))
|
||||
entries.append(cmake_cache_path("CMAKE_CUDA_HOST_COMPILER", "${CMAKE_CXX_COMPILER}"))
|
||||
# Include the deprecated CUDA_TOOLKIT_ROOT_DIR for supporting BLT packages
|
||||
entries.append(cmake_cache_path("CUDA_TOOLKIT_ROOT_DIR", cudatoolkitdir))
|
||||
|
||||
archs = spec.variants["cuda_arch"].value
|
||||
if archs != "none":
|
||||
arch_str = ";".join(archs)
|
||||
entries.append(
|
||||
cmake_cache_string("CMAKE_CUDA_ARCHITECTURES", "{0}".format(arch_str))
|
||||
)
|
||||
|
||||
if "+rocm" in spec:
|
||||
entries.append("#------------------{0}".format("-" * 30))
|
||||
entries.append("# ROCm")
|
||||
entries.append("#------------------{0}\n".format("-" * 30))
|
||||
|
||||
# Explicitly setting HIP_ROOT_DIR may be a patch that is no longer necessary
|
||||
entries.append(cmake_cache_path("HIP_ROOT_DIR", "{0}".format(spec["hip"].prefix)))
|
||||
entries.append(
|
||||
cmake_cache_path("HIP_CXX_COMPILER", "{0}".format(self.spec["hip"].hipcc))
|
||||
)
|
||||
archs = self.spec.variants["amdgpu_target"].value
|
||||
if archs != "none":
|
||||
arch_str = ";".join(archs)
|
||||
entries.append(
|
||||
cmake_cache_string("CMAKE_HIP_ARCHITECTURES", "{0}".format(arch_str))
|
||||
)
|
||||
entries.append(cmake_cache_string("AMDGPU_TARGETS", "{0}".format(arch_str)))
|
||||
entries.append(cmake_cache_string("GPU_TARGETS", "{0}".format(arch_str)))
|
||||
|
||||
return entries
|
||||
|
||||
def std_initconfig_entries(self):
|
||||
cmake_prefix_path_env = os.environ["CMAKE_PREFIX_PATH"]
|
||||
cmake_prefix_path = cmake_prefix_path_env.replace(os.pathsep, ";")
|
||||
return [
|
||||
"#------------------{0}".format("-" * 60),
|
||||
"# !!!! This is a generated file, edit at own risk !!!!",
|
||||
"#------------------{0}".format("-" * 60),
|
||||
"# CMake executable path: {0}".format(self.pkg.spec["cmake"].command.path),
|
||||
"#------------------{0}\n".format("-" * 60),
|
||||
cmake_cache_path("CMAKE_PREFIX_PATH", cmake_prefix_path),
|
||||
]
|
||||
|
||||
def initconfig_package_entries(self):
|
||||
|
@@ -10,6 +10,7 @@
|
||||
from llnl.util.filesystem import find, join_path, working_dir
|
||||
|
||||
import spack.builder
|
||||
import spack.install_test
|
||||
import spack.package_base
|
||||
from spack.directives import build_system, depends_on, extends
|
||||
from spack.multimethod import when
|
||||
@@ -30,8 +31,8 @@ class SIPPackage(spack.package_base.PackageBase):
|
||||
#: Name of private sip module to install alongside package
|
||||
sip_module = "sip"
|
||||
|
||||
#: Callback names for install-time test
|
||||
install_time_test_callbacks = ["test"]
|
||||
#: Callback names for install-time testing
|
||||
install_time_test_callbacks = ["test_imports"]
|
||||
#: Legacy buildsystem attribute used to deserialize and install old specs
|
||||
legacy_buildsystem = "sip"
|
||||
|
||||
@@ -87,18 +88,20 @@ def python(self, *args, **kwargs):
|
||||
"""The python ``Executable``."""
|
||||
inspect.getmodule(self).python(*args, **kwargs)
|
||||
|
||||
def test(self):
|
||||
def test_imports(self):
|
||||
"""Attempts to import modules of the installed package."""
|
||||
|
||||
# Make sure we are importing the installed modules,
|
||||
# not the ones in the source directory
|
||||
python = inspect.getmodule(self).python
|
||||
for module in self.import_modules:
|
||||
self.run_test(
|
||||
inspect.getmodule(self).python.path,
|
||||
["-c", "import {0}".format(module)],
|
||||
with spack.install_test.test_part(
|
||||
self,
|
||||
"test_imports_{0}".format(module),
|
||||
purpose="checking import of {0}".format(module),
|
||||
work_dir="spack-test",
|
||||
)
|
||||
):
|
||||
python("-c", "import {0}".format(module))
|
||||
|
||||
|
||||
@spack.builder.builder("sip")
|
||||
|
@@ -1095,7 +1095,7 @@ def generate_gitlab_ci_yaml(
|
||||
raise AttributeError
|
||||
|
||||
def main_script_replacements(cmd):
|
||||
return cmd.replace("{env_dir}", concrete_env_dir)
|
||||
return cmd.replace("{env_dir}", rel_concrete_env_dir)
|
||||
|
||||
job_object["script"] = _unpack_script(
|
||||
job_object["script"], op=main_script_replacements
|
||||
|
@@ -79,6 +79,12 @@ def setup_parser(subparser):
|
||||
read_cray_manifest.add_argument(
|
||||
"--directory", default=None, help="specify a directory storing a group of manifest files"
|
||||
)
|
||||
read_cray_manifest.add_argument(
|
||||
"--ignore-default-dir",
|
||||
action="store_true",
|
||||
default=False,
|
||||
help="ignore the default directory of manifest files",
|
||||
)
|
||||
read_cray_manifest.add_argument(
|
||||
"--dry-run",
|
||||
action="store_true",
|
||||
@@ -177,11 +183,16 @@ def external_read_cray_manifest(args):
|
||||
manifest_directory=args.directory,
|
||||
dry_run=args.dry_run,
|
||||
fail_on_error=args.fail_on_error,
|
||||
ignore_default_dir=args.ignore_default_dir,
|
||||
)
|
||||
|
||||
|
||||
def _collect_and_consume_cray_manifest_files(
|
||||
manifest_file=None, manifest_directory=None, dry_run=False, fail_on_error=False
|
||||
manifest_file=None,
|
||||
manifest_directory=None,
|
||||
dry_run=False,
|
||||
fail_on_error=False,
|
||||
ignore_default_dir=False,
|
||||
):
|
||||
manifest_files = []
|
||||
if manifest_file:
|
||||
@@ -191,7 +202,7 @@ def _collect_and_consume_cray_manifest_files(
|
||||
if manifest_directory:
|
||||
manifest_dirs.append(manifest_directory)
|
||||
|
||||
if os.path.isdir(cray_manifest.default_path):
|
||||
if not ignore_default_dir and os.path.isdir(cray_manifest.default_path):
|
||||
tty.debug(
|
||||
"Cray manifest path {0} exists: collecting all files to read.".format(
|
||||
cray_manifest.default_path
|
||||
|
@@ -112,36 +112,26 @@ def _to_dict(compiler):
|
||||
def get_compiler_config(scope=None, init_config=True):
|
||||
"""Return the compiler configuration for the specified architecture."""
|
||||
|
||||
def init_compiler_config():
|
||||
"""Compiler search used when Spack has no compilers."""
|
||||
compilers = find_compilers()
|
||||
compilers_dict = []
|
||||
for compiler in compilers:
|
||||
compilers_dict.append(_to_dict(compiler))
|
||||
spack.config.set("compilers", compilers_dict, scope=scope)
|
||||
config = spack.config.get("compilers", scope=scope) or []
|
||||
if config or not init_config:
|
||||
return config
|
||||
|
||||
merged_config = spack.config.get("compilers")
|
||||
if merged_config:
|
||||
return config
|
||||
|
||||
_init_compiler_config(scope=scope)
|
||||
config = spack.config.get("compilers", scope=scope)
|
||||
# Update the configuration if there are currently no compilers
|
||||
# configured. Avoid updating automatically if there ARE site
|
||||
# compilers configured but no user ones.
|
||||
if not config and init_config:
|
||||
if scope is None:
|
||||
# We know no compilers were configured in any scope.
|
||||
init_compiler_config()
|
||||
config = spack.config.get("compilers", scope=scope)
|
||||
elif scope == "user":
|
||||
# Check the site config and update the user config if
|
||||
# nothing is configured at the site level.
|
||||
site_config = spack.config.get("compilers", scope="site")
|
||||
sys_config = spack.config.get("compilers", scope="system")
|
||||
if not site_config and not sys_config:
|
||||
init_compiler_config()
|
||||
config = spack.config.get("compilers", scope=scope)
|
||||
return config
|
||||
elif config:
|
||||
return config
|
||||
else:
|
||||
return [] # Return empty list which we will later append to.
|
||||
return config
|
||||
|
||||
|
||||
def _init_compiler_config(*, scope):
|
||||
"""Compiler search used when Spack has no compilers."""
|
||||
compilers = find_compilers()
|
||||
compilers_dict = []
|
||||
for compiler in compilers:
|
||||
compilers_dict.append(_to_dict(compiler))
|
||||
spack.config.set("compilers", compilers_dict, scope=scope)
|
||||
|
||||
|
||||
def compiler_config_files():
|
||||
|
@@ -151,7 +151,11 @@ def setup_custom_environment(self, pkg, env):
|
||||
arch = arch.replace("-", "_")
|
||||
# vcvars can target specific sdk versions, force it to pick up concretized sdk
|
||||
# version, if needed by spec
|
||||
sdk_ver = "" if "win-sdk" not in pkg.spec else pkg.spec["win-sdk"].version.string + ".0"
|
||||
sdk_ver = (
|
||||
""
|
||||
if "win-sdk" not in pkg.spec or pkg.name == "win-sdk"
|
||||
else pkg.spec["win-sdk"].version.string + ".0"
|
||||
)
|
||||
# provide vcvars with msvc version selected by concretization,
|
||||
# not whatever it happens to pick up on the system (highest available version)
|
||||
out = subprocess.check_output( # novermin
|
||||
|
@@ -48,7 +48,8 @@ def translated_compiler_name(manifest_compiler_name):
|
||||
def compiler_from_entry(entry):
|
||||
compiler_name = translated_compiler_name(entry["name"])
|
||||
paths = entry["executables"]
|
||||
version = entry["version"]
|
||||
# to instantiate a compiler class we may need a concrete version:
|
||||
version = "={}".format(entry["version"])
|
||||
arch = entry["arch"]
|
||||
operating_system = arch["os"]
|
||||
target = arch["target"]
|
||||
|
@@ -460,7 +460,8 @@ def write_tested_status(self):
|
||||
elif self.counts[TestStatus.PASSED] > 0:
|
||||
status = TestStatus.PASSED
|
||||
|
||||
_add_msg_to_file(self.tested_file, f"{status.value}")
|
||||
with open(self.tested_file, "w") as f:
|
||||
f.write(f"{status.value}\n")
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
|
@@ -170,11 +170,9 @@ def merge_config_rules(configuration, spec):
|
||||
Returns:
|
||||
dict: actions to be taken on the spec passed as an argument
|
||||
"""
|
||||
# Construct a dictionary with the actions we need to perform on the spec passed as a parameter
|
||||
spec_configuration = {}
|
||||
# The keyword 'all' is always evaluated first, all the others are
|
||||
# evaluated in order of appearance in the module file
|
||||
spec_configuration.update(copy.deepcopy(configuration.get("all", {})))
|
||||
spec_configuration = copy.deepcopy(configuration.get("all", {}))
|
||||
for constraint, action in configuration.items():
|
||||
if spec.satisfies(constraint):
|
||||
if hasattr(constraint, "override") and constraint.override:
|
||||
@@ -395,7 +393,7 @@ class BaseConfiguration(object):
|
||||
querying easier. It needs to be sub-classed for specific module types.
|
||||
"""
|
||||
|
||||
default_projections = {"all": "{name}-{version}-{compiler.name}-{compiler.version}"}
|
||||
default_projections = {"all": "{name}/{version}-{compiler.name}-{compiler.version}"}
|
||||
|
||||
def __init__(self, spec, module_set_name, explicit=None):
|
||||
# Module where type(self) is defined
|
||||
|
@@ -134,6 +134,7 @@ def filter_hierarchy_specs(self):
|
||||
return configuration(self.name).get("filter_hierarchy_specs", {})
|
||||
|
||||
@property
|
||||
@lang.memoized
|
||||
def hierarchy_tokens(self):
|
||||
"""Returns the list of tokens that are part of the modulefile
|
||||
hierarchy. 'compiler' is always present.
|
||||
@@ -158,6 +159,7 @@ def hierarchy_tokens(self):
|
||||
return tokens
|
||||
|
||||
@property
|
||||
@lang.memoized
|
||||
def requires(self):
|
||||
"""Returns a dictionary mapping all the requirements of this spec
|
||||
to the actual provider. 'compiler' is always present among the
|
||||
@@ -224,6 +226,7 @@ def available(self):
|
||||
return available
|
||||
|
||||
@property
|
||||
@lang.memoized
|
||||
def missing(self):
|
||||
"""Returns the list of tokens that are not available."""
|
||||
return [x for x in self.hierarchy_tokens if x not in self.available]
|
||||
@@ -317,6 +320,7 @@ def available_path_parts(self):
|
||||
return parts
|
||||
|
||||
@property
|
||||
@lang.memoized
|
||||
def unlocked_paths(self):
|
||||
"""Returns a dictionary mapping conditions to a list of unlocked
|
||||
paths.
|
||||
@@ -428,6 +432,7 @@ def missing(self):
|
||||
return self.conf.missing
|
||||
|
||||
@tengine.context_property
|
||||
@lang.memoized
|
||||
def unlocked_paths(self):
|
||||
"""Returns the list of paths that are unlocked unconditionally."""
|
||||
layout = make_layout(self.spec, self.conf.name, self.conf.explicit)
|
||||
|
@@ -37,7 +37,9 @@
|
||||
|
||||
|
||||
def slingshot_network():
|
||||
return os.path.exists("/opt/cray/pe") and os.path.exists("/lib64/libcxi.so")
|
||||
return os.path.exists("/opt/cray/pe") and (
|
||||
os.path.exists("/lib64/libcxi.so") or os.path.exists("/usr/lib64/libcxi.so")
|
||||
)
|
||||
|
||||
|
||||
def _target_name_from_craype_target_name(name):
|
||||
|
@@ -6,7 +6,6 @@
|
||||
import itertools
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
from collections import OrderedDict
|
||||
|
||||
import macholib.mach_o
|
||||
@@ -356,13 +355,7 @@ def _set_elf_rpaths(target, rpaths):
|
||||
# Join the paths using ':' as a separator
|
||||
rpaths_str = ":".join(rpaths)
|
||||
|
||||
# If we're relocating patchelf itself, make a copy and use it
|
||||
bak_path = None
|
||||
if target.endswith("/bin/patchelf"):
|
||||
bak_path = target + ".bak"
|
||||
shutil.copy(target, bak_path)
|
||||
|
||||
patchelf, output = executable.Executable(bak_path or _patchelf()), None
|
||||
patchelf, output = executable.Executable(_patchelf()), None
|
||||
try:
|
||||
# TODO: revisit the use of --force-rpath as it might be conditional
|
||||
# TODO: if we want to support setting RUNPATH from binary packages
|
||||
@@ -371,9 +364,6 @@ def _set_elf_rpaths(target, rpaths):
|
||||
except executable.ProcessError as e:
|
||||
msg = "patchelf --force-rpath --set-rpath {0} failed with error {1}"
|
||||
tty.warn(msg.format(target, e))
|
||||
finally:
|
||||
if bak_path and os.path.exists(bak_path):
|
||||
os.remove(bak_path)
|
||||
return output
|
||||
|
||||
|
||||
|
@@ -614,6 +614,23 @@ def multiple_values_error(self, attribute, pkg):
|
||||
def no_value_error(self, attribute, pkg):
|
||||
return f'Cannot select a single "{attribute}" for package "{pkg}"'
|
||||
|
||||
def _get_cause_tree(self, cause, conditions, condition_causes, literals, indent=" "):
|
||||
parents = [c for e, c in condition_causes if e == cause]
|
||||
local = "required because %s " % conditions[cause]
|
||||
|
||||
return [indent + local] + [
|
||||
c
|
||||
for parent in parents
|
||||
for c in self._get_cause_tree(
|
||||
parent, conditions, condition_causes, literals, indent=indent + " "
|
||||
)
|
||||
]
|
||||
|
||||
def get_cause_tree(self, cause):
|
||||
conditions = dict(extract_args(self.model, "condition"))
|
||||
condition_causes = list(extract_args(self.model, "condition_cause"))
|
||||
return self._get_cause_tree(cause, conditions, condition_causes, [])
|
||||
|
||||
def handle_error(self, msg, *args):
|
||||
"""Handle an error state derived by the solver."""
|
||||
if msg == "multiple_values_error":
|
||||
@@ -622,14 +639,28 @@ def handle_error(self, msg, *args):
|
||||
if msg == "no_value_error":
|
||||
return self.no_value_error(*args)
|
||||
|
||||
try:
|
||||
idx = args.index("startcauses")
|
||||
except ValueError:
|
||||
msg_args = args
|
||||
cause_args = []
|
||||
else:
|
||||
msg_args = args[:idx]
|
||||
cause_args = args[idx + 1 :]
|
||||
|
||||
msg = msg.format(*msg_args)
|
||||
|
||||
# For variant formatting, we sometimes have to construct specs
|
||||
# to format values properly. Find/replace all occurances of
|
||||
# Spec(...) with the string representation of the spec mentioned
|
||||
msg = msg.format(*args)
|
||||
specs_to_construct = re.findall(r"Spec\(([^)]*)\)", msg)
|
||||
for spec_str in specs_to_construct:
|
||||
msg = msg.replace("Spec(%s)" % spec_str, str(spack.spec.Spec(spec_str)))
|
||||
|
||||
for cause in set(cause_args):
|
||||
for c in self.get_cause_tree(cause):
|
||||
msg += f"\n{c}"
|
||||
|
||||
return msg
|
||||
|
||||
def message(self, errors) -> str:
|
||||
@@ -775,6 +806,8 @@ def visit(node):
|
||||
self.control.load(os.path.join(parent_dir, "concretize.lp"))
|
||||
self.control.load(os.path.join(parent_dir, "os_compatibility.lp"))
|
||||
self.control.load(os.path.join(parent_dir, "display.lp"))
|
||||
if spack.error.debug:
|
||||
self.control.load(os.path.join(parent_dir, "causation.lp"))
|
||||
timer.stop("load")
|
||||
|
||||
# Grounding is the first step in the solve -- it turns our facts
|
||||
@@ -835,7 +868,13 @@ def on_model(model):
|
||||
|
||||
# print any unknown functions in the model
|
||||
for sym in best_model:
|
||||
if sym.name not in ("attr", "error", "opt_criterion"):
|
||||
if sym.name not in (
|
||||
"attr",
|
||||
"error",
|
||||
"opt_criterion",
|
||||
"condition",
|
||||
"condition_cause",
|
||||
):
|
||||
tty.debug(
|
||||
"UNKNOWN SYMBOL: %s(%s)" % (sym.name, ", ".join(stringify(sym.arguments)))
|
||||
)
|
||||
@@ -1266,7 +1305,11 @@ def package_provider_rules(self, pkg):
|
||||
for when in whens:
|
||||
msg = "%s provides %s when %s" % (pkg.name, provided, when)
|
||||
condition_id = self.condition(when, provided, pkg.name, msg)
|
||||
self.gen.fact(fn.provider_condition(condition_id, when.name, provided.name))
|
||||
self.gen.fact(
|
||||
fn.imposed_constraint(
|
||||
condition_id, "virtual_condition_holds", pkg.name, provided.name
|
||||
)
|
||||
)
|
||||
self.gen.newline()
|
||||
|
||||
def package_dependencies_rules(self, pkg):
|
||||
@@ -1287,16 +1330,25 @@ def package_dependencies_rules(self, pkg):
|
||||
if not deptypes:
|
||||
continue
|
||||
|
||||
msg = "%s depends on %s" % (pkg.name, dep.spec.name)
|
||||
msg = "%s depends on %s" % (pkg.name, dep.spec)
|
||||
if cond != spack.spec.Spec():
|
||||
msg += " when %s" % cond
|
||||
|
||||
condition_id = self.condition(cond, dep.spec, pkg.name, msg)
|
||||
self.gen.fact(fn.dependency_condition(condition_id, pkg.name, dep.spec.name))
|
||||
self.gen.fact(fn.condition_requirement(condition_id, "spack_installed", pkg.name))
|
||||
|
||||
for t in sorted(deptypes):
|
||||
# there is a declared dependency of type t
|
||||
self.gen.fact(fn.dependency_type(condition_id, t))
|
||||
self.gen.fact(
|
||||
fn.imposed_constraint(
|
||||
condition_id, "dependency_holds", pkg.name, dep.spec.name, t
|
||||
)
|
||||
)
|
||||
self.gen.fact(
|
||||
fn.imposed_constraint(
|
||||
condition_id, "virtual_node" if dep.spec.virtual else "node", dep.spec.name
|
||||
)
|
||||
)
|
||||
|
||||
self.gen.newline()
|
||||
|
||||
@@ -1450,7 +1502,11 @@ def external_packages(self):
|
||||
for local_idx, spec in enumerate(external_specs):
|
||||
msg = "%s available as external when satisfying %s" % (spec.name, spec)
|
||||
condition_id = self.condition(spec, msg=msg)
|
||||
self.gen.fact(fn.possible_external(condition_id, pkg_name, local_idx))
|
||||
self.gen.fact(
|
||||
fn.imposed_constraint(
|
||||
condition_id, "external_conditions_hold", pkg_name, local_idx
|
||||
)
|
||||
)
|
||||
self.possible_versions[spec.name].add(spec.version)
|
||||
self.gen.newline()
|
||||
|
||||
@@ -2294,16 +2350,29 @@ def setup(self, driver, specs, reuse=None):
|
||||
self.define_target_constraints()
|
||||
|
||||
def literal_specs(self, specs):
|
||||
for idx, spec in enumerate(specs):
|
||||
for spec in specs:
|
||||
self.gen.h2("Spec: %s" % str(spec))
|
||||
self.gen.fact(fn.literal(idx))
|
||||
|
||||
self.gen.fact(fn.literal(idx, "virtual_root" if spec.virtual else "root", spec.name))
|
||||
# cannot use self.condition because it requires condition requirements
|
||||
condition_id = next(self._condition_id_counter)
|
||||
self.gen.fact(fn.condition(condition_id, "%s is provided as input spec" % spec))
|
||||
self.gen.fact(fn.literal(condition_id))
|
||||
|
||||
self.gen.fact(fn.condition_requirement(condition_id, "literal_solved", condition_id))
|
||||
|
||||
self.gen.fact(
|
||||
fn.imposed_constraint(
|
||||
condition_id, "virtual_root" if spec.virtual else "root", spec.name
|
||||
)
|
||||
)
|
||||
|
||||
for clause in self.spec_clauses(spec):
|
||||
self.gen.fact(fn.literal(idx, *clause.args))
|
||||
self.gen.fact(fn.imposed_constraint(condition_id, *clause.args))
|
||||
if clause.args[0] == "variant_set":
|
||||
self.gen.fact(
|
||||
fn.literal(idx, "variant_default_value_from_cli", *clause.args[1:])
|
||||
fn.imposed_constraint(
|
||||
condition_id, "variant_default_value_from_cli", *clause.args[1:]
|
||||
)
|
||||
)
|
||||
|
||||
if self.concretize_everything:
|
||||
@@ -2397,6 +2466,8 @@ class SpecBuilder(object):
|
||||
r"^root$",
|
||||
r"^virtual_node$",
|
||||
r"^virtual_root$",
|
||||
r"^.*holds?$",
|
||||
r"^literal.*$",
|
||||
]
|
||||
)
|
||||
)
|
||||
@@ -2836,12 +2907,13 @@ class InternalConcretizerError(spack.error.UnsatisfiableSpecError):
|
||||
"""
|
||||
|
||||
def __init__(self, provided, conflicts):
|
||||
indented = [" %s\n" % conflict for conflict in conflicts]
|
||||
error_msg = "".join(indented)
|
||||
msg = "Spack concretizer internal error. Please submit a bug report"
|
||||
msg += "\n Please include the command, environment if applicable,"
|
||||
msg += "\n and the following error message."
|
||||
msg = "\n %s is unsatisfiable, errors are:\n%s" % (provided, error_msg)
|
||||
msg = (
|
||||
"Spack concretizer internal error. Please submit a bug report and include the "
|
||||
"command, environment if applicable and the following error message."
|
||||
f"\n {provided} is unsatisfiable, errors are:"
|
||||
)
|
||||
|
||||
msg += "".join([f"\n {conflict}" for conflict in conflicts])
|
||||
|
||||
super(spack.error.UnsatisfiableSpecError, self).__init__(msg)
|
||||
|
||||
|
72
lib/spack/spack/solver/causation.lp
Normal file
72
lib/spack/spack/solver/causation.lp
Normal file
@@ -0,0 +1,72 @@
|
||||
% Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
|
||||
% Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
%
|
||||
% SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
% associated conditions by cause -> effect
|
||||
condition_cause(Effect, Cause) :-
|
||||
condition_holds(Effect), condition_holds(Cause),
|
||||
attr(Name, A1),
|
||||
condition_requirement(Effect, Name, A1),
|
||||
imposed_constraint(Cause, Name, A1).
|
||||
condition_cause(Effect, Cause) :-
|
||||
condition_holds(Effect), condition_holds(Cause),
|
||||
attr(Name, A1, A2),
|
||||
condition_requirement(Effect, Name, A1, A2),
|
||||
imposed_constraint(Cause, Name, A1, A2).
|
||||
condition_cause(Effect, Cause) :-
|
||||
condition_holds(Effect), condition_holds(Cause),
|
||||
attr(Name, A1, A2, A3),
|
||||
condition_requirement(Effect, Name, A1, A2, A3),
|
||||
imposed_constraint(Cause, Name, A1, A2, A3).
|
||||
condition_cause(Effect, Cause) :-
|
||||
condition_holds(Effect), condition_holds(Cause),
|
||||
attr(Name, A1, A2, A3, A4),
|
||||
condition_requirement(Effect, Name, A1, A2, A3, A4),
|
||||
imposed_constraint(Cause, Name, A1, A2, A3, A4).
|
||||
|
||||
% At most one variant for single valued variants
|
||||
error(0, "'{0}' required multiple values for single-valued variant '{1}'\n Requested 'Spec({1}={2})' and 'Spec({1}={3})'", Package, Variant, Value1, Value2, startcauses, Cause1, Cause2)
|
||||
:- attr("node", Package),
|
||||
variant(Package, Variant),
|
||||
variant_single_value(Package, Variant),
|
||||
build(Package),
|
||||
attr("variant_value", Package, Variant, Value1),
|
||||
imposed_constraint(Cause1, "variant_set", Package, Variant, Value1),
|
||||
condition_holds(Cause1),
|
||||
attr("variant_value", Package, Variant, Value2),
|
||||
imposed_constraint(Cause2, "variant_set", Package, Variant, Value2),
|
||||
condition_holds(Cause2),
|
||||
Value1 < Value2. % see[1] in concretize.lp
|
||||
|
||||
% We cannot have a version that violates another version constraint
|
||||
error(0, "Version '{0}' of {1} does not satisfy '@{2}'", Version, Package, Constraint, startcauses, VersionCause, ConstraintCause)
|
||||
:- attr("node", Package),
|
||||
attr("version", Package, Version),
|
||||
imposed_constraint(VersionCause, "node_version_satisfies", Package, Version),
|
||||
condition_holds(VersionCause),
|
||||
attr("node_version_satisfies", Package, Constraint),
|
||||
imposed_constraint(ConstraintCause, "node_version_satisfies", Package, Constraint),
|
||||
condition_holds(ConstraintCause),
|
||||
not version_satisfies(Package, Constraint, Version).
|
||||
|
||||
% A virtual package may or may not have a version, but never has more than one
|
||||
% Error to catch how it happens
|
||||
error(0, "Version '{0}' of {1} does not satisfy '@{2}'", Version, Virtual, Constraint, startcauses, VersionCause, ConstraintCause)
|
||||
:- attr("virtual_node", Virtual),
|
||||
attr("version", Virtual, Version),
|
||||
imposed_constraint(VersionCause, "node_version_satisfies", Virtual, Version),
|
||||
condition_holds(VersionCause),
|
||||
attr("node_version_satisfies", Virtual, Constraint),
|
||||
imposed_constraint(ConstraintCause, "node_version_satisfies", Virtual, Constraint),
|
||||
condition_holds(ConstraintCause),
|
||||
not version_satisfies(Virtual, Constraint, Version).
|
||||
|
||||
% More specific error message if the version cannot satisfy some constraint
|
||||
% Otherwise covered by `no_version_error` and `versions_conflict_error`.
|
||||
error(0, "Cannot satisfy '{0}@{1}'", Package, Constraint, startcauses, ConstraintCause)
|
||||
:- attr("node_version_satisfies", Package, Constraint),
|
||||
imposed_constraint(ConstraintCause, "node_version_satisfies", Package, Constraint),
|
||||
condition_holds(ConstraintCause),
|
||||
attr("version", Package, Version),
|
||||
not version_satisfies(Package, Constraint, Version).
|
@@ -12,8 +12,8 @@
|
||||
%-----------------------------------------------------------------------------
|
||||
|
||||
% Give clingo the choice to solve an input spec or not
|
||||
{ literal_solved(ID) } :- literal(ID).
|
||||
literal_not_solved(ID) :- not literal_solved(ID), literal(ID).
|
||||
{ attr("literal_solved", ID) } :- literal(ID).
|
||||
literal_not_solved(ID) :- not attr("literal_solved", ID), literal(ID).
|
||||
|
||||
% If concretize_everything() is a fact, then we cannot have unsolved specs
|
||||
:- literal_not_solved(ID), concretize_everything.
|
||||
@@ -21,24 +21,14 @@ literal_not_solved(ID) :- not literal_solved(ID), literal(ID).
|
||||
% Make a problem with "zero literals solved" unsat. This is to trigger
|
||||
% looking for solutions to the ASP problem with "errors", which results
|
||||
% in better reporting for users. See #30669 for details.
|
||||
1 { literal_solved(ID) : literal(ID) }.
|
||||
1 { attr("literal_solved", ID) : literal(ID) }.
|
||||
|
||||
opt_criterion(300, "number of input specs not concretized").
|
||||
#minimize{ 0@300: #true }.
|
||||
#minimize { 1@300,ID : literal_not_solved(ID) }.
|
||||
|
||||
% Map constraint on the literal ID to the correct PSID
|
||||
attr(Name, A1) :- literal(LiteralID, Name, A1), literal_solved(LiteralID).
|
||||
attr(Name, A1, A2) :- literal(LiteralID, Name, A1, A2), literal_solved(LiteralID).
|
||||
attr(Name, A1, A2, A3) :- literal(LiteralID, Name, A1, A2, A3), literal_solved(LiteralID).
|
||||
attr(Name, A1, A2, A3, A4) :- literal(LiteralID, Name, A1, A2, A3, A4), literal_solved(LiteralID).
|
||||
|
||||
#defined concretize_everything/0.
|
||||
#defined literal/1.
|
||||
#defined literal/3.
|
||||
#defined literal/4.
|
||||
#defined literal/5.
|
||||
#defined literal/6.
|
||||
|
||||
% Attributes for node packages which must have a single value
|
||||
attr_single_value("version").
|
||||
@@ -58,6 +48,13 @@ error(100, multiple_values_error, Attribute, Package)
|
||||
attr_single_value(Attribute),
|
||||
2 { attr(Attribute, Package, Version) }.
|
||||
|
||||
%-----------------------------------------------------------------------------
|
||||
% Define functions for error handling
|
||||
%-----------------------------------------------------------------------------
|
||||
|
||||
#defined error/9.
|
||||
#defined condition_cause/2.
|
||||
|
||||
%-----------------------------------------------------------------------------
|
||||
% Version semantics
|
||||
%-----------------------------------------------------------------------------
|
||||
@@ -96,7 +93,18 @@ version_satisfies(Package, Constraint, HashVersion) :- version_satisfies(Package
|
||||
{ attr("version", Package, Version) : version_declared(Package, Version) }
|
||||
:- attr("node", Package).
|
||||
|
||||
% Error to ensure structure of the program is not violated
|
||||
error(2, "No version from '{0}' satisfies '@{1}' and '@{2}'", Package, Version1, Version2)
|
||||
:- attr("node", Package),
|
||||
attr("version", Package, Version1),
|
||||
attr("version", Package, Version2),
|
||||
Version1 < Version2. % see[1]
|
||||
|
||||
error(2, "No versions available for package '{0}'", Package)
|
||||
:- attr("node", Package), not attr("version", Package, _).
|
||||
|
||||
% A virtual package may or may not have a version, but never has more than one
|
||||
% fallback error for structure in case there's another way for it to happen
|
||||
error(100, "Cannot select a single version for virtual '{0}'", Virtual)
|
||||
:- attr("virtual_node", Virtual),
|
||||
2 { attr("version", Virtual, Version) }.
|
||||
@@ -150,8 +158,7 @@ possible_version_weight(Package, Weight)
|
||||
:- attr("node_version_satisfies", Package, Constraint),
|
||||
version_satisfies(Package, Constraint, _).
|
||||
|
||||
% More specific error message if the version cannot satisfy some constraint
|
||||
% Otherwise covered by `no_version_error` and `versions_conflict_error`.
|
||||
% Error for structure of program
|
||||
error(10, "Cannot satisfy '{0}@{1}'", Package, Constraint)
|
||||
:- attr("node_version_satisfies", Package, Constraint),
|
||||
attr("version", Package, Version),
|
||||
@@ -182,9 +189,8 @@ condition_holds(ID) :-
|
||||
attr(Name, A1, A2, A3) : condition_requirement(ID, Name, A1, A2, A3);
|
||||
attr(Name, A1, A2, A3, A4) : condition_requirement(ID, Name, A1, A2, A3, A4).
|
||||
|
||||
% condition_holds(ID) implies all imposed_constraints, unless do_not_impose(ID)
|
||||
% is derived. This allows imposed constraints to be canceled in special cases.
|
||||
impose(ID) :- condition_holds(ID), not do_not_impose(ID).
|
||||
% condition_holds(ID) implies all imposed_constraints.
|
||||
impose(ID) :- condition_holds(ID).
|
||||
|
||||
% conditions that hold impose constraints on other specs
|
||||
attr(Name, A1) :- impose(ID), imposed_constraint(ID, Name, A1).
|
||||
@@ -229,33 +235,19 @@ depends_on(Package, Dependency) :- attr("depends_on", Package, Dependency, _).
|
||||
% a dependency holds if its condition holds and if it is not external or
|
||||
% concrete. We chop off dependencies for externals, and dependencies of
|
||||
% concrete specs don't need to be resolved -- they arise from the concrete
|
||||
% specs themselves.
|
||||
dependency_holds(Package, Dependency, Type) :-
|
||||
dependency_condition(ID, Package, Dependency),
|
||||
dependency_type(ID, Type),
|
||||
build(Package),
|
||||
not external(Package),
|
||||
condition_holds(ID).
|
||||
|
||||
% We cut off dependencies of externals (as we don't really know them).
|
||||
% Don't impose constraints on dependencies that don't exist.
|
||||
do_not_impose(ID) :-
|
||||
not dependency_holds(Package, Dependency, _),
|
||||
dependency_condition(ID, Package, Dependency).
|
||||
% specs themselves. This attr is used in constraints from dependency conditions
|
||||
attr("spack_installed", Package) :- build(Package), not external(Package).
|
||||
|
||||
% declared dependencies are real if they're not virtual AND
|
||||
% the package is not an external.
|
||||
% They're only triggered if the associated dependnecy condition holds.
|
||||
attr("depends_on", Package, Dependency, Type)
|
||||
:- dependency_holds(Package, Dependency, Type),
|
||||
:- attr("dependency_holds", Package, Dependency, Type),
|
||||
not virtual(Dependency).
|
||||
|
||||
% every root must be a node
|
||||
attr("node", Package) :- attr("root", Package).
|
||||
|
||||
% dependencies imply new nodes
|
||||
attr("node", Dependency) :- attr("node", Package), depends_on(Package, Dependency).
|
||||
|
||||
% all nodes in the graph must be reachable from some root
|
||||
% this ensures a user can't say `zlib ^libiconv` (neither of which have any
|
||||
% dependencies) and get a two-node unconnected graph
|
||||
@@ -296,14 +288,17 @@ error(1, Msg) :- attr("node", Package),
|
||||
% if a package depends on a virtual, it's not external and we have a
|
||||
% provider for that virtual then it depends on the provider
|
||||
attr("depends_on", Package, Provider, Type)
|
||||
:- dependency_holds(Package, Virtual, Type),
|
||||
:- attr("dependency_holds", Package, Virtual, Type),
|
||||
provider(Provider, Virtual),
|
||||
not external(Package).
|
||||
|
||||
% dependencies on virtuals also imply that the virtual is a virtual node
|
||||
attr("virtual_node", Virtual)
|
||||
:- dependency_holds(Package, Virtual, Type),
|
||||
virtual(Virtual), not external(Package).
|
||||
% If a package depends on a provider, the provider must be a node
|
||||
% nodes that are not indirected by a virtual are instantiated
|
||||
% directly from the imposed constraints of the dependency condition
|
||||
attr("node", Provider)
|
||||
:- attr("dependency_holds", Package, Virtual, Type),
|
||||
provider(Provider, Virtual),
|
||||
not external(Package).
|
||||
|
||||
% If there's a virtual node, we must select one and only one provider.
|
||||
% The provider must be selected among the possible providers.
|
||||
@@ -330,17 +325,11 @@ attr("root", Package) :- attr("virtual_root", Virtual), provider(Package, Virtua
|
||||
% for environments that are concretized together (e.g. where we
|
||||
% asks to install "mpich" and "hdf5+mpi" and we want "mpich" to
|
||||
% be the mpi provider)
|
||||
provider(Package, Virtual) :- attr("node", Package), virtual_condition_holds(Package, Virtual).
|
||||
|
||||
% The provider provides the virtual if some provider condition holds.
|
||||
virtual_condition_holds(Provider, Virtual) :-
|
||||
provider_condition(ID, Provider, Virtual),
|
||||
condition_holds(ID),
|
||||
virtual(Virtual).
|
||||
provider(Package, Virtual) :- attr("node", Package), attr("virtual_condition_holds", Package, Virtual).
|
||||
|
||||
% A package cannot be the actual provider for a virtual if it does not
|
||||
% fulfill the conditions to provide that virtual
|
||||
:- provider(Package, Virtual), not virtual_condition_holds(Package, Virtual),
|
||||
:- provider(Package, Virtual), not attr("virtual_condition_holds", Package, Virtual),
|
||||
internal_error("Virtual when provides not respected").
|
||||
|
||||
#defined possible_provider/2.
|
||||
@@ -382,14 +371,8 @@ possible_provider_weight(Dependency, Virtual, 100, "fallback") :- provider(Depen
|
||||
|
||||
% do not warn if generated program contains none of these.
|
||||
#defined possible_provider/2.
|
||||
#defined provider_condition/3.
|
||||
#defined required_provider_condition/3.
|
||||
#defined required_provider_condition/4.
|
||||
#defined required_provider_condition/5.
|
||||
#defined required_provider_condition/6.
|
||||
#defined declared_dependency/3.
|
||||
#defined virtual/1.
|
||||
#defined virtual_condition_holds/2.
|
||||
#defined external/1.
|
||||
#defined external_spec/2.
|
||||
#defined external_version_declared/4.
|
||||
@@ -437,25 +420,15 @@ external(Package) :- attr("external_spec_selected", Package, _).
|
||||
|
||||
% determine if an external spec has been selected
|
||||
attr("external_spec_selected", Package, LocalIndex) :-
|
||||
external_conditions_hold(Package, LocalIndex),
|
||||
attr("external_conditions_hold", Package, LocalIndex),
|
||||
attr("node", Package),
|
||||
not attr("hash", Package, _).
|
||||
|
||||
external_conditions_hold(Package, LocalIndex) :-
|
||||
possible_external(ID, Package, LocalIndex), condition_holds(ID).
|
||||
|
||||
% it cannot happen that a spec is external, but none of the external specs
|
||||
% conditions hold.
|
||||
error(100, "Attempted to use external for '{0}' which does not satisfy any configured external spec", Package)
|
||||
:- external(Package),
|
||||
not external_conditions_hold(Package, _).
|
||||
|
||||
#defined possible_external/3.
|
||||
#defined external_spec_index/3.
|
||||
#defined external_spec_condition/3.
|
||||
#defined external_spec_condition/4.
|
||||
#defined external_spec_condition/5.
|
||||
#defined external_spec_condition/6.
|
||||
not attr("external_conditions_hold", Package, _).
|
||||
|
||||
%-----------------------------------------------------------------------------
|
||||
% Config required semantics
|
||||
@@ -594,7 +567,6 @@ attr("variant_value", Package, Variant, Value) :-
|
||||
variant(Package, Variant),
|
||||
build(Package).
|
||||
|
||||
|
||||
error(100, "'{0}' required multiple values for single-valued variant '{1}'", Package, Variant)
|
||||
:- attr("node", Package),
|
||||
variant(Package, Variant),
|
||||
@@ -665,7 +637,7 @@ variant_default_not_used(Package, Variant, Value)
|
||||
external_with_variant_set(Package, Variant, Value)
|
||||
:- attr("variant_value", Package, Variant, Value),
|
||||
condition_requirement(ID, "variant_value", Package, Variant, Value),
|
||||
possible_external(ID, Package, _),
|
||||
imposed_constraint(ID, "external_conditions_hold", Package, _),
|
||||
external(Package),
|
||||
attr("node", Package).
|
||||
|
||||
|
@@ -23,5 +23,12 @@
|
||||
#show error/4.
|
||||
#show error/5.
|
||||
#show error/6.
|
||||
#show error/7.
|
||||
#show error/8.
|
||||
#show error/9.
|
||||
|
||||
% show cause -> effect data for errors
|
||||
#show condition_cause/2.
|
||||
#show condition/2.
|
||||
|
||||
% debug
|
||||
|
@@ -4333,7 +4333,7 @@ def write_attribute(spec, attribute, color):
|
||||
|
||||
if callable(current):
|
||||
raise SpecFormatStringError("Attempted to format callable object")
|
||||
if not current:
|
||||
if current is None:
|
||||
# We're not printing anything
|
||||
return
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
import itertools
|
||||
import textwrap
|
||||
from typing import List
|
||||
from typing import List, Optional, Tuple
|
||||
|
||||
import llnl.util.lang
|
||||
|
||||
@@ -66,17 +66,17 @@ def to_dict(self):
|
||||
return dict(d)
|
||||
|
||||
|
||||
def make_environment(dirs=None):
|
||||
"""Returns an configured environment for template rendering."""
|
||||
@llnl.util.lang.memoized
|
||||
def make_environment(dirs: Optional[Tuple[str, ...]] = None):
|
||||
"""Returns a configured environment for template rendering."""
|
||||
# Import at this scope to avoid slowing Spack startup down
|
||||
import jinja2
|
||||
|
||||
if dirs is None:
|
||||
# Default directories where to search for templates
|
||||
builtins = spack.config.get("config:template_dirs", ["$spack/share/spack/templates"])
|
||||
extensions = spack.extensions.get_template_dirs()
|
||||
dirs = [canonicalize_path(d) for d in itertools.chain(builtins, extensions)]
|
||||
|
||||
# avoid importing this at the top level as it's used infrequently and
|
||||
# slows down startup a bit.
|
||||
import jinja2
|
||||
dirs = tuple(canonicalize_path(d) for d in itertools.chain(builtins, extensions))
|
||||
|
||||
# Loader for the templates
|
||||
loader = jinja2.FileSystemLoader(dirs)
|
||||
|
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
import pickle
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -39,7 +40,10 @@ def test_dump(tmpdir):
|
||||
with tmpdir.as_cwd():
|
||||
build_env("--dump", _out_file, "zlib")
|
||||
with open(_out_file) as f:
|
||||
assert any(line.startswith("PATH=") for line in f.readlines())
|
||||
if sys.platform == "win32":
|
||||
assert any(line.startswith('set "PATH=') for line in f.readlines())
|
||||
else:
|
||||
assert any(line.startswith("PATH=") for line in f.readlines())
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("config", "mock_packages", "working_env")
|
||||
|
@@ -2688,7 +2688,7 @@ def test_modules_relative_to_views(environment_from_manifest, install_mockery, m
|
||||
|
||||
spec = e.specs_by_hash[e.concretized_order[0]]
|
||||
view_prefix = e.default_view.get_projection_for_spec(spec)
|
||||
modules_glob = "%s/modules/**/*" % e.path
|
||||
modules_glob = "%s/modules/**/*/*" % e.path
|
||||
modules = glob.glob(modules_glob)
|
||||
assert len(modules) == 1
|
||||
module = modules[0]
|
||||
@@ -2724,12 +2724,12 @@ def test_multiple_modules_post_env_hook(environment_from_manifest, install_mocke
|
||||
|
||||
spec = e.specs_by_hash[e.concretized_order[0]]
|
||||
view_prefix = e.default_view.get_projection_for_spec(spec)
|
||||
modules_glob = "%s/modules/**/*" % e.path
|
||||
modules_glob = "%s/modules/**/*/*" % e.path
|
||||
modules = glob.glob(modules_glob)
|
||||
assert len(modules) == 1
|
||||
module = modules[0]
|
||||
|
||||
full_modules_glob = "%s/full_modules/**/*" % e.path
|
||||
full_modules_glob = "%s/full_modules/**/*/*" % e.path
|
||||
full_modules = glob.glob(full_modules_glob)
|
||||
assert len(full_modules) == 1
|
||||
full_module = full_modules[0]
|
||||
|
@@ -62,7 +62,7 @@ def source_file(tmpdir, is_relocatable):
|
||||
src = tmpdir.join("relocatable.c")
|
||||
shutil.copy(template_src, str(src))
|
||||
else:
|
||||
template_dirs = [os.path.join(spack.paths.test_path, "data", "templates")]
|
||||
template_dirs = (os.path.join(spack.paths.test_path, "data", "templates"),)
|
||||
env = spack.tengine.make_environment(template_dirs)
|
||||
template = env.get_template("non_relocatable.c")
|
||||
text = template.render({"prefix": spack.store.layout.root})
|
||||
@@ -173,14 +173,6 @@ def test_ensure_binary_is_relocatable(source_file, is_relocatable):
|
||||
assert relocatable == is_relocatable
|
||||
|
||||
|
||||
@pytest.mark.requires_executables("patchelf", "strings", "file")
|
||||
@skip_unless_linux
|
||||
def test_patchelf_is_relocatable():
|
||||
patchelf = os.path.realpath(spack.relocate._patchelf())
|
||||
assert llnl.util.filesystem.is_exe(patchelf)
|
||||
spack.relocate.ensure_binary_is_relocatable(patchelf)
|
||||
|
||||
|
||||
@skip_unless_linux
|
||||
def test_ensure_binary_is_relocatable_errors(tmpdir):
|
||||
# The file passed in as argument must exist...
|
||||
@@ -241,30 +233,6 @@ def test_normalize_relative_paths(start_path, relative_paths, expected):
|
||||
assert normalized == expected
|
||||
|
||||
|
||||
def test_set_elf_rpaths(mock_patchelf):
|
||||
# Try to relocate a mock version of patchelf and check
|
||||
# the call made to patchelf itself
|
||||
patchelf = mock_patchelf("echo $@")
|
||||
rpaths = ["/usr/lib", "/usr/lib64", "/opt/local/lib"]
|
||||
output = spack.relocate._set_elf_rpaths(patchelf, rpaths)
|
||||
|
||||
# Assert that the arguments of the call to patchelf are as expected
|
||||
assert "--force-rpath" in output
|
||||
assert "--set-rpath " + ":".join(rpaths) in output
|
||||
assert patchelf in output
|
||||
|
||||
|
||||
@skip_unless_linux
|
||||
def test_set_elf_rpaths_warning(mock_patchelf):
|
||||
# Mock a failing patchelf command and ensure it warns users
|
||||
patchelf = mock_patchelf("exit 1")
|
||||
rpaths = ["/usr/lib", "/usr/lib64", "/opt/local/lib"]
|
||||
# To avoid using capfd in order to check if the warning was triggered
|
||||
# here we just check that output is not set
|
||||
output = spack.relocate._set_elf_rpaths(patchelf, rpaths)
|
||||
assert output is None
|
||||
|
||||
|
||||
@pytest.mark.requires_executables("patchelf", "strings", "file", "gcc")
|
||||
@skip_unless_linux
|
||||
def test_relocate_text_bin(binary_with_rpaths, prefix_like):
|
||||
|
@@ -660,6 +660,7 @@ def test_spec_formatting(self, default_mock_concretization):
|
||||
("{architecture.os}", "", "os", lambda spec: spec.architecture),
|
||||
("{architecture.target}", "", "target", lambda spec: spec.architecture),
|
||||
("{prefix}", "", "prefix", lambda spec: spec),
|
||||
("{external}", "", "external", lambda spec: spec), # test we print "False"
|
||||
]
|
||||
|
||||
hash_segments = [
|
||||
|
@@ -71,7 +71,7 @@ def test_template_retrieval(self):
|
||||
"""Tests the template retrieval mechanism hooked into config files"""
|
||||
# Check the directories are correct
|
||||
template_dirs = spack.config.get("config:template_dirs")
|
||||
template_dirs = [canonicalize_path(x) for x in template_dirs]
|
||||
template_dirs = tuple([canonicalize_path(x) for x in template_dirs])
|
||||
assert len(template_dirs) == 3
|
||||
|
||||
env = tengine.make_environment(template_dirs)
|
||||
|
@@ -441,6 +441,30 @@ def test_write_tested_status(
|
||||
assert TestStatus(status) == expected
|
||||
|
||||
|
||||
@pytest.mark.regression("37840")
|
||||
def test_write_tested_status_no_repeats(
|
||||
tmpdir, install_mockery_mutable_config, mock_fetch, mock_test_stage
|
||||
):
|
||||
"""Emulate re-running the same stand-alone tests a second time."""
|
||||
s = spack.spec.Spec("trivial-smoke-test").concretized()
|
||||
pkg = s.package
|
||||
statuses = [TestStatus.PASSED, TestStatus.PASSED]
|
||||
for i, status in enumerate(statuses):
|
||||
pkg.tester.test_parts[f"test_{i}"] = status
|
||||
pkg.tester.counts[status] += 1
|
||||
|
||||
pkg.tester.tested_file = tmpdir.join("test-log.txt")
|
||||
pkg.tester.write_tested_status()
|
||||
pkg.tester.write_tested_status()
|
||||
|
||||
# The test should NOT result in a ValueError: invalid literal for int()
|
||||
# with base 10: '2\n2' (i.e., the results being appended instead of
|
||||
# written to the file).
|
||||
with open(pkg.tester.tested_file, "r") as f:
|
||||
status = int(f.read().strip("\n"))
|
||||
assert TestStatus(status) == TestStatus.PASSED
|
||||
|
||||
|
||||
def test_check_special_outputs(tmpdir):
|
||||
"""This test covers two related helper methods"""
|
||||
contents = """CREATE TABLE packages (
|
||||
|
@@ -119,7 +119,10 @@ def test_dump_environment(prepare_environment_for_tests, tmpdir):
|
||||
dumpfile_path = str(tmpdir.join("envdump.txt"))
|
||||
envutil.dump_environment(dumpfile_path)
|
||||
with open(dumpfile_path, "r") as dumpfile:
|
||||
assert "TEST_ENV_VAR={0}; export TEST_ENV_VAR\n".format(test_paths) in list(dumpfile)
|
||||
if sys.platform == "win32":
|
||||
assert 'set "TEST_ENV_VAR={}"\n'.format(test_paths) in list(dumpfile)
|
||||
else:
|
||||
assert "TEST_ENV_VAR={0}; export TEST_ENV_VAR\n".format(test_paths) in list(dumpfile)
|
||||
|
||||
|
||||
def test_reverse_environment_modifications(working_env):
|
||||
|
@@ -171,7 +171,11 @@ def path_put_first(var_name: str, directories: List[Path]):
|
||||
BASH_FUNCTION_FINDER = re.compile(r"BASH_FUNC_(.*?)\(\)")
|
||||
|
||||
|
||||
def _env_var_to_source_line(var: str, val: str) -> str:
|
||||
def _win_env_var_to_set_line(var: str, val: str) -> str:
|
||||
return f'set "{var}={val}"'
|
||||
|
||||
|
||||
def _nix_env_var_to_source_line(var: str, val: str) -> str:
|
||||
if var.startswith("BASH_FUNC"):
|
||||
source_line = "function {fname}{decl}; export -f {fname}".format(
|
||||
fname=BASH_FUNCTION_FINDER.sub(r"\1", var), decl=val
|
||||
@@ -181,6 +185,13 @@ def _env_var_to_source_line(var: str, val: str) -> str:
|
||||
return source_line
|
||||
|
||||
|
||||
def _env_var_to_source_line(var: str, val: str) -> str:
|
||||
if sys.platform == "win32":
|
||||
return _win_env_var_to_set_line(var, val)
|
||||
else:
|
||||
return _nix_env_var_to_source_line(var, val)
|
||||
|
||||
|
||||
@system_path_filter(arg_slice=slice(1))
|
||||
def dump_environment(path: Path, environment: Optional[MutableMapping[str, str]] = None):
|
||||
"""Dump an environment dictionary to a source-able file.
|
||||
|
@@ -128,6 +128,38 @@ default:
|
||||
extends: [ ".base-job", ".generate-base" ]
|
||||
tags: ["spack", "public", "medium", "x86_64"]
|
||||
|
||||
.darwin-generate-base:
|
||||
stage: generate
|
||||
script:
|
||||
- export SPACK_DISABLE_LOCAL_CONFIG=1
|
||||
- export SPACK_USER_CACHE_PATH=$(pwd)/_user_cache
|
||||
- uname -a || true
|
||||
- grep -E 'vendor|model name' /proc/cpuinfo 2>/dev/null | sort -u || head -n10 /proc/cpuinfo 2>/dev/null || true
|
||||
- nproc || true
|
||||
- . "./share/spack/setup-env.sh"
|
||||
- spack --version
|
||||
- cd share/spack/gitlab/cloud_pipelines/stacks/${SPACK_CI_STACK_NAME}
|
||||
- spack env activate --without-view .
|
||||
- spack -d ci generate --check-index-only
|
||||
--buildcache-destination "${SPACK_BUILDCACHE_DESTINATION}"
|
||||
--artifacts-root "${CI_PROJECT_DIR}/jobs_scratch_dir"
|
||||
--output-file "${CI_PROJECT_DIR}/jobs_scratch_dir/cloud-ci-pipeline.yml"
|
||||
after_script:
|
||||
- cat /proc/loadavg || true
|
||||
artifacts:
|
||||
paths:
|
||||
- "${CI_PROJECT_DIR}/jobs_scratch_dir"
|
||||
interruptible: true
|
||||
timeout: 60 minutes
|
||||
retry:
|
||||
max: 2
|
||||
when:
|
||||
- always
|
||||
|
||||
.darwin-generate:
|
||||
extends: [ ".base-job", ".darwin-generate-base" ]
|
||||
|
||||
|
||||
.generate-deprecated:
|
||||
extends: [ ".base-job" ]
|
||||
stage: generate
|
||||
@@ -236,124 +268,6 @@ protected-publish:
|
||||
# - artifacts: True
|
||||
# job: my-super-cool-stack-generate
|
||||
|
||||
########################################
|
||||
# E4S Mac Stack
|
||||
#
|
||||
# With no near-future plans to have
|
||||
# protected aws runners running mac
|
||||
# builds, it seems best to decouple
|
||||
# them from the rest of the stacks for
|
||||
# the time being. This way they can
|
||||
# still run on UO runners and be signed
|
||||
# using the previous approach.
|
||||
########################################
|
||||
# .e4s-mac:
|
||||
# variables:
|
||||
# SPACK_CI_STACK_NAME: e4s-mac
|
||||
# allow_failure: True
|
||||
|
||||
# .mac-pr:
|
||||
# only:
|
||||
# - /^pr[\d]+_.*$/
|
||||
# - /^github\/pr[\d]+_.*$/
|
||||
# variables:
|
||||
# SPACK_BUILDCACHE_DESTINATION: "s3://spack-binaries-prs/${CI_COMMIT_REF_NAME}"
|
||||
# SPACK_PRUNE_UNTOUCHED: "True"
|
||||
|
||||
# .mac-protected:
|
||||
# only:
|
||||
# - /^develop$/
|
||||
# - /^releases\/v.*/
|
||||
# - /^v.*/
|
||||
# - /^github\/develop$/
|
||||
# variables:
|
||||
# SPACK_BUILDCACHE_DESTINATION: "s3://spack-binaries/${CI_COMMIT_REF_NAME}/${SPACK_CI_STACK_NAME}"
|
||||
|
||||
# .mac-pr-build:
|
||||
# extends: [ ".mac-pr", ".build" ]
|
||||
# variables:
|
||||
# AWS_ACCESS_KEY_ID: ${PR_MIRRORS_AWS_ACCESS_KEY_ID}
|
||||
# AWS_SECRET_ACCESS_KEY: ${PR_MIRRORS_AWS_SECRET_ACCESS_KEY}
|
||||
# .mac-protected-build:
|
||||
# extends: [ ".mac-protected", ".build" ]
|
||||
# variables:
|
||||
# AWS_ACCESS_KEY_ID: ${PROTECTED_MIRRORS_AWS_ACCESS_KEY_ID}
|
||||
# AWS_SECRET_ACCESS_KEY: ${PROTECTED_MIRRORS_AWS_SECRET_ACCESS_KEY}
|
||||
# SPACK_SIGNING_KEY: ${PACKAGE_SIGNING_KEY}
|
||||
|
||||
# e4s-mac-pr-generate:
|
||||
# extends: [".e4s-mac", ".mac-pr"]
|
||||
# stage: generate
|
||||
# script:
|
||||
# - tmp="$(mktemp -d)"; export SPACK_USER_CONFIG_PATH="$tmp"; export SPACK_USER_CACHE_PATH="$tmp"
|
||||
# - . "./share/spack/setup-env.sh"
|
||||
# - spack --version
|
||||
# - cd share/spack/gitlab/cloud_pipelines/stacks/${SPACK_CI_STACK_NAME}
|
||||
# - spack env activate --without-view .
|
||||
# - spack ci generate --check-index-only
|
||||
# --buildcache-destination "${SPACK_BUILDCACHE_DESTINATION}"
|
||||
# --artifacts-root "${CI_PROJECT_DIR}/jobs_scratch_dir"
|
||||
# --output-file "${CI_PROJECT_DIR}/jobs_scratch_dir/cloud-ci-pipeline.yml"
|
||||
# artifacts:
|
||||
# paths:
|
||||
# - "${CI_PROJECT_DIR}/jobs_scratch_dir"
|
||||
# tags:
|
||||
# - lambda
|
||||
# interruptible: true
|
||||
# retry:
|
||||
# max: 2
|
||||
# when:
|
||||
# - runner_system_failure
|
||||
# - stuck_or_timeout_failure
|
||||
# timeout: 60 minutes
|
||||
|
||||
# e4s-mac-protected-generate:
|
||||
# extends: [".e4s-mac", ".mac-protected"]
|
||||
# stage: generate
|
||||
# script:
|
||||
# - tmp="$(mktemp -d)"; export SPACK_USER_CONFIG_PATH="$tmp"; export SPACK_USER_CACHE_PATH="$tmp"
|
||||
# - . "./share/spack/setup-env.sh"
|
||||
# - spack --version
|
||||
# - cd share/spack/gitlab/cloud_pipelines/stacks/${SPACK_CI_STACK_NAME}
|
||||
# - spack env activate --without-view .
|
||||
# - spack ci generate --check-index-only
|
||||
# --artifacts-root "${CI_PROJECT_DIR}/jobs_scratch_dir"
|
||||
# --output-file "${CI_PROJECT_DIR}/jobs_scratch_dir/cloud-ci-pipeline.yml"
|
||||
# artifacts:
|
||||
# paths:
|
||||
# - "${CI_PROJECT_DIR}/jobs_scratch_dir"
|
||||
# tags:
|
||||
# - omicron
|
||||
# interruptible: true
|
||||
# retry:
|
||||
# max: 2
|
||||
# when:
|
||||
# - runner_system_failure
|
||||
# - stuck_or_timeout_failure
|
||||
# timeout: 60 minutes
|
||||
|
||||
# e4s-mac-pr-build:
|
||||
# extends: [ ".e4s-mac", ".mac-pr-build" ]
|
||||
# trigger:
|
||||
# include:
|
||||
# - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
|
||||
# job: e4s-mac-pr-generate
|
||||
# strategy: depend
|
||||
# needs:
|
||||
# - artifacts: True
|
||||
# job: e4s-mac-pr-generate
|
||||
|
||||
# e4s-mac-protected-build:
|
||||
# extends: [ ".e4s-mac", ".mac-protected-build" ]
|
||||
# trigger:
|
||||
# include:
|
||||
# - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
|
||||
# job: e4s-mac-protected-generate
|
||||
# strategy: depend
|
||||
# needs:
|
||||
# - artifacts: True
|
||||
# job: e4s-mac-protected-generate
|
||||
|
||||
########################################
|
||||
# E4S pipeline
|
||||
########################################
|
||||
@@ -762,6 +676,28 @@ ml-linux-x86_64-rocm-build:
|
||||
- artifacts: True
|
||||
job: ml-linux-x86_64-rocm-generate
|
||||
|
||||
########################################
|
||||
# Machine Learning - Darwin aarch64 (MPS)
|
||||
########################################
|
||||
.ml-darwin-aarch64-mps:
|
||||
variables:
|
||||
SPACK_CI_STACK_NAME: ml-darwin-aarch64-mps
|
||||
|
||||
ml-darwin-aarch64-mps-generate:
|
||||
tags: [ "macos-ventura", "apple-clang-14", "aarch64-macos" ]
|
||||
extends: [ ".ml-darwin-aarch64-mps", ".darwin-generate"]
|
||||
|
||||
ml-darwin-aarch64-mps-build:
|
||||
extends: [ ".ml-darwin-aarch64-mps", ".build" ]
|
||||
trigger:
|
||||
include:
|
||||
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
|
||||
job: ml-darwin-aarch64-mps-generate
|
||||
strategy: depend
|
||||
needs:
|
||||
- artifacts: True
|
||||
job: ml-darwin-aarch64-mps-generate
|
||||
|
||||
########################################
|
||||
# Deprecated CI testing
|
||||
########################################
|
||||
|
@@ -0,0 +1,27 @@
|
||||
compilers:
|
||||
- compiler:
|
||||
spec: apple-clang@14.0.0
|
||||
paths:
|
||||
cc: /usr/bin/clang
|
||||
cxx: /usr/bin/clang++
|
||||
f77: /opt/homebrew/bin/gfortran
|
||||
fc: /opt/homebrew/bin/gfortran
|
||||
flags: {}
|
||||
operating_system: ventura
|
||||
target: aarch64
|
||||
modules: []
|
||||
environment: {}
|
||||
extra_rpaths: []
|
||||
- compiler:
|
||||
spec: gcc@12.2.0
|
||||
paths:
|
||||
cc: /opt/homebrew/bin/gcc-12
|
||||
cxx: /opt/homebrew/bin/g++-12
|
||||
f77: /opt/homebrew/bin/gfortran-12
|
||||
fc: /opt/homebrew/bin/gfortran-12
|
||||
flags: {}
|
||||
operating_system: ventura
|
||||
target: aarch64
|
||||
modules: []
|
||||
environment: {}
|
||||
extra_rpaths: []
|
@@ -0,0 +1,3 @@
|
||||
config:
|
||||
install_tree:
|
||||
root: $spack/opt/spack
|
@@ -1,14 +0,0 @@
|
||||
ci:
|
||||
pipeline-gen:
|
||||
- build-job:
|
||||
script: |
|
||||
- tmp="$(mktemp -d)"; export SPACK_USER_CONFIG_PATH="$tmp"; export SPACK_USER_CACHE_PATH="$tmp"
|
||||
- . "./share/spack/setup-env.sh"
|
||||
- spack --version
|
||||
- spack arch
|
||||
- cd ${SPACK_CONCRETE_ENV_DIR}
|
||||
- spack env activate --without-view .
|
||||
- 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
|
||||
- spack --color=always --backtrace ci rebuild > >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_out.txt) 2> >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_err.txt >&2)
|
||||
tags: ["lambda"]
|
@@ -1,40 +0,0 @@
|
||||
spack:
|
||||
view: false
|
||||
packages:
|
||||
all:
|
||||
compiler: [apple-clang@13.1.6]
|
||||
target: [m1]
|
||||
|
||||
definitions:
|
||||
- easy_specs:
|
||||
- berkeley-db
|
||||
- ncurses
|
||||
- gcc
|
||||
- py-jupyterlab
|
||||
- py-scipy
|
||||
- py-matplotlib
|
||||
- py-pandas
|
||||
|
||||
- arch:
|
||||
- '%apple-clang@13.1.6 target=m1'
|
||||
|
||||
specs:
|
||||
|
||||
- matrix:
|
||||
- - $easy_specs
|
||||
- - $arch
|
||||
|
||||
mirrors: { "mirror": "s3://spack-binaries/develop/e4s-mac" }
|
||||
|
||||
ci:
|
||||
pipeline-gen:
|
||||
- cleanup-job:
|
||||
before_script: |
|
||||
- export SPACK_USER_CACHE_PATH=$(pwd)/.spack-user-cache
|
||||
- export SPACK_USER_CONFIG_PATH=$(pwd)/.spack-user-config
|
||||
- . "./share/spack/setup-env.sh"
|
||||
- spack --version
|
||||
tags: [lambda]
|
||||
|
||||
cdash:
|
||||
build-group: E4S Mac
|
@@ -0,0 +1,139 @@
|
||||
spack:
|
||||
view: false
|
||||
|
||||
concretizer:
|
||||
unify: false
|
||||
reuse: false
|
||||
|
||||
config:
|
||||
concretizer: clingo
|
||||
db_lock_timeout: 120
|
||||
install_tree:
|
||||
root: $spack/opt/spack
|
||||
padded_length: 256
|
||||
projections:
|
||||
all: '{architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}'
|
||||
|
||||
packages:
|
||||
all:
|
||||
require: target=aarch64
|
||||
variants: +mps~cuda~rocm
|
||||
mpi:
|
||||
require: openmpi
|
||||
|
||||
specs:
|
||||
# Hugging Face
|
||||
- py-transformers
|
||||
|
||||
# JAX
|
||||
- py-jax
|
||||
# - py-jaxlib # bazel codesign
|
||||
|
||||
# Keras
|
||||
- py-keras-applications
|
||||
- py-keras-preprocessing
|
||||
- py-keras2onnx
|
||||
# - py-keras # bazel codesign
|
||||
|
||||
# MXNet
|
||||
- mxnet
|
||||
|
||||
# PyTorch
|
||||
- py-botorch
|
||||
- py-gpytorch
|
||||
- py-pytorch-gradual-warmup-lr
|
||||
- py-segmentation-models-pytorch
|
||||
- py-timm
|
||||
- py-torch
|
||||
- py-torch-cluster
|
||||
- py-torch-geometric
|
||||
- py-torch-sparse
|
||||
- py-torchdata
|
||||
- py-torchfile
|
||||
- py-torchgeo
|
||||
- py-torchvision
|
||||
|
||||
# scikit-learn
|
||||
- py-scikit-learn
|
||||
- py-scikit-learn-extra
|
||||
|
||||
# TensorBoard
|
||||
- py-tensorboard
|
||||
- py-tensorboard-data-server
|
||||
- py-tensorboard-plugin-wit
|
||||
- py-tensorboardx
|
||||
|
||||
# TensorFlow
|
||||
# - py-tensorflow # bazel codesign
|
||||
# - py-tensorflow-datasets # bazel codesign
|
||||
# - py-tensorflow-hub # bazel codesign
|
||||
# - py-tensorflow-metadata # bazel codesign
|
||||
# - py-tensorflow-estimator # bazel codesign
|
||||
# - py-tensorflow-probability # py-dm-tree due to bazel codesign
|
||||
|
||||
# XGBoost
|
||||
- py-xgboost
|
||||
- xgboost
|
||||
|
||||
# ERRORS
|
||||
# - py-efficientnet-pytorch # py-torch
|
||||
# - py-horovod # py-torch
|
||||
# - py-kornia # py-torch
|
||||
# - py-lightning # py-torch
|
||||
# - py-pytorch-lightning # py-torch
|
||||
# - py-torch-nvidia-apex # py-torch
|
||||
# - py-torch-scatter # py-torch
|
||||
# - py-torch-spline-conv # py-torch
|
||||
# - py-torchaudio # py-torchaudio
|
||||
# - py-torchmetrics # py-torch
|
||||
# - py-torchtext # py-torchtext
|
||||
# - py-vector-quantize-pytorch # py-torch
|
||||
# - r-xgboost # r
|
||||
|
||||
mirrors: { "mirror": "s3://spack-binaries/develop/ml-darwin-aarch64-cpu" }
|
||||
|
||||
ci:
|
||||
pipeline-gen:
|
||||
- build-job-remove:
|
||||
image: no-image
|
||||
tags: [spack, public]
|
||||
- build-job:
|
||||
tags: [ "macos-ventura", "apple-clang-14", "aarch64-macos" ]
|
||||
script::
|
||||
- - spack compiler find
|
||||
- cd ${SPACK_CONCRETE_ENV_DIR}
|
||||
- spack env activate --without-view .
|
||||
- if [ -n "$SPACK_BUILD_JOBS" ]; then spack config add "config:build_jobs:$SPACK_BUILD_JOBS"; fi
|
||||
- mkdir -p ${SPACK_ARTIFACTS_ROOT}/user_data
|
||||
# AWS runners mount E4S public key (verification), UO runners mount public/private (signing/verification)
|
||||
- if [[ -r /etc/protected-runner/e4s.gpg ]]; then spack gpg trust /etc/protected-runner/e4s.gpg; fi
|
||||
# UO runners mount intermediate ci public key (verification), AWS runners mount public/private (signing/verification)
|
||||
- if [[ -r /etc/protected-runner/intermediate_ci_signing_key.gpg ]]; then spack gpg trust /etc/protected-runner/intermediate_ci_signing_key.gpg; fi
|
||||
- if [[ -r /etc/protected-runner/spack_public_key.gpg ]]; then spack gpg trust /etc/protected-runner/spack_public_key.gpg; fi
|
||||
- spack --color=always --backtrace ci rebuild --tests > >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_out.txt) 2> >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_err.txt >&2)
|
||||
after_script:
|
||||
- - cat /proc/loadavg || true
|
||||
- signing-job:
|
||||
image: { "name": "ghcr.io/spack/notary:latest", "entrypoint": [""] }
|
||||
tags: ["aws"]
|
||||
script:
|
||||
- - aws s3 sync --exclude "*" --include "*spec.json*" ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache /tmp
|
||||
- /sign.sh
|
||||
- aws s3 sync --exclude "*" --include "*spec.json.sig*" /tmp ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache
|
||||
- aws s3 cp /tmp/public_keys ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/_pgp --recursive --exclude "*" --include "*.pub"
|
||||
- any-job:
|
||||
image: "ghcr.io/spack/e4s-ubuntu-18.04:v2021-10-18"
|
||||
tags: ["spack"]
|
||||
before_script:
|
||||
- - uname -a || true
|
||||
- grep -E "vendor|model name" /proc/cpuinfo 2>/dev/null | sort -u || head -n10 /proc/cpuinfo 2>/dev/null || true
|
||||
- nproc || true
|
||||
- - . "./share/spack/setup-env.sh"
|
||||
- spack --version
|
||||
- spack arch
|
||||
|
||||
cdash:
|
||||
build-group: Machine Learning MPS
|
||||
url: https://cdash.spack.io
|
||||
project: Spack Testing
|
||||
site: Cloud Gitlab Infrastructure
|
@@ -1060,7 +1060,7 @@ _spack_external_list() {
|
||||
}
|
||||
|
||||
_spack_external_read_cray_manifest() {
|
||||
SPACK_COMPREPLY="-h --help --file --directory --dry-run --fail-on-error"
|
||||
SPACK_COMPREPLY="-h --help --file --directory --ignore-default-dir --dry-run --fail-on-error"
|
||||
}
|
||||
|
||||
_spack_fetch() {
|
||||
|
@@ -36,6 +36,40 @@
|
||||
}
|
||||
|
||||
_versions = {
|
||||
"23.04.1": {
|
||||
"RHEL-7": (
|
||||
"5e84daaf0510f73c235723112f9241bbd744ed89eb4f70f089bac05cf2aad2c4",
|
||||
"https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/23-04-1/arm-compiler-for-linux_23.04.1_RHEL-7_aarch64.tar",
|
||||
),
|
||||
"RHEL-8": (
|
||||
"6ec1f2c7338ea8a2831a7ff353ab44f87804f56716d1f3686576fb950c2f730f",
|
||||
"https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/23-04-1/arm-compiler-for-linux_23.04.1_RHEL-8_aarch64.tar",
|
||||
),
|
||||
"RHEL-9": (
|
||||
"dbd6493ea762b9b4c6cb54a76ad42e2223360882165ee3c223c1b7d1ebe927e2",
|
||||
"https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/23-04-1/arm-compiler-for-linux_23.04.1_RHEL-9_aarch64.tar",
|
||||
),
|
||||
"SLES-15": (
|
||||
"74c29890d47556114922c77e5a9797b055f8fe49f0c8665d17102465fca766b4",
|
||||
"https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/23-04-1/arm-compiler-for-linux_23.04.1_SLES-15_aarch64.tar",
|
||||
),
|
||||
"Ubuntu-20.04": (
|
||||
"78015ff5a246facfe45219a03a3774221b2f3b58db6fa3d9840d2574d103310c",
|
||||
"https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/23-04-1/arm-compiler-for-linux_23.04.1_Ubuntu-20.04_aarch64.tar",
|
||||
),
|
||||
"Ubuntu-22.04": (
|
||||
"19213db67aa11de44b617255e9e32efd294f930c6b6145192acf9ee331452ea6",
|
||||
"https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/23-04-1/arm-compiler-for-linux_23.04.1_Ubuntu-22.04_aarch64.tar",
|
||||
),
|
||||
"AmazonLinux-2": (
|
||||
"31ba559302a2889e5f0897f1c07563b20a5a8eaa671e623bef406b6490d1f4f2",
|
||||
"https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/23-04-1/arm-compiler-for-linux_23.04.1_AmazonLinux-2_aarch64.tar",
|
||||
),
|
||||
"AmazonLinux-2023": (
|
||||
"fa38f3d79775e9a537c59c8ba39c3b10505e895a3602bbd93c09445170db571f",
|
||||
"https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/23-04-1/arm-compiler-for-linux_23.04.1_AmazonLinux-2023_aarch64.tar",
|
||||
),
|
||||
},
|
||||
"23.04": {
|
||||
"RHEL-7": (
|
||||
"6526218484e87c195c1145f60536552fabbd25ba98c05cf096f54de18381a422",
|
||||
@@ -72,23 +106,23 @@
|
||||
},
|
||||
"22.1": {
|
||||
"RHEL-7": (
|
||||
"bfbfef9099bf0e90480d48b3a1a741d583fc939284f869958e9c09e177098c73",
|
||||
"367b9a60fa13b5fcf2fa787122c12d4bfb14d6f3e3e7b0460efc7627484a56a4",
|
||||
"https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/22-1/arm-compiler-for-linux_22.1_RHEL-7_aarch64.tar",
|
||||
),
|
||||
"RHEL-8": (
|
||||
"28116f6030c95ee8f69eba89023966974d6b44d4a686098f5c3c03e34f7495f6",
|
||||
"f03ad3381a74df73a4c25baf5f1c15bd466cfd6286498c38b37ddeaa85c9965e",
|
||||
"https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/22-1/arm-compiler-for-linux_22.1_RHEL-8_aarch64.tar",
|
||||
),
|
||||
"SLES-15": (
|
||||
"6616dba1af4a73300ce822b645a0f1dfd363f507db5ea44cab1c6051ea388554",
|
||||
"8a1c5bd570bd195982c342da8dafb7075f8f6b373b44539d4c810e69e8157c1f",
|
||||
"https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/22-1/arm-compiler-for-linux_22.1_SLES-15_aarch64.tar",
|
||||
),
|
||||
"Ubuntu-18.04": (
|
||||
"3b3dd6f416299fbd14fbaf0b1bddf7e2f4445a186de7a87e9efdae0b9d0dc3d5",
|
||||
"4628599d389efcee07d0986cc3e791931e6a37eddb6e4b93c7846e17efe2148f",
|
||||
"https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/22-1/arm-compiler-for-linux_22.1_Ubuntu-18.04_aarch64.tar",
|
||||
),
|
||||
"Ubuntu-20.04": (
|
||||
"e6361a08f75817c8dbfb56dc72578810eaf5ffb65591215e394cb3ec6bdd9c10",
|
||||
"20d950d16e6bb0b3a4c4f3c8ad393aae2356d4c998303b319da9e9833d4a6d12",
|
||||
"https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/22-1/arm-compiler-for-linux_22.1_Ubuntu-20.04_aarch64.tar",
|
||||
),
|
||||
},
|
||||
@@ -199,8 +233,8 @@ class Acfl(Package):
|
||||
with a modern LLVM-based compiler framework.
|
||||
"""
|
||||
|
||||
homepage = "https://developer.arm.com/tools-and-software/server-and-hpc/arm-allinea-studio"
|
||||
url = "https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/22-1/arm-compiler-for-linux_22.1_Ubuntu-20.04_aarch64.tar"
|
||||
homepage = "https://developer.arm.com/Tools%20and%20Software/Arm%20Compiler%20for%20Linux"
|
||||
url = "https://developer.arm.com/-/media/Files/downloads/hpc/arm-compiler-for-linux/23-04-1/arm-compiler-for-linux_23.04.1_Ubuntu-22.04_aarch64.tar"
|
||||
|
||||
maintainers("annop-w")
|
||||
|
||||
|
@@ -21,6 +21,8 @@ class Amgx(CMakePackage, CudaPackage):
|
||||
|
||||
maintainers("js947")
|
||||
|
||||
version("2.3.0", sha256="419b3cd5bd3eb3469cbef79d64a8d19d5db88dd5cce809e49cac6fc4fc2edff1")
|
||||
version("2.2.0", sha256="dac78516bb528135cad903399fe0093aa0904e304565ef2d3da4fae05eda7928")
|
||||
version("2.1.0", sha256="6245112b768a1dc3486b2b3c049342e232eb6281a6021fffa8b20c11631f63cc")
|
||||
version("2.0.1", sha256="6f9991f1836fbf4ba2114ce9f49febd0edc069a24f533bd94fd9aa9be72435a7")
|
||||
version("2.0.0", sha256="8ec7ea8412be3de216fcf7243c4e2a8bcf76878e6865468e4238630a082a431b")
|
||||
|
@@ -314,43 +314,20 @@ def cmake_args(self):
|
||||
|
||||
return args
|
||||
|
||||
# TODO: Replace this method and its 'get' use for cmake path with
|
||||
# join_path(self.spec['cmake'].prefix.bin, 'cmake') once stand-alone
|
||||
# tests can access build dependencies through self.spec['cmake'].
|
||||
def cmake_bin(self, set=True):
|
||||
"""(Hack) Set/get cmake dependency path."""
|
||||
filepath = join_path(self.install_test_root, "cmake_bin_path.txt")
|
||||
if set:
|
||||
with open(filepath, "w") as out_file:
|
||||
cmake_bin = join_path(self.spec["cmake"].prefix.bin, "cmake")
|
||||
out_file.write("{0}\n".format(cmake_bin))
|
||||
else:
|
||||
with open(filepath, "r") as in_file:
|
||||
return in_file.read().strip()
|
||||
|
||||
@run_after("build")
|
||||
def setup_smoke_test(self):
|
||||
"""Skip setup smoke tests for AMReX versions less than 21.12."""
|
||||
def setup_standalone_test(self):
|
||||
"""Setup stand-alonetests for AMReX versions from 21.12 on."""
|
||||
if self.spec.satisfies("@:21.11"):
|
||||
return
|
||||
|
||||
self.cache_extra_test_sources(["Tests"])
|
||||
|
||||
# TODO: Remove once self.spec['cmake'] is available here
|
||||
self.cmake_bin(set=True)
|
||||
|
||||
def test(self):
|
||||
"""Skip smoke tests for AMReX versions less than 21.12."""
|
||||
def test_run_install_test(self):
|
||||
"""build and run AmrCore test"""
|
||||
if self.spec.satisfies("@:21.11"):
|
||||
print("SKIPPED: Stand-alone tests not supported for this version of AMReX.")
|
||||
return
|
||||
raise SkipTest("Test is not supported for versions @:21.11")
|
||||
|
||||
"""Perform smoke tests on installed package."""
|
||||
# TODO: Remove/replace once self.spec['cmake'] is available here
|
||||
cmake_bin = self.cmake_bin(set=False)
|
||||
|
||||
args = []
|
||||
args.append("-S./cache/amrex/Tests/SpackSmokeTest")
|
||||
args = ["-S{0}".format(join_path(".", "cache", "amrex", "Tests", "SpackSmokeTest"))]
|
||||
args.append("-DAMReX_ROOT=" + self.prefix)
|
||||
if "+mpi" in self.spec:
|
||||
args.append("-DMPI_C_COMPILER=" + self.spec["mpi"].mpicc)
|
||||
@@ -360,15 +337,15 @@ def test(self):
|
||||
args.append("-DCMAKE_CUDA_COMPILER=" + join_path(self.spec["cuda"].prefix.bin, "nvcc"))
|
||||
|
||||
args.extend(self.cmake_args())
|
||||
self.run_test(cmake_bin, args, purpose="Configure with CMake")
|
||||
cmake = which(self.spec["cmake"].prefix.bin.cmake)
|
||||
cmake(*args)
|
||||
|
||||
self.run_test("make", [], purpose="Compile")
|
||||
make = which("make")
|
||||
make()
|
||||
|
||||
self.run_test(
|
||||
"install_test",
|
||||
["./cache/amrex/Tests/Amr/Advection_AmrCore/Exec/inputs-ci"],
|
||||
["finalized"],
|
||||
installed=False,
|
||||
purpose="AMReX Stand-Alone Smoke Test -- AmrCore",
|
||||
skip_missing=False,
|
||||
install_test = which("install_test")
|
||||
inputs_path = join_path(
|
||||
".", "cache", "amrex", "Tests", "Amr", "Advection_AmrCore", "Exec", "inputs-ci"
|
||||
)
|
||||
out = install_test(inputs_path, output=str.split, error=str.split)
|
||||
assert "finalized" in out
|
||||
|
@@ -2,6 +2,7 @@
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
import os
|
||||
|
||||
from spack.package import *
|
||||
|
||||
@@ -17,6 +18,8 @@ class Arborx(CMakePackage, CudaPackage, ROCmPackage):
|
||||
|
||||
maintainers("aprokop")
|
||||
|
||||
test_requires_compiler = True
|
||||
|
||||
version("master", branch="master")
|
||||
version("1.4", sha256="803a1018a6305cf3fea161172b3ada49537f59261279d91c2abbcce9492ee7af")
|
||||
version("1.3", sha256="3f1e17f029a460ab99f8396e2772cec908eefc4bf3868c8828907624a2d0ce5d")
|
||||
@@ -120,18 +123,18 @@ def cached_tests_work_dir(self):
|
||||
"""The working directory for cached test sources."""
|
||||
return join_path(self.test_suite.current_test_cache_dir, self.examples_src_dir)
|
||||
|
||||
def build_tests(self):
|
||||
"""Build the stand-alone/smoke test."""
|
||||
def test_run_ctest(self):
|
||||
"""run ctest tests on the installed package"""
|
||||
|
||||
arborx_dir = self.spec["arborx"].prefix
|
||||
cmake_prefix_path = "-DCMAKE_PREFIX_PATH={0}".format(arborx_dir)
|
||||
cmake_prefix_path = f"-DCMAKE_PREFIX_PATH={arborx_dir}"
|
||||
if "+mpi" in self.spec:
|
||||
cmake_prefix_path += ";{0}".format(self.spec["mpi"].prefix)
|
||||
cmake_prefix_path += f";{self.spec['mpi'].prefix}"
|
||||
|
||||
cmake_args = [
|
||||
".",
|
||||
cmake_prefix_path,
|
||||
"-DCMAKE_CXX_COMPILER={0}".format(self.compiler.cxx),
|
||||
f"-DCMAKE_CXX_COMPILER={os.environ['CXX']}",
|
||||
self.define(
|
||||
"Kokkos_ROOT",
|
||||
self.spec["kokkos"].prefix
|
||||
@@ -139,23 +142,11 @@ def build_tests(self):
|
||||
else self.spec["trilinos"].prefix,
|
||||
),
|
||||
]
|
||||
cmake = which(self.spec["cmake"].prefix.bin.cmake)
|
||||
make = which("make")
|
||||
ctest = which("ctest")
|
||||
|
||||
self.run_test(
|
||||
"cmake", cmake_args, purpose="test: calling cmake", work_dir=self.cached_tests_work_dir
|
||||
)
|
||||
|
||||
self.run_test(
|
||||
"make", [], purpose="test: building the tests", work_dir=self.cached_tests_work_dir
|
||||
)
|
||||
|
||||
def test(self):
|
||||
"""Perform stand-alone/smoke tests on the installed package."""
|
||||
self.build_tests()
|
||||
|
||||
self.run_test(
|
||||
"ctest",
|
||||
["-V"],
|
||||
purpose="test: running the tests",
|
||||
installed=False,
|
||||
work_dir=self.cached_tests_work_dir,
|
||||
)
|
||||
with working_dir(self.cached_tests_work_dir):
|
||||
cmake(*cmake_args)
|
||||
make()
|
||||
ctest("-V")
|
||||
|
@@ -3,7 +3,6 @@
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
|
||||
import os
|
||||
|
||||
from spack.package import *
|
||||
@@ -50,25 +49,17 @@ def cache_test_sources(self):
|
||||
install test subdirectory for use during `spack test run`."""
|
||||
self.cache_extra_test_sources(["test"])
|
||||
|
||||
def run_parallel_example_test(self):
|
||||
"""Run stand alone test: parallel-simple"""
|
||||
|
||||
def test_run_parallel_example(self):
|
||||
"""build and run parallel-simple"""
|
||||
test_dir = join_path(self.test_suite.current_test_cache_dir, "test", "parallel")
|
||||
|
||||
if not os.path.exists(test_dir):
|
||||
print("Skipping archer test")
|
||||
return
|
||||
raise SkipTest("Parallel test directory does not exist")
|
||||
|
||||
exe = "parallel-simple"
|
||||
test_exe = "parallel-simple"
|
||||
test_src = "{0}.c".format(test_exe)
|
||||
with working_dir(test_dir):
|
||||
clang = which("clang-archer")
|
||||
clang("-o", test_exe, test_src)
|
||||
|
||||
self.run_test(
|
||||
"clang-archer",
|
||||
options=["-o", exe, "{0}".format(join_path(test_dir, "parallel-simple.c"))],
|
||||
purpose="test: compile {0} example".format(exe),
|
||||
work_dir=test_dir,
|
||||
)
|
||||
|
||||
self.run_test(exe, purpose="test: run {0} example".format(exe), work_dir=test_dir)
|
||||
|
||||
def test(self):
|
||||
self.run_parallel_example_test()
|
||||
parallel_simple = which(test_exe)
|
||||
parallel_simple()
|
||||
|
@@ -36,6 +36,50 @@
|
||||
}
|
||||
|
||||
_versions = {
|
||||
"23.04.1_gcc-12.2": {
|
||||
"RHEL-7": ("789cc093cb7e0d9294aff0fdf94b74987435a09cdff4c1b7118a03350548d03c"),
|
||||
"RHEL-8": ("1b668baec6d3df2d48c5aedc70baa6a9b638983b94bf2cd58d378859a1da49f0"),
|
||||
"RHEL-9": ("8a4d7aec2fe109aedcb9e8fdec566dc1ba3adcb3ba79e5c08b78b9717578db1c"),
|
||||
"SLES-15": ("9c8aa114907d3ac9311301b991d732d535422e73516e0f337395637ce6a14c4a"),
|
||||
"Ubuntu-20.04": ("c0a67afb6989b2bdb172052ff7d20a9e3197356714df06c862edd3ac71ef62f0"),
|
||||
"Ubuntu-22.04": ("02e59d834c341164f5acf633555024bf614726aed8a85c1b0b46d024ce7840e2"),
|
||||
"AmazonLinux-2": ("1cbb9a3d777353b42bfb5af327419c231640e7744ab46ab3a13e97802b1ce227"),
|
||||
"AmazonLinux-2023": ("ee9b0b6ee0d881280e473390007020504a147b75bf6076d245832f101b01653e"),
|
||||
},
|
||||
"23.04.1_gcc-11.3": {
|
||||
"RHEL-7": ("522e0269ca03d6251c10ee3aa8d94ceec4618887f47847defb535849434439a5"),
|
||||
"RHEL-8": ("00f6fee4ba4bbff5be6d5ad34137973ab89505fc61a23d8e0c302b8860c70484"),
|
||||
"RHEL-9": ("2402165267b25d07fd64b6d444b3120354dfd27594b11a1f082e85e76465e712"),
|
||||
"SLES-15": ("a928539efe5af760fc86a009e3d87c9648e4d4e91490c13bc136a837591549c3"),
|
||||
"Ubuntu-20.04": ("5754d8a6040bb6d0b1df326c9ab61901a72e5cc6d2d4195e52ca9271e55fb9f6"),
|
||||
"Ubuntu-22.04": ("8af5aca7512a604b051a7808701a5c0285e92d88232138612d8caf973b7b1252"),
|
||||
"AmazonLinux-2": ("8c710cb7bb21694130b915cc2650cfb85fb00cfca7e5fca9bbdec5c59a09c007"),
|
||||
"AmazonLinux-2023": ("8b9c69a72c5b1ed5814e28ddd122ab09dbe5dd3585e4c395242ed590eea6ea79"),
|
||||
},
|
||||
"23.04.1_gcc-10.2": {
|
||||
"RHEL-7": ("40d62517bd978516c308b2e57ab88772699fd8bb579d98bbc10ea397c0bab431"),
|
||||
"RHEL-8": ("76554ea1f3d143f1236afea67e33eea74660f57718ef57c12986843da75e03d3"),
|
||||
"SLES-15": ("63a6acb00300a9e85cfafd2141515ecb28dac82c1f441778d74e8add038724e2"),
|
||||
"Ubuntu-20.04": ("7b6bcb8d1b9ca8be2d29e7620862fa961d965f479fa04873616ac8cc9bb399fc"),
|
||||
"AmazonLinux-2": ("c6410ce2c109ae72568186bb7e162fcf4a9b05ea89da36d17db695b7df34f506"),
|
||||
},
|
||||
"23.04.1_gcc-9.3": {
|
||||
"RHEL-7": ("782bbc27c77c230426086c226a78b8951501066d631947438e65ca51d33f24c3"),
|
||||
"RHEL-8": ("8d3be6381b3e5032c5068a1d2e3d0e69c308a93496f85af42d43a579f9f7d9a3"),
|
||||
"SLES-15": ("abe2245674a66ec93cff3c93dac7ae04a99c6c7e43e2733de214ec188e0d6cae"),
|
||||
"Ubuntu-20.04": ("a7d385b901f2d1c07f243c816030ad19543e00667615dea1969ce16d29759271"),
|
||||
"AmazonLinux-2": ("7113b6e2c795933ce8d18d468889168732d3a52a0df4a48ef4bf4497e891083a"),
|
||||
},
|
||||
"23.04.1_gcc-8.2": {
|
||||
"RHEL-7": ("4e077813121c1cbd8abd1afe5348cafcce5b70f96affa725c7c2d8671e2d5eed"),
|
||||
"RHEL-8": ("772aaab9304191e3a398cba2dec21ec22fd0abadcaf44d44f32114968bd3b59d"),
|
||||
"SLES-15": ("33766ac351fb4628c6b39f16d6bdb310ad09d88b6a6f43740349405c960d4d21"),
|
||||
"AmazonLinux-2": ("c215ed8de77b5144a60b6552f79ef2b59ccbfac5350f083ef135305ddf643a4e"),
|
||||
},
|
||||
"23.04.1_gcc-7.5": {
|
||||
"RHEL-7": ("7b2239b2ce5315e1be14dbd8fe15aff2d3b07968d64b5c80c8ab57140b6a17a8"),
|
||||
"AmazonLinux-2": ("a2e0f176df627c50f851924ac57994f582f63b0f3d42ad0b65c915ea04dc0467"),
|
||||
},
|
||||
"23.04_gcc-12.2": {
|
||||
"RHEL-7": ("e159f84f14d885aa5e47ca17c16ef3d95128f834a655827bf6b48fcf8d6ec459"),
|
||||
"RHEL-8": ("6ac1974ec9bd814d3a4eecf330cefd67cf2c878f026a8b04bc2928368948671a"),
|
||||
@@ -225,6 +269,13 @@ class ArmplGcc(Package):
|
||||
conflicts("target=ppc64:", msg="Only available on Aarch64")
|
||||
conflicts("target=ppc64le:", msg="Only available on Aarch64")
|
||||
|
||||
conflicts("%gcc@:11", when="@23.04.1_gcc-12.2")
|
||||
conflicts("%gcc@:10", when="@23.04.1_gcc-11.3")
|
||||
conflicts("%gcc@:9", when="@23.04.1_gcc-10.2")
|
||||
conflicts("%gcc@:8", when="@23.04.1_gcc-9.3")
|
||||
conflicts("%gcc@:7", when="@23.04.1_gcc-8.2")
|
||||
conflicts("%gcc@:6", when="@23.04.1_gcc-7.5")
|
||||
|
||||
conflicts("%gcc@:11", when="@23.04_gcc-12.2")
|
||||
conflicts("%gcc@:10", when="@23.04_gcc-11.3")
|
||||
conflicts("%gcc@:9", when="@23.04_gcc-10.2")
|
||||
|
@@ -14,17 +14,44 @@ class Asio(AutotoolsPackage):
|
||||
homepage = "https://think-async.com/Asio/"
|
||||
url = "https://github.com/chriskohlhoff/asio/archive/asio-1-18-2.tar.gz"
|
||||
git = "https://github.com/chriskohlhoff/asio.git"
|
||||
maintainers("msimberg")
|
||||
maintainers("msimberg", "pauleonix")
|
||||
|
||||
version("1.21.0", sha256="5d2d2dcb7bfb39bff941cabbfc8c27ee322a495470bf0f3a7c5238648cf5e6a9")
|
||||
# As uneven minor versions of asio are not considered stable, they wont be added anymore
|
||||
version("1.28.0", sha256="226438b0798099ad2a202563a83571ce06dd13b570d8fded4840dbc1f97fa328")
|
||||
version("1.26.0", sha256="935583f86825b7b212479277d03543e0f419a55677fa8cb73a79a927b858a72d")
|
||||
version("1.24.0", sha256="cbcaaba0f66722787b1a7c33afe1befb3a012b5af3ad7da7ff0f6b8c9b7a8a5b")
|
||||
version("1.22.2", sha256="985fc2d522f32d232d8386d2fa4ac6f2b25a0cad30495bf2e2e7997bce743f0b")
|
||||
version("1.22.1", sha256="30cb54a5de5e465d10ec0c2026d6b5917f5e89fffabdbabeb1475846fc9a2cf0")
|
||||
version("1.22.0", sha256="17bfd506f6d55c85a33603277a256b42ca5883bf290930040489ffeeed23724a")
|
||||
version(
|
||||
"1.21.0",
|
||||
sha256="5d2d2dcb7bfb39bff941cabbfc8c27ee322a495470bf0f3a7c5238648cf5e6a9",
|
||||
deprecated=True, # non-stable
|
||||
)
|
||||
version("1.20.0", sha256="34a8f07be6f54e3753874d46ecfa9b7ab7051c4e3f67103c52a33dfddaea48e6")
|
||||
version("1.19.2", sha256="5ee191aee825dfb1325cbacf643d599b186de057c88464ea98f1bae5ba4ff47a")
|
||||
version("1.19.1", sha256="2555e0a29256de5c77d6a34b14faefd28c76555e094ba0371acb0b91d483520e")
|
||||
version("1.19.0", sha256="11bc0e22fcdfb3f0b77574ac33760a3592c0dac7e7eece7668b823c158243629")
|
||||
version(
|
||||
"1.19.2",
|
||||
sha256="5ee191aee825dfb1325cbacf643d599b186de057c88464ea98f1bae5ba4ff47a",
|
||||
deprecated=True, # non-stable
|
||||
)
|
||||
version(
|
||||
"1.19.1",
|
||||
sha256="2555e0a29256de5c77d6a34b14faefd28c76555e094ba0371acb0b91d483520e",
|
||||
deprecated=True, # non-stable
|
||||
)
|
||||
version(
|
||||
"1.19.0",
|
||||
sha256="11bc0e22fcdfb3f0b77574ac33760a3592c0dac7e7eece7668b823c158243629",
|
||||
deprecated=True, # non-stable
|
||||
)
|
||||
version("1.18.2", sha256="8d67133b89e0f8b212e9f82fdcf1c7b21a978d453811e2cd941c680e72c2ca32")
|
||||
version("1.18.1", sha256="39c721b987b7a0d2fe2aee64310bd128cd8cc10f43481604d18cb2d8b342fd40")
|
||||
version("1.18.0", sha256="820688d1e0387ff55194ae20036cbae0fb3c7d11b7c3f46492369723c01df96f")
|
||||
version("1.17.0", sha256="46406a830f8334b3789e7352ed7309a39c7c30b685b0499d289eda4fd4ae2067")
|
||||
version(
|
||||
"1.17.0",
|
||||
sha256="46406a830f8334b3789e7352ed7309a39c7c30b685b0499d289eda4fd4ae2067",
|
||||
deprecated=True, # non-stable
|
||||
)
|
||||
version("1.16.1", sha256="e40bbd531530f08318b7c7d7e84e457176d8eae6f5ad2e3714dc27b9131ecd35")
|
||||
version("1.16.0", sha256="c87410ea62de6245aa239b9ed2057edf01d7f66acc3f5e50add9a29343c87512")
|
||||
|
||||
@@ -32,6 +59,15 @@ class Asio(AutotoolsPackage):
|
||||
depends_on("automake", type="build")
|
||||
depends_on("m4", type="build")
|
||||
depends_on("libtool", type="build")
|
||||
depends_on("pkgconfig", type="build", when="@1.23:")
|
||||
|
||||
# See https://github.com/chriskohlhoff/asio/issues/944 and
|
||||
# https://github.com/chriskohlhoff/asio/pull/995
|
||||
conflicts(
|
||||
"%gcc@12:",
|
||||
when="@:1.22.0",
|
||||
msg="asio v1.22.1 fixed missing includes necessary for gcc v12 and above",
|
||||
)
|
||||
|
||||
stds = ("11", "14", "17", "2a")
|
||||
variant(
|
||||
|
@@ -12,7 +12,10 @@ class Bbcp(Package):
|
||||
homepage = "https://www.slac.stanford.edu/~abh/bbcp/"
|
||||
git = "https://www.slac.stanford.edu/~abh/bbcp/bbcp.git"
|
||||
|
||||
version("master", branch="master")
|
||||
maintainers("vanderwb")
|
||||
|
||||
# Stanford's git server does not support "smart https" shallow clones
|
||||
version("master", branch="master", get_full_repo=True)
|
||||
|
||||
depends_on("zlib")
|
||||
depends_on("openssl")
|
||||
|
@@ -17,6 +17,13 @@ class Beast2(Package):
|
||||
homepage = "http://beast2.org/"
|
||||
url = "https://github.com/CompEvol/beast2/releases/download/v2.6.4/BEAST.v2.6.4.Linux.tgz"
|
||||
|
||||
maintainers("snehring")
|
||||
|
||||
version(
|
||||
"2.7.4",
|
||||
sha256="f5086c74a0337190ae3459ef018468fc6b2eff68ae2b53fb5c96eb7b5df84004",
|
||||
url="https://github.com/CompEvol/beast2/releases/download/v2.7.4/BEAST.v2.7.4.Linux.x86.tgz",
|
||||
)
|
||||
version("2.6.7", sha256="05dcc619c2e10163f2c1089ec66149f6e53ec5a0583cd2cb8ffdccbbdb1d8183")
|
||||
version("2.6.4", sha256="4f80e2920eb9d87f3e9f64433119774dc67aca390fbd13dd480f852e3f8701a4")
|
||||
version("2.6.3", sha256="8899277b0d7124ab04dc512444d45f0f1a13505f3ce641e1f117098be3e2e20d")
|
||||
@@ -24,6 +31,19 @@ class Beast2(Package):
|
||||
version("2.4.6", sha256="84029c5680cc22f95bef644824130090f5f12d3d7f48d45cb4efc8e1d6b75e93")
|
||||
|
||||
depends_on("java")
|
||||
depends_on("java@17:", when="@2.7.0:")
|
||||
depends_on("javafx", when="@2.7.0:")
|
||||
|
||||
def patch(self):
|
||||
# handle javafx stuff
|
||||
if self.spec.satisfies("@2.7.0:"):
|
||||
javafx = "--module-path {}".format(self.spec["javafx"].prefix.lib)
|
||||
modules = "--add-modules javafx.controls"
|
||||
with working_dir("bin"):
|
||||
for i in find(".", "*"):
|
||||
filter_file(
|
||||
r"(beast\.pkgmgmt.*\b)|(viz.*\b)", "{0} {1} \\1".format(javafx, modules), i
|
||||
)
|
||||
|
||||
def setup_run_environment(self, env):
|
||||
env.set("BEAST", self.prefix)
|
||||
@@ -33,4 +53,8 @@ def install(self, spec, prefix):
|
||||
install_tree("examples", join_path(self.prefix, "examples"))
|
||||
install_tree("images", join_path(self.prefix, "images"))
|
||||
install_tree("lib", prefix.lib)
|
||||
install_tree("templates", join_path(self.prefix, "templates"))
|
||||
if spec.satisfies("@:2.6.4"):
|
||||
template_dir = "templates"
|
||||
else:
|
||||
template_dir = "fxtemplates"
|
||||
install_tree(template_dir, join_path(self.prefix, template_dir))
|
||||
|
@@ -16,6 +16,8 @@ class Bedops(MakefilePackage):
|
||||
url = "https://github.com/bedops/bedops/archive/v2.4.39.tar.gz"
|
||||
|
||||
maintainers("jacorvar")
|
||||
|
||||
version("2.4.41", sha256="3b868c820d59dd38372417efc31e9be3fbdca8cf0a6b39f13fb2b822607d6194")
|
||||
version("2.4.40", sha256="8c01db76669dc58c595e2e1b9bdb6d462f3363fc569b15c460a63a63b8b6bf30")
|
||||
version("2.4.39", sha256="f8bae10c6e1ccfb873be13446c67fc3a54658515fb5071663883f788fc0e4912")
|
||||
version("2.4.35", sha256="da0265cf55ef5094834318f1ea4763d7a3ce52a6900e74f532dd7d3088c191fa")
|
||||
|
@@ -2,6 +2,7 @@
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
import os
|
||||
import re
|
||||
|
||||
from spack.package import *
|
||||
@@ -93,25 +94,40 @@ def configure_args(self):
|
||||
|
||||
return config_args
|
||||
|
||||
def test(self):
|
||||
"""Perform smoke tests on the installed package binaries."""
|
||||
exes = [
|
||||
"db_checkpoint",
|
||||
"db_deadlock",
|
||||
"db_dump",
|
||||
"db_load",
|
||||
"db_printlog",
|
||||
"db_stat",
|
||||
"db_upgrade",
|
||||
"db_verify",
|
||||
]
|
||||
for exe in exes:
|
||||
reason = "test version of {0} is {1}".format(exe, self.spec.version)
|
||||
self.run_test(
|
||||
exe,
|
||||
["-V"],
|
||||
[self.spec.version.string],
|
||||
installed=True,
|
||||
purpose=reason,
|
||||
skip_missing=True,
|
||||
)
|
||||
def check_exe_version(self, exe):
|
||||
"""Check that the installed executable prints the correct version."""
|
||||
installed_exe = join_path(self.prefix.bin, exe)
|
||||
if not os.path.exists(installed_exe):
|
||||
raise SkipTest(f"{exe} is not installed")
|
||||
|
||||
exe = which(installed_exe)
|
||||
out = exe("-V", output=str.split, error=str.split)
|
||||
assert self.spec.version.string in out
|
||||
|
||||
def test_db_checkpoint(self):
|
||||
"""check db_checkpoint version"""
|
||||
self.check_exe_version("db_checkpoint")
|
||||
|
||||
def test_db_deadlock(self):
|
||||
"""check db_deadlock version"""
|
||||
self.check_exe_version("db_deadlock")
|
||||
|
||||
def test_db_dump(self):
|
||||
"""check db_dump version"""
|
||||
self.check_exe_version("db_dump")
|
||||
|
||||
def test_db_load(self):
|
||||
"""check db_load version"""
|
||||
self.check_exe_version("db_load")
|
||||
|
||||
def test_db_stat(self):
|
||||
"""check db_stat version"""
|
||||
self.check_exe_version("db_stat")
|
||||
|
||||
def test_db_upgrade(self):
|
||||
"""check db_upgrade version"""
|
||||
self.check_exe_version("db_upgrade")
|
||||
|
||||
def test_db_verify(self):
|
||||
"""check db_verify version"""
|
||||
self.check_exe_version("db_verify")
|
||||
|
@@ -2,6 +2,7 @@
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
import os
|
||||
import re
|
||||
|
||||
import spack.build_systems.autotools
|
||||
@@ -192,31 +193,36 @@ def flag_handler(self, name, flags):
|
||||
iflags.append("-Wl,-z,notext")
|
||||
return (iflags, None, flags)
|
||||
|
||||
def test(self):
|
||||
spec_vers = str(self.spec.version)
|
||||
def test_binaries(self):
|
||||
binaries = [
|
||||
"ar",
|
||||
"c++filt",
|
||||
"coffdump",
|
||||
"dlltool",
|
||||
"elfedit",
|
||||
"gprof",
|
||||
"ld",
|
||||
"nm",
|
||||
"objdump",
|
||||
"ranlib",
|
||||
"readelf",
|
||||
"size",
|
||||
"strings",
|
||||
]
|
||||
|
||||
checks = {
|
||||
"ar": spec_vers,
|
||||
"c++filt": spec_vers,
|
||||
"coffdump": spec_vers,
|
||||
"dlltool": spec_vers,
|
||||
"elfedit": spec_vers,
|
||||
"gprof": spec_vers,
|
||||
"ld": spec_vers,
|
||||
"nm": spec_vers,
|
||||
"objdump": spec_vers,
|
||||
"ranlib": spec_vers,
|
||||
"readelf": spec_vers,
|
||||
"size": spec_vers,
|
||||
"strings": spec_vers,
|
||||
}
|
||||
# Since versions can have mixed separator characters after the minor
|
||||
# version, just check the first two components
|
||||
version = str(self.spec.version.up_to(2))
|
||||
for _bin in binaries:
|
||||
reason = "checking version of {0} is {1}".format(_bin, version)
|
||||
with test_part(self, "test_binaries_{0}".format(_bin), purpose=reason):
|
||||
installed_exe = join_path(self.prefix.bin, _bin)
|
||||
if not os.path.exists(installed_exe):
|
||||
raise SkipTest("{0} is not installed".format(_bin))
|
||||
|
||||
for exe in checks:
|
||||
expected = checks[exe]
|
||||
reason = "test: ensuring version of {0} is {1}".format(exe, expected)
|
||||
self.run_test(
|
||||
exe, "--version", expected, installed=True, purpose=reason, skip_missing=True
|
||||
)
|
||||
exe = which(installed_exe)
|
||||
out = exe("--version", output=str.split, error=str.split)
|
||||
assert version in out
|
||||
|
||||
|
||||
class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
|
||||
|
@@ -30,25 +30,16 @@ def configure_args(self):
|
||||
args = ["--with-libmaus2={0}".format(self.spec["libmaus2"].prefix)]
|
||||
return args
|
||||
|
||||
def _fix_shortsort(self):
|
||||
"""Fix the testshortsort.sh file copied during installation."""
|
||||
test_dir = join_path(self.install_test_root, self.test_src_dir)
|
||||
filter_file("../src/", "", join_path(test_dir, "testshortsort.sh"))
|
||||
|
||||
@run_after("install")
|
||||
def cache_test_sources(self):
|
||||
"""Copy the test source files after the package is installed to an
|
||||
install test subdirectory for use during `spack test run`."""
|
||||
self.cache_extra_test_sources(self.test_src_dir)
|
||||
self._fix_shortsort()
|
||||
|
||||
def test(self):
|
||||
"""Perform stand-alone/smoke test on installed package."""
|
||||
def test_short_sort(self):
|
||||
"""run testshortsort.sh to check alignments sorted by coordinate"""
|
||||
test_dir = join_path(self.test_suite.current_test_cache_dir, self.test_src_dir)
|
||||
self.run_test(
|
||||
"sh",
|
||||
["testshortsort.sh"],
|
||||
expected="Alignments sorted by coordinate.",
|
||||
purpose="test: checking alignments",
|
||||
work_dir=test_dir,
|
||||
)
|
||||
with working_dir(test_dir):
|
||||
sh = which("sh")
|
||||
out = sh("testshortsort.sh", output=str.split, error=str.split)
|
||||
assert "Alignments sorted by coordinate." in out
|
||||
|
@@ -5,8 +5,6 @@
|
||||
|
||||
import os
|
||||
|
||||
from llnl.util import tty
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
@@ -26,6 +24,8 @@ class Bolt(CMakePackage):
|
||||
git = "https://github.com/pmodels/bolt.git"
|
||||
maintainers("shintaro-iwasaki")
|
||||
|
||||
test_requires_compiler = True
|
||||
|
||||
tags = ["e4s"]
|
||||
|
||||
version("main", branch="main")
|
||||
@@ -33,8 +33,6 @@ class Bolt(CMakePackage):
|
||||
version("1.0.1", sha256="769e30dfc4042cee7ebbdadd23cf08796c03bcd8b335f516dc8cbc3f8adfa597")
|
||||
version("1.0", sha256="1c0d2f75597485ca36335d313a73736594e75c8a36123c5a6f54d01b5ba5c384")
|
||||
|
||||
test_requires_compiler = True
|
||||
|
||||
depends_on("argobots")
|
||||
depends_on("autoconf", type="build")
|
||||
depends_on("automake", type="build")
|
||||
@@ -55,20 +53,20 @@ def cache_test_sources(self):
|
||||
install test subdirectory for use during `spack test run`."""
|
||||
self.cache_extra_test_sources(["examples"])
|
||||
|
||||
def run_sample_nested_example(self):
|
||||
"""Run stand alone test: sample_nested"""
|
||||
def test_sample_nested_example(self):
|
||||
"""build and run sample_nested"""
|
||||
|
||||
test_dir = join_path(self.test_suite.current_test_cache_dir, "examples")
|
||||
exe = "sample_nested"
|
||||
source_file = "sample_nested.c"
|
||||
source_file = "{0}.c".format(exe)
|
||||
|
||||
if not os.path.isfile(join_path(test_dir, source_file)):
|
||||
tty.warn("Skipping bolt test:" "{0} does not exist".format(source_file))
|
||||
return
|
||||
path = find_required_file(
|
||||
self.test_suite.current_test_cache_dir, source_file, expected=1, recursive=True
|
||||
)
|
||||
|
||||
self.run_test(
|
||||
exe=os.environ["CXX"],
|
||||
options=[
|
||||
test_dir = os.path.dirname(path)
|
||||
with working_dir(test_dir):
|
||||
cxx = which(os.environ["CXX"])
|
||||
cxx(
|
||||
"-L{0}".format(self.prefix.lib),
|
||||
"-I{0}".format(self.prefix.include),
|
||||
"{0}".format(join_path(test_dir, source_file)),
|
||||
@@ -76,12 +74,7 @@ def run_sample_nested_example(self):
|
||||
exe,
|
||||
"-lomp",
|
||||
"-lbolt",
|
||||
],
|
||||
purpose="test: compile {0} example".format(exe),
|
||||
work_dir=test_dir,
|
||||
)
|
||||
)
|
||||
|
||||
self.run_test(exe, purpose="test: run {0} example".format(exe), work_dir=test_dir)
|
||||
|
||||
def test(self):
|
||||
self.run_sample_nested_example()
|
||||
sample_nested = which(exe)
|
||||
sample_nested()
|
||||
|
@@ -13,12 +13,19 @@ class Catch2(CMakePackage):
|
||||
homepage = "https://github.com/catchorg/Catch2"
|
||||
url = "https://github.com/catchorg/Catch2/archive/v2.13.10.tar.gz"
|
||||
git = "https://github.com/catchorg/Catch2.git"
|
||||
maintainers("ax3l", "AndrewGaspar")
|
||||
maintainers("ax3l")
|
||||
|
||||
# In-Development
|
||||
version("develop", branch="devel")
|
||||
|
||||
# Releases
|
||||
version("3.3.2", sha256="8361907f4d9bff3ae7c1edb027f813659f793053c99b67837a0c0375f065bae2")
|
||||
version("3.3.1", sha256="d90351cdc55421f640c553cfc0875a8c834428679444e8062e9187d05b18aace")
|
||||
version("3.3.0", sha256="fe2f29a54ca775c2dd04bb97ffb79d398e6210e3caa174348b5cd3b7e4ca887d")
|
||||
version("3.2.1", sha256="4613d3e8142b672159fcae252a4860d72c8cf8e2df5043b1ae3541db9ef5d73c")
|
||||
version("3.2.0", sha256="feee04647e28ac3cbeff46cb42abc8ee2d8d5f646d36e3fb3ba274b8c69a58ea")
|
||||
version("3.1.1", sha256="2106bccfec18c8ce673623d56780220e38527dd8f283ccba26aa4b8758737d0e")
|
||||
version("3.1.0", sha256="c252b2d9537e18046d8b82535069d2567f77043f8e644acf9a9fffc22ea6e6f7")
|
||||
version("3.0.1", sha256="8c4173c68ae7da1b5b505194a0c2d6f1b2aef4ec1e3e7463bde451f26bbaf4e7")
|
||||
version(
|
||||
"3.0.0-preview4", sha256="2458d47d923b65ab611656cb7669d1810bcc4faa62e4c054a7405b1914cd4aee"
|
||||
@@ -27,6 +34,7 @@ class Catch2(CMakePackage):
|
||||
"3.0.0-preview3", sha256="06a4f903858f21c553e988f8b76c9c6915d1f95f95512d6a58c421e02a2c4975"
|
||||
)
|
||||
version("2.13.10", sha256="d54a712b7b1d7708bc7a819a8e6e47b2fde9536f487b89ccbca295072a7d9943")
|
||||
version("2.13.9", sha256="06dbc7620e3b96c2b69d57bf337028bf245a211b3cddb843835bfe258f427a52")
|
||||
version("2.13.8", sha256="b9b592bd743c09f13ee4bf35fc30eeee2748963184f6bea836b146e6cc2a585a")
|
||||
version("2.13.7", sha256="3cdb4138a072e4c0290034fe22d9f0a80d3bcfb8d7a8a5c49ad75d3a5da24fae")
|
||||
version("2.13.6", sha256="48dfbb77b9193653e4e72df9633d2e0383b9b625a47060759668480fdf24fbd4")
|
||||
|
@@ -18,6 +18,7 @@ class Cbc(AutotoolsPackage):
|
||||
depends_on("osi")
|
||||
depends_on("cgl")
|
||||
|
||||
version("2.10.9", sha256="96d02593b01fd1460d421f002734384e4eb1e93ebe1fb3570dc2b7600f20a27e")
|
||||
version("2.10.8", sha256="8525abb541ee1b8e6ff03b00411b66e98bbc58f95be1aefd49d2bca571be2eaf")
|
||||
version("2.10.5", sha256="cc44c1950ff4615e7791d7e03ea34318ca001d3cac6dc3f7f5ee392459ce6719")
|
||||
|
||||
|
@@ -20,6 +20,11 @@ class Cdo(AutotoolsPackage):
|
||||
|
||||
maintainers("skosukhin", "Try2Code")
|
||||
|
||||
version(
|
||||
"2.2.0",
|
||||
sha256="679c8d105706caffcba0960ec5ddc4a1332c1b40c52f82c3937356999d8fadf2",
|
||||
url="https://code.mpimet.mpg.de/attachments/download/28013/cdo-2.2.0.tar.gz",
|
||||
)
|
||||
version(
|
||||
"2.1.1",
|
||||
sha256="c29d084ccbda931d71198409fb2d14f99930db6e7a3654b3c0243ceb304755d9",
|
||||
|
@@ -436,17 +436,28 @@ def setup_dependent_package(self, module, dependent_spec):
|
||||
module.cmake = Executable(self.spec.prefix.bin.cmake)
|
||||
module.ctest = Executable(self.spec.prefix.bin.ctest)
|
||||
|
||||
def test(self):
|
||||
"""Perform smoke tests on the installed package."""
|
||||
spec_vers_str = "version {0}".format(self.spec.version)
|
||||
def run_version_check(self, bin):
|
||||
"""Runs and checks output of the installed binary."""
|
||||
exe_path = join_path(self.prefix.bin, bin)
|
||||
if not os.path.exists(exe_path):
|
||||
raise SkipTest(f"{exe} is not installed")
|
||||
|
||||
for exe in ["ccmake", "cmake", "cpack", "ctest"]:
|
||||
reason = "test version of {0} is {1}".format(exe, spec_vers_str)
|
||||
self.run_test(
|
||||
exe,
|
||||
["--version"],
|
||||
[spec_vers_str],
|
||||
installed=True,
|
||||
purpose=reason,
|
||||
skip_missing=True,
|
||||
)
|
||||
exe = which(exe_path)
|
||||
out = exe("--version", output=str.split, error=str.split)
|
||||
assert f"version {self.spec.version}" in out
|
||||
|
||||
def test_ccmake(self):
|
||||
"""check version from ccmake"""
|
||||
self.run_version_check("ccmake")
|
||||
|
||||
def test_cmake(self):
|
||||
"""check version from cmake"""
|
||||
self.run_version_check("cmake")
|
||||
|
||||
def test_cpack(self):
|
||||
"""check version from cpack"""
|
||||
self.run_version_check("cpack")
|
||||
|
||||
def test_ctest(self):
|
||||
"""check version from ctest"""
|
||||
self.run_version_check("ctest")
|
||||
|
@@ -58,7 +58,7 @@ class Cp2k(MakefilePackage, CudaPackage):
|
||||
"elpa",
|
||||
default=False,
|
||||
description="Enable optimised diagonalisation routines from ELPA",
|
||||
when="@8.3:",
|
||||
when="@6.1:",
|
||||
)
|
||||
variant(
|
||||
"sirius",
|
||||
@@ -246,6 +246,7 @@ class Cp2k(MakefilePackage, CudaPackage):
|
||||
sha256="3617abb877812c4b933f601438c70f95e21c6161bea177277b1d4125fd1c0bf9",
|
||||
when="@8.2",
|
||||
)
|
||||
patch("posix_c_source.patch", when="%aocc")
|
||||
|
||||
def url_for_version(self, version):
|
||||
url = "https://github.com/cp2k/cp2k/releases/download/v{0}/cp2k-{0}.tar.bz2"
|
||||
@@ -274,7 +275,7 @@ def archive_files(self):
|
||||
def edit(self, spec, prefix):
|
||||
pkgconf = which("pkg-config")
|
||||
|
||||
fftw = spec["fftw-api"]
|
||||
fftw = spec["fftw-api:openmp" if "+openmp" in spec else "fftw-api"]
|
||||
fftw_header_dir = fftw.headers.directories[0]
|
||||
|
||||
# some providers (mainly Intel) keep the fftw headers in a subdirectory, find it
|
||||
|
12
var/spack/repos/builtin/packages/cp2k/posix_c_source.patch
Normal file
12
var/spack/repos/builtin/packages/cp2k/posix_c_source.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
--- a/src/sockets.c 2019-12-24 01:41:57.000000000 +0530
|
||||
+++ b/src/sockets.c 2023-05-15 18:35:33.941236292 +0530
|
||||
@@ -35,6 +35,7 @@
|
||||
*/
|
||||
#ifndef __NO_IPI_DRIVER
|
||||
|
||||
+#define _POSIX_C_SOURCE 200112L
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
@@ -18,6 +18,7 @@ class Cpio(AutotoolsPackage, GNUMirrorPackage):
|
||||
|
||||
executables = ["^cpio$"]
|
||||
|
||||
version("2.14", sha256="145a340fd9d55f0b84779a44a12d5f79d77c99663967f8cfa168d7905ca52454")
|
||||
version("2.13", sha256="e87470d9c984317f658567c03bfefb6b0c829ff17dbf6b0de48d71a4c8f3db88")
|
||||
|
||||
build_directory = "spack-build"
|
||||
|
@@ -14,6 +14,7 @@ class Cracklib(AutotoolsPackage):
|
||||
homepage = "https://github.com/cracklib/cracklib"
|
||||
url = "https://github.com/cracklib/cracklib/archive/v2.9.7.tar.gz"
|
||||
|
||||
version("2.9.9", sha256="0a3fd72163512088c6f2add0f6cd6e34954ca0fa3f333ff9cced478b04e73ce1")
|
||||
version("2.9.7", sha256="ff4e6c3f86494c93719f5e4186e2c3ea9e265f41972ec21f7b87852aced704e6")
|
||||
version("2.9.6", sha256="7cd2c01365f199c466b490ad2585beccbe0108ccd606c1bcc6c1e52800e627fe")
|
||||
version("2.9.5", sha256="b3fcf3fba2f4566f8eb2b79502d1a66198a71c557d2ab1011c78001489f0fe26")
|
||||
|
@@ -14,6 +14,7 @@ class CyrusSasl(AutotoolsPackage):
|
||||
homepage = "https://github.com/cyrusimap/cyrus-sasl"
|
||||
url = "https://github.com/cyrusimap/cyrus-sasl/archive/cyrus-sasl-2.1.27.tar.gz"
|
||||
|
||||
version("2.1.28", sha256="3e38933a30b9ce183a5488b4f6a5937a702549cde0d3287903d80968ad4ec341")
|
||||
version("2.1.27", sha256="b564d773803dc4cff42d2bdc04c80f2b105897a724c247817d4e4a99dd6b9976")
|
||||
version("2.1.26", sha256="7c14d1b5bd1434adf2dd79f70538617e6aa2a7bde447454b90b84ac5c4d034ba")
|
||||
version("2.1.25", sha256="8bfd4fa4def54c760e5061f2a74c278384c3b9807f02c4b07dab68b5894cc7c1")
|
||||
|
@@ -144,70 +144,39 @@ def _copy_test_inputs(self):
|
||||
test_inputs = [join_path(self.basepath, "mpi-io-test.c")]
|
||||
self.cache_extra_test_sources(test_inputs)
|
||||
|
||||
def _test_intercept(self):
|
||||
def test_mpi_io_test(self):
|
||||
"""build, run, and check outputs"""
|
||||
if "+mpi" not in self.spec:
|
||||
raise SkipTest("Test requires +mpi build")
|
||||
|
||||
testdir = "intercept-test"
|
||||
logname = join_path(os.getcwd(), testdir, "test.darshan")
|
||||
testexe = "mpi-io-test"
|
||||
|
||||
with working_dir(testdir, create=True):
|
||||
if "+mpi" in self.spec:
|
||||
# compile a test program
|
||||
logname = join_path(os.getcwd(), "test.darshan")
|
||||
fname = join_path(
|
||||
self.test_suite.current_test_cache_dir,
|
||||
join_path(self.basepath, "mpi-io-test.c"),
|
||||
)
|
||||
cc = Executable(self.spec["mpi"].mpicc)
|
||||
compile_opt = ["-c", fname]
|
||||
link_opt = ["-o", "mpi-io-test", "mpi-io-test.o"]
|
||||
cc(*(compile_opt))
|
||||
cc(*(link_opt))
|
||||
env["LD_PRELOAD"] = join_path(self.prefix.lib, "libdarshan.so")
|
||||
env["DARSHAN_LOGFILE"] = logname
|
||||
|
||||
# run test program and intercept
|
||||
purpose = "Test running code built against darshan"
|
||||
exe = "./mpi-io-test"
|
||||
options = ["-f", "tmp.dat"]
|
||||
status = [0]
|
||||
installed = False
|
||||
expected_output = [
|
||||
r"Write bandwidth = \d+.\d+ Mbytes/sec",
|
||||
r"Read bandwidth = \d+.\d+ Mbytes/sec",
|
||||
]
|
||||
env["LD_PRELOAD"] = "libdarshan.so"
|
||||
env["DARSHAN_LOGFILE"] = logname
|
||||
self.run_test(
|
||||
exe,
|
||||
options,
|
||||
expected_output,
|
||||
status,
|
||||
installed,
|
||||
purpose,
|
||||
skip_missing=False,
|
||||
work_dir=None,
|
||||
)
|
||||
env.pop("LD_PRELOAD")
|
||||
# compile the program
|
||||
fname = join_path(
|
||||
self.test_suite.current_test_cache_dir, self.basepath, f"{testexe}.c"
|
||||
)
|
||||
cc = Executable(self.spec["mpi"].mpicc)
|
||||
compile_opt = ["-c", fname]
|
||||
link_opt = ["-o", "mpi-io-test", "mpi-io-test.o"]
|
||||
cc(*(compile_opt))
|
||||
cc(*(link_opt))
|
||||
|
||||
import llnl.util.tty as tty
|
||||
# run test program and intercept
|
||||
mpi_io_test = which(join_path(".", testexe))
|
||||
out = mpi_io_test("-f", "tmp.dat", output=str.split, error=str.split)
|
||||
env.pop("LD_PRELOAD")
|
||||
|
||||
# verify existence of log and size is > 0
|
||||
tty.msg("Test for existince of log:")
|
||||
if os.path.exists(logname):
|
||||
sr = os.stat(logname)
|
||||
print("PASSED")
|
||||
tty.msg("Test for size of log:")
|
||||
if not sr.st_size > 0:
|
||||
exc = BaseException("log size is 0")
|
||||
m = None
|
||||
if spack.config.get("config:fail_fast", False):
|
||||
raise TestFailure([(exc, m)])
|
||||
else:
|
||||
self.test_failures.append((exc, m))
|
||||
else:
|
||||
print("PASSED")
|
||||
else:
|
||||
exc = BaseException("log does not exist")
|
||||
m = None
|
||||
if spack.config.get("config:fail_fast", False):
|
||||
raise TestFailure([(exc, m)])
|
||||
else:
|
||||
self.test_failures.append((exc, m))
|
||||
expected_output = [
|
||||
r"Write bandwidth = \d+.\d+ Mbytes/sec",
|
||||
r"Read bandwidth = \d+.\d+ Mbytes/sec",
|
||||
]
|
||||
check_outputs(expected_output, out)
|
||||
|
||||
def test(self):
|
||||
self._test_intercept()
|
||||
assert os.path.exists(logname), f"Expected {logname} to exist"
|
||||
assert (os.stat(logname)).st_size > 0, f"Expected non-empty {logname}"
|
||||
|
@@ -110,6 +110,12 @@ class Dd4hep(CMakePackage):
|
||||
# Workaround for failing build file generation in some cases
|
||||
# See https://github.com/spack/spack/issues/24232
|
||||
patch("cmake_language.patch", when="@:1.17")
|
||||
# Fix missing SimCaloHits when using the LCIO format
|
||||
patch(
|
||||
"https://patch-diff.githubusercontent.com/raw/AIDASoft/DD4hep/pull/1019.patch?full_index=1",
|
||||
when="@1.19:1.23",
|
||||
sha256="6466719c82de830ce728db57004fb7db03983587a63b804f6dc95c6b92b3fc76",
|
||||
)
|
||||
|
||||
# variants for subpackages
|
||||
variant("ddcad", default=True, description="Enable CAD interface based on Assimp")
|
||||
|
@@ -105,6 +105,7 @@ class Dealii(CMakePackage, CudaPackage):
|
||||
# (NB: only if tbb is removed in 9.3, as planned!!!)
|
||||
variant("threads", default=True, description="Compile with multi-threading via TBB")
|
||||
variant("trilinos", default=True, description="Compile with Trilinos (only with MPI)")
|
||||
variant("platform-introspection", default=True, description="Enable platform introspection")
|
||||
|
||||
# Required dependencies: Light version
|
||||
depends_on("blas")
|
||||
@@ -635,6 +636,12 @@ def cmake_args(self):
|
||||
# See https://github.com/dealii/dealii/issues/9164
|
||||
options.append(self.define("DEAL_II_CXX_FLAGS", os.environ["SPACK_TARGET_ARGS"]))
|
||||
|
||||
# platform introspection - needs to be disabled in some environments
|
||||
if "+platform-introspection" in spec:
|
||||
options.append(self.define("DEAL_II_ALLOW_PLATFORM_INTROSPECTION", True))
|
||||
else:
|
||||
options.append(self.define("DEAL_II_ALLOW_PLATFORM_INTROSPECTION", False))
|
||||
|
||||
return options
|
||||
|
||||
def setup_run_environment(self, env):
|
||||
|
@@ -0,0 +1,42 @@
|
||||
From ae55be42bcc21d9ae1f57604b7c6faf9695f98ae Mon Sep 17 00:00:00 2001
|
||||
From: Sean Koyama <skoyama@anl.gov>
|
||||
Date: Thu, 23 Mar 2023 17:32:09 +0000
|
||||
Subject: [PATCH] Add CPATH and LIBRARY_PATHs to OpenCL search paths
|
||||
|
||||
---
|
||||
cmake/FindOpenCL.cmake | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/cmake/FindOpenCL.cmake b/cmake/FindOpenCL.cmake
|
||||
index a0dff56..e7d7873 100644
|
||||
--- a/cmake/FindOpenCL.cmake
|
||||
+++ b/cmake/FindOpenCL.cmake
|
||||
@@ -64,6 +64,7 @@ else()
|
||||
find_path(OpenCL_INCLUDE_DIR NAMES CL/cl.h OpenCL/cl.h
|
||||
HINTS
|
||||
ENV OpenCL_ROOT
|
||||
+ ENV CPATH
|
||||
ENV AMDAPPSDKROOT
|
||||
ENV INTELOCLSDKROOT
|
||||
ENV CUDA_PATH
|
||||
@@ -80,6 +81,8 @@ else()
|
||||
find_library(OpenCL_LIBRARY NAMES OpenCL
|
||||
HINTS
|
||||
ENV OpenCL_ROOT
|
||||
+ ENV LIBRARY_PATH
|
||||
+ ENV LD_LIBRARY_PATH
|
||||
ENV AMDAPPSDKROOT
|
||||
ENV INTELOCLSDKROOT
|
||||
ENV CUDA_PATH
|
||||
@@ -96,6 +99,8 @@ else()
|
||||
find_library(OpenCL_LIBRARY NAMES OpenCL
|
||||
HINTS
|
||||
ENV OpenCL_ROOT
|
||||
+ ENV LIBRARY_PATH
|
||||
+ ENV LD_LIBRARY_PATH
|
||||
ENV AMDAPPSDKROOT
|
||||
ENV INTELOCLSDKROOT
|
||||
ENV CUDA_PATH
|
||||
--
|
||||
2.34.1
|
||||
|
@@ -34,6 +34,8 @@ class DoubleBatchedFftLibrary(CMakePackage):
|
||||
depends_on("oneapi-level-zero", when="+level-zero")
|
||||
depends_on("opencl", when="+opencl")
|
||||
|
||||
patch("0001-Add-CPATH-and-LIBRARY_PATHs-to-OpenCL-search-paths.patch", when="@:0.3.6")
|
||||
|
||||
def cmake_args(self):
|
||||
cxx_compiler = os.path.basename(self.compiler.cxx)
|
||||
if self.spec.satisfies("+sycl") and cxx_compiler not in ["icpx", "dpcpp"]:
|
||||
|
@@ -21,6 +21,7 @@ class DoubleConversion(CMakePackage):
|
||||
homepage = "https://github.com/google/double-conversion"
|
||||
url = "https://github.com/google/double-conversion/archive/v2.0.1.zip"
|
||||
|
||||
version("3.3.0", sha256="4080014235f90854ffade6d1c423940b314bbca273a338235f049da296e47183")
|
||||
version("3.2.1", sha256="55aa41b463346b1032585c04fe7d0adec9db56598d8d699841cdadeb3597e909")
|
||||
version("3.1.5", sha256="72c0e3925a1214095afc6f1c214faecbec20e8526cf6b8a541cf72195a11887f")
|
||||
version("2.0.2", sha256="7a0ae55ec9f75c22607808d091bae050a38d4a7728c52273c89d25dd5b78fcdd")
|
||||
|
@@ -13,12 +13,13 @@ class Dpdk(MakefilePackage, MesonPackage):
|
||||
It supports many processor architectures and both FreeBSD and Linux."""
|
||||
|
||||
homepage = "https://github.com/DPDK/dpdk"
|
||||
url = "https://github.com/DPDK/dpdk/archive/v22.11.tar.gz"
|
||||
url = "https://github.com/DPDK/dpdk/archive/v23.03.tar.gz"
|
||||
git = "https://github.com/DPDK/dpdk"
|
||||
|
||||
maintainers("hyoklee")
|
||||
|
||||
version("main", branch="main")
|
||||
version("23.03", sha256="8a8fa67941b1e0d428937f9068f401457e4e4fd576031479450da065385b332c")
|
||||
version("22.11", sha256="ed8b2a2b153f0311ffa065d35af29a098367af44a22b3c33e191e1a74211f2e3")
|
||||
version("20.02", sha256="29e56ea8e47e30110ecb881fa5a37125a865dd2d45b61f68e93e334caaab16b7")
|
||||
version("19.11", sha256="ce1befb20a5e5c5399b326a39cfa23314a5229c0ced2553f53b09b1ae630706b")
|
||||
|
@@ -183,3 +183,12 @@ def cmake_args(self):
|
||||
args.append("-DENABLE_STATIC_LIBS=NO")
|
||||
|
||||
return args
|
||||
|
||||
def test_ptls(self):
|
||||
"""Run parseThat on /bin/ls to rewrite with basic instrumentation"""
|
||||
parseThat = which(self.prefix.bin.parseThat)
|
||||
os.environ["DYNINSTAPI_RT_LIB"] = join_path(self.prefix.lib, "libdyninstAPI_RT.so")
|
||||
parseThat(
|
||||
"--binary-edit={0:s}".format(join_path(self.test_suite.stage, "ls.rewritten")),
|
||||
"/bin/ls",
|
||||
)
|
||||
|
@@ -17,6 +17,7 @@ class Elfio(CMakePackage):
|
||||
|
||||
maintainers("haampie")
|
||||
|
||||
version("3.11", sha256="3307b104c205399786edbba203906de9517e36297709fe747faf9478d55fbb91")
|
||||
version("3.10", sha256="cdc6362ede2e0c8d1d6db15d7da4b526f461d9cfae6f6337369e416a8bc60234")
|
||||
version("3.9", sha256="767b269063fc35aba6d361139f830aa91c45dc6b77942f082666876c1aa0be0f")
|
||||
version("3.8", sha256="9553ce2b8d8aa2fb43f0e9be9bcbd10cd52f40b385110ea54173889c982f9ac4")
|
||||
|
@@ -62,6 +62,9 @@ class EnvironmentModules(Package):
|
||||
depends_on("automake", type="build", when="@main")
|
||||
depends_on("libtool", type="build", when="@main")
|
||||
depends_on("m4", type="build", when="@main")
|
||||
depends_on("python", type="build", when="@main")
|
||||
depends_on("py-sphinx@1.0:", type="build", when="@main")
|
||||
depends_on("gzip", type="build", when="@main")
|
||||
|
||||
# Dependencies:
|
||||
depends_on("tcl", type=("build", "link", "run"))
|
||||
|
@@ -13,5 +13,6 @@ class Erfa(AutotoolsPackage):
|
||||
homepage = "https://github.com/liberfa/erfa"
|
||||
url = "https://github.com/liberfa/erfa/releases/download/v1.7.0/erfa-1.7.0.tar.gz"
|
||||
|
||||
version("2.0.0", sha256="75cb0a2cc1561d24203d9d0e67c21f105e45a70181d57f158e64a46a50ccd515")
|
||||
version("1.7.0", sha256="f0787e30e848750c0cbfc14827de6fc7f69a2d5ef0fc653504e74b8967a764e0")
|
||||
version("1.4.0", sha256="035b7f0ad05c1191b8588191ba4b19ba0f31afa57ad561d33bd5417d9f23e460")
|
||||
|
@@ -16,6 +16,7 @@ class Erlang(AutotoolsPackage):
|
||||
homepage = "https://erlang.org/"
|
||||
url = "https://erlang.org/download/otp_src_23.3.tar.gz"
|
||||
|
||||
version("26.0", sha256="4e411587bd7d18ee2d5a0e7207f638e14036152633db57d2cf49c84a9c92d945")
|
||||
version("25.3", sha256="aeaa546e0c38e338010d16348d8c67f7fc8c02df728a88d8499838d8c9131e1c")
|
||||
version("25.2", sha256="0df1243afde953647df95785f8e75541fd0ea8ac70c0f639c977513be1761f63")
|
||||
version("23.3", sha256="3c888d8f46124e134b75a9ba5d845f079020b7198ed2de64411e183d07e9002a")
|
||||
|
@@ -179,6 +179,7 @@ def cmake_args(self):
|
||||
self.define_from_variant("EXAGO_ENABLE_IPOPT", "ipopt"),
|
||||
self.define_from_variant("EXAGO_ENABLE_PYTHON", "python"),
|
||||
self.define_from_variant("EXAGO_ENABLE_LOGGING", "logging"),
|
||||
self.define("LAPACK_LIBRARIES", spec["lapack"].libs + spec["blas"].libs),
|
||||
]
|
||||
)
|
||||
|
||||
|
@@ -13,8 +13,12 @@ class Fastp(MakefilePackage):
|
||||
homepage = "https://github.com/OpenGene/fastp"
|
||||
url = "https://github.com/OpenGene/fastp/archive/v0.20.0.tar.gz"
|
||||
|
||||
version("0.23.3", sha256="a37ee4b5dcf836a5a19baec645657b71d9dcd69ee843998f41f921e9b67350e3")
|
||||
version("0.20.0", sha256="8d751d2746db11ff233032fc49e3bcc8b53758dd4596fdcf4b4099a4d702ac22")
|
||||
|
||||
depends_on("libisal", type=("build", "link"), when="@0.23:")
|
||||
depends_on("libdeflate", type=("build", "link"), when="@0.23:")
|
||||
|
||||
def install(self, spec, prefix):
|
||||
mkdirp(prefix.bin)
|
||||
make("install", "PREFIX={0}".format(prefix))
|
||||
|
@@ -16,6 +16,7 @@ class Fasttransforms(MakefilePackage):
|
||||
homepage = "https://github.com/MikaelSlevinsky/FastTransforms"
|
||||
url = "https://github.com/MikaelSlevinsky/FastTransforms/archive/v0.3.4.tar.gz"
|
||||
|
||||
version("0.6.2", sha256="fd00befcb0c20ba962a8744a7b9139355071ee95be70420de005b7c0f6e023aa")
|
||||
version("0.5.0", sha256="9556d0037bd5348a33f15ad6100e32053b6e22cab16a97c504f30d6c52fd0efd")
|
||||
version("0.3.4", sha256="a5c8b5aedbdb40218521d061a7df65ef32ce153d4e19d232957db7e3e63c7e9b")
|
||||
|
||||
|
@@ -27,11 +27,21 @@ class Flecsi(CMakePackage, CudaPackage, ROCmPackage):
|
||||
version("2.2.0", tag="v2.2.0", preferred=True)
|
||||
version("2.1.0", tag="v2.1.0")
|
||||
version("2.0.0", tag="v2.0.0")
|
||||
version("1.4.1", tag="v1.4.1")
|
||||
version("1.4.1", tag="v1.4.1", submodules=True)
|
||||
version(
|
||||
"1.4.develop", git="https://github.com/laristra/flecsi.git", branch="1.4", deprecated=True
|
||||
"1.4.develop",
|
||||
git="https://github.com/laristra/flecsi.git",
|
||||
branch="1.4",
|
||||
submodules=True,
|
||||
deprecated=True,
|
||||
)
|
||||
version(
|
||||
"1.4.2",
|
||||
git="https://github.com/laristra/flecsi.git",
|
||||
tag="v1.4.2",
|
||||
submodules=True,
|
||||
deprecated=True,
|
||||
)
|
||||
version("1.4.2", git="https://github.com/laristra/flecsi.git", tag="v1.4.2", deprecated=True)
|
||||
version(
|
||||
"flecsph",
|
||||
git="https://github.com/laristra/flecsi.git",
|
||||
@@ -71,7 +81,7 @@ class Flecsi(CMakePackage, CudaPackage, ROCmPackage):
|
||||
variant("doxygen", default=False, description="Enable doxygen", when="@:1")
|
||||
variant("tutorial", default=False, description="Build FleCSI Tutorials", when="@:1")
|
||||
variant("flecstan", default=False, description="Build FleCSI Static Analyzer", when="@:1")
|
||||
variant("external_cinch", default=True, description="Enable External Cinch", when="@:1")
|
||||
variant("external_cinch", default=False, description="Enable External Cinch", when="@:1")
|
||||
variant("unit_tests", default=False, description="Build with Unit Tests Enabled", when="@:1")
|
||||
|
||||
# All Current FleCSI Releases
|
||||
|
@@ -13,6 +13,8 @@ class Flibcpp(CMakePackage):
|
||||
git = "https://github.com/swig-fortran/flibcpp.git"
|
||||
url = "https://github.com/swig-fortran/flibcpp/archive/v1.0.1.tar.gz"
|
||||
|
||||
test_requires_compiler = True
|
||||
|
||||
version("1.0.2", sha256="e2c11c1f58ca830eb7ac7f25d66fc3502c4a8d994192ee30c63a1c3b51aac241")
|
||||
version("1.0.1", sha256="8569c71eab0257097a6aa666a6d86bdcb6cd6e31244d32cc5b2478d0e936ca7a")
|
||||
version("0.5.2", sha256="b9b4eb6431d5b56a54c37f658df7455eafd3d204a5534903b127e0c8a1c9b827")
|
||||
@@ -73,25 +75,18 @@ def cached_tests_work_dir(self):
|
||||
"""The working directory for cached test sources."""
|
||||
return join_path(self.test_suite.current_test_cache_dir, self.examples_src_dir)
|
||||
|
||||
def test(self):
|
||||
"""Perform stand-alone/smoke tests."""
|
||||
def test_examples(self):
|
||||
"""build and run examples"""
|
||||
cmake_args = [
|
||||
self.define("CMAKE_PREFIX_PATH", self.prefix),
|
||||
self.define("CMAKE_Fortran_COMPILER", self.compiler.fc),
|
||||
]
|
||||
cmake_args.append(self.cached_tests_work_dir)
|
||||
cmake = which(self.spec["cmake"].prefix.bin.cmake)
|
||||
make = which("make")
|
||||
sh = which("sh")
|
||||
|
||||
self.run_test(
|
||||
"cmake", cmake_args, purpose="test: calling cmake", work_dir=self.cached_tests_work_dir
|
||||
)
|
||||
|
||||
self.run_test(
|
||||
"make", [], purpose="test: building the tests", work_dir=self.cached_tests_work_dir
|
||||
)
|
||||
|
||||
self.run_test(
|
||||
"run-examples.sh",
|
||||
[],
|
||||
purpose="test: running the examples",
|
||||
work_dir=self.cached_tests_work_dir,
|
||||
)
|
||||
with working_dir(self.cached_tests_work_dir):
|
||||
cmake(*cmake_args)
|
||||
make()
|
||||
sh("run-examples.sh")
|
||||
|
@@ -20,6 +20,7 @@ class FluxCore(AutotoolsPackage):
|
||||
maintainers("grondo")
|
||||
|
||||
version("master", branch="master")
|
||||
version("0.50.0", sha256="77414299a7ca081199aa0f57bcaea3e05860e2095df73c0f6b7672b88fadf683")
|
||||
version("0.49.0", sha256="9b8d7af1d8aaa7ee110bcb9815b6b8647af686de949097c9bb2a0269d5551051")
|
||||
version("0.48.0", sha256="32c1bfdde44123e90606422807d381406874bb6dbec170ddb493f905208cc275")
|
||||
version("0.47.0", sha256="c13c8df3dd3db565ff7a3db727f087b7c1a3946b98c4b945ac43fe44a4c534c3")
|
||||
@@ -114,6 +115,7 @@ class FluxCore(AutotoolsPackage):
|
||||
|
||||
variant("docs", default=False, description="Build flux manpages and docs")
|
||||
variant("cuda", default=False, description="Build dependencies with support for CUDA")
|
||||
variant("security", default=False, description="Build with flux-security")
|
||||
|
||||
# Restrict flux to Linux based platforms where builds are possible.
|
||||
conflicts("platform=darwin", msg="flux-core does not support MacOS based platforms.")
|
||||
@@ -149,6 +151,12 @@ class FluxCore(AutotoolsPackage):
|
||||
depends_on("asciidoc", type="build", when="+docs")
|
||||
depends_on("py-docutils", type="build", when="@0.32.0: +docs")
|
||||
|
||||
# Flux security variant
|
||||
# Note that if you install with this variant, it is
|
||||
# recommended to create a view and then a broker.toml that
|
||||
# has the path to flux-imp generated by flux-security
|
||||
depends_on("flux-security", type="build", when="+security")
|
||||
|
||||
# Need autotools when building on master:
|
||||
depends_on("autoconf", type="build", when="@master")
|
||||
depends_on("automake", type="build", when="@master")
|
||||
@@ -242,6 +250,8 @@ def configure_args(self):
|
||||
args = ["--enable-pylint=no"]
|
||||
if "+docs" not in self.spec:
|
||||
args.append("--disable-docs")
|
||||
if "+security" in self.spec:
|
||||
args.append("--with-flux-security")
|
||||
return args
|
||||
|
||||
def flag_handler(self, name, flags):
|
||||
|
@@ -13,6 +13,7 @@ class Form(AutotoolsPackage):
|
||||
url = "https://github.com/vermaseren/form/releases/download/v4.2.1/form-4.2.1.tar.gz"
|
||||
maintainers("iarspider", "tueda")
|
||||
|
||||
version("4.3.1", sha256="f1f512dc34fe9bbd6b19f2dfef05fcb9912dfb43c8368a75b796ec472ee8bbce")
|
||||
version("4.3.0", sha256="b234e0d095f73ecb0904cdc3b0d8d8323a9fa7f46770a52fb22267c624aafbf6")
|
||||
version("4.2.1", sha256="f2722d6d4ccb034e01cf786d55342e1c21ff55b182a4825adf05d50702ab1a28")
|
||||
version(
|
||||
|
@@ -44,6 +44,11 @@ class Freetype(AutotoolsPackage, CMakePackage):
|
||||
"support __builtin_shuffle)",
|
||||
)
|
||||
|
||||
variant("shared", default=True, description="Build shared libraries")
|
||||
variant("pic", default=True, description="Enable position-independent code (PIC)")
|
||||
|
||||
requires("+pic", when="+shared build_system=autotools")
|
||||
|
||||
patch("windows.patch", when="@2.9.1")
|
||||
|
||||
@property
|
||||
@@ -64,6 +69,8 @@ def configure_args(self):
|
||||
]
|
||||
if self.spec.satisfies("@2.9.1:"):
|
||||
args.append("--enable-freetype-config")
|
||||
args.extend(self.enable_or_disable("shared"))
|
||||
args.extend(self.with_or_without("pic"))
|
||||
return args
|
||||
|
||||
|
||||
@@ -75,4 +82,6 @@ def cmake_args(self):
|
||||
self.define("FT_DISABLE_HARFBUZZ", True),
|
||||
self.define("FT_REQUIRE_PNG", True),
|
||||
self.define("FT_REQUIRE_BZIP2", True),
|
||||
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
|
||||
self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"),
|
||||
]
|
||||
|
@@ -145,23 +145,39 @@ def install(self, spec, prefix):
|
||||
|
||||
@run_after("install")
|
||||
@on_package_attributes(run_tests=True)
|
||||
def test_install(self):
|
||||
def check_install(self):
|
||||
if "conduits=smp" in self.spec:
|
||||
make("-C", "smp-conduit", "run-tests")
|
||||
if "conduits=none" not in self.spec:
|
||||
self.run_test(
|
||||
join_path(self.prefix.tests, "testtools"),
|
||||
expected=["Done."],
|
||||
status=0,
|
||||
installed=True,
|
||||
purpose="Running testtools",
|
||||
)
|
||||
self.test_testtools()
|
||||
|
||||
def test(self):
|
||||
def _setup_test_env(self):
|
||||
"""Set up key stand-alone test environment variables."""
|
||||
os.environ["GASNET_VERBOSEENV"] = "1" # include diagnostic info
|
||||
|
||||
# The following are not technically relevant to test_testtools
|
||||
os.environ["GASNET_SPAWN_VERBOSE"] = "1" # include spawning diagnostics
|
||||
if "GASNET_SSH_SERVERS" not in os.environ:
|
||||
os.environ["GASNET_SSH_SERVERS"] = "localhost " * 4
|
||||
|
||||
def test_testtools(self):
|
||||
"""run testtools and check output"""
|
||||
if "conduits=none" in self.spec:
|
||||
spack.main.send_warning_to_tty("No conduit libraries built -- SKIPPED")
|
||||
return
|
||||
raise SkipTest("Test requires conduit libraries")
|
||||
|
||||
testtools_path = join_path(self.prefix.tests, "testtools")
|
||||
assert os.path.exists(testtools_path), "Test requires testtools"
|
||||
|
||||
self._setup_test_env()
|
||||
testtools = which(testtools_path, required=True)
|
||||
out = testtools(output=str.split, error=str.split)
|
||||
assert "Done." in out
|
||||
|
||||
def test_testgasnet(self):
|
||||
"""run testgasnet and check output"""
|
||||
if "conduits=none" in self.spec:
|
||||
raise SkipTest("Test requires conduit libraries")
|
||||
|
||||
self._setup_test_env()
|
||||
ranks = "4"
|
||||
spawner = {
|
||||
"smp": ["env", "GASNET_PSHM_NODES=" + ranks],
|
||||
@@ -172,27 +188,18 @@ def test(self):
|
||||
"udp": [join_path(self.prefix.bin, "amudprun"), "-spawn", "L", "-np", ranks],
|
||||
}
|
||||
|
||||
os.environ["GASNET_VERBOSEENV"] = "1" # include diagnostic info
|
||||
os.environ["GASNET_SPAWN_VERBOSE"] = "1" # include spawning diagnostics
|
||||
if "GASNET_SSH_SERVERS" not in os.environ:
|
||||
os.environ["GASNET_SSH_SERVERS"] = "localhost " * 4
|
||||
|
||||
self.run_test(
|
||||
join_path(self.prefix.tests, "testtools"),
|
||||
expected=["Done."],
|
||||
status=0,
|
||||
installed=True,
|
||||
purpose="Running testtools",
|
||||
)
|
||||
|
||||
expected = "done."
|
||||
for c in self.spec.variants["conduits"].value:
|
||||
os.environ["GASNET_SUPERNODE_MAXSIZE"] = "0" if (c == "smp") else "1"
|
||||
test = join_path(self.prefix.tests, c, "testgasnet")
|
||||
self.run_test(
|
||||
spawner[c][0],
|
||||
spawner[c][1:] + [test],
|
||||
expected=["done."],
|
||||
status=0,
|
||||
installed=(c != "smp"),
|
||||
purpose="Running %s-conduit/testgasnet" % c,
|
||||
)
|
||||
|
||||
with test_part(
|
||||
self,
|
||||
"test_testgasnet_{0}".format(c),
|
||||
purpose="run {0}-conduit/testgasnet".format(c),
|
||||
):
|
||||
exe = which(spawner[c][0], required=True)
|
||||
|
||||
args = spawner[c][1:] + [test]
|
||||
out = exe(*args, output=str.split, error=str.split)
|
||||
assert expected in out
|
||||
|
@@ -41,6 +41,7 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage):
|
||||
version("12.2.0", sha256="e549cf9cf3594a00e27b6589d4322d70e0720cdd213f39beb4181e06926230ff")
|
||||
version("12.1.0", sha256="62fd634889f31c02b64af2c468f064b47ad1ca78411c45abe6ac4b5f8dd19c7b")
|
||||
|
||||
version("11.4.0", sha256="3f2db222b007e8a4a23cd5ba56726ef08e8b1f1eb2055ee72c1402cea73a8dd9")
|
||||
version("11.3.0", sha256="b47cf2818691f5b1e21df2bb38c795fac2cfbd640ede2d0a5e1c89e338a3ac39")
|
||||
version("11.2.0", sha256="d08edc536b54c372a1010ff6619dd274c0f1603aa49212ba20f7aa2cda36fa8b")
|
||||
version("11.1.0", sha256="4c4a6fb8a8396059241c2e674b85b351c26a5d678274007f076957afa1cc9ddf")
|
||||
|
@@ -56,6 +56,8 @@ class Geos(CMakePackage):
|
||||
depends_on("cmake@3.13:", when="@3.10:", type="build")
|
||||
depends_on("cmake@3.8:", type="build")
|
||||
|
||||
variant("shared", default=True, description="Build shared library")
|
||||
|
||||
patch(
|
||||
"https://github.com/libgeos/geos/pull/461.patch?full_index=1",
|
||||
sha256="ab78db7ff2e8fc89e899b8233cf77d90b24d88940dd202c4219decba479c8d35",
|
||||
@@ -73,4 +75,6 @@ def cmake_args(self):
|
||||
if "%intel" in self.spec:
|
||||
args.append(self.define("BUILD_ASTYLE", False))
|
||||
|
||||
args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
|
||||
|
||||
return args
|
||||
|
@@ -9,7 +9,7 @@
|
||||
from spack.util.environment import is_system_path
|
||||
|
||||
|
||||
class Glib(Package):
|
||||
class Glib(MesonPackage, AutotoolsPackage):
|
||||
"""GLib provides the core application building blocks for
|
||||
libraries and applications written in C.
|
||||
|
||||
@@ -26,6 +26,8 @@ class Glib(Package):
|
||||
|
||||
maintainers("michaelkuhn")
|
||||
|
||||
version("2.76.3", sha256="c0be444e403d7c3184d1f394f89f0b644710b5e9331b54fa4e8b5037813ad32a")
|
||||
version("2.76.2", sha256="24f3847857b1d8674cdb0389a36edec0f13c666cd3ce727ecd340eb9da8aca9e")
|
||||
version("2.76.1", sha256="43dc0f6a126958f5b454136c4398eab420249c16171a769784486e25f2fda19f")
|
||||
version("2.74.7", sha256="196ab86c27127a61b7a70c3ba6af7b97bdc01c07cd3b21abd5e778b955eccb1b")
|
||||
version("2.74.6", sha256="069cf7e51cd261eb163aaf06c8d1754c6835f31252180aff5814e5afc7757fbc")
|
||||
@@ -119,9 +121,17 @@ class Glib(Package):
|
||||
description="Enable tracing support",
|
||||
)
|
||||
|
||||
depends_on("meson@0.49.2:", when="@2.61.2:", type="build")
|
||||
depends_on("meson@0.48.0:", when="@2.58.0:", type="build")
|
||||
depends_on("ninja", when="@2.58.0:", type="build")
|
||||
build_system(
|
||||
conditional("meson", when="@2.58:"),
|
||||
conditional("autotools", when="@:2.57"),
|
||||
default="meson",
|
||||
)
|
||||
|
||||
with when("build_system=meson"):
|
||||
depends_on("meson@0.60.0:", when="@2.73:", type="build")
|
||||
depends_on("meson@0.52.0:", when="@2.71:2.72", type="build")
|
||||
depends_on("meson@0.49.2:", when="@2.61.2:2.70", type="build")
|
||||
depends_on("meson@0.48.0:", when="@:2.61.1", type="build")
|
||||
|
||||
depends_on("pkgconfig", type="build")
|
||||
depends_on("libffi")
|
||||
@@ -180,112 +190,8 @@ def patch(self):
|
||||
def libs(self):
|
||||
return find_libraries(["libglib*"], root=self.prefix, recursive=True)
|
||||
|
||||
def meson_args(self):
|
||||
args = []
|
||||
if self.spec.satisfies("@2.63.5:"):
|
||||
if "+libmount" in self.spec:
|
||||
args.append("-Dlibmount=enabled")
|
||||
else:
|
||||
args.append("-Dlibmount=disabled")
|
||||
else:
|
||||
if "+libmount" in self.spec:
|
||||
args.append("-Dlibmount=true")
|
||||
else:
|
||||
args.append("-Dlibmount=false")
|
||||
if "tracing=dtrace" in self.spec:
|
||||
args.append("-Ddtrace=true")
|
||||
else:
|
||||
args.append("-Ddtrace=false")
|
||||
if "tracing=systemtap" in self.spec:
|
||||
args.append("-Dsystemtap=true")
|
||||
else:
|
||||
args.append("-Dsystemtap=false")
|
||||
if self.spec.satisfies("@2.59.0:"):
|
||||
args.append("-Dselinux=disabled")
|
||||
else:
|
||||
args.append("-Dselinux=false")
|
||||
args.append("-Dgtk_doc=false")
|
||||
args.append("-Dlibelf=enabled")
|
||||
|
||||
# arguments for older versions
|
||||
if self.spec.satisfies("@:2.72"):
|
||||
args.append("-Dgettext=external")
|
||||
if self.spec.satisfies("@:2.74"):
|
||||
if self.spec["iconv"].name == "libc":
|
||||
args.append("-Diconv=libc")
|
||||
else:
|
||||
if self.spec.satisfies("@2.61.0:"):
|
||||
args.append("-Diconv=external")
|
||||
else:
|
||||
args.append("-Diconv=gnu")
|
||||
return args
|
||||
|
||||
def install(self, spec, prefix):
|
||||
with working_dir("spack-build", create=True):
|
||||
# We cannot simply do
|
||||
# meson('..', *std_meson_args, *self.meson_args())
|
||||
# because that is not Python 2 compatible. Instead, collect
|
||||
# arguments into a temporary buffer first.
|
||||
args = []
|
||||
args.extend(std_meson_args)
|
||||
args.extend(self.meson_args())
|
||||
meson("..", *args)
|
||||
ninja("-v")
|
||||
if self.run_tests:
|
||||
ninja("test")
|
||||
ninja("install")
|
||||
|
||||
def configure_args(self):
|
||||
args = []
|
||||
if "+libmount" in self.spec:
|
||||
args.append("--enable-libmount")
|
||||
else:
|
||||
args.append("--disable-libmount")
|
||||
if self.spec.satisfies("@2.53.4:"):
|
||||
args.append(
|
||||
"--with-python={0}".format(os.path.basename(self.spec["python"].command.path))
|
||||
)
|
||||
if self.spec["iconv"].name == "libc":
|
||||
args.append("--with-libiconv=maybe")
|
||||
else:
|
||||
args.append("--with-libiconv=gnu")
|
||||
if self.spec.satisfies("@2.56:"):
|
||||
for value in ("dtrace", "systemtap"):
|
||||
if ("tracing=" + value) in self.spec:
|
||||
args.append("--enable-" + value)
|
||||
else:
|
||||
args.append("--disable-" + value)
|
||||
else:
|
||||
if "tracing=dtrace" in self.spec or "tracing=systemtap" in self.spec:
|
||||
args.append("--enable-tracing")
|
||||
else:
|
||||
args.append("--disable-tracing")
|
||||
# SELinux is not available in Spack, so glib should not use it.
|
||||
args.append("--disable-selinux")
|
||||
# glib should not use the globally installed gtk-doc. Otherwise,
|
||||
# gtk-doc can fail with Python errors such as "ImportError: No module
|
||||
# named site". This is due to the fact that Spack sets PYTHONHOME,
|
||||
# which can confuse the global Python installation used by gtk-doc.
|
||||
args.append("--disable-gtk-doc-html")
|
||||
# glib uses gtk-doc even though it should be disabled if it can find
|
||||
# its binaries. Override the checks to use the true binary.
|
||||
true = which("true")
|
||||
args.append("GTKDOC_CHECK={0}".format(true))
|
||||
args.append("GTKDOC_CHECK_PATH={0}".format(true))
|
||||
args.append("GTKDOC_MKPDF={0}".format(true))
|
||||
args.append("GTKDOC_REBASE={0}".format(true))
|
||||
return args
|
||||
|
||||
@when("@:2.57")
|
||||
def install(self, spec, prefix):
|
||||
configure("--prefix={0}".format(prefix), *self.configure_args())
|
||||
make()
|
||||
if self.run_tests:
|
||||
make("check")
|
||||
make("install")
|
||||
if self.run_tests:
|
||||
make("installcheck")
|
||||
|
||||
class BaseBuilder(metaclass=spack.builder.PhaseCallbacksMeta):
|
||||
@property
|
||||
def dtrace_copy_path(self):
|
||||
return join_path(self.stage.source_path, "dtrace-copy")
|
||||
@@ -363,3 +269,88 @@ def gettext_libdir(self):
|
||||
repl = "Libs: -L{0} -Wl,-rpath={0} ".format(spec["gettext"].libs.directories[0])
|
||||
myfile = join_path(self.spec["glib"].libs.directories[0], "pkgconfig", "glib-2.0.pc")
|
||||
filter_file(pattern, repl, myfile, backup=False)
|
||||
|
||||
|
||||
class MesonBuilder(BaseBuilder, spack.build_systems.meson.MesonBuilder):
|
||||
def meson_args(self):
|
||||
args = []
|
||||
if self.spec.satisfies("@2.63.5:"):
|
||||
if "+libmount" in self.spec:
|
||||
args.append("-Dlibmount=enabled")
|
||||
else:
|
||||
args.append("-Dlibmount=disabled")
|
||||
else:
|
||||
if "+libmount" in self.spec:
|
||||
args.append("-Dlibmount=true")
|
||||
else:
|
||||
args.append("-Dlibmount=false")
|
||||
if "tracing=dtrace" in self.spec:
|
||||
args.append("-Ddtrace=true")
|
||||
else:
|
||||
args.append("-Ddtrace=false")
|
||||
if "tracing=systemtap" in self.spec:
|
||||
args.append("-Dsystemtap=true")
|
||||
else:
|
||||
args.append("-Dsystemtap=false")
|
||||
if self.spec.satisfies("@2.59.0:"):
|
||||
args.append("-Dselinux=disabled")
|
||||
else:
|
||||
args.append("-Dselinux=false")
|
||||
args.append("-Dgtk_doc=false")
|
||||
args.append("-Dlibelf=enabled")
|
||||
|
||||
# arguments for older versions
|
||||
if self.spec.satisfies("@:2.72"):
|
||||
args.append("-Dgettext=external")
|
||||
if self.spec.satisfies("@:2.74"):
|
||||
if self.spec["iconv"].name == "libc":
|
||||
args.append("-Diconv=libc")
|
||||
else:
|
||||
if self.spec.satisfies("@2.61.0:"):
|
||||
args.append("-Diconv=external")
|
||||
else:
|
||||
args.append("-Diconv=gnu")
|
||||
return args
|
||||
|
||||
|
||||
class AutotoolsBuilder(BaseBuilder, spack.build_systems.autotools.AutotoolsBuilder):
|
||||
def configure_args(self):
|
||||
args = []
|
||||
if "+libmount" in self.spec:
|
||||
args.append("--enable-libmount")
|
||||
else:
|
||||
args.append("--disable-libmount")
|
||||
if self.spec.satisfies("@2.53.4:"):
|
||||
args.append(
|
||||
"--with-python={0}".format(os.path.basename(self.spec["python"].command.path))
|
||||
)
|
||||
if self.spec["iconv"].name == "libc":
|
||||
args.append("--with-libiconv=maybe")
|
||||
else:
|
||||
args.append("--with-libiconv=gnu")
|
||||
if self.spec.satisfies("@2.56:"):
|
||||
for value in ("dtrace", "systemtap"):
|
||||
if ("tracing=" + value) in self.spec:
|
||||
args.append("--enable-" + value)
|
||||
else:
|
||||
args.append("--disable-" + value)
|
||||
else:
|
||||
if "tracing=dtrace" in self.spec or "tracing=systemtap" in self.spec:
|
||||
args.append("--enable-tracing")
|
||||
else:
|
||||
args.append("--disable-tracing")
|
||||
# SELinux is not available in Spack, so glib should not use it.
|
||||
args.append("--disable-selinux")
|
||||
# glib should not use the globally installed gtk-doc. Otherwise,
|
||||
# gtk-doc can fail with Python errors such as "ImportError: No module
|
||||
# named site". This is due to the fact that Spack sets PYTHONHOME,
|
||||
# which can confuse the global Python installation used by gtk-doc.
|
||||
args.append("--disable-gtk-doc-html")
|
||||
# glib uses gtk-doc even though it should be disabled if it can find
|
||||
# its binaries. Override the checks to use the true binary.
|
||||
true = which("true")
|
||||
args.append("GTKDOC_CHECK={0}".format(true))
|
||||
args.append("GTKDOC_CHECK_PATH={0}".format(true))
|
||||
args.append("GTKDOC_MKPDF={0}".format(true))
|
||||
args.append("GTKDOC_REBASE={0}".format(true))
|
||||
return args
|
||||
|
@@ -12,6 +12,7 @@ class Glog(Package):
|
||||
homepage = "https://github.com/google/glog"
|
||||
url = "https://github.com/google/glog/archive/v0.3.5.tar.gz"
|
||||
|
||||
version("0.6.0", sha256="8a83bf982f37bb70825df71a9709fa90ea9f4447fb3c099e1d720a439d88bad6")
|
||||
version("0.4.0", sha256="f28359aeba12f30d73d9e4711ef356dc842886968112162bc73002645139c39c")
|
||||
version("0.3.5", sha256="7580e408a2c0b5a89ca214739978ce6ff480b5e7d8d7698a2aa92fadc484d1e0")
|
||||
version(
|
||||
|
@@ -15,6 +15,7 @@ class Gnupg(AutotoolsPackage):
|
||||
|
||||
maintainers("alalazo")
|
||||
|
||||
version("2.4.2", sha256="97eb47df8ae5a3ff744f868005a090da5ab45cb48ee9836dbf5ee739a4e5cf49")
|
||||
version("2.4.1", sha256="76b71e5aeb443bfd910ce9cbc8281b617c8341687afb67bae455877972b59de8")
|
||||
version("2.4.0", sha256="1d79158dd01d992431dd2e3facb89fdac97127f89784ea2cb610c600fb0c1483")
|
||||
version("2.3.8", sha256="540b7a40e57da261fb10ef521a282e0021532a80fd023e75fb71757e8a4969ed")
|
||||
|
@@ -18,6 +18,7 @@ class GobjectIntrospection(MesonPackage, AutotoolsPackage):
|
||||
|
||||
maintainers("michaelkuhn")
|
||||
|
||||
version("1.76.1", sha256="196178bf64345501dcdc4d8469b36aa6fe80489354efe71cb7cb8ab82a3738bf")
|
||||
version("1.72.1", sha256="012e313186e3186cf0fde6decb57d970adf90e6b1fac5612fe69cbb5ba99543a")
|
||||
version("1.72.0", sha256="02fe8e590861d88f83060dd39cda5ccaa60b2da1d21d0f95499301b186beaabc")
|
||||
version("1.56.1", sha256="5b2875ccff99ff7baab63a34b67f8c920def240e178ff50add809e267d9ea24b")
|
||||
|
@@ -17,7 +17,9 @@ class Gradle(Package):
|
||||
homepage = "https://gradle.org"
|
||||
url = "https://services.gradle.org/distributions/gradle-3.4-all.zip"
|
||||
|
||||
version("8.1.1", sha256="5625a0ae20fe000d9225d000b36909c7a0e0e8dda61c19b12da769add847c975")
|
||||
version("8.0.2", sha256="47a5bfed9ef814f90f8debcbbb315e8e7c654109acd224595ea39fca95c5d4da")
|
||||
version("7.3", sha256="00b273629df4ce46e68df232161d5a7c4e495b9a029ce6e0420f071e21316867")
|
||||
version("7.2", sha256="a8da5b02437a60819cad23e10fc7e9cf32bcb57029d9cb277e26eeff76ce014b")
|
||||
version("7.1.1", sha256="9bb8bc05f562f2d42bdf1ba8db62f6b6fa1c3bf6c392228802cc7cb0578fe7e0")
|
||||
version("7.1", sha256="a9e356a21595348b6f04b024ed0b08ac8aea6b2ac37e6c0ef58e51549cd7b9cb")
|
||||
|
@@ -18,6 +18,7 @@ class Hbase(Package):
|
||||
list_url = "https://archive.apache.org/dist/hbase"
|
||||
list_depth = 1
|
||||
|
||||
version("2.5.3", sha256="874f239c341a6a4a646051c79fda9e838242481b70463bf8daa28ba7239576c2")
|
||||
version("2.4.9", sha256="ed282a165fe0910b27d143f3ea21d552110bc155fd5456250a05dc51b0f0b6bd")
|
||||
version("2.2.5", sha256="25d08f8f038d9de5beb43dfb0392e8a8b34eae7e0f2670d6c2c172abc3855194")
|
||||
version("2.2.4", sha256="ec91b628352931e22a091a206be93061b6bf5364044a28fb9e82f0023aca3ca4")
|
||||
|
@@ -191,7 +191,7 @@ def check(self):
|
||||
with working_dir(self.build_directory):
|
||||
make("check", parallel=False)
|
||||
|
||||
extra_install_tests = "hdf/util/testfiles"
|
||||
extra_install_tests = join_path("hdf", "util", "testfiles")
|
||||
|
||||
@property
|
||||
def cached_tests_work_dir(self):
|
||||
@@ -204,81 +204,78 @@ def setup_build_tests(self):
|
||||
install test subdirectory for use during `spack test run`."""
|
||||
self.cache_extra_test_sources(self.extra_install_tests)
|
||||
|
||||
def _test_check_versions(self):
|
||||
"""Perform version checks on selected installed package binaries."""
|
||||
spec_vers_str = "Version {0}".format(self.spec.version.up_to(2))
|
||||
def _check_version_match(self, exe):
|
||||
"""Ensure exe version check yields spec version."""
|
||||
path = join_path(self.prefix.bin, exe)
|
||||
if not os.path.isfile(path):
|
||||
raise SkipTest(f"{exe} is not installed")
|
||||
|
||||
exes = ["hdfimport", "hrepack", "ncdump", "ncgen"]
|
||||
for exe in exes:
|
||||
reason = "test: ensuring version of {0} is {1}".format(exe, spec_vers_str)
|
||||
self.run_test(
|
||||
exe, ["-V"], spec_vers_str, installed=True, purpose=reason, skip_missing=True
|
||||
)
|
||||
exe = which(path)
|
||||
out = exe("-V", output=str.split, error=str.split)
|
||||
vers = f"Version {self.spec.version.up_to(2)}"
|
||||
assert vers in out
|
||||
|
||||
def _test_gif_converters(self):
|
||||
"""This test performs an image conversion sequence and diff."""
|
||||
work_dir = "."
|
||||
storm_fn = os.path.join(self.cached_tests_work_dir, "storm110.hdf")
|
||||
def test_hdfimport_version(self):
|
||||
"""ensure hdfimport version matches spec"""
|
||||
self._check_version_match("hdfimport")
|
||||
|
||||
gif_fn = "storm110.gif"
|
||||
new_hdf_fn = "storm110gif.hdf"
|
||||
def test_hrepack_version(self):
|
||||
"""ensure hrepack version matches spec"""
|
||||
self._check_version_match("hrepack")
|
||||
|
||||
# Convert a test HDF file to a gif
|
||||
self.run_test(
|
||||
"hdf2gif",
|
||||
[storm_fn, gif_fn],
|
||||
"",
|
||||
installed=True,
|
||||
purpose="test: hdf-to-gif",
|
||||
work_dir=work_dir,
|
||||
)
|
||||
def test_ncdump_version(self):
|
||||
"""ensure ncdump version matches spec"""
|
||||
self._check_version_match("hrepack")
|
||||
|
||||
# Convert the gif to an HDF file
|
||||
self.run_test(
|
||||
"gif2hdf",
|
||||
[gif_fn, new_hdf_fn],
|
||||
"",
|
||||
installed=True,
|
||||
purpose="test: gif-to-hdf",
|
||||
work_dir=work_dir,
|
||||
)
|
||||
def test_ncgen_version(self):
|
||||
"""ensure ncgen version matches spec"""
|
||||
self._check_version_match("ncgen")
|
||||
|
||||
# Compare the original and new HDF files
|
||||
self.run_test(
|
||||
"hdiff",
|
||||
[new_hdf_fn, storm_fn],
|
||||
"",
|
||||
installed=True,
|
||||
purpose="test: compare orig to new hdf",
|
||||
work_dir=work_dir,
|
||||
)
|
||||
def test_gif_converters(self):
|
||||
"""test image conversion sequence and diff"""
|
||||
base_name = "storm110"
|
||||
storm_fn = join_path(self.cached_tests_work_dir, f"{base_name}.hdf")
|
||||
if not os.path.exists(storm_fn):
|
||||
raise SkipTest(f"Missing test image {storm_fn}")
|
||||
|
||||
if not os.path.exists(self.prefix.bin.hdf2gif) or not os.path.exists(
|
||||
self.prefix.bin.gif2hdf
|
||||
):
|
||||
raise SkipTest("Missing one or more installed: 'hdf2gif', 'gif2hdf'")
|
||||
|
||||
gif_fn = f"{base_name}.gif"
|
||||
new_hdf_fn = f"{base_name}gif.hdf"
|
||||
|
||||
with test_part(
|
||||
self, "test_gif_converters_hdf2gif", purpose=f"convert {base_name} hdf-to-gif"
|
||||
):
|
||||
hdf2gif = which(self.prefix.bin.hdf2gif)
|
||||
hdf2gif(storm_fn, gif_fn)
|
||||
|
||||
with test_part(
|
||||
self, "test_gif_converters_gif2hdf", purpose=f"convert {base_name} gif-to-hdf"
|
||||
):
|
||||
gif2hdf = which(self.prefix.bin.gif2hdf)
|
||||
gif2hdf(gif_fn, new_hdf_fn)
|
||||
|
||||
with test_part(
|
||||
self, "test_gif_converters_hdiff", purpose=f"compare new and orig {base_name} hdf"
|
||||
):
|
||||
hdiff = which(self.prefix.bin.hdiff)
|
||||
hdiff(new_hdf_fn, storm_fn)
|
||||
|
||||
def test_list(self):
|
||||
"""compare low-level HDF file information to expected"""
|
||||
base_name = "storm110"
|
||||
if not os.path.isfile(self.prefix.bin.hdfls):
|
||||
raise SkipTest("hdfls is not installed")
|
||||
|
||||
def _test_list(self):
|
||||
"""This test compares low-level HDF file information to expected."""
|
||||
storm_fn = os.path.join(self.cached_tests_work_dir, "storm110.hdf")
|
||||
test_data_dir = self.test_suite.current_test_data_dir
|
||||
work_dir = "."
|
||||
|
||||
reason = "test: checking hdfls output"
|
||||
details_file = os.path.join(test_data_dir, "storm110.out")
|
||||
details_file = os.path.join(test_data_dir, f"{base_name}.out")
|
||||
expected = get_escaped_text_output(details_file)
|
||||
self.run_test(
|
||||
"hdfls",
|
||||
[storm_fn],
|
||||
expected,
|
||||
installed=True,
|
||||
purpose=reason,
|
||||
skip_missing=True,
|
||||
work_dir=work_dir,
|
||||
)
|
||||
|
||||
def test(self):
|
||||
"""Perform smoke tests on the installed package."""
|
||||
# Simple version check tests on subset of known binaries that respond
|
||||
self._test_check_versions()
|
||||
storm_fn = os.path.join(self.cached_tests_work_dir, f"{base_name}.hdf")
|
||||
|
||||
# Run gif converter sequence test
|
||||
self._test_gif_converters()
|
||||
|
||||
# Run hdfls output
|
||||
self._test_list()
|
||||
hdfls = which(self.prefix.bin.hdfls)
|
||||
out = hdfls(storm_fn, output=str.split, error=str.split)
|
||||
check_outputs(expected, out)
|
||||
|
@@ -7,6 +7,7 @@
|
||||
import re
|
||||
import shutil
|
||||
|
||||
import llnl.util.lang
|
||||
import llnl.util.tty as tty
|
||||
|
||||
from spack.package import *
|
||||
@@ -556,6 +557,12 @@ def is_enabled(text):
|
||||
def setup_build_environment(self, env):
|
||||
env.set("SZIP_INSTALL", self.spec["szip"].prefix)
|
||||
|
||||
def setup_run_environment(self, env):
|
||||
# According to related github posts and problems running test_install
|
||||
# as a stand-alone test, it appears the lib path must be added to
|
||||
# LD_LIBRARY_PATH.
|
||||
env.append_path("LD_LIBRARY_PATH", self.prefix.lib)
|
||||
|
||||
@run_before("cmake")
|
||||
def fortran_check(self):
|
||||
if "+fortran" in self.spec and not self.compiler.fc:
|
||||
@@ -686,67 +693,60 @@ def fix_package_config(self):
|
||||
if not os.path.exists(tgt_filename):
|
||||
symlink(src_filename, tgt_filename)
|
||||
|
||||
@property
|
||||
@llnl.util.lang.memoized
|
||||
def _output_version(self):
|
||||
spec_vers_str = str(self.spec.version.up_to(3))
|
||||
if "develop" in spec_vers_str:
|
||||
# Remove 'develop-' from the version in spack for checking
|
||||
# version against the version in the HDF5 code.
|
||||
spec_vers_str = spec_vers_str.partition("-")[2]
|
||||
return spec_vers_str
|
||||
|
||||
@run_after("install")
|
||||
@on_package_attributes(run_tests=True)
|
||||
def check_install(self):
|
||||
self._check_install()
|
||||
self.test_check_prog()
|
||||
|
||||
def _check_install(self):
|
||||
# Build and run a small program to test the installed HDF5 library
|
||||
spec = self.spec
|
||||
def test_check_prog(self):
|
||||
"""build, run and check output of check.c"""
|
||||
print("Checking HDF5 installation...")
|
||||
prog = "check.c"
|
||||
|
||||
spec = self.spec
|
||||
checkdir = "spack-check"
|
||||
|
||||
# Because the release number in a develop branch is not fixed,
|
||||
# only the major and minor version numbers are compared.
|
||||
# Otherwise all 3 numbers are checked.
|
||||
fmt = "%d.%d %u.%u"
|
||||
arg_line1 = "H5_VERS_MAJOR, H5_VERS_MINOR"
|
||||
arg_line2 = "majnum, minnum"
|
||||
if not spec.version.isdevelop():
|
||||
fmt = "%d." + fmt + ".%u"
|
||||
arg_line2 = "H5_VERS_RELEASE, " + arg_line2 + ", relnum"
|
||||
|
||||
source = r"""
|
||||
#include <hdf5.h>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
int main(int argc, char **argv) {{
|
||||
unsigned majnum, minnum, relnum;
|
||||
herr_t herr = H5get_libversion(&majnum, &minnum, &relnum);
|
||||
assert(!herr);
|
||||
printf("HDF5 version {}\n", {},
|
||||
{});
|
||||
return 0;
|
||||
}}
|
||||
"""
|
||||
|
||||
expected = f"HDF5 version {self._output_version} {self._output_version}\n"
|
||||
|
||||
with working_dir(checkdir, create=True):
|
||||
# Because the release number in a develop branch is not fixed,
|
||||
# only the major and minor version numbers are compared.
|
||||
# Otherwise all 3 numbers are checked.
|
||||
if "develop" in str(spec.version.up_to(3)):
|
||||
source = r"""
|
||||
#include <hdf5.h>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
int main(int argc, char **argv) {
|
||||
unsigned majnum, minnum, relnum;
|
||||
herr_t herr = H5get_libversion(&majnum, &minnum, &relnum);
|
||||
assert(!herr);
|
||||
printf("HDF5 version %d.%d %u.%u\n", H5_VERS_MAJOR, H5_VERS_MINOR,
|
||||
majnum, minnum);
|
||||
return 0;
|
||||
}
|
||||
"""
|
||||
else:
|
||||
source = r"""
|
||||
#include <hdf5.h>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
int main(int argc, char **argv) {
|
||||
unsigned majnum, minnum, relnum;
|
||||
herr_t herr = H5get_libversion(&majnum, &minnum, &relnum);
|
||||
assert(!herr);
|
||||
printf("HDF5 version %d.%d.%d %u.%u.%u\n", H5_VERS_MAJOR, H5_VERS_MINOR,
|
||||
H5_VERS_RELEASE, majnum, minnum, relnum);
|
||||
return 0;
|
||||
}
|
||||
"""
|
||||
expected = """\
|
||||
HDF5 version {version} {version}
|
||||
""".format(
|
||||
version=str(spec.version.up_to(3))
|
||||
)
|
||||
if "develop" in expected:
|
||||
# Remove 'develop-' from the version in spack for checking
|
||||
# version against the version in the HDF5 code.
|
||||
expected = """\
|
||||
HDF5 version {version} {version}
|
||||
""".format(
|
||||
version=str(spec.version.up_to(3)).partition("-")[2]
|
||||
)
|
||||
with open("check.c", "w") as f:
|
||||
f.write(source)
|
||||
if "+mpi" in spec:
|
||||
cc = Executable(spec["mpi"].mpicc)
|
||||
else:
|
||||
cc = Executable(self.compiler.cc)
|
||||
with open(prog, "w") as f:
|
||||
f.write(source.format(fmt, arg_line1, arg_line2))
|
||||
|
||||
cc = Executable(os.environ["CC"])
|
||||
cc(*(["-c", "check.c"] + spec["hdf5"].headers.cpp_flags.split()))
|
||||
cc(*(["-o", "check", "check.o"] + spec["hdf5"].libs.ld_flags.split()))
|
||||
try:
|
||||
@@ -768,13 +768,9 @@ def _check_install(self):
|
||||
raise RuntimeError("HDF5 install check failed")
|
||||
shutil.rmtree(checkdir)
|
||||
|
||||
def _test_check_versions(self):
|
||||
def test_version(self):
|
||||
"""Perform version checks on selected installed package binaries."""
|
||||
spec_vers_str = "Version {0}".format(self.spec.version)
|
||||
if "develop" in spec_vers_str:
|
||||
# Remove 'develop-' from the version in spack for checking
|
||||
# version against the version in the HDF5 code.
|
||||
spec_vers_str = spec_vers_str.partition("-")[2]
|
||||
expected = f"Version {self._output_version}"
|
||||
|
||||
exes = [
|
||||
"h5copy",
|
||||
@@ -789,55 +785,31 @@ def _test_check_versions(self):
|
||||
]
|
||||
use_short_opt = ["h52gif", "h5repart", "h5unjam"]
|
||||
for exe in exes:
|
||||
reason = "test: ensuring version of {0} is {1}".format(exe, spec_vers_str)
|
||||
reason = f"ensure version of {exe} is {self._output_version}"
|
||||
option = "-V" if exe in use_short_opt else "--version"
|
||||
self.run_test(
|
||||
exe, option, spec_vers_str, installed=True, purpose=reason, skip_missing=True
|
||||
)
|
||||
with test_part(self, f"test_version_{exe}", purpose=reason):
|
||||
path = join_path(self.prefix.bin, exe)
|
||||
if not os.path.isfile(path):
|
||||
raise SkipTest(f"{path} is not installed")
|
||||
|
||||
def _test_example(self):
|
||||
"""This test performs copy, dump, and diff on an example hdf5 file."""
|
||||
prog = which(path)
|
||||
output = prog(option, output=str.split, error=str.split)
|
||||
assert expected in output
|
||||
|
||||
def test_example(self):
|
||||
"""copy, dump, and diff example hdf5 file"""
|
||||
test_data_dir = self.test_suite.current_test_data_dir
|
||||
with working_dir(test_data_dir, create=True):
|
||||
filename = "spack.h5"
|
||||
h5dump = which(self.prefix.bin.h5dump)
|
||||
out = h5dump(filename, output=str.split, error=str.split)
|
||||
expected = get_escaped_text_output("dump.out")
|
||||
check_outputs(expected, out)
|
||||
|
||||
filename = "spack.h5"
|
||||
h5_file = test_data_dir.join(filename)
|
||||
h5copy = which(self.prefix.bin.h5copy)
|
||||
copyname = "test.h5"
|
||||
options = ["-i", filename, "-s", "Spack", "-o", copyname, "-d", "Spack"]
|
||||
h5copy(*options)
|
||||
|
||||
reason = "test: ensuring h5dump produces expected output"
|
||||
expected = get_escaped_text_output(test_data_dir.join("dump.out"))
|
||||
self.run_test(
|
||||
"h5dump",
|
||||
filename,
|
||||
expected,
|
||||
installed=True,
|
||||
purpose=reason,
|
||||
skip_missing=True,
|
||||
work_dir=test_data_dir,
|
||||
)
|
||||
|
||||
reason = "test: ensuring h5copy runs"
|
||||
options = ["-i", h5_file, "-s", "Spack", "-o", "test.h5", "-d", "Spack"]
|
||||
self.run_test(
|
||||
"h5copy", options, [], installed=True, purpose=reason, skip_missing=True, work_dir="."
|
||||
)
|
||||
|
||||
reason = "test: ensuring h5diff shows no differences between orig and" " copy"
|
||||
self.run_test(
|
||||
"h5diff",
|
||||
[h5_file, "test.h5"],
|
||||
[],
|
||||
installed=True,
|
||||
purpose=reason,
|
||||
skip_missing=True,
|
||||
work_dir=".",
|
||||
)
|
||||
|
||||
def test(self):
|
||||
"""Perform smoke tests on the installed package."""
|
||||
# Simple version check tests on known binaries
|
||||
self._test_check_versions()
|
||||
|
||||
# Run sequence of commands on an hdf5 file
|
||||
self._test_example()
|
||||
|
||||
# Run existing install check
|
||||
self._check_install()
|
||||
h5diff = which(self.prefix.bin.h5diff)
|
||||
h5diff(filename, copyname)
|
||||
|
@@ -13,14 +13,17 @@ class Hdfview(Package):
|
||||
and editing HDF (HDF5 and HDF4) files."""
|
||||
|
||||
homepage = "https://www.hdfgroup.org/downloads/hdfview/"
|
||||
url = "https://s3.amazonaws.com/hdf-wordpress-1/wp-content/uploads/manual/HDFView/hdfview-3.0.tar.gz"
|
||||
url = "https://support.hdfgroup.org/ftp/HDF5/releases/HDF-JAVA/hdfview-3.1.4/src/hdfview-3.1.4.tar.gz"
|
||||
|
||||
version("3.3.0", sha256="0916161861c21fa8dd354b445b48eff5a53d80a5c0b383e79eb64b7b108e2430")
|
||||
version("3.2.0", sha256="d3c0deff2cbd959508c4da9c712da72fb204ff6818a3434f00a7071f8e8cf2b8")
|
||||
version("3.1.4", sha256="898fcd5227d4e7b697efde5e5a969405f96b72517f9dfbdbdce2991290fd56a0")
|
||||
version("3.1.1", sha256="1cfd127ebb4c3b0ab1cfe54649a410fc7a1c2d73f45564697d3729f4aa6b0ba3")
|
||||
version(
|
||||
"3.1.1",
|
||||
sha256="1cfd127ebb4c3b0ab1cfe54649a410fc7a1c2d73f45564697d3729f4aa6b0ba3",
|
||||
url="https://support.hdfgroup.org/ftp/HDF5/releases/HDF-JAVA/hdfview-3.1.1/src/hdfview-3.1.1.tar.gz",
|
||||
"3.0",
|
||||
sha256="e2a16d3842d8947f3d4f154ee9f48a106c7f445914a9e626a53976d678a0e934",
|
||||
url="https://s3.amazonaws.com/hdf-wordpress-1/wp-content/uploads/manual/HDFView/hdfview-3.0.tar.gz",
|
||||
)
|
||||
version("3.0", sha256="e2a16d3842d8947f3d4f154ee9f48a106c7f445914a9e626a53976d678a0e934")
|
||||
|
||||
# unknown flag: --ignore-missing-deps
|
||||
patch("fix_build.patch", when="@3.1.1")
|
||||
@@ -29,10 +32,11 @@ class Hdfview(Package):
|
||||
depends_on("hdf5 +java")
|
||||
depends_on("hdf +java -external-xdr +shared")
|
||||
|
||||
def install(self, spec, prefix):
|
||||
env["HDF5LIBS"] = spec["hdf5"].prefix
|
||||
env["HDFLIBS"] = spec["hdf"].prefix
|
||||
depends_on("hdf5@1.10", when="@:3.1")
|
||||
depends_on("hdf5@1.12:", when="@3.2")
|
||||
depends_on("hdf5@1.14:", when="@3.3:")
|
||||
|
||||
def install(self, spec, prefix):
|
||||
ant = which("ant")
|
||||
ant("-Dbuild.debug=false", "deploy")
|
||||
|
||||
@@ -47,3 +51,8 @@ def install(self, spec, prefix):
|
||||
chmod = which("chmod")
|
||||
chmod("+x", self.prefix.bin.hdfview)
|
||||
install_tree(path, prefix)
|
||||
|
||||
def setup_build_environment(self, env):
|
||||
env.set("HDF5LIBS", self.spec["hdf5"].prefix)
|
||||
env.set("HDFLIBS", self.spec["hdf"].prefix)
|
||||
env.set("ANT_HOME", self.spec["ant"].prefix)
|
||||
|
@@ -0,0 +1,13 @@
|
||||
diff --git a/cmake/HeffteConfig.cmake b/cmake/HeffteConfig.cmake
|
||||
index 8bbe907..df1cf86 100644
|
||||
--- a/cmake/HeffteConfig.cmake
|
||||
+++ b/cmake/HeffteConfig.cmake
|
||||
@@ -51,7 +51,7 @@ if (@Heffte_ENABLE_MAGMA@ AND NOT TARGET Heffte::MAGMA)
|
||||
set_target_properties(Heffte::MAGMA PROPERTIES INTERFACE_INCLUDE_DIRECTORIES @HeffteMAGMA_INCLUDES@)
|
||||
if (@Heffte_ENABLE_CUDA@)
|
||||
list(FILTER CUDA_CUBLAS_LIBRARIES EXCLUDE REGEX "-NOTFOUND$") # work-around CMake 3.10 + CUDA 10
|
||||
- target_link_libraries(Heffte Heffte::MAGMA INTERFACE ${CUDA_CUBLAS_LIBRARIES})
|
||||
+ target_link_libraries(Heffte::MAGMA INTERFACE ${CUDA_CUBLAS_LIBRARIES})
|
||||
endif()
|
||||
if (@Heffte_ENABLE_ROCM@)
|
||||
find_package(rocblas REQUIRED)
|
@@ -49,6 +49,7 @@ class Heffte(CMakePackage, CudaPackage, ROCmPackage):
|
||||
|
||||
patch("threads10.patch", when="@1.0")
|
||||
patch("fortran200.patch", when="@2.0.0")
|
||||
patch("cmake-magma-v230.patch", when="@2.3.0")
|
||||
|
||||
depends_on("cmake@3.10:", type=("build", "run"))
|
||||
depends_on("cmake@3.19:", when="@develop", type=("build", "run"))
|
||||
@@ -113,6 +114,8 @@ def cmake_args(self):
|
||||
nvcc_flags += "{0};".format(nvflag)
|
||||
|
||||
args.append("-DCUDA_NVCC_FLAGS={0}".format(nvcc_flags))
|
||||
archs = ";".join(cuda_arch)
|
||||
args.append("-DCMAKE_CUDA_ARCHITECTURES=%s" % archs)
|
||||
|
||||
if "+rocm" in self.spec and self.spec.satisfies("@:2.3.0"):
|
||||
args.append("-DCMAKE_CXX_COMPILER={0}".format(self.spec["hip"].hipcc))
|
||||
|
@@ -13,8 +13,12 @@ class Highfive(CMakePackage):
|
||||
|
||||
homepage = "https://github.com/BlueBrain/HighFive"
|
||||
url = "https://github.com/BlueBrain/HighFive/archive/v1.2.tar.gz"
|
||||
git = "https://github.com/BlueBrain/HighFive.git"
|
||||
maintainers("alkino")
|
||||
|
||||
version("develop", branch="master")
|
||||
version("2.7.1", sha256="25b4c51a94d1e670dc93b9b73f51e79b65d8ff49bcd6e5d5582d5ecd2789a249")
|
||||
version("2.7.0", sha256="8e05672ddf81a59ce014b1d065bd9a8c5034dbd91a5c2578e805ef880afa5907")
|
||||
version("2.6.2", sha256="ab51b9fbb49e877dd1aa7b53b4b26875f41e4e0b8ee0fc2f1d735e0d1e43d708")
|
||||
version("2.6.1", sha256="b5002c1221cf1821e02fb2ab891b0160bac88b43f56655bd844a472106ca3397")
|
||||
version("2.6.0", sha256="9f9828912619ba27d6f3a30e77c27669d9f19f6ee9170f79ee5f1ea96f85a4cd")
|
||||
|
@@ -153,6 +153,8 @@ def cmake_args(self):
|
||||
args.extend(
|
||||
[
|
||||
self.define("HIOP_BUILD_STATIC", True),
|
||||
self.define("BLAS_FOUND", True),
|
||||
self.define("BLAS_LIBRARIES", spec["blas"].libs),
|
||||
self.define("LAPACK_FOUND", True),
|
||||
self.define("LAPACK_LIBRARIES", spec["lapack"].libs + spec["blas"].libs),
|
||||
self.define_from_variant("HIOP_BUILD_SHARED", "shared"),
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user