Commit graph

2120 commits

Author SHA1 Message Date
Todd Gamblin
b962622975 Add spack arch --platform option 2016-10-30 23:55:00 -07:00
Todd Gamblin
58e76721b9 Make provider_index use spack yaml for cleaner output. 2016-10-30 23:55:00 -07:00
Todd Gamblin
da760a66de source_cache, misc_cache, verify_ssl, checksum, & dirty in config.yaml
- Added new preferences to config.yaml:
  - source_cache
  - misc_cache
  - verify_ssl
  - checksum
  - dirty
2016-10-30 23:55:00 -07:00
Todd Gamblin
22b14e0f23 Add module_roots to config.yaml 2016-10-30 23:55:00 -07:00
Todd Gamblin
0da639298c Move temp directory configuration to config.yaml
- Moved temp finding logic to spack.stage
- Updated stage tests
- Added tests for new path substaitution of $user, $spack, $tempdir
2016-10-30 23:55:00 -07:00
Todd Gamblin
9347f86939 Rename install.yaml -> config.yaml, install_area -> "store"
- Added a schema for config.yaml
- Moved install tree configuration to config.yaml
- Moved etc/spack/install.yaml to etc/spack/defaults/config.yaml
- renamed install_area to "store", to use a term in common with guix/nix.
  - in `config.yaml` file, it's called the `install_tree` to be more
    intuitive to users.
  - `install_tree` might've worked in the code, but `install_tree` is
    already a global function in the spack namespace, from
    llnl.util.filesystem.
