Commit graph

18150 commits

Author SHA1 Message Date
Todd Gamblin
36ec66d997 concretizer: use clingo json output instead of text
Clingo actually has an option to output JSON -- use that instead of
parsing the raw otuput ourselves.

This also allows us to pick the best answer -- modify the parser to
*only* construct a spec for that one rather than building all of them
like we did before.
2020-11-17 10:04:13 -08:00
Todd Gamblin
a332981f2f concretizer: require only one provider for any virtual in the DAG 2020-11-17 10:04:13 -08:00
Todd Gamblin
501cb371c9 concretizer: handle variant defaults with optimization
- Instead of using default logic, handle variant defaults by minimizing
  the number of non-default variants in the solution.

- This actually seems to be pretty fast, and it fixes the long-standing
  issue that writing this:

      spack install hdf5 ^mpich

  will fail if you don't specify hdf5+mpi.  With optimization and
  allowing enums to be enumerated, the solver seems to be able to quickly
  discover that +mpi is the only way hdf5 can depend on mpich, and it
  forces the switch to be thrown.
2020-11-17 10:04:13 -08:00
Todd Gamblin
1cab1b1994 concretizer: support conditional dependencies 2020-11-17 10:04:13 -08:00
Todd Gamblin
51af590e64 variants: allow MultiValuedVariants to be constructed incrementally 2020-11-17 10:04:13 -08:00
Todd Gamblin
be10568a6a concretizer: initial support for virtual dependencies
Add initial support for virtual dependencies.  Solver now knows about all
virtuals and can choose one to resolve a dependency.
2020-11-17 10:04:13 -08:00
Todd Gamblin
3f93553a08 concretizer: print out virtuals 2020-11-17 10:04:13 -08:00
Todd Gamblin
8a6207aa70 concretizer: handle versions with choice construct rather than conflicts
Use '1 { version(x); version(y); version(z) } 1.' instead of declaring
conflicts for non-matching versions.  This keeps the sense of version
clauses positive, which will allow them to be used more easily in
conditionals later.

Also refactor `spec_clauses()` method to return clauses that can be used
in conditions, etc. instead of just printing out facts.
2020-11-17 10:04:13 -08:00
Todd Gamblin
6e31430bec concretizer: add another definition pragma.
- single_value_variant may not be defined by the generated program.  Mark
  it to avoid warnings.
2020-11-17 10:04:13 -08:00
Todd Gamblin
a81258663c concretizer: cleanup 2020-11-17 10:04:13 -08:00
Todd Gamblin
6bbc64555b concretizer: use conditional literals for versions. 2020-11-17 10:04:13 -08:00
Todd Gamblin
4288639770 concretizer: mark depends_on/2 defined for solves without dependencies. 2020-11-17 10:04:13 -08:00
Todd Gamblin
60cf3fdb34 concretizer: add basic semantics for compilers
- This handles setting the compiler and falling back to a default
  compiler, as well as providing default values for compilers/compiler
  versions.

- Versions still aren't quite right -- you can't properly override
  versions on compiler specs.
2020-11-17 10:04:13 -08:00
Todd Gamblin
f7dce19754 concretizer: simplify and move architecture semantics into concretize.lp
- Model architecture default settings and propagation off of variants

- Leverage ASP default logic to set architecture to default if it's not
  set otherwise.

- Move logic out of Python and into concretize.lp as first-order rules.
2020-11-17 10:04:13 -08:00
Todd Gamblin
34ea3d20cf concretizer: break output up into easier-to-understand sections 2020-11-17 10:04:13 -08:00
Todd Gamblin
d94d957536 concretizer: simplify and suppress warnings for variant handling
We are relying on default logic in the variant handling in that we set a
default value if we never see `variant_set(P, V, X)`.

- Move the logic for this into `concretize.lp` instead of generating it
  for every package.

- For programs that don't have explicit variant settings, clingo warns
  that variant_set(P, V, X) doesn't appear in any rule head, because a
  setting is never generated.

  - Specifically suppress this warning.
2020-11-17 10:04:13 -08:00
Todd Gamblin
b171ac5050 concretizer: split long lines in ASP programs 2020-11-17 10:04:13 -08:00
Todd Gamblin
573a2612dc concretizer: split main logic program out into files
- Add `concretize.lp` and `display.lp` as independent files
- Dump them instead of embedded strings
2020-11-17 10:04:13 -08:00
Todd Gamblin
8bc1092f41 concretizer: colorize ASP output 2020-11-17 10:04:13 -08:00
Todd Gamblin
3637b611a7 concretizer: move dump logic into solver.asp
- moving the dump logic into spack.solver.asp.solve() allows us to print
  out useful debug info sooner

