Commit graph

26285 commits

Author SHA1 Message Date
Massimiliano Culpo
f2a81af70e
Best effort co-concretization (iterative algorithm) (#28941)
Currently, environments can either be concretized fully together or fully separately. This works well for users who create environments for interoperable software and can use `concretizer:unify:true`. It does not allow environments with conflicting software to be concretized for maximal interoperability.

The primary use-case for this is facilities providing system software. Facilities provide multiple MPI implementations, but all software built against a given MPI ought to be interoperable.

This PR adds a concretization option `concretizer:unify:when_possible`. When this option is used, Spack will concretize specs in the environment separately, but will optimize for minimal differences in overlapping packages.

* Add a level of indirection to root specs

This commit introduce the "literal" atom, which comes with
a few different "arities". The unary "literal" contains an
integer that id the ID of a spec literal. Other "literals"
contain information on the requests made by literal ID. For
instance zlib@1.2.11 generates the following facts:

literal(0,"root","zlib").
literal(0,"node","zlib").
literal(0,"node_version_satisfies","zlib","1.2.11").

This should help with solving large environments "together
where possible" since later literals can be now solved
together in batches.

* Add a mechanism to relax the number of literals being solved

* Modify spack solve to display the new criteria

Since the new criteria is above all the build criteria,
we need to modify the way we display the output.

Originally done by Greg in #27964 and cherry-picked
to this branch by the co-author of the commit.

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>

* Inject reusable specs into the solve

Instead of coupling the PyclingoDriver() object with
spack.config, inject the concrete specs that can be
reused.

A method level function takes care of reading from
the store and the buildcache.

* spack solve: show output of multi-rounds

* add tests for best-effort coconcretization

* Enforce having at least a literal being solved

Co-authored-by: Greg Becker <becker33@llnl.gov>
2022-05-24 12:13:28 -07:00
Jen Herting
494e567fe5
New package: py-x21 (#30225)
* Py-x21 now works, needs dependencies

Conflicts:
	var/spack/repos/rit-rc/packages/py-x21/package.py

* Added dependencies to py-x21

* Making flake style check happy

* [py-x21] flake8

* [py-x21]

- added homepage
- added placeholder description
- added comment about checksums

* [py-x21] added darwin support and fixed issue with python 3.7 wheel name

* [py-x21] adding checksum hash

* [py-x21] removed duplicate py-pynacl

* [py-x21]

- updated description
- updated version listing to have a different version for each version
  of python. Also, versions dependent on sys.platform
- updated url_for_version to not require post concretized information so
  that spack checksum works

* [py-x21] isort

Co-authored-by: vehrc <vehrc@rit.edu>
2022-05-24 18:12:48 +00:00
Seth R. Johnson
6a57aede57
environments: fail gracefully on missing keys (#26378) 2022-05-24 08:52:40 -07:00
edwardsp
ba701a7cf8
Update regex to correctly identify quoted args (#23494)
Previously the regex was only checking for presence of quotes as a beginning
or end character and not a matching set.  This erroneously identified the
following *single* argument as being quoted:

    source bashenvfile &> /dev/null && python3 -c "import os, json; print(json.dumps(dict(os.environ)))"
2022-05-24 08:26:07 -07:00
Matthias Wolf
557845cccc
apptainer: new package (#30745) 2022-05-24 16:01:46 +02:00
iarspider
c5297523af
vdt: add preload variant (#30030) 2022-05-24 12:19:09 +02:00
Evan Bollig
6883868896
libfabric has needed rdma-core for efa since 1.10.0 (#30798) 2022-05-24 04:17:47 -06:00
Satish Balay
1c5587f72d
petsc: update rocrand location wrt rocm@5.1.0 (#30790)
rocm-5.1.0 removed librocrand.so from ROCM_DIR/rocrand/lib location (but  includes are still at this location)

/opt/rocm-5.0.2/lib/librocrand.so
/opt/rocm-5.0.2/rocrand/lib/librocrand.so
/opt/rocm-5.1.0/lib/librocrand.so

drwxr-xr-x 2 root root 617 Mar  8 08:20 /opt/rocm-5.0.2/rocrand/include
drwxr-xr-x 2 root root 617 Mar 31 09:48 /opt/rocm-5.1.0/rocrand/include
2022-05-24 11:54:29 +02:00
Mr-Timn
6e7eb49888
su2: add v7.3.1 (#30794) 2022-05-24 10:50:16 +02:00
Paul Wolfenbarger
3df4a32c4f
trilinos: add adelus, aprepro and teuchos variants (#28935) 2022-05-24 09:49:33 +01:00
Adam J. Stewart
95b03e7bc9
gplates: add v2.3.0 (#30676) 2022-05-24 08:02:39 +02:00
Greg Becker
817ee81eaa
compiler flags: imposed hashes impose the lack of additional compiler flags (#30797) 2022-05-24 01:22:29 -04:00
Tom Scogland
330832c22c
strip -Werror: all specific or none (#30284)
Add a config option to strip `-Werror*` or `-Werror=*` from compile lines everywhere.

```yaml
config:
    keep_werror: false
```

By default, we strip all `-Werror` arguments out of compile lines, to avoid unwanted
failures when upgrading compilers.  You can re-enable `-Werror` in your builds if
you really want to, with either:

```yaml
config:
    keep_werror: all
```

or to keep *just* specific `-Werror=XXX` args:

```yaml
config:
    keep_werror: specific
```

This should make swapping in newer versions of compilers much smoother when
maintainers have decided to enable `-Werror` by default.
2022-05-24 00:57:09 -04:00
Todd Gamblin
306bed48d7
specs: emit better parsing errors for specs. (#24860)
Parse error information is kept for specs, but it doesn't seem like we propagate it
to the user when we encounter an error.  This fixes that.

e.g., for this error in a package:

```python
    depends_on("python@:3.8", when="0.900:")
```

Before, with no context and no clue that it's even from a particular spec:

```
==> Error: Unexpected token: ':'
```

With this PR:

```
==> Error: Unexpected token: ':'
  Encountered when parsing spec:
    0.900:
         ^
```
2022-05-24 03:33:43 +00:00
Scott Wittenburg
63402c512b
Revert "Added cloud_pipline for E4S on Amazon Linux (#29522)" (#30796)
This reverts commit 07e9c0695a.
2022-05-23 21:12:48 -06:00
Brian Van Essen
736fddc079
Bugfix hwloc find cuda (#30788)
* Added autotools configure flags to ensure that hwloc finds the correct
version of CUDA that it was concretized against, rather than the first
one that package config finds.

* Added support for finding the correct version of ROCm libraries.  Fixed Flake8.

* Fixed guard on finding ROCm library
2022-05-23 20:17:46 -06:00
Jen Herting
036048c26f
[py-h2] added version 3.2.0 and 4.1.0 (#29804)
* [py-h2] py-wheel is implied by PythonPackage

* [py-h2] python dependencies should be type=('build', 'run')

* [py-h2] fixed dependencies for py-h2@4.0.0

* [py-h2] added version 3.2.0

* [py-h2] added version 4.1.0

* [py-h2] Older version requires py-enum34 for older versions of python
2022-05-23 17:56:45 -07:00
Greg Becker
8616ba04db
Documentation and new method for CachedCMakePackage build system (#22706)
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2022-05-23 22:48:12 +00:00
Evan Bollig
07e9c0695a
Added cloud_pipline for E4S on Amazon Linux (#29522)
Add two new cloud pipelines for E4S on Amazon Linux, include arm and x86 (v3 + v4) stacks.

Notes:
- Updated mpark-variant to remove conflict that no longer exists in Amazon Linux
- Which command on Amazon Linux prefixes on all results when padded_length is too high. In this case, padded_length<=503 works as expected. Chose conservative length of 384.
2022-05-23 15:33:38 -06:00
snehring
f24886acb5
usearch: adding in new version, updating checksums (#30776) 2022-05-23 13:50:50 -07:00
snehring
5031578c39
genemark-et: updating to 4.69 (#30793) 2022-05-23 13:36:26 -07:00
Massimiliano Culpo
7c4cc1c71c
archspec: add oneapi and dpcpp flag support (#30783) 2022-05-23 13:28:54 -07:00
Harmen Stoppels
f7258e246f
Deprecate spack:concretization over concretizer:unify (#30038)
* Introduce concretizer:unify option to replace spack:concretization

* Deprecate concretization

* Make spack:concretization overrule concretize:unify for now

* Add environment update logic to move from spack:concretization to spack:concretizer:reuse

* Migrate spack:concretization to spack:concretize:unify in all locations

* For new environments make concretizer:unify explicit, so that defaults can be changed in 0.19
2022-05-23 13:20:34 -07:00
Maciej Wójcik
ff980a1452
plumed: add versions up to v2.8.0 (#30787) 2022-05-23 20:07:47 +00:00
Chuck Atkins
51130abf86
ci: Map visit to huge instance for the data-vis-sdk pipeline (#30779) 2022-05-23 14:16:24 -04:00
marcus-elia
383356452b
abseil-cpp: add v20211102 (#30785) 2022-05-23 18:52:39 +02:00
Cody Balos
5fc1547886
xsdk-examples: add v0.3.0 (#30770)
Co-authored-by: Satish Balay <balay@mcs.anl.gov>
Co-authored-by: Veselin Dobrev <dobrev@llnl.gov>
2022-05-23 18:45:11 +02:00
Manuela Kuhn
68cd6c72c7
py-rnc2rng: fix 2.6.5 and add 2.6.6 (#30784) 2022-05-23 08:02:13 -07:00
Jean Luca Bez
3d2ff57e7b
hdf5-vol-async: update new version, tests, and runtime envs (#30713)
* Update h5bench maintainers and versions

* Include version 1.1 for h5bench

* Correct release hash and set default version

* Update .tar.gz version

* Include new version and update runtime

* Update year

* Update package.py

* Update package.py
2022-05-23 09:28:26 -04:00
Massimiliano Culpo
3bc656808c
llvm: make "omp_as_runtime" variant conditional (#30782)
fixes #30700

To avoid clingo adding penalties for not using the
default value for a variant, it's better to model
the variant as conditional where possible.
2022-05-23 14:21:11 +02:00
Ben Bergen
7ded692a76
gdb: add v11.2 (#30780)
- This resolves bug https://sourceware.org/PR28302
2022-05-23 12:18:26 +02:00
MichaelLaufer
aa3c7a138a
py-pyfr: Add v1.14.0, add LIBXSMM variant (#30612)
* Update PyFR, Gimmik versions. Add PyFR LIBXSMM variant

* Fixes

* Changes to variants

* Update py-gimmik version requirement in py-pyfr

* Revert "Update py-gimmik version requirement in py-pyfr"

This reverts commit 3b3fde30425ece252290eb0a2793ca1707f84860.

* Update libxsmm conflicts
2022-05-22 12:01:21 -06:00
Paul Kuberry
42441cddcc
Add Teuchos patch that fixes implicit casting of complex numbers (#30777) 2022-05-22 09:26:33 -04:00
Abhik Sarkar
b78025345b
Feature/composed boost pkg deps p3 (#28961)
* This commit removes the Boost.with_default_variants to variants that packages are precisely dependant upon. This is the third batch of 16 packages with modified boost dependencies.

* style fix

* Update var/spack/repos/builtin/packages/sympol/package.py

Co-authored-by: Tim Haines <thaines.astro@gmail.com>

* fix style

* Apply suggestions from code review

Co-authored-by: Tim Haines <thaines.astro@gmail.com>

* Fix Trilinos boost deps

* Fix style

Co-authored-by: Tim Haines <thaines.astro@gmail.com>
Co-authored-by: Tom Scogland <tom.scogland@gmail.com>
2022-05-21 15:57:59 -07:00
Harmen Stoppels
2113b625d1
gcc: add build_type and profiled variants (#30660)
Add a `build_type` variant, which allows building optimized compilers,
as well as target libraries (libstdc++ and friends).

The default is `build_type=RelWithDebInfo`, which corresponds to GCC's
default of -O2 -g.

When building with `+bootstrap %gcc`, also add Spack's arch specific
flags using the common denominator between host and new GCC.

It is done by creating a config/spack.mk file in def patch, that looks
as follows:
```
BOOT_CFLAGS := $(filter-out -O% -g%, $(BOOT_CFLAGS)) -O2 -g -march=znver2 -mtune=znver2
CFLAGS_FOR_TARGET := $(filter-out -O% -g%, $(CFLAGS_FOR_TARGET)) -O2 -g -march=znver2 -mtune=znver2
CXXFLAGS_FOR_TARGET := $(filter-out -O% -g%, $(CXXFLAGS_FOR_TARGET)) -O2 -g -march=znver2 -mtune=znver2
```
2022-05-21 23:44:51 +02:00
Jen Herting
c6c3d243e1
New package: py-motor (#30763)
* New package: py-motor

* Fixed dependency errors

* Fixed flake style errors

* Fixed linked issue

Co-authored-by: Viv Eric Hafener <vehrc@sporcbuild.rc.rit.edu>
2022-05-21 11:36:37 -05:00
Manuela Kuhn
870b997cb6
py-ww: add new package (#30767)
* py-ww: add new package

* Add missing py-pytest-runner dependency
2022-05-21 11:28:53 -05:00
snehring
c9492f1cd4
paml: add v4.10.3 (#30772) 2022-05-21 09:47:38 +02:00
dependabot[bot]
24f370491e
build(deps): bump actions/upload-artifact from 3 to 3.1.0 (#30778)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 3.1.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...3cea5372237819ed00197afe530f5a7ea3e805c8)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-21 08:57:19 +02:00
Glenn Johnson
d688a699fa
Fix toolchain detection for oneapi/dpcpp compilers (#30775)
The oneapi and dpcpp compilers are essentially the same except for which
binary is used foc CXX. Spack will detect them as "mixed toolchain" and
not inject compiler optimization flags. This will be needed once
archspec has entries for the oneapi and dpcpp compilers. This PR detects
when dpcpp and oneapi are in the toolchains list and explicitly sets
`is_mixed_toolchain` to `False`.
2022-05-21 08:38:01 +02:00
Chuck Atkins
4fbb822072
visit: Overhaul to build in the DAV SDK (#30594)
* mesa-glu and mesa-demos: Fix conflicts with glu and osmesa

* visit: Update visit dependencies

* ecp-data-vis-sdk: Enable +visit

* ci[data-vis-sdk]: Enable +visit
2022-05-20 19:17:30 -04:00
Sreenivasa Murthy Kolam
f86c481280
update checksum and url for mlirmiopen recipe (#30771) 2022-05-20 21:29:58 +00:00
Jen Herting
91a99882b3
[py-openslide-python] added verion 1.1.2 (#30722)
* [py-openslide-python] added verion 1.1.2 and set max py-setuptools version for 1.1.1

* [py-openslide-python]

- setuptools required for all possible newer versions
- python is type build run

* [py-openslide-python] use pil provider
2022-05-20 19:25:20 +00:00
Manuela Kuhn
74bef2105a
py-formatizer: add new package (#30755) 2022-05-20 10:37:55 -07:00
Manuela Kuhn
630ebb9d8b
py-pybids: add 0.8.0 and 0.15.1 (#30756) 2022-05-20 10:37:01 -07:00
iarspider
183465321e
DWZ: use virtual "elf" package (#30761) 2022-05-20 10:29:11 -07:00
Nate deVelder
580f9ec86e
Add newer openfast versions and preliminary OpenMP compile support (#30752)
* Add version 3.0 and 3.1 and prelim OpenMP support

* Fix flag handler missing spec variable

* Use self.compiler.openmp_flag instead of -fopenmp

* Fix whitespace
2022-05-20 10:27:47 -07:00
Jordan Galby
0b0920bc90
qt: Qt 5.15.0 requires OpenSSL 1.1.1 (#30754)
Fixes qt configure errors with external openssl on older systems (rhel7)

See
efc02f9cc3/dist/changes-5.15.0 (L346)

This means for now on, `qt ^openssl@1.0` gets you `qt@5.15.4 ~ssl`:
clingo chooses latest qt version **but disables ssl support**.
2022-05-20 18:24:30 +02:00
Greg Becker
ee04a1ab0b
errors: model error messages as an optimization problem (#30669)
Error messages for the clingo concretizer have proven challenging. The current messages are incredibly vague and often don't help users at all. Unsat cores in clingo are not guaranteed to be minimal, and lead to cores that are either not useful or need to be post-processed for hours to reach a minimal core.

Following up on an idea from a slack conversation with kwryankrattiger on slack, this PR takes a new approach. We eliminate most integrity constraints and minima/maxima on choice rules in clingo, and instead force invalid states to imply an error predicate. The error predicate can include context on the cause of the error (Package, Version, etc). These error predicates are then heavily optimized against, to ensure that we do not include error facts in the solution when a solution with no error facts could be generated. When post-processing the clingo solution to construct specs, any error facts cause the program to raise an exception. This leads to much more legible error messages. Each error predicate includes a priority and an error message. The error message is formatted by the remaining arguments to produce the error message. The priority is used to ensure that when clingo has a choice of which rules to violate, it chooses the one which will be most informative to the user.

Performance:

"fresh" concretizations appear to suffer a ~20% performance penalty under this branch, while "reuse" concretizations see a speedup of around 33%. 

Possible optimizations if users still see unhelpful messages:

There are currently 3 levels of priority of the error messages. Additional priorities are possible, and can allow us finer granularity to ensure more informative error messages are provided in lieu of less informative ones.

Future work:

Improve tests to ensure that every possible rule implying an error message is exercised
2022-05-20 08:27:07 -07:00
Peter Scheibel
55f4950ed4
Petsc: fix enable-x for virtuals (#30749)
* If direct dependencies provide virtuals, add those virtual names as well
* Also refer to package by virtual name for jpeg
2022-05-20 03:15:44 +00:00