Commit graph

13737 commits

Author SHA1 Message Date
darmac
855f9afa6e add new package : jafka (#14304) 2019-12-28 12:20:55 -06:00
Glenn Johnson
bd345e16b8 New package - TECkit (#14301)
This PR adds the teckit package to spack.
2019-12-28 12:20:20 -06:00
Glenn Johnson
12692424a7 New package - graphite2 (#14299)
* New package - graphite2

This PR adds the Graphite2 package to Spack.

* Replace smart quotes with standard quotes
2019-12-28 12:19:21 -06:00
Johannes Blaschke
c0d5c360d5 setup-env-test: fix pipe redirect (#14306) 2019-12-27 22:37:47 -08:00
Dr. Christian Tacke
8ee75e19bd Improve info variant header (#14275)
In "spack info" the Variants header currently has two blank
lines under it. That's too much. It looks like the actual
content belongs to something else.

Instead underline the headers to make things more obvious.
2019-12-27 15:21:15 -08:00
Glenn Johnson
2166a91ec5 New package - libpaper (#14302)
This PR adds the paper library to spack.
2019-12-27 15:18:16 -08:00
Gregory Lee
6c957b6b62 added build dependences required after cairo package change (#14297)
* added build dependences required after cairo package change

* fixed pango build dependencies
2019-12-27 12:13:50 -06:00
Gregory Lee
08898a2ad7 patch cairo build files for build without fontconfig fixes #14112 (#14296)
* patch cairo build files for build without fontconfig

* added build dependencies for cairo
2019-12-26 16:20:16 -06:00
asmaahassan90
3315700da9 Add Avizo Recipe (#12792)
* Add Avizo Recipe

* make changes as per review

* fix home url and linting

* Fix url

* fix identation

* change checksum to sha256 instead of md5

* fix installation

* fix lint

* fix identation

* make it compatible with python 2.6

* enhancing recipe and fixing avizo licensing

changes as per suggestions from reviewer; fix licensing

* fix identation

* use new setup_run_environment function
2019-12-26 14:43:51 -06:00
t-karatsu
c7f1e2835b aspa: Fix common errors. (#14295)
* aspa: Fix common errors.

* defined new member 'Vec_value_type' in 'self' namespace.

* fix narrowing error.

* fix patch about typecast.
2019-12-26 14:42:59 -06:00
Massimiliano Culpo
2aa8132afd Migrate build tests from Travis to Github Actions (#13967)
This PR moves build smoke tests from TravisCI and migrates them to Github Actions. The result is that build tests are performed in parallel with unit tests and they don't hog additional resources on Travis. The workflow will not run if a PR only changes packages in the built-in repository, but will always run on pushes to develop or master.

* Removed build tests from Travis and passed them to Github Actions
* Store ~/.ccache in Github Actions cache
* Add filters on paths and make sure this workflow don't run
* Use paths-ignore and exclude only files in the built-in repo
* Added a badge to README.md
2019-12-25 00:06:48 -08:00
Todd Gamblin
61b4ad1837
tests: finish removing pyqver from the repository (#14294)
Remove a few remaining mentions of the pyqver package, which was removed in #14289.
2019-12-24 17:37:03 -08:00
Massimiliano Culpo
d333e14721 tests: check min required python version with vermin (#14289)
This commit removes the `python_version.py` unit test module
and the vendored dependencies `pyqver2.py` and `pyqver3.py`.
It substitutes them with an equivalent check done using
`vermin` that is run as a separate workflow via Github Actions.

This allows us to delete 2 vendored dependencies that are unmaintained
and substitutes them with a maintained tool.

Also, updates the list of vendored dependencies.
2019-12-24 09:28:33 -08:00
t-karatsu
1e2c9d960c a64fx: fix typo in GCC flags (#14286) 2019-12-24 17:45:03 +01:00
Matthias Diener
6a084a8289 intel-pin: add version 3.11 (#14292) 2019-12-24 10:06:51 -06:00
Matthias Diener
37c1d2d004 cmake: add version 3.16.2 (#14291) 2019-12-24 10:05:54 -06:00
Matthias Diener
ee8bc0df98 scons: add version 3.1.2 (#14290) 2019-12-24 10:05:18 -06:00
健美猞猁
748c552992 Bump nektar to 5.0.0. (#14288) 2019-12-24 10:01:16 -06:00
Todd Gamblin
7652d1a4c1
Merge branch 'releases/v0.13' into develop 2019-12-24 01:04:41 -08:00
Todd Gamblin
55d5b435c8
update CHANGELOG.md for 0.13.3 2019-12-23 23:48:11 -08:00
Todd Gamblin
231e237764
version bump: 0.13.3 2019-12-23 23:48:11 -08:00
Massimiliano Culpo
8616a26406
Travis exits at the first failing test, pin codecov at v4.5.4 (#14179)
Before this commit we used to run the entire unit test suite
in the presence of a failure. Since we currently rely a lot
on the state of the filesystem etc. the end report was most
of the time showing spurious failures that were a consequence
of the first failing test.

This PR makes unit tests exit at the first failing test

Also, pin codecov at v4.5.4 (last one supporting Python 2.6)
2019-12-23 23:48:03 -08:00
Todd Gamblin
e22d3250dd
performance: dont' read spec.yaml files twice in view regeneration
`ViewDescriptor.regenerate()` calls `get_all_specs()`, which reads
`spec.yaml` files, which is slow.  It's fine to do this once, but
`view.remove_specs()` *also* calls it immediately afterwards.

- [x] Pass the result of `get_all_specs()` as an optional parameter to
  `view.remove_specs()` to avoid reading `spec.yaml` files twice.
2019-12-23 23:18:47 -08:00
Todd Gamblin
e3939b0c72
performance: don't recompute hashes when regenerating environments
`ViewDescriptor.regenerate()` was copying specs and stripping build
dependencies, which clears `_hash` and other cached fields on concrete
specs, which causes a bunch of YAML hashes to be recomputed.

- [x] Preserve the `_hash` and `_normal` fields on stripped specs, as
  these will be unchanged.
2019-12-23 23:18:46 -08:00
Todd Gamblin
f013687397
performance: reduce system calls required for remove_dead_links
`os.path.exists()` will report False if the target of a symlink doesn't
exist, so we can avoid a costly call to realpath here.
2019-12-23 23:18:46 -08:00
Todd Gamblin
79ddf6cf0d
performance: only regenerate env views once in spack install
`spack install` previously concretized, writes the entire environment
out, regenerated views, then wrote and regenerated views
again. Regenerating views is slow, so ensure that we only do that once.

- [x] add an option to env.write() to skip view regeneration

- [x] add a note on whether regenerate_views() shouldn't just be a
  separate operation -- not clear if we want to keep it as part of write
  to ensure consistency, or take it out to avoid performance issues.
2019-12-23 23:18:45 -08:00
Todd Gamblin
be6d7db2a8
performance: add read transactions for install_all() and install()
Environments need to read the DB a lot when installing all specs.

- [x] Put a read transaction around `install_all()` and `install()`
  to avoid repeated locking
2019-12-23 23:18:45 -08:00
Todd Gamblin
d87ededddc
lock transactions: avoid redundant reading in write transactions
Our `LockTransaction` class was reading overly aggressively.  In cases
like this:

```
1  with spack.store.db.read_transaction():
2    with spack.store.db.write_transaction():
3      ...
```

The `ReadTransaction` on line 1 would read in the DB, but the
WriteTransaction on line 2 would read in the DB *again*, even though we
had a read lock the whole time.  `WriteTransaction`s were only
considering nested writes to decide when to read, but they didn't know
when we already had a read lock.

- [x] `Lock.acquire_write()` return `False` in cases where we already had
       a read lock.
2019-12-23 23:18:45 -08:00
Todd Gamblin
b3a5f2e3c3
lock transactions: ensure that nested write transactions write
If a write transaction was nested inside a read transaction, it would not
write properly on release, e.g., in a sequence like this, inside our
`LockTransaction` class:

```
1  with spack.store.db.read_transaction():
2    with spack.store.db.write_transaction():
3      ...
4  with spack.store.db.read_transaction():
   ...
```

The WriteTransaction on line 2 had no way of knowing that its
`__exit__()` call was the last *write* in the nesting, and it would skip
calling its write function.

The `__exit__()` call of the `ReadTransaction` on line 1 wouldn't know
how to write, and the file would never be written.

The DB would be correct in memory, but the `ReadTransaction` on line 4
would re-read the whole DB assuming that other processes may have
modified it.  Since the DB was never written, we got stale data.

- [x] Make `Lock.release_write()` return `True` whenever we release the
      *last write* in a nest.
2019-12-23 23:18:44 -08:00
Todd Gamblin
98577e3af5
lock transactions: fix non-transactional writes
Lock transactions were actually writing *after* the lock was
released. The code was looking at the result of `release_write()` before
writing, then writing based on whether the lock was released.  This is
pretty obviously wrong.

- [x] Refactor `Lock` so that a release function can be passed to the
      `Lock` and called *only* when a lock is really released.

- [x] Refactor `LockTransaction` classes to use the release function
  instead of checking the return value of `release_read()` / `release_write()`
2019-12-23 23:18:44 -08:00
Todd Gamblin
a85b9070cb
performance: avoid repeated DB locking on view generation
`ViewDescriptor.regenerate()` checks repeatedly whether packages are
installed and also does a lot of DB queries.  Put a read transaction
around the whole thing to avoid repeatedly locking and unlocking the DB.
2019-12-23 23:18:44 -08:00
Todd Gamblin
91ea90c253
performance: speed up spack find in environments
`Environment.added_specs()` has a loop around calls to
`Package.installed()`, which can result in repeated DB queries.  Optimize
this with a read transaction in `Environment`.
2019-12-23 23:17:59 -08:00
Todd Gamblin
5bdba98837
performance: spack spec should use a read transacction with -I
`spack spec -I` queries the database for installation status and should
use a read transaction around calls to `Spec.tree()`.
2019-12-23 23:17:59 -08:00
Todd Gamblin
cbf8553406
concretization: improve performance by avoiding database locks
Checks for deprecated specs were repeatedly taking out read locks on the
database, which can be very slow.

- [x] put a read transaction around the deprecation check
2019-12-23 23:17:58 -08:00
Todd Gamblin
48befd67b5
performance: memoize spack.architecture.get_platform()
`get_platform()` is pretty expensive and can be called many times in a
spack invocation.

- [x] memoize `get_platform()`
2019-12-23 23:17:58 -08:00
Sajid Ali
37eac1a226
use sys.executable instead of python in _source_single_file (#14252) 2019-12-23 23:16:30 -08:00
Peter Josef Scheibel
639156130b
Patch fetching: remove unnecessary argument 2019-12-23 23:03:10 -08:00
Peter Josef Scheibel
587c650b88
Mirrors: skip attempts to fetch BundlePackages
BundlePackages use a noop fetch strategy. The mirror logic was assuming
that the fetcher had a resource to cach after performing a fetch. This adds
a special check to skip caching if the stage is associated with a
BundleFetchStrategy. Note that this should allow caching resources
associated with BundlePackages.
2019-12-23 23:03:10 -08:00
Peter Josef Scheibel
d71428622b
Mirrors: avoid re-downloading patches
When updating a mirror, Spack was re-retrieving all patches (since the
fetch logic for patches is separate). This updates the patch logic to
allow the mirror logic to avoid this.
2019-12-23 23:03:10 -08:00
Peter Josef Scheibel
a69b3c85b0
Mirrors: perform checksum of fetched sources
Since cache_mirror does the fetch itself, it also needs to do the
checksum itself if it wants to verify that the source stored in the
mirror is valid. Note that this isn't strictly required because fetching
(including from mirrors) always separately verifies the checksum.
2019-12-23 23:03:09 -08:00
Peter Josef Scheibel
98b498c671
Mirrors: fix cosmetic symlink targets
The targets for the cosmetic paths in mirrrors were being calculated
incorrectly as of fb3a3ba: the symlinks used relative paths as targets,
and the relative path was computed relative to the wrong directory.
2019-12-23 23:03:09 -08:00
Peter Josef Scheibel
64209dda97
Allow repeated invocations of 'mirror create'
When creating a cosmetic symlink for a resource in a mirror, remove
it if it already exists. The symlink is removed in case the logic to
create the symlink has changed.
2019-12-23 23:03:09 -08:00
Paul Ferrell
c15e55c668
mirror bug fixes: symlinks, duplicate patch names, and exception handling (#13789)
* Some packages (e.g. mpfr at the time of this patch) can have patches
  with the same name but different contents (which apply to different
  versions of the package). This appends part of the patch hash to the
  cache file name to avoid conflicts.
* Some exceptions which occur during fetching are not a subclass of
  SpackError and therefore do not have a 'message' attribute. This
  updates the logic for mirroring a single spec (add_single_spec)
  to produce an appropriate error message in that case (where before
  it failed with an AttributeError)
* In various circumstances, a mirror can contain the universal storage
  path but not a cosmetic symlink; in this case it would not generate
  a symlink. Now "spack mirror create" will create a symlink for any
  package that doesn't have one.
2019-12-23 23:03:03 -08:00
Todd Gamblin
d7f2a32887 performance: dont' read spec.yaml files twice in view regeneration
`ViewDescriptor.regenerate()` calls `get_all_specs()`, which reads
`spec.yaml` files, which is slow.  It's fine to do this once, but
`view.remove_specs()` *also* calls it immediately afterwards.

- [x] Pass the result of `get_all_specs()` as an optional parameter to
  `view.remove_specs()` to avoid reading `spec.yaml` files twice.
2019-12-23 18:36:56 -08:00
Todd Gamblin
78b84e4ade performance: don't recompute hashes when regenerating environments
`ViewDescriptor.regenerate()` was copying specs and stripping build
dependencies, which clears `_hash` and other cached fields on concrete
specs, which causes a bunch of YAML hashes to be recomputed.

- [x] Preserve the `_hash` and `_normal` fields on stripped specs, as
  these will be unchanged.
2019-12-23 18:36:56 -08:00
Todd Gamblin
9b90d7e801 performance: reduce system calls required for remove_dead_links
`os.path.exists()` will report False if the target of a symlink doesn't
exist, so we can avoid a costly call to realpath here.
2019-12-23 18:36:56 -08:00
Todd Gamblin
c83e365c59 performance: only regenerate env views once in spack install
`spack install` previously concretized, writes the entire environment
out, regenerated views, then wrote and regenerated views
again. Regenerating views is slow, so ensure that we only do that once.

- [x] add an option to env.write() to skip view regeneration

- [x] add a note on whether regenerate_views() shouldn't just be a
  separate operation -- not clear if we want to keep it as part of write
  to ensure consistency, or take it out to avoid performance issues.
2019-12-23 18:36:56 -08:00
Todd Gamblin
0fb3280011 performance: add read transactions for install_all() and install()
Environments need to read the DB a lot when installing all specs.

- [x] Put a read transaction around `install_all()` and `install()`
  to avoid repeated locking
2019-12-23 18:36:56 -08:00
Todd Gamblin
6c9467e8c6 lock transactions: avoid redundant reading in write transactions
Our `LockTransaction` class was reading overly aggressively.  In cases
like this:

```
1  with spack.store.db.read_transaction():
2    with spack.store.db.write_transaction():
3      ...
```

The `ReadTransaction` on line 1 would read in the DB, but the
WriteTransaction on line 2 would read in the DB *again*, even though we
had a read lock the whole time.  `WriteTransaction`s were only
considering nested writes to decide when to read, but they didn't know
when we already had a read lock.

- [x] `Lock.acquire_write()` return `False` in cases where we already had
       a read lock.
2019-12-23 18:36:56 -08:00
Todd Gamblin
bb517fdb84 lock transactions: ensure that nested write transactions write
If a write transaction was nested inside a read transaction, it would not
write properly on release, e.g., in a sequence like this, inside our
`LockTransaction` class:

```
1  with spack.store.db.read_transaction():
2    with spack.store.db.write_transaction():
3      ...
4  with spack.store.db.read_transaction():
   ...
```

The WriteTransaction on line 2 had no way of knowing that its
`__exit__()` call was the last *write* in the nesting, and it would skip
calling its write function.

The `__exit__()` call of the `ReadTransaction` on line 1 wouldn't know
how to write, and the file would never be written.

The DB would be correct in memory, but the `ReadTransaction` on line 4
would re-read the whole DB assuming that other processes may have
modified it.  Since the DB was never written, we got stale data.

- [x] Make `Lock.release_write()` return `True` whenever we release the
      *last write* in a nest.
2019-12-23 18:36:56 -08:00