- prior approach required a successful solve to print out anyhting.
2020-11-17 10:04:13 -08:00
Todd Gamblin
81e187e410 concretizer: first rudimentary round-trip with asp-based solver 2020-11-17 10:04:13 -08:00
Todd Gamblin
c7812f7e10 concretizer: add rudimentary variants with defaults to ASP solve 2020-11-17 10:04:13 -08:00
Todd Gamblin
a8a6d943d6 concretizer: beginnings of solve() command
- `spack solve` command outputs a really basic ASP program that handles
  unconditional dependencies, architecture and versions

- doesn't yet handle conflicts, picking latest versions, preferred
  versions, compilers, etc.

- doesn't handle variants
2020-11-17 10:04:13 -08:00
Todd Gamblin
5b725a37bc repo: Add all_package_classes() method.
- We were able to get names and instances previously
- Add a convenience function to get package classes
2020-11-17 10:04:13 -08:00
Themos Tsikas
72bc6cdf61
Build 7036 of Nag Fortran Compiler (#19954)
updated sha256sum of download .tgz
2020-11-17 11:14:22 -06:00
Robert Underwood
f359664493
include share/pkgconfig in user environments (#19909)
According to the documentation for spack and pkg-config,
$view/share/pkgconfig should also be a valid place to look
for package config files.  This commit ensures that when
spack activate env $dir is called, the environment has this
directory in PKG_CONFIG_PATH.
2020-11-17 11:10:28 -06:00
t-nojiri
7562e53a5a
clfft: Fix for aarch64 (#19873)
* clfft: Fix for aarch64

* clfft: Changed the patch application conditions.

* clfft: Changed Patch file
2020-11-17 09:59:14 -06:00
Keita Iwabuchi
8ba0ee7a0e
Metall package: add v0.7 (#19950)
* Metall: add version 0.2

* Add Metall v0.3

* Update Metall package to v0.4 and v0.5.

* Metall package: add v0.6

* Metall package: add v0.7
2020-11-17 09:58:36 -06:00
Tamara Dahlgren
6fa6af1070
Support parallel environment builds (#18131)
As of #13100, Spack installs the dependencies of a _single_ spec in parallel.
Environments, when installed, can only get parallelism from each individual
spec, as they're installed in order.  This PR makes entire environments build
in parallel by extending Spack's package installer to accept multiple root
specs.  The install command and Environment class have been updated to use
the new parallel install method.

The specs and kwargs for each *uninstalled* package (when not force-replacing
installations) of an environment are collected, passed to the `PackageInstaller`,
and processed using a single build queue.

This introduces a `BuildRequest` class to track install arguments, and it
significantly cleans up the code used to track package ids during installation.
Package ids in the build queue are now just DAG hashes as you would expect,

Other tasks:

- [x] Finish updating the unit tests based on `PackageInstaller`'s use of
      `BuildRequest` and the associated changes
- [x] Change `environment.py`'s `install_all` to use the `PackageInstaller` directly
- [x] Change the `install` command to leverage the new installation process for multiple specs
- [x] Change install output messages for external packages, e.g.:
       `[+] /usr` -> `[+] /usr (external bzip2-1.0.8-<dag-hash>`
- [x] Fix incomplete environment install's view setup/update and not confirming all 
       packages are installed (?)
- [x] Ensure externally installed package dependencies are properly accounted for in 
       remaining build tasks
- [x] Add tests for coverage (if insufficient and can identity the appropriate, uncovered non-comment lines)
- [x] Add documentation
- [x] Resolve multi-compiler environment install issues
- [x] Fix issue with environment installation reporting (restore CDash/JUnit reports)
2020-11-17 02:41:07 -08:00
Wouter Deconinck
423e80af23
spack edit: accept readonly packages (#19949) 2020-11-16 17:14:46 -08:00
Scott Wittenburg
ef0a555ca2
pipelines: support testing PRs from forks (#19248)
This change makes improvements to the `spack ci rebuild` command
which supports running gitlab pipelines on PRs from forks.  Much
of this has to do with making sure we can run without the secrets
previously required for running gitlab pipelines (e.g signing key,
aws credentials, etc).  Specific improvements in this PR:

Check if spack has precisely one signing key, and use that information
as an additional constraint on whether or not we should attempt to sign
the binary package we create.

Also, if spack does not have at least one public key, add the install
option "--no-check-signature"

If we are running a pipeline without any profile or environment
variables allowing us to push to S3, the pipeline could still
successfully create a buildcache in the artifacts and move on.  So
just print a message and move on if pushing either the buildcache
entry or cdash id file to the remote mirror fails.

When we attempt to generate a pacakge or gpg key index on an S3
mirror, and there is nothing to index, just print a warning and
exit gracefully rather than throw an exception.

Support the use of PR-specific mirrors for temporary binary pkg
storage.  This will allow quality-of-life improvement for developers,
providing a place to store binaries over the lifetime of a PR, so
that they must only wait for packages to rebuild from source when
they push a new commit that causes it to be necessary.

Replace two-pass install with a single pass and the new option:
 --require-full-hash-match.  Doing this also removes the need to
save a copy of the spack.yaml to be copied over the one spack
rewrites in between the two spack install passes.

Work around a mirror configuration issue caused by using
spack.util.executable to do the package installation.

* Update pipeline trigger jobs for PRs from forks

Moving to PRs from forks relies on external synchronization script
pushing special branch names.  Also secrets will only live on the
spack mirror project, and must be propagated to the E4S project via
variables on the trigger jobs.

When this change is merged, pipelines will not run until we update
the "Custom CI configuration path" in the Gitlab CI Settings, as the
name of the file has changed to better reflect its purpose.

* Arg to MirrorCollection is used exclusively, so add main remote mirror to it

* Compute full hash less frequently

* Add tests covering index generation error handling code
2020-11-16 15:16:24 -08:00
vvolkl
ee5ae14a3b
[xerces-c] add netaccessor variant, new version (#19927)
* [xerces-c] add netaccessor variant, new version

* [geant4] add xerces-c netaccessor requirement

* [xerces-c] format
2020-11-16 16:12:53 -06:00
Wouter Deconinck
8752fc5872
[pythia6] needs CFLAGS/FFLAGS=-fcommon when %gcc@10: (#19947) 2020-11-16 16:12:20 -06:00
Jordan Ogas
385f5b8c53
node-js add gcc 4.8 conflict (#19945)
* add gcc 4.8 conflict

* commit suggestion

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2020-11-16 16:11:26 -06:00
eugeneswalker
81a7ae2c27
llvm: add variant: llvm_dylib (LLVM_BUILD_LLVM_DYLIB:Bool) (#19701) 2020-11-16 14:10:20 -08:00
Phil Tooley
42008e532f
WRF: Add version 3.9.1.1 and improve recipe robustness (#19882)
* Add WRF 3.9.1.1 and improve recipe robustness

* Include version 3.9.1.1 as common benchmarking workload
* Fix compilation against recent glibc (detect spack installed libtirpc)
* Detect and handle failed compilation (upstream use make -i)

* WRF: PR changes round 1
fix build jobs
fix maintainers
fix pkgconfig dependency
use Executable to run compile stage
repair some overzealous autoformatting by black

* WRF: make recipe py26 compatible

* wrf: recipe review changes round 2

* more python 26 fixes
2020-11-16 15:56:39 -06:00
Dr. Christian Tacke
8d50427c45
vgm: Switch all URLs to https (#19943) 2020-11-16 13:31:53 -06:00
Hadrien G
c512d0f408
[acts] Add versions 1.2.1 and 2.0.0 (#19936) 2020-11-16 13:28:55 -06:00
Ruben Di Battista
1fb8ae42e0
texlive: Fix install of @live version (#19941)
The unattended install using the pre-compiled binaries (tl-install)
needs a .profile file or it goes in interactive mode blocking the
install process forever
2020-11-16 13:26:31 -06:00
Satish Balay
6142ab56c7
Trilinos: update 13.0.1 (#19944) 2020-11-16 13:55:48 -05:00
Andreas Baumbach
a8fccdbddd
add new version py-wavelets@1.1.1 (#19930)
* add new version py-wavelets@1.1.1

* also update dependencies

* Update package.py
2020-11-16 10:41:17 -06:00
t-nojiri
793af74eb4
graphmap: Fix for aarch64 (#19935) 2020-11-16 10:41:00 -06:00
Matthieu Dorier
59d0c17654
Added new versions for the py-attrs package (#19938) 2020-11-16 10:39:49 -06:00
vvolkl
b6843e1a82
[dd4hep] switch to ninja generator to avoid running out of memory … (#19940)
* [dd4hep] switch to ninja generator to avoid running out of memory while compiling ddparsers

* [dd4hep] format
2020-11-16 10:38:50 -06:00
Dr. Christian Tacke
0aa55d426c
vmc: Add Version 1-0-p3 (#19942) 2020-11-16 10:36:32 -06:00
Andreas Baumbach
6aaa44c929
add new version py-tifffile@2020.10.1 (#19929)
* add new version py-tifffile@2020.10.1

* also update dependencies

* Update package.py
2020-11-16 10:08:40 -06:00
Tomoki, Karatsu
9c4733ab59
py-numpy: Add Fujitsu Fortran compiler to compiler type. (#19858)
* py-numpy: Add Fujitsu Fortran compiler to compiler type.

py-scipy: Specify Fujitsu to fcompiler types.

* Create patches applicable to each version.
2020-11-16 10:05:45 -06:00
Dr. Christian Tacke
5e904e37bb
singularity: added v3.6.4 (#19939) 2020-11-16 13:33:54 +01:00
Adam J. Stewart
3536433c41
macOS: Big Sur reports as either 10.16 or 11.0 (#19900) 2020-11-15 11:54:39 -06:00
Joseph Wang
b218991283
fix a typo in podio package script (#19928) 2020-11-15 11:33:19 -06:00