Commit graph

4267 commits

Author SHA1 Message Date
Massimiliano Culpo
fcb4dfc307
Ensure variant defaults are parsable from CLI. (#18661)
- Add a unit test to check if there are unparsable defaults
- Fix 'rust' and 'nsimd' variants
2020-09-19 07:54:26 +02:00
Greg Becker
7585b37865
do out of source builds in hashed directories (#18574) 2020-09-18 12:21:13 -07:00
Greg Becker
2e4892c111
env view failures: print underlying error message (#18713) 2020-09-18 10:21:14 -07:00
Scott Wittenburg
28ef5b1204 Do not assume we sit in the directory where the env file lives. 2020-09-14 10:37:42 -06:00
Scott Wittenburg
031490f6aa Remove :<name> interpolation, add SPACK_VERSION variables
Also fix issues with documentation to reflect changes
2020-09-14 10:37:42 -06:00
Scott Wittenburg
bf90cdd6c7 Document pipeline keys which can be global but overridden
Update pipelines documentation to describe how 'tags', 'variables',
'image', 'before_script', 'script', and 'after_script' can be
supplied at the top level, to be used by any of the runner mappings,
and also overridden by any of the runner mappings.

Also show an example of capturing the custom spack SHA at pipeline
generation time, so all jobs are sure to run with the same version
of spack, as a means to illustrate the $env:VARIABLE_NAME syntax.
2020-09-14 10:37:42 -06:00
Scott Wittenburg
d9e0718c9d Allow overridable global runner attributes 2020-09-14 10:37:42 -06:00
Scott Wittenburg
e686f1500e Update pipeline documentation to describe user-provided scripts 2020-09-14 10:37:42 -06:00
Scott Wittenburg
e18612a321 Add test for variable interpolation and scripts 2020-09-14 10:37:42 -06:00
Scott Wittenburg
2386f7582a Support variable interpolation at pipeline generation time 2020-09-14 10:37:42 -06:00
Scott Wittenburg
ace52bd476 Provide your own script, before_script, and after_script 2020-09-14 10:37:42 -06:00
Massimiliano Culpo
4ca7d46e15
Fix a typo in test/concretize.pyi (#18662) 2020-09-14 09:58:14 -05:00
Richarda Butler
8116153f2a
bugfix: include configuration ignoring files with the same basename (#18487)
* Use the config path instead of the basename

* Removing unused variables

Co-authored-by: Greg Becker <becker33@llnl.gov>

* Test
Making sure if there are 2 include config files with the same basename they are both implemented

* Edit test assert

Co-authored-by: Greg Becker <becker33@llnl.gov>
2020-09-11 16:45:36 -07:00
Massimiliano Culpo
8ad2cc2acf
Environments: Avoid inconsistent state on failed write (#18538)
Fixes #18441 

When writing an environment, there are cases where the lock file for
the environment may be removed. In this case there was a period 
between removing the lock file and writing the new manifest file
where an exception could leave the manifest in its old state (in
which case the lock and manifest would be out of sync).

This adds a context manager which is used to restore the prior lock
file state in cases where the manifest file cannot be written.
2020-09-11 10:57:29 -07:00
Rémi Lacroix
fa04ad5d92
tcl module files: fix configuration overriding (#18514)
This is a special case of overriding since each section is being matched with the current spec.

The trailing ':' for sections with override is now removed when parsing the configuration so the special handling for the modules configuration stopped working but it went unnoticed.
2020-09-09 18:05:58 +02:00
Tamara Dahlgren
88749de5c9
Clarify manual download required if unable to fetch package (#18242)
Clarify manual download required if unable to fetch (from mirror(s)); support (and tests) for package-specific download instructions
2020-09-08 17:15:48 -07:00
Richarda Butler
d721bd8070
commands: update help for spack install --yes-to-all (#18367)
`spack install --yes-to-all` doesn't actually make the build non-interactive,
but that is why people typically use it. This documents that you must also
specify `--no-checksum` for a fully non-interactive build.
2020-09-08 13:18:25 -07:00
Peter Josef Scheibel
ccd65895a6 print out debug information about which specs are applying which constraints 2020-09-08 12:19:02 -07:00
Adam J. Stewart
94e694b19f
spack docs: http -> https (#18573) 2020-09-08 20:19:20 +02:00
Rémi Lacroix
92bf9493cf
Modules: Deduplicate suffixes but don't sort them. (#18351)
* Modules: Deduplicate suffixes but don't sort them.

The suffixes' order is defined by the order in which they appear in the configuration file.

* Modules: Modify tests to use spack_yaml.load_config.

spack_yaml.load_config ensures that the configuration is stored in an ordered manner. Without this change, the behavior of the tests did not match Spack's.

* Modules: Tweak the suffixes test to better catch ordering issues.
2020-09-08 08:43:03 -06:00
Massimiliano Culpo
28c6ce9714
SpecList: remove mutable types from __init__ arguments (#18515)
fixes #18439
2020-09-07 11:53:59 -07:00
Robert Blake
ea57171712
Make spack environment configurations writable from spack external and spack compiler find (#18165)
* spack config: default modification scope can be an environment

The previous model was that environments are the highest priority config
scope for config reading operations, but were not considered for config
writing operations. Now, the active environment is the highest priority
config scope for both reading and writing operations.

Now spack config add, spack external find and spack compiler set environment 
configuration in the environment by default if an environment is active. This is a
change in default behavior for these routines, but better matches the mental
model for an environment taking precedence over the user's default config file.

* add scope argument to 'spack external find' to choose non-default scope

* Increase testing for config modifications on environments

Co-authored-by: Gregory Becker <becker33@llnl.gov>
2020-09-05 01:12:26 -07:00
Adam J. Stewart
7d9f2bf4ed
depends_on cannot handle ^ sigil (#18220)
* depends_on cannot handle ^ sigil

* cardioid+mfem+cuda requires hypre+cuda

* Document this limitation

* Move warning message to Known Issues docs

* Better handling of parmetis dep
2020-09-03 17:31:00 -05:00
Adam J. Stewart
7728b0737b
Add new MavenPackage build system base class (#18185)
* Add new MavenPackage build system base class

* Fix flake8 and doc tests

* More specific regex

* Java 8 required for these packages
2020-09-03 17:30:39 -05:00
Massimiliano Culpo
fab2622a71
Hashing: force hash consistency for values read from config (#18446)
The 'external_modules' attribute on a Spec, when read from a YAML
configuration file, may contain extra formatting that is lost when
that Spec is written-to/read-from JSON format. This was resulting in
a hashing instability (when the Spec was read back, it would report a
different hash). This commit adds a function which removes the extra
formatting from 'external_modules' as it is passed to the Spec in
__init__ to ensure a consistent hash.
2020-09-03 10:49:36 -07:00
Adam J. Stewart
741bb9bafe
install/install_tree: glob support (#18376)
* install/install_tree: glob support

* Add unit tests

* Update existing packages

* Raise error if glob finds no files, document function raises
2020-09-03 10:47:19 -07:00
Tamara Dahlgren
84381fbc80
Bugfix: terminate if a spack.yaml include path does not exist (#18074) 2020-09-03 14:37:24 +02:00
Adam J. Stewart
443407cda5
Add new RubyPackage build system base class (#18199)
* Add new RubyPackage build system base class

* Ruby: add spack external find support

* Add build tests for RubyPackage
2020-09-02 16:26:36 -07:00
Adam J. Stewart
e58db067c3
PythonPackage: update documentation (#18181) 2020-09-02 15:05:10 -07:00
Adam J. Stewart
8eb375bf81
spack test: no gpg signing for git commits (#18454) 2020-09-02 14:48:48 -07:00
Adam J. Stewart
1992fdf712
Document test dependency type (#18365) 2020-09-02 13:46:52 -07:00
Rui Xue
d9b945f663
Mac OS: support Python >= 3.8 by using fork-based multiprocessing (#18124)
As detailed in https://bugs.python.org/issue33725, starting new
processes with 'fork' on Mac OS is not guaranteed to work in general.
As of Python 3.8 the default process spawning mechanism was changed
to avoid this issue.

Spack depends on the fork-based method to preserve file descriptors
transparently, to preserve global state, and to avoid pickling some
objects. An effort is underway to remove dependence on fork-based
process spawning (see #18205). In the meantime, this allows Spack to
run with Python 3.8 on Mac OS by explicitly choosing to use 'fork'.

Co-authored-by: Peter Josef Scheibel <scheibel1@llnl.gov>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2020-09-02 00:15:39 -07:00
Adam J. Stewart
17f7b23783
Deprecate spack setup (#18240) 2020-09-01 18:07:48 -07:00
Patrick Gartung
ae44a8ff64
test/relocate.py: skip tests involving patchelf on macOS (#18451) 2020-09-01 14:49:05 -05:00
Adam J. Stewart
f4a37b2dc2
Remove unmatched triple quotes (#18272) 2020-08-31 13:05:07 +02:00
Greg Becker
d10dff1b89
docs: add main version to docs for develop-like versions (#18328) 2020-08-27 12:35:11 -07:00
Richarda Butler
416afa0059
docs: fix bugs in contribution, getting started guides (#18216)
Co-authored-by: Greg Becker <becker33@llnl.gov>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2020-08-27 08:23:26 +02:00
Massimiliano Culpo
96ac5add9d
release procedure: add step to activate the documentation on readthedocs (#18288) 2020-08-26 12:47:47 -07:00
George Hartzell
b53b9fd17e
Fix redundant reset of terminal in prompt example (#17698)
I know that it's just an example, but I was trying to figure out what was going on and it wasn't making sense....

`tput sgr0` resets the terminal state (http://linuxcommand.org/lc3_adv_tput.php) and I can't see any reason to do it twice.  Deleting the second occurrence doesn't seem to break the fancy prompt effect.
2020-08-22 13:27:39 -05:00
Richarda Butler
d599e4d9d4
Added the file path for running a specific test (#18214) 2020-08-21 17:42:24 -05:00
Michael Kuhn
11b1ce84cf
docs: List tar and some compressors in prerequisites (#18169)
Fixes #18152
2020-08-20 17:13:47 -05:00
Greg Becker
ad9cd25285
allow external packages that violate conflicts (#18183) 2020-08-20 10:16:48 -07:00
Massimiliano Culpo
1addcff724
Test "is_extension" after a round trip to dict (#18188)
closes #3887
closes #3853
2020-08-20 08:08:49 -07:00
Greg Becker
ccf94ded67
Compilers: use Compiler._real_version for flag version checks (#18179)
Compilers can have strange versions, as the version is provided by the user.  We know the real version internally, (by querying the compiler) so expose it as a property and use it in places we don't trust the user.  Eventually we'll refactor this with compilers as dependencies, but this is the best fix we've got for now.

- [x] Make `real_version` a property and cache the version returned by the compiler
- [x] Use `real_version` to make C++ language level flags work
2020-08-19 21:56:06 -07:00
Tamara Dahlgren
1c0a92662b
Restore curl progress output (#18127)
Restores the fetching progress bar sans failure outputs; restores non-debug reporting of using fetch cache for installed packages; and adds a unit test.

* Add status bar check to test and fetch output when already installed
2020-08-19 12:10:18 -07:00
Michael Kuhn
b6321cdfa9
microarchitectures: Fix icelake (#18151)
Some of the feature flags are named differently and clwb is missing on
my i7-1065G7. cascadelake and cannonlake might have similar problems but
I do not have access to those architectures to test.
2020-08-19 11:49:43 +02:00
Massimiliano Culpo
1ed70d0e2c
'spack env update' can handle overrides (#18149)
fixes #18147

Before this commit the command erroneously reported
"Additional properties not allowed" for keys with a
double colon.
2020-08-18 17:05:25 +02:00
eugeneswalker
1b965ac507
Binary Distribution: Relocate RPATH on Cray (#18110)
* make_package_relative: relocate rpaths on cray

* relocate_package: relocate rpaths on cray

* platforms: add `binary_formats` property

We need to know which binary formats are supported on a platform so we
know which types of relocations to try. This adds a list of binary
formats to the platform and removes a bunch of special cases from
`binary_distribution.py`.

Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2020-08-17 13:21:36 -07:00
Massimiliano Culpo
395b478b1b
spack config update (bugfix): packages.yaml with empty attributes (#18057)
Before this PR, packages.yaml files that contained an
empty "paths" or "modules" attribute were not updated
correctly, since the update function was not reporting
them as changed after the update.

This PR fixes that issue and adds a unit test to
avoid regression.
2020-08-14 19:31:55 -07:00
Massimiliano Culpo
31f660bd90
Improve output of the external find command (#18017)
This commit adds output to the "spack external find"
command to inform users of the result of the operation.

It also fixes a bug introduced in #17804 due to the fact
that a function was not updated to conform to the new
packages.yaml format (_get_predefined_externals).
2020-08-13 14:36:58 -07:00
Harmen Stoppels
d6587ea365
fix buildcache create for environments with uninstalled root specs (#17859)
* Handle uninstalled rootspecs in buildcache

- Do not parse specs / find matching specs when in an environment and no
package string is provided
- Error only when a spec.yaml or spec string are not installed. In an
environment it is fine when the root spec does not exist.
- When iterating through the matched specs, simply skip uninstalled
packages
2020-08-13 09:59:20 -07:00
Massimiliano Culpo
d2f56830f1
"spack config update" can handle comments in YAML files (#18045)
fixes #18031

With this fix "spack config update" can update YAML
files that contain comments, while previously it
couldn't.
2020-08-13 09:54:07 -07:00
Todd Gamblin
b476f8aa63 Merge tag 'v0.15.4' into develop 2020-08-13 07:23:02 -07:00
Todd Gamblin
091b45c3c7 bump version number for 0.15.4 2020-08-13 00:33:31 -07:00
Massimiliano Culpo
1707448fde Move Python 2.6 unit tests to Github Actions (#17279)
* Run Python2.6 unit tests on Github Actions
* Skip url tests on Python 2.6 to reduce waiting times
* Skip foreground background tests on Python 2.6 to reduce waiting times
* Removed references to Travis in the documentation
* Deleted install_patchelf.sh (can be installed from repo on CentOS 6)
2020-08-13 00:33:31 -07:00
Patrick Gartung
4d25481473 Buildcache: bindist test without invoking spack compiler wrappers. (#15687)
* Buildcache:
   * Try mocking an install of quux, corge and garply using prebuilt binaries
   * Put patchelf install after ccache restore
   * Add script to install patchelf from source so it can be used on Ubuntu:Trusty which does not have a patchelf pat package. The script will skip building on macOS
   * Remove mirror at end of bindist test
   * Add patchelf to Ubuntu build env
   * Revert mock patchelf package to allow other tests to run.
   * Remove depends_on('patchelf', type='build') relying instead on
   * Test fixture to ensure patchelf is available.

* Call g++ command to build libraries directly during test build

* Flake8

* Install patchelf in before_install stage using apt unless on Trusty where a build is done.

* Add some symbolic links between packages

* Flake8

* Flake8:

* Update mock packages to write their own source files

* Create the stage because spec search does not create it any longer

* updates after change of list command arguments

* cleanup after merge

* flake8
2020-08-13 00:33:31 -07:00
Todd Gamblin
303882834a docs: document releases and branches in Spack
- [x] Remove references to `master` branch
- [x] Document how release branches are structured
- [x] Document how to make a major release
- [x] Document how to make a point release
- [x] Document how to do work in our release projects
2020-08-13 00:33:31 -07:00
Todd Gamblin
5b63ec8652 Remove references to master from CI
- [x] remove master from github actions
- [x] remove master from .travis.yml
- [x] make `develop` the default branch for `spack ci`
2020-08-13 00:30:51 -07:00
Massimiliano Culpo
fc94dde3fc Moved flake8, shell and documentation tests to Github Action (#17328)
* Move flake8 tests on Github Actions

* Move shell test to Github Actions

* Moved documentation build to Github Action

* Don't run coverage on Python 2.6

Since we get connection errors consistently on Travis
when trying to upload coverage results for Python 2.6,
avoid computing coverage entirely to speed-up tests.
2020-08-13 00:30:51 -07:00
Todd Gamblin
c05fa25057 bugfix: fix spack -V with releases/latest and shallow clones (#17884)
`spack -V` stopped working when we added the `releases/latest` tag to
track the most recent release. It started just reporting the version,
even on a `develop` checkout. We need to tell it to *only* search for
tags that start with `v`, so that it will ignore `releases/latest`.

`spack -V` also would print out unwanted git eror output on a shallow
clone.

- [x] add `--match 'v*'` to `git describe` arguments
- [x] route error output to `os.devnull`
2020-08-12 23:58:10 -07:00
Patrick Gartung
8e2f41fe18 Buildcache create: change NoOverwriteException back to a warning as in v0.14 (#17832)
* Change buildcache create `NoOverwriteException` back to a warning.
2020-08-12 23:58:10 -07:00
Todd Gamblin
5f8ab69396 bugfix: fix spack buildcache list --allarch
`spack buildcache list` was trying to construct an `Arch` object and
compare it to `arch_for_spec(<spec>)`. for each spec in the buildcache.
`Arch` objects are only intended to be constructed for the machine they
describe. The `ArchSpec` object (part of the `Spec`) is the descriptor
that lets us talk about architectures anywhere.

- [x] Modify `spack buildcache list` and `spack buildcache install` to
      filter with `Spec` matching instead of using `Arch`.
2020-08-12 23:58:10 -07:00
Todd Gamblin
aff0e8b592 architecture: make it easier to get a Spec for the default arch
- [x] Make it easier to get a `Spec` with a proper `ArchSpec` from an
      `Arch` object via new `Arch.to_spec()` method.

- [x] Pull `spack.architecture.default_arch()` out of
      `spack.architecture.sys_type()` so we can get an `Arch` instead of
      a string.
2020-08-12 23:58:10 -07:00
eugeneswalker
7302dd834f allow GNUPGHOME to come from SPACK_GNUPGHOME in env, if set (#17139) 2020-08-12 22:57:57 -07:00
Chris White
105caa7297
Axom + Conduit updates (#17863)
* Loosen Axom's variants, add shared variant for axom, fix clang/xlf rpath'ing problem on blueos

* Fix flake8

* Add main branch to list of known git branches
2020-08-12 20:15:59 -05:00
Harmen Stoppels
edcc334631
Respect $PATH ordering when registering compilers (#17967) 2020-08-12 13:38:08 +02:00
Massimiliano Culpo
6cda20472e
Fix loading of compiler modules on CRAY (#17984)
The modifications in 193e8333fa
introduced a bug in the loading of compiler modules, since a
function that was expecting a list of string was just getting
a string.

This commit fixes the bug and adds an assertion to verify the
prerequisite of the function.
2020-08-11 10:11:01 +02:00
Adam J. Stewart
f0c0cd5c3f
Fix typo in spack external debug msg (#17982) 2020-08-11 09:55:44 +02:00
Massimiliano Culpo
1dba0ce81b Removed references to BlueGene/Q in docs and comments 2020-08-10 17:09:09 -07:00
Massimiliano Culpo
98701279df Removed references to BlueGene/Q in core Spack 2020-08-10 17:09:09 -07:00
Massimiliano Culpo
c0d490ffbe Simplify the detection protocol for packages
Packages can implement “detect_version” to support detection
of external instances of a package. This is generally easier
than implementing “determine_spec_details”. The API for
determine_version is similar: for example you can return
“None” to indicate that an executable is not an instance
of a package.

Users may implement a “determine_variants” method for a package.
When doing external detection, executables are grouped by version
and each group results in a single invocation of “determine_variants”
for the associated spec. The method returns a string specifying
the variants for the package. The method may additionally return
a dictionary representing extra attributes for the package.

These will be stored in the spec yaml and can be retrieved
from self.spec.extra_attributes

The Spack GCC package has been updated with an implementation
of “determine_variants” which adds the following extra
attributes to the package: c, cxx, fortran
2020-08-10 11:59:05 -07:00
Massimiliano Culpo
193e8333fa Update packages.yaml format and support configuration updates
The YAML config for paths and modules of external packages has
changed: the new format allows a single spec to load multiple
modules. Spack will automatically convert from the old format
when reading the configs (the updates do not add new essential
properties, so this change in Spack is backwards-compatible).

With this update, Spack cannot modify existing configs/environments
without updating them (e.g. “spack config add” will fail if the
configuration is in a format that predates this PR). The user is
prompted to do this explicitly and commands are provided. All
config scopes can be updated at once. Each environment must be
updated one at a time.
2020-08-10 11:59:05 -07:00
Michael Kuhn
8c1329958c
Hotfix for config singleton initialization (#17263)
Fixes #17262
2020-08-10 07:48:33 +02:00
Todd Gamblin
7c9c486d07
deptypes: move deptype formatting code from Spec.format to dependency.py (#17843)
- This simplifies Spec.format somewhat
- Makes code to generate deptype strings (e.g., '[blrt]') reusable
2020-08-09 15:33:31 -07:00
Tomoki, Karatsu
c83236d3a4
Fujitsu compiler: Accept alphabet as version. (#17890)
* Fujitsu compiler: Accept alphabet as version.

* Fujitsu copiler: Updated test pattern.
2020-08-07 09:06:22 -05:00
Todd Gamblin
9dbe1d7776
bugfix: fix spack -V with releases/latest and shallow clones (#17884)
`spack -V` stopped working when we added the `releases/latest` tag to
track the most recent release. It started just reporting the version,
even on a `develop` checkout. We need to tell it to *only* search for
tags that start with `v`, so that it will ignore `releases/latest`.

`spack -V` also would print out unwanted git eror output on a shallow
clone.

- [x] add `--match 'v*'` to `git describe` arguments
- [x] route error output to `os.devnull`
2020-08-05 17:01:18 -07:00
Harmen Stoppels
c07102ac9f
Fix typo: yaml -> json (#17854) 2020-08-03 23:11:41 -05:00
Harmen Stoppels
827ca72c26
Fix docs about containers on cray (#17431)
* For detecting Cray: CRAYPE_VERSION is not used, but MODULEPATH

* Fix typo and write Cray with a capital
2020-08-03 16:16:18 -07:00
Patrick Gartung
33116d730d
Buildcache create: change NoOverwriteException back to a warning as in v0.14 (#17832)
* Change buildcache create `NoOverwriteException` back to a warning.
2020-08-02 13:52:15 -07:00
Patrick Gartung
f29dd48101 Add bindist tests for macOS. 2020-08-02 13:51:14 -07:00
Todd Gamblin
ff27233e30 bugfix: fix spack buildcache list --allarch
`spack buildcache list` was trying to construct an `Arch` object and
compare it to `arch_for_spec(<spec>)`. for each spec in the buildcache.
`Arch` objects are only intended to be constructed for the machine they
describe. The `ArchSpec` object (part of the `Spec`) is the descriptor
that lets us talk about architectures anywhere.

- [x] Modify `spack buildcache list` and `spack buildcache install` to
      filter with `Spec` matching instead of using `Arch`.
2020-08-01 08:36:12 -07:00
Todd Gamblin
0c48f0a15d architecture: make it easier to get a Spec for the default arch
- [x] Make it easier to get a `Spec` with a proper `ArchSpec` from an
      `Arch` object via new `Arch.to_spec()` method.

- [x] Pull `spack.architecture.default_arch()` out of
      `spack.architecture.sys_type()` so we can get an `Arch` instead of
      a string.
2020-08-01 08:36:12 -07:00
Massimiliano Culpo
9dbad500bc
Move Python 2.6 unit tests to Github Actions (#17279)
* Run Python2.6 unit tests on Github Actions
* Skip url tests on Python 2.6 to reduce waiting times
* Skip foreground background tests on Python 2.6 to reduce waiting times
* Removed references to Travis in the documentation
* Deleted install_patchelf.sh (can be installed from repo on CentOS 6)
2020-07-31 15:01:12 -07:00
Todd Gamblin
f24dd29cd2 Merge tag 'v0.15.3' into develop 2020-07-28 02:18:30 -07:00
Todd Gamblin
ae4bbbd241 bump version number for 0.15.3 2020-07-28 02:05:26 -07:00
Greg Becker
24bd9e3039 bugfix: allow relative view paths (#17721)
Relative paths in views have been broken since #17608 or earlier.

- [x] Fix by passing base path of the environment into the `ViewDescriptor`.
      Relative paths are calculated from this path.
2020-07-27 23:48:59 -07:00
Greg Becker
158ee6ac25
bugfix: allow relative view paths (#17721)
Relative paths in views have been broken since #17608 or earlier.

- [x] Fix by passing base path of the environment into the `ViewDescriptor`.
      Relative paths are calculated from this path.
2020-07-27 23:44:56 -07:00
Patrick Gartung
69775fcc07 Relocation of sbang needs to be done when the spack prefix changes even if the install tree has not changed. (#17455) 2020-07-27 11:38:48 -07:00
Patrick Gartung
ce772420dd Relocate rpaths for all binaries, then do text bin replacement if the rpaths still exist after running patchelf/otool (#17418) 2020-07-27 11:28:50 -07:00
Todd Gamblin
8d8cf6201b bugfix: don't redundantly print ChildErrors (#17709)
A bug was introduced in #13100 where ChildErrors would be redundantly
printed when raised during a build. We should eventually revisit error
handling in builds and figure out what the right separation of
responsibilities is for distributed builds, but for now just skip
printing.

- [x] SpackErrors were designed to be printed by the forked process, not
      by the parent, so check if they've already been printed.
- [x] update tests
2020-07-26 22:43:10 -07:00
Todd Gamblin
d351946194
bugfix: don't redundantly print ChildErrors (#17709)
A bug was introduced in #13100 where ChildErrors would be redundantly
printed when raised during a build. We should eventually revisit error
handling in builds and figure out what the right separation of
responsibilities is for distributed builds, but for now just skip
printing.

- [x] SpackErrors were designed to be printed by the forked process, not
      by the parent, so check if they've already been printed.
- [x] update tests
2020-07-26 22:41:55 -07:00
Dennis Klein
0c63c94103
Relax architecture compatibility check (#15972)
* Relax architecture compatibility check
* Add test coverage for the spack.abi module
2020-07-24 10:00:55 -07:00
Adam J. Stewart
f73a3d35a8
spack help --spec: add compiler flags (#17584) 2020-07-24 17:27:43 +02:00
Dmitriy
02f14fd857
Initialize new_specs in Environment.remove() (#17592) 2020-07-24 17:18:40 +02:00
Gregory Becker
63db5499ee Merge tag 'v0.15.2' into develop 2020-07-23 16:55:22 -07:00
Gregory Becker
3534717151 bump version number for 0.15.2 2020-07-23 16:04:08 -07:00
Chuck Atkins
547c71ad78
Revert "Add libglvnd packages/Add EGL support (#14572)" (#17682)
This reverts commit 573489db71.
2020-07-23 17:41:48 -04:00
Greg Becker
ed8250e055 cray: detect shasta os properly (#17467)
Fixes #17299

Cray Shasta systems appear to use an unmodified Sles or other Linux operating system on the backend (like Cray "Cluster" systems and unlike Cray "XC40" systems that use CNL).

This updates the CNL version detection to properly note that this is the underlying OS instead of CNL and delegate to LinuxDistro.
2020-07-23 14:01:09 -07:00
robo-wylder
40cd845479 environment-views: fix bug where missing recipe/repo breaks env commands (#17608)
* environment-views: fix bug where missing recipe/repo breaks env commands

When a recipe or a repo has been removed from Spack and an environment
is active, it causes the view activation to crash Spack before any
commands can be executed. Further, the error message it not at all clear
in explaining the issue.

This forces view regeneration to always start from scratch to avoid the
missing package recipes, and defaults add_view=False in main for views activated
by the `spack -e` option.

* add messages to env status and deactivate

Warn users that a view may be corrupt when deactivating an environment
or checking its status while active. Updated message for activate.

* tests for view checking

Co-authored-by: Gregory Becker <becker33@llnl.gov>
2020-07-23 14:00:42 -07:00
Peter Scheibel
3b45241566 Update fetch order to match iteration order of MirrorReference (#17572) 2020-07-23 14:00:14 -07:00
Tamara Dahlgren
d5b0f85ea3 Reduce output verbosity with debug levels (#17546)
* switch from bool to int debug levels

* Added debug options and changed lock logging to use more detailed values

* Limit installer and timestamp PIDs to standard debug output

* Reduced verbosity of fetch/stage/install output, changing most to debug level 1

* Combine lock log methods; change build process install to debug

* Changed binary cache install messages to extraction messages
2020-07-23 13:59:12 -07:00
eugeneswalker
c6241e72a6 bugfix: use getattr for variation.prefix/suffix (#17669) 2020-07-23 13:56:45 -07:00
Todd Gamblin
f528022a7d bugfix: make compiler preferences slightly saner (#17590)
* bugfix: make compiler preferences slightly saner

This fixes two issues with the way we currently select compilers.

If multiple compilers have the same "id" (os/arch/compiler/version), we
currently prefer them by picking this one with the most supported
languages.  This can have some surprising effects:

* If you have no `gfortran` but you have `gfortran-8`, you can detect
  `clang` that has no configured C compiler -- just `f77` and `f90`. This
  happens frequently on macOS with homebrew. The bug is due to some
  kludginess about the way we detect mixed `clang`/`gfortran`.

* We can prefer suffixed versions of compilers to non-suffixed versions,
  which means we may select `clang-gpu` over `clang` at LLNL. But,
  `clang-gpu` is not actually clang, and it can break builds. We should
  prefer `clang` if it's available.

- [x] prefer compilers that have C compilers and prefer no name variation
  to variation.

* tests: add test for which()
2020-07-23 13:56:18 -07:00
Harmen Stoppels
665a47607e ci pipelines: activate environment without view (#17440) 2020-07-23 13:55:46 -07:00
Todd Gamblin
12958497dc bugfix: ignore Apple's "gcc" by default (#17589)
Apple's gcc is really clang. We previously ignored it by default but
there was a regression in #17110.

Originally we checked for all clang versions with this, but I know of
none other than `gcc` on macos that actually do this, so limiting to
`apple-clang` should be ok.

- [x] Fix check for `apple-clang` in `gcc.py` to use version detection
  from `spack.compilers.apple_clang`
2020-07-23 13:55:11 -07:00
Scott Wittenburg
3a8bc7ffc6 buildcache: list all mirrors even if one fails 2020-07-23 13:54:36 -07:00
Scott Wittenburg
9cbe358f84 Bugfix/install missing compiler from buildcache (#17536)
Ensure compilers installed from buildcache are registered.
2020-07-23 13:53:46 -07:00
Harmen Stoppels
24dff9cf20 Fix security issue in CI (#17545)
The `spack-build-env.txt` file may contains many secrets, but the obvious one is the private signing key in `SPACK_SIGNING_KEY`. This file is nonetheless uploaded as a build artifact to gitlab. For anyone running CI on a public version of Gitlab this is a major security problem. Even for private Gitlab instances it can be very problematic.

Co-authored-by: Scott Wittenburg <scott.wittenburg@kitware.com>
2020-07-23 13:52:09 -07:00
Sajid Ali
5e5cc99147 clear mpicc and friends before each build (#17450)
* clear mpi env vars
2020-07-23 13:48:47 -07:00
Greg Becker
44bc176d08
cray: detect shasta os properly (#17467)
Fixes #17299

Cray Shasta systems appear to use an unmodified Sles or other Linux operating system on the backend (like Cray "Cluster" systems and unlike Cray "XC40" systems that use CNL).

This updates the CNL version detection to properly note that this is the underlying OS instead of CNL and delegate to LinuxDistro.
2020-07-23 13:20:03 -07:00
robo-wylder
3c145b42bc
environment-views: fix bug where missing recipe/repo breaks env commands (#17608)
* environment-views: fix bug where missing recipe/repo breaks env commands

When a recipe or a repo has been removed from Spack and an environment
is active, it causes the view activation to crash Spack before any
commands can be executed. Further, the error message it not at all clear
in explaining the issue.

This forces view regeneration to always start from scratch to avoid the
missing package recipes, and defaults add_view=False in main for views activated
by the `spack -e` option.

* add messages to env status and deactivate

Warn users that a view may be corrupt when deactivating an environment
or checking its status while active. Updated message for activate.

* tests for view checking

Co-authored-by: Gregory Becker <becker33@llnl.gov>
2020-07-23 11:00:58 -07:00
Peter Scheibel
ae82650174
Update fetch order to match iteration order of MirrorReference (#17572) 2020-07-23 10:58:59 -07:00
Greg Becker
e8aa737b09
util.executable.which: handle path separators like /bin/which (#17668)
* util.executable.which: handle path separators like /bin/which

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2020-07-23 10:54:25 -07:00
Tamara Dahlgren
605c1a76e0
Reduce output verbosity with debug levels (#17546)
* switch from bool to int debug levels

* Added debug options and changed lock logging to use more detailed values

* Limit installer and timestamp PIDs to standard debug output

* Reduced verbosity of fetch/stage/install output, changing most to debug level 1

* Combine lock log methods; change build process install to debug

* Changed binary cache install messages to extraction messages
2020-07-23 00:49:57 -07:00
eugeneswalker
f1eec05d0e
bugfix: use getattr for variation.prefix/suffix (#17669) 2020-07-22 16:15:25 -07:00
Todd Gamblin
0c44a9a504
bugfix: make compiler preferences slightly saner (#17590)
* bugfix: make compiler preferences slightly saner

This fixes two issues with the way we currently select compilers.

If multiple compilers have the same "id" (os/arch/compiler/version), we
currently prefer them by picking this one with the most supported
languages.  This can have some surprising effects:

* If you have no `gfortran` but you have `gfortran-8`, you can detect
  `clang` that has no configured C compiler -- just `f77` and `f90`. This
  happens frequently on macOS with homebrew. The bug is due to some
  kludginess about the way we detect mixed `clang`/`gfortran`.

* We can prefer suffixed versions of compilers to non-suffixed versions,
  which means we may select `clang-gpu` over `clang` at LLNL. But,
  `clang-gpu` is not actually clang, and it can break builds. We should
  prefer `clang` if it's available.

- [x] prefer compilers that have C compilers and prefer no name variation
  to variation.

* tests: add test for which()
2020-07-21 18:48:37 -07:00
Harmen Stoppels
6c69b8a4d4
ci pipelines: activate environment without view (#17440) 2020-07-21 10:15:43 -07:00
Todd Gamblin
897e80e596
bugfix: ignore Apple's "gcc" by default (#17589)
Apple's gcc is really clang. We previously ignored it by default but
there was a regression in #17110.

Originally we checked for all clang versions with this, but I know of
none other than `gcc` on macos that actually do this, so limiting to
`apple-clang` should be ok.

- [x] Fix check for `apple-clang` in `gcc.py` to use version detection
  from `spack.compilers.apple_clang`
2020-07-20 18:24:18 -07:00
Dr. Christian Tacke
bd236918dd
Configuration: allow usage of command-line scopes with environments (#14608)
Spack did not support usage of the `--config-scope` option in
combination with an environment: In `lib/spack/spack/main.py`,
`spack.config.command_line_scopes` is set equal to any config scopes
passed by the `--config-scope` option. However, this is done after
activating an environment. In the process of activating an environment,
the `spack.config.config` singleton is instantiated, so later setting of
`spack.config.command_line_scopes` is ignored.

This commit sets command line scopes before activating an environment to
ensure that they are included in the configuration.

Co-authored-by: Tim Fuller <tjfulle@sandia.gov>
2020-07-20 13:58:06 -07:00
eugeneswalker
96fa6f0c1b
allow GNUPGHOME to come from SPACK_GNUPGHOME in env, if set (#17139) 2020-07-17 13:29:30 -07:00
Scott Wittenburg
b5f82696e2
Bugfix/install missing compiler from buildcache (#17536)
Ensure compilers installed from buildcache are registered.
2020-07-17 11:13:36 -07:00
Scott Wittenburg
ae03782032 buildcache: list all mirrors even if one fails 2020-07-17 10:04:05 -06:00
Harmen Stoppels
1fcc00df96
Fix security issue in CI (#17545)
The `spack-build-env.txt` file may contains many secrets, but the obvious one is the private signing key in `SPACK_SIGNING_KEY`. This file is nonetheless uploaded as a build artifact to gitlab. For anyone running CI on a public version of Gitlab this is a major security problem. Even for private Gitlab instances it can be very problematic.

Co-authored-by: Scott Wittenburg <scott.wittenburg@kitware.com>
2020-07-16 17:27:37 -07:00
Axel Huebl
a6abd530bd
CUDA 11.0.2 (#17423)
- [x] wait for general release candidate
- [x] compute capability support
- [x] compiler conflicts
  - [x] ppc64le
- [x] new download links
2020-07-13 18:32:28 -05:00
Harmen Stoppels
2b809a5374
Add -o flag to tar decompressor (#17427)
For normal users, `-o` or `--no-same-owner` (GNU extension) is
the default behavior, but for the root user, `tar` attempts to preserve
the ownership from the tarball.

This makes `tar` use `-o` all the time.  This should improve untarring
files owned by users not available in rootless Docker builds.
2020-07-13 15:19:04 -07:00
Omar Padron
573489db71
Add libglvnd packages/Add EGL support (#14572)
* add new package: "libglvnd-frontend"

* add +glvnd variant to opengl package

* add +glvnd variant to mesa package

* add +egl variant to paraview package

* add libglvnd-frontend entries to default packages config

* fix style

* add default providers for glvnd virtuals

add default providers for glvnd-gl, glvnd-glx, and glvnd-egl

* WIP: rough start to external OpenGL documentation

* rename libglvnd-frontend package and backend virtual dependencies

* update documentation

* fix ligvnd-be-* typos

* fix libglvnd-fe package class name

* fix doc parse error
2020-07-13 11:32:36 -04:00
Greg Becker
406596af70
update docs on point releases (#17463) 2020-07-11 14:35:25 -07:00
Peter Josef Scheibel
5e50dc5acb Merge branch 'releases/v0.15' into develop 2020-07-10 23:14:36 -07:00
Peter Josef Scheibel
1741279f16 Bump version to 0.15.1; update CHANGELOG and version references 2020-07-10 16:54:49 -07:00
Greg Becker
c2393fe566 spack install: improve error message with no args (#17454)
The error message was not updated when the behavior of Spack environments
was changed to not automatically activate the local environment in #17258.
The previous error message no longer makes sense.
2020-07-10 13:05:49 -07:00
Greg Becker
afbb4a5cba installation: skip repository metadata for externals (#16954)
When Spack installs a package, it stores repository package.py files
for it and all of its dependencies - any package with a Spack metadata
directory in its installation prefix.

It turns out this was too broad: this ends up including external
packages installed by Spack (e.g. installed by another Spack instance).
Currently Spack doesn't store the namespace properly for such packages,
so even though the package file could be fetched from the external,
Spack is unable to locate it.

This commit avoids the issue by skipping any attempt to locate and copy
from the package repository of externals, regardless of whether they
have a Spack repo directory.
2020-07-10 13:05:49 -07:00
Michael Kuhn
4e4de51f0d autotools bugfix: handle missing config.guess (#17356)
Spack was attempting to calculate abspath on the located config.guess
path even when it was not found (None); this commit skips the abspath
calculation when config.guess is not found.
2020-07-10 13:05:49 -07:00
Michael Kuhn
44681dbca5 autotools: Fix config.guess detection, take two (#17333)
The previous fix from #17149 contained a thinko that produced errors for
packages that overwrite configure_directory.
2020-07-10 13:05:49 -07:00
Greg Becker
f2889e698a
spack install: improve error message with no args (#17454)
The error message was not updated when the behavior of Spack environments
was changed to not automatically activate the local environment in #17258.
The previous error message no longer makes sense.
2020-07-10 10:45:11 -07:00
Patrick Gartung
e72e2568dd
Relocation of sbang needs to be done when the spack prefix changes even if the install tree has not changed. (#17455) 2020-07-09 22:28:51 -05:00
Harmen Stoppels
84eae97f91
aspirin for buildaches (#17437) 2020-07-09 22:00:38 -05:00
Sajid Ali
12099ed55e
clear mpicc and friends before each build (#17450)
* clear mpi env vars
2020-07-09 16:14:49 -05:00
Greg Becker
d0f5b69a19
installation: skip repository metadata for externals (#16954)
When Spack installs a package, it stores repository package.py files
for it and all of its dependencies - any package with a Spack metadata
directory in its installation prefix.

It turns out this was too broad: this ends up including external
packages installed by Spack (e.g. installed by another Spack instance).
Currently Spack doesn't store the namespace properly for such packages,
so even though the package file could be fetched from the external,
Spack is unable to locate it.

This commit avoids the issue by skipping any attempt to locate and copy
from the package repository of externals, regardless of whether they
have a Spack repo directory.
2020-07-09 11:08:51 -07:00
Patrick Gartung
8c41173678
Buildcache: bindist test without invoking spack compiler wrappers. (#15687)
* Buildcache:
   * Try mocking an install of quux, corge and garply using prebuilt binaries
   * Put patchelf install after ccache restore
   * Add script to install patchelf from source so it can be used on Ubuntu:Trusty which does not have a patchelf pat package. The script will skip building on macOS
   * Remove mirror at end of bindist test
   * Add patchelf to Ubuntu build env
   * Revert mock patchelf package to allow other tests to run.
   * Remove depends_on('patchelf', type='build') relying instead on
   * Test fixture to ensure patchelf is available.

* Call g++ command to build libraries directly during test build

* Flake8

* Install patchelf in before_install stage using apt unless on Trusty where a build is done.

* Add some symbolic links between packages

* Flake8

* Flake8:

* Update mock packages to write their own source files

* Create the stage because spec search does not create it any longer

* updates after change of list command arguments

* cleanup after merge

* flake8
2020-07-08 15:05:58 -05:00
Adam J. Stewart
207e496162
spack create: ask how many to download (#17373) 2020-07-08 09:38:42 +02:00
Simon Byrne
f85da868ac
Improve Travis sample in the docs (#17420)
- printf is better than echo for multiline strings
- ** should be &&
- use line continuation
- Use multiline block
2020-07-08 07:25:37 +02:00
Patrick Gartung
7f8e827db8
Relocate rpaths for all binaries, then do text bin replacement if the rpaths still exist after running patchelf/otool (#17418) 2020-07-07 16:46:39 -05:00
Massimiliano Culpo
f4ac3770b4
CudaPackage: maintainers are listed in the docstring (#17409)
fixes #17396

This prevents the class attribute to be inherited and
saves current maintainers from becoming the default
maintainers of every Cuda package.
2020-07-07 20:45:41 +02:00
Todd Gamblin
b0506a722e
releases: document releases/latest tag (#17402)
We got rid of `master` after #17377, but users still want a way to get
the latest stable release without knowing its number.

We've added a `releases/latest` tag to replace what was once `master`.

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2020-07-07 11:44:15 -07:00
Peter Scheibel
650ab563f4
Uninstall: tolerate hook failures when force=true (#16513)
Fixes #16478

This allows an uninstall to proceed even when encountering pre-uninstall
hook failures if the user chooses the --force option for the uninstall.

This also prevents post-uninstall hook failures from raising an exception,
which would terminate a sequence of uninstalls. This isn't likely essential
for #16478, but I think overall it will improve the user experience: if
the post-uninstall hook fails, there isn't much point in terminating a
sequence of spec uninstalls because at the point where the post-uninstall
hook is run, the spec has already been removed from the database (so it
will never have another chance to run).

Notes:

* When doing spack uninstall -a, certain pre/post-uninstall hooks aren't
  important to run, but this isn't easy to track with the current model.
  For example: if you are uninstalling a package and its extension, you
  do not have to do the activation check for the extension.
* This doesn't handle the uninstallation of specs that are not in the DB,
  so it may leave "dangling" specs in the installation prefix
2020-07-07 11:37:36 -07:00
Todd Gamblin
9ec9327f5a docs: document releases and branches in Spack
- [x] Remove references to `master` branch
- [x] Document how release branches are structured
- [x] Document how to make a major release
- [x] Document how to make a point release
- [x] Document how to do work in our release projects
2020-07-06 11:39:19 -07:00
Todd Gamblin
11088df402 Remove references to master from CI
- [x] remove master from github actions
- [x] remove master from .travis.yml
- [x] make `develop` the default branch for `spack ci`
2020-07-06 11:39:19 -07:00
Todd Gamblin
4ea76dc95c change master/child to controller/minion in pty docstrings
PTY support used the concept of 'master' and 'child' processes. 'master'
has been renamed to 'controller' and 'child' to 'minion'.
2020-07-06 11:39:19 -07:00
Michael Kuhn
516c3e659f
autotools bugfix: handle missing config.guess (#17356)
Spack was attempting to calculate abspath on the located config.guess
path even when it was not found (None); this commit skips the abspath
calculation when config.guess is not found.
2020-07-06 10:53:02 -07:00
Shahzeb Siddiqui
04f3000646
Pipelines doc: fixed two broken links (#17355) 2020-07-03 12:29:45 +02:00