2016-10-30 23:55:00 -07:00
Benedikt Hegner
24901f7a38 add documentation for new option to set install area 2016-10-30 23:55:00 -07:00
Benedikt Hegner
c557e76565 refactor settings for install area and make them config options 2016-10-30 23:55:00 -07:00
Matt Belhorn
7ccf56a0b7 Removes cyclic dependency on spack.config. (#2121)
Merge #2030 added a cyclic dependency between the Cray platform needing
to read a `targets.yaml` config file and `config.py` needing to get the
platform names.

This commit removes the cyclic dependency in favor of the more general
config scheme. It also removes the now functionless `targets.yaml`
config file. This breaks 'frontend' targets on the Cray platform but
all architecture targets, including the frontend, that are provided by
CrayPE are added to the Platform anyway so users can be explicit about
the architecture targeted by the Cray compiler wrappers:

```
spack spec libelf arch=cray-CNL-frontend
```

becomes

```
spack spec libelf arch=cray-CNL-mc8         # on an XK7 or
spack spec libelf arch=cray-CNL-sandybridge # on an older XC30, etc..
```

The only way the 'frontend' target can be defined after this commit is
through target environment variables.
2016-10-30 21:02:27 -07:00
Massimiliano Culpo
9989f8e267 module file support: major rework of docs (#2169)
* module file support: major rework of docs

* module file support: fixed issues found by @adamjstewart

- list or enumeration should not be indented
- use console instead of bash or csh in things that are not scripts
- other typos

* module file support: fixed other issues found by @adamjstewart

- tables should not be indented
- substitute lines with pyobject to import an entire function
- get help output running commands
- typos

* module file support: fixes according to review comments

- @citibeth moved `spack module loads` after `spack load`
- @glennpj tried to clarify installation table + changes to language
- @tgamblin Removed top level section and moved the whole thing into the reference manual

* module file support: moved directive before spack module loads
2016-10-30 12:41:41 -07:00
Massimiliano Culpo
4d35ac6a16 configuration file for modules : fixed enable keyword (#2176)
- enable keyword works again
- test/modules.py : proper clean-up after tests
2016-10-30 12:30:51 -07:00
Barry Smith
ef2c42a889 Do not check directory layout for external packages (#2172)
External packages do not have an spec.yaml file so don't check for it.
Without this change any time a package depends on an external package
when the new package is installed you will get the error

Install prefix exists but contains no spec.yaml

This problem has also haunted me since I started using Spack since PETSc
depends on Python and I used an external python but fortunately it
was relatively easy to debug once I could reproduce it at will.

Funded-by: IDEAS
Project: IDEAS/xSDK
Time: 1 hour
2016-10-29 20:57:41 -07:00
Matthew Scott Krafczyk
c2d58d39dd Import dso_suffix from spack.build_environment in abi.py (#2174)
Fixes #1845
2016-10-29 16:47:06 -07:00
scheibelp
23683c65de Use Spec.format for token substitution in modules (#1848)
This replaces a custom token-based substitution format with calls to
Spec.format in modules.py

This also resolves a couple issues:

- LmodModules set configuration globally instead of in its initializer
  which meant test-specific configuration was not applied
- Added support for setting hash_length=0 for LmodModules. This only
  affects the module filename and not the directory names for the
  hierarchy tokens in the path. This includes an additional unit test.
2016-10-29 13:56:34 -07:00
Adam J. Stewart
58409a2eaf Fix rpath linking for NAG, add documentation on setup (#2142) 2016-10-27 15:28:09 -07:00
Elizabeth Fischer
12270b9dbf Remove support for deprecated package. See also #2085 and #2086 (#2090) 2016-10-26 21:53:08 -07:00
George Hartzell
bf08bd7076 Fix typo: _choiches -> _choices (#2127)
The breaks `spack create`.
2016-10-26 20:39:08 -07:00
George Hartzell
e652a32f05 typo: vlaues -> values (#2147) 2016-10-26 17:51:01 -07:00
Elizabeth Fischer
3895c974a0 Removed documentation on false paths as per #2083 (#2146)
Removed documentation on false paths as per #2083
2016-10-26 17:11:54 -07:00
Denis Davydov
9f54cea5c5 document recommended usage of system blas/lapack (#2081)
* document recommended usage of system blas/lapack

* update doc

* minor

* reword
2016-10-26 16:22:18 -07:00
Massimiliano Culpo
37dc719d13 ProcessError : now the exception is correctly pickled and passed across processes. (#2143) 2016-10-26 15:17:20 -07:00
Massimiliano Culpo
e73ab84680 spack install : added --log-format option (incorporates test-install command) (#2112)
* spack install : added --log-format option (incorporates test-install command)

fixes #1907

* qa : removed extra whitespace
2016-10-26 14:22:46 -07:00
Denis Davydov
33fb7bbd1b add a unit test for conretization with develop version (#2064) 2016-10-26 01:49:52 -07:00
Denis Davydov
39772e4c4c filter system paths (#2083)
* add filter_system_paths()

* filter system paths in set_build_environment_variables()

* two function: lib/inc + bin

* reverse order in bin

* fix order

* minor

* improvements of the code

* more cleanup

* alternative solution for filter_bins

* fiddle base alalazo's approach

* minor

* minor
2016-10-25 11:25:13 -07:00
Adam J. Stewart
a250792202 Find compatibility versions of GCC (#2099) 2016-10-25 11:07:49 -07:00
Massimiliano Culpo
7a575d2f4b multimethod.py : calls functools.wraps before returning the correct method fixes #2118 (#2119) 2016-10-25 08:30:40 -07:00
Massimiliano Culpo
b27e78cd78 spack setup : fixed regression after #1186 (#2117) 2016-10-25 07:53:11 -07:00
Todd Gamblin
0f6a5cd385 Merge pull request #1186 from epfl-scitas/features/install_with_phases
do_install : allow for an arbitrary number of phases
2016-10-24 17:13:49 -07:00
Todd Gamblin
c1ad4bde28 Rename EditableMakefile to MakefilePackage 2016-10-24 16:41:20 -07:00
Joseph Ciurej
7dd14870ce Bug Fix : Apply Compiler Flags Specified by Manual Compiler Configuration (#1532)
* Fixed a bug causing config-specified compiler flags to be ignored.
Updated the compiler config so all flags are in a separate section.

* Updated the documentation for the `compilers.yaml` file spec.

* Implemented basic testing for the 'flags' section of compiler config.

* Fixed a few minor problems with the manual compiler config documentation.
2016-10-24 14:37:03 -07:00
George Hartzell
e35c023c61 Typo: becuase -> because (#2110) 2016-10-24 14:28:04 -07:00
Elizabeth Fischer
4f0b7cd2c2 Small fix to docs. (#2092) 2016-10-24 11:09:02 -07:00
Massimiliano Culpo
8af9881e9b spack test : exits after ctrl+c fixes #2029 (#2082) 2016-10-24 11:07:08 -07:00
alalazo
7bd735416d package.py : moved each specialized package to its own module file 2016-10-23 22:38:19 +02:00
alalazo
e0f3188970 spack setup : improved error message 2016-10-23 19:10:07 +02:00
alalazo
fa3f07c092 CMakePackage, AutotoolsPackage : added default behavior on check 2016-10-23 19:02:46 +02:00
alalazo
ebbbed166e Merge branch 'develop' of https://github.com/LLNL/spack into features/install_with_phases_rebase 2016-10-23 13:35:12 +02:00
alalazo
284ed13fa6 spack.error : fixed pickling and representation to permit to pass FetchErrors 2016-10-23 13:34:29 +02:00
alalazo
bdf4832269 spack build, spack configure : added commands 2016-10-22 17:08:52 +02:00
alalazo
484aaf50cc CMakePackage : changed method name from wdir to build_directory 2016-10-22 14:54:26 +02:00
alalazo
8091a3d6cb do_install : use build_system_class attribute instead of type(self).__base__ 2016-10-22 10:48:16 +02:00
alalazo
c84123dce5 spack info : shows the build-system class used 2016-10-22 10:39:33 +02:00
Matthew LeGendre
859d296105 Don't clear LD_LIBRARY_PATH and friends from compiler wrappers (#2074)
* Don't clear LD_LIBRARY_PATH and friends from compiler wrappers

* remove debugging print
2016-10-21 16:25:12 -07:00
alalazo
482f60d1d3 packages : moved decorators into AutotoolsPackage and CMakePackage 2016-10-22 01:03:07 +02:00
alalazo
012da99644 spack create : fixed typo 2016-10-22 00:10:37 +02:00
alalazo
e8dafd1090 Removed space before colon in FIXME:, added one line description of guess classes 2016-10-21 23:54:11 +02:00
alalazo
715e029361 spack info : added phases 2016-10-21 22:44:41 +02:00
Matthew LeGendre
5ff08386af Remove unnecessary blackslash for flake8 2016-10-21 13:17:23 -07:00
alalazo
fd2b72fd0f qa : flake8 issues 2016-10-21 22:15:29 +02:00
alalazo
04821c7be8 spack create : now creates packages that are derived from AutotoolsPackage and CMakePackage 2016-10-21 22:12:21 +02:00
Matthew LeGendre
73b46a92bc Fix concretize bug where provider sort couldn't handle version ranges 2016-10-21 11:59:41 -07:00
Adam J. Stewart
52158d9316 Add new Version property to handle joined version numbers (#2062)
* Add new version property to handle joined version numbers

* Add unit test for new joined property

* Add documentation on version.up_to() and version.joined
2016-10-21 07:49:36 -07:00
Massimiliano Culpo
aa86432ec6 patch directive : fixed retrieval from urls ( fixes #1584 ) (#2039)
* patch directive : fixed retrieval from urls fixes #1584

 - add support for 'gz' archives
 - fixed bugs with URL patches
 - updated nwchem

* patch directive : added checksum to UrlPatch

 - refactored classes in patch.py
 - updated nwchem

* patch directive : added caching
2016-10-21 07:32:52 -07:00
alalazo
2251428f0a CMakePackage : changed list() to [] 2016-10-21 13:01:55 +02:00
alalazo
5ce3071143 do_install : removed install_self from the list of arguments (leftover after rebasing #1956) 2016-10-21 12:51:38 +02:00
alalazo
213e3f0860 Merge branch 'develop' of https://github.com/LLNL/spack into features/install_with_phases_rebase
Conflicts:
	lib/spack/spack/cmd/install.py
	lib/spack/spack/cmd/setup.py
2016-10-21 12:38:43 +02:00
scheibelp
8111a4bb9d Don't cache truncated dag hash for spec (#2048)
If Spec.dag_hash was called for the first time with a 'length'
specified, the cached hash was truncated. This ensures that the
full hash is cached.
2016-10-18 22:34:46 -07:00
Massimiliano Culpo
0a3cc5e8e3 Package.do_install : removed install_self from arguments (#1956)
* Removes the extra argument from Package.do_install while maintaining the changes in behavior pulled in #1603

* install : removed -i and -d shorthands (breaks backward compatibility)

* Change ':' to ','
2016-10-18 14:25:07 -07:00
Eric
306eea5e59 Support for bazel (#2023)
* Add package bazel

* Add support for bazel-based builds
2016-10-18 07:46:42 -07:00
Adam J. Stewart
d891143a08 Ignore GPG/PGP signatures/checksums when finding available downloads (#2028)
* Ignore GPG/PGP signatures/checksums when finding available downloads

* Remove duplicated basename
2016-10-16 14:46:29 -07:00
Todd Gamblin
193f68083f Platform-specific config scopes (#2030)
* Add platform-specific configuration scopes.

* Update `spack config` to use the new scope arguments.
2016-10-15 17:00:11 -07:00
Massimiliano Culpo
8d5961ecaf spack purge : updated documentation fixes #1938 (#2025) 2016-10-15 15:51:49 -07:00
Adam J. Stewart
78d3c7e2a2 Major updates to Contribution Guide (#1968)
* Major updates to Contribution Guide

* Grammar changes

* Fix missing/extra backticks

* Rewording, links, and tips added
2016-10-14 09:16:13 -07:00
Todd Gamblin
d861a52ebe Use cYAML if it is available in Python. (#2010) 2016-10-12 18:25:18 -07:00
Ben Boeckel
b369be65d7 Mock up Xcode devdir to make Qt5 work on Mac OS X (#1832)
* build_environment: allow compilers to set up an environment

* clang: mock up a toolchain directory for xcode

Some projects ignore CC and CXX flags and instead use xcode to find the
toolchain. Clang on Apple should set up the environment properly.
Arguably, every compiler could do this on Apple, but let's see how this
works out just for AppleClang for now.

The Documentation directory is ~1.7G and the excluded platforms add up
to about 7G. Ignoring swift saves another 500M. The resulting Xcode.app
copy is in the 2G range.

* compiler: set member variables early

This is required so that later methods can query things such as the
version of the compiler.

* compiler: support finding the real path of the compiler

On Apple, the /usr/bin compilers are actually wrapping tools themselves
which query xcrun for the currently selected Xcode installation. Pierce
this veil and get the real, full path the to underlying compilers
instead.

* icu4c: install with rpath

On macOS, icu installs with a library ID of the library name. Enabling
rpath makes its ID its full installed path which lets Qt5 link against
it successfully.

* qt: no -no-gtkstyle flag on Qt5 on macOS
2016-10-12 09:58:12 -07:00
Massimiliano Culpo
1925db5c77 spack list : updated documentation (#2004)
* spack list : updated documentation

* spack list : removed space before ':'
2016-10-12 09:43:28 -07:00
Glenn Johnson
5b070418e7 Documentation for modules configuration options (#1685)
This PR add documentation for the `suffixes` and `hash_length` options
for modules.yaml.

This resolves #1416.
2016-10-11 23:14:42 -07:00
Todd Gamblin
488e1bab2c Make insecure option work with curl AND git. (#1786) 2016-10-11 23:13:40 -07:00
Massimiliano Culpo
eb17895630 environment modifications : permit to pass parameters along with file to be sourced (#1626) 2016-10-11 22:55:14 -07:00
alalazo
dd56784d28 qa : flake8 issues 2016-10-11 16:44:18 +02:00
alalazo
ab995df777 Merge branch 'develop' of https://github.com/LLNL/spack into features/install_with_phases_rebase
Conflicts:
	lib/spack/spack/build_environment.py
	lib/spack/spack/cmd/install.py
	lib/spack/spack/cmd/setup.py
	lib/spack/spack/package.py
	var/spack/repos/builtin/packages/gmp/package.py
	var/spack/repos/builtin/packages/hdf5/package.py
2016-10-11 16:28:08 +02:00
Mario Melara
b42dbc01fe Use python platform.system for system ID (#1499)
* Rebase and merging using platform.system

Rebasing and merging using platform.system instead of uname -a.

* Add missing import platform statement

* Remove subprocess import

Remove ununsed import subprocess to make changes flak8 compliant
2016-10-11 07:04:29 -07:00
Todd Gamblin
9c5c8b22c8 Fix bug in spack debug create-db-tarball
- Fix a bug handling '/' characters in branch names.

- Make tarballs use a descriptive name for the top-level directory, not
  just `opt`.
2016-10-11 01:55:33 -07:00
Todd Gamblin
f0edfa6edf Roll my my own bit_length function for Python 2.6 compatibility. 2016-10-11 01:55:33 -07:00
Todd Gamblin
222f551c37 Use a single lock file for stages and a single file for prefixes.
- Locks now use fcntl range locks on a single file.

How it works for prefixes:

- Each lock is a byte range lock on the nth byte of a file.

- The lock file is ``spack.installed_db.prefix_lock`` -- the DB tells us
  what to call it and it lives alongside the install DB.  n is the
  sys.maxsize-bit prefix of the DAG hash.

For stages, we take the sha1 of the stage name and use that to select a
byte to lock.

With 100 concurrent builds, the likelihood of a false lock collision is
~5.36e-16, so this scheme should retain more than sufficient paralellism
(with no chance of false negatives), and get us reader-writer lock
semantics with a single file, so no need to clean up lots of lock files.
2016-10-11 01:55:33 -07:00
Todd Gamblin
080a78664e Add tests for locks with byte ranges. 2016-10-11 01:55:33 -07:00
Todd Gamblin
3d8d8d3644 Fix bug with lock upgrades.
- Closing and re-opening to upgrade to write will lose all existing read
  locks on this process.
  - If we didn't allow ranges, sleeping until no reads would work.
  - With ranges, we may never be able to take some legal write locks
    without invalidating all reads. e.g., if a write lock has distinct
    range from all reads, it should just work, but we'd have to close the
    file, reopen, and re-take reads.

- It's easier to just check whether the file is writable in the first
  place and open for writing from the start.

- Lock now only opens files read-only if we *can't* write them.
2016-10-11 01:55:33 -07:00
Todd Gamblin
a024c6df95 Add base32_prefix_bits function to get prefix of DAG hash as an int. 2016-10-11 01:55:32 -07:00
Todd Gamblin
da6bbfb2d4 Add byte-range parameters to llnl.util.lock 2016-10-11 01:55:32 -07:00
Todd Gamblin
ea10e3bab0 Remove need to touch lock files before using.
- Locks will now create enclosing directories and touch the lock file
  automatically.
2016-10-11 01:55:32 -07:00
Todd Gamblin
907fe912ef Make llnl.util.lock use file objects instead of low-level OS fds.
- Make sure we write, truncate, flush when setting PID and owning host in
  the file.
2016-10-11 01:55:32 -07:00
alalazo
f229290880 stage : try to remove dead links only of folder that you actually care about
A use case where the previous approach was failing is :

 - more than one spack process running on compute nodes
 - stage directory is a link to fast LOCAL storage

 In this case the processes may try to unlink something that is "dead" for them, but actually used by other processes on storage they cannot see.
2016-10-11 01:55:32 -07:00
alalazo
f47dcdc47a lockfiles : creates directory for locks if not already present 2016-10-11 01:55:32 -07:00
alalazo
a3fc492d45 diy : removed global write lock on the db 2016-10-11 01:55:32 -07:00
alalazo
74fb1029fa uninstall : removed global lock 2016-10-11 01:55:25 -07:00
alalazo
b3a6e307b9 unit tests : fixed failing tests 2016-10-11 01:38:27 -07:00
alalazo
34fe51a4aa install : finer graned locking for install command 2016-10-11 01:38:27 -07:00
James Wynne III
bd61a36587 Fixed set operation from undefined += to a union (#1963)
Fixed flake8 issues
2016-10-11 01:30:11 -07:00
Massimiliano Culpo
b7a612dcdf spack list : merged package-list into list (#1932)
* spack list : merged package-list into the command

* list : removed option for case sensitivity
2016-10-11 01:22:53 -07:00
Kelly Thompson
ff1108712c Make CMake-based builds more verbose by default. (#1988) 2016-10-11 00:43:36 -07:00
Massimiliano Culpo
b1a2728af6 uninstall : permits to uninstall all installed software fixes #1477 (#1973) 2016-10-11 00:42:31 -07:00
Massimiliano Culpo
c8bf8a5e6e md5 : normalizes input before computing the md5 fixes #1508 (#1977)
Bottomline :

- fetcher change the current working directory
- relative paths were resolved differently depending on the prder f evaluation
2016-10-11 00:37:29 -07:00
Jean-Paul Pelteret
876c26f658 Add documentation for standard python repositories. (#1970)
Fixes #1939
2016-10-07 22:46:22 -07:00
Isuru Fernando
ccf530ba5e Check for -r in ccld mode too (#1972) 2016-10-07 22:44:37 -07:00
Massimiliano Culpo
efae58a4ef fixes #858 (#1961)
Fix spack uninstall -f
2016-10-07 11:30:10 -07:00
Todd Gamblin
dbc864c9db Restore default RPATH settings but allow packages to limit to immediate deps. (#1954)
- Some packages (netcdf) NEED RPATHs for transitive deps.
- Others (dealii) will exceed OS limits when the DAG is too large.
2016-10-06 15:57:23 -07:00
Adam J. Stewart
415ddeecf8 Fix bugs preventing readthedocs from rebuilding the documentation (#1945) 2016-10-06 12:50:49 -07:00
Elizabeth Fischer
98f8f40896 [Bug Fix (and docs too)] : Do not select @develop version by default (#1933)
* This fixes a bug in concretization.  Before the recent change to the
algorithm, the intent was that the @develop version, although
"greater" than numberic versions, is never preferred BY DEFAULT over
numeric versions.

To test this... suppose you have a package with no `preferred=True` in
it, and nothing in `packages.yaml`, but with a `develop` version.  For
the sake of this example, I've hacked my `python/package.py` to work
this way.

Without bugfix (WRONG: user should never get develop by default):

```
  python@develop%clang@7.3.0-apple~tk~ucs4 arch=darwin-elcapitan-x86_64
      ...
```

With bugfix (RIGHT: largest numeric version selected):

```
  python@3.5.2%clang@7.3.0-apple~tk~ucs4 arch=darwin-elcapitan-x86_64
      ...
```

* Documented version selection in concretization algo.

* Fix typos

* flake8
2016-10-06 09:08:15 -07:00
Denis Davydov
2ccb3d5531 add contribution guide focused on Git and PRs (#1664) 2016-10-06 07:45:47 -07:00
Adam J. Stewart
83a074eea6 Fix various documentation bugs (#1678)
* Fix various documentation bugs

* Keep long option names, but don't include in Command Index

* Use long option name

* Explicitly designate sections to be listed in the Command Index

* Consistent menu bar titles
2016-10-06 02:49:44 -07:00