Commit graph

21288 commits

Author SHA1 Message Date
Greg Becker
7490d63c38
Separable module configuration -- without the bugs this time (#23703)
Currently, module configurations are inconsistent because modulefiles are generated with the configs for the active environment, but are shared among all environments (and spack outside any environment).

This PR fixes that by allowing Spack environments (or other spack config scopes) to define additional sets of modules to generate. Each set of modules can enable either lmod or tcl modules, and contains all of the previously available module configuration. The user defines the name of each module set -- the set configured in Spack by default is named "default", and is the one returned by module manipulation commands in the absence of user intervention.

As part of this change, the module roots configuration moved from the config section to inside each module configuration.

Additionally, it adds a feature that the modulefiles for an environment can be configured to be relative to an environment view rather than the underlying prefix. This will not be enabled by default, as it should only be enabled within an environment and for non-default views constructed with separate projections per-spec.
2021-05-28 14:12:05 -07:00
Desmond Orton
9b99f85abf
New Package:py-ucsf-pyem (#23961)
* New Package:py-ucsf-pyem

* Dep additions, eun env deletion

* extraction step change

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2021-05-28 13:28:14 -06:00
Ken Raffenetti
3c9c3c678d
mpich: add v3.4.2 (#24002) 2021-05-28 12:34:29 -06:00
Desmond Orton
f8223303bb
New Package: py-retry-decorator (#23967)
* New Package: py-retry-decorator

* pypi link correction

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2021-05-28 18:06:36 +00:00
Scott Wittenburg
91f66ea0a4
Pipelines: reproducible builds (#22887)
### Overview

The goal of this PR is to make gitlab pipeline builds (especially build failures) more reproducible outside of the pipeline environment.  The two key changes here which aim to improve reproducibility are: 

1. Produce a `spack.lock` during pipeline generation which is passed to child jobs via artifacts.  This concretized environment is used both by generated child jobs as well as uploaded as an artifact to be used when reproducing the build locally.
2. In the `spack ci rebuild` command, if a spec needs to be rebuilt from source, do this by generating and running an `install.sh` shell script which is then also uploaded as a job artifact to be run during local reproduction.  

To make it easier to take advantage of improved build reproducibility, this PR also adds a new subcommand, `spack ci reproduce-build`, which, given a url to job artifacts:

- fetches and unzips the job artifacts to a local directory
- looks for the generated pipeline yaml and parses it to find details about the job to reproduce
- attempts to provide a copy of the same version of spack used in the ci build
- if the ci build used a docker image, the command prints a `docker run` command you can run to get an interactive shell for reproducing the build

#### Some highlights

One consequence of this change will be much smaller pipeline yaml files.  By encoding the concrete environment in a `spack.lock` and passing to child jobs via artifacts, we will no longer need to encode the concrete root of each spec and write it into the job variables, greatly reducing the size of the generated pipeline yaml.

Additionally `spack ci rebuild` output (stdout/stderr) is no longer internally redirected to a log file, so job output will appear directly in the gitlab job trace.  With debug logging turned on, this often results in log files getting truncated because they exceed the maximum amount of log output gitlab allows.  If this is a problem, you still have the option to `tee` command output to a file in the within the artifacts directory, as now each generated job exposes a `user_data` directory as an artifact, which you can fill with whatever you want in your custom job scripts.

There are some changes to be aware of in how pipelines should be set up after this PR:

#### Pipeline generation

Because the pipeline generation job now writes a `spack.lock` artifact to be consumed by generated downstream jobs, `spack ci generate` takes a new option `--artifacts-root`, inside which it creates a `concrete_env` directory to place the lockfile.  This artifacts root directory is also where the `user_data` directory will live, in case you want to generate any custom artifacts.  If you do not provide `--artifacts-root`, the default is for it to create a `jobs_scratch_dir` within your `CI_PROJECT_DIR` (a gitlab predefined environment variable) or whatever is your current working directory if that variable isn't set. Here's the diff of the PR testing `.gitlab-ci.yml` taking advantage of the new option:

```
$ git diff develop..pipelines-reproducible-builds share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml
diff --git a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml
index 579d7b56f3..0247803a30 100644
--- a/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml
+++ b/share/spack/gitlab/cloud_pipelines/.gitlab-ci.yml
@@ -28,10 +28,11 @@ default:
     - cd share/spack/gitlab/cloud_pipelines/stacks/${SPACK_CI_STACK_NAME}
     - spack env activate --without-view .
     - spack ci generate --check-index-only
+      --artifacts-root "${CI_PROJECT_DIR}/jobs_scratch_dir"
       --output-file "${CI_PROJECT_DIR}/jobs_scratch_dir/cloud-ci-pipeline.yml"
   artifacts:
     paths:
-      - "${CI_PROJECT_DIR}/jobs_scratch_dir/cloud-ci-pipeline.yml"
+      - "${CI_PROJECT_DIR}/jobs_scratch_dir"
   tags: ["spack", "public", "medium", "x86_64"]
   interruptible: true
```

Notice how we replaced the specific pointer to the generated pipeline file with its containing folder, the same folder we passed as `--artifacts-root`.  This way anything in that directory (the generated pipeline yaml, as well as the concrete environment directory containing the `spack.lock`) will be uploaded as an artifact and available to the downstream jobs.

#### Rebuild jobs

Rebuild jobs now must activate the concrete environment created by `spack ci generate` and provided via artifacts.  When the pipeline is generated, a directory called `concrete_environment` is created within the artifacts root directory, and this is where the `spack.lock` file is written to be passed to the generated rebuild jobs.  The artifacts root directory can be specified using the `--artifacts-root` option to `spack ci generate`, otherwise, it is assumed to be `$CI_PROJECT_DIR`.  The directory containing the concrete environment files (`spack.yaml` and `spack.lock`) is then passed to generated child jobs via the `SPACK_CONCRETE_ENV_DIR` variable in the generated pipeline yaml file.

When you don't provide custom `script` sections in your `mappings` within the `gitlab-ci` section of your `spack.yaml`, the default behavior of rebuild jobs is now to change into `SPACK_CONCRETE_ENV_DIR` and activate that environment.   If you do provide custom rebuild scripts in your `spack.yaml`, be aware those scripts should do the same thing: assume `SPACK_CONCRETE_ENV_DIR` contains the concretized environment to activate.  No other changes to existing custom rebuild scripts should be required as a result of this PR. 

As mentioned above, one key change made in this PR is the generation of the `install.sh` script by the rebuild jobs, as that same script is both run by the CI rebuild job as well as exported as an artifact to aid in subsequent attempts to reproduce the build outside of CI.  The generated `install.sh` script contains only a single `spack install` command with arguments computed by `spack ci rebuild`.  If the install fails, the job trace in gitlab will contain instructions on how to reproduce the build locally:

```
To reproduce this build locally, run:
  spack ci reproduce-build https://gitlab.next.spack.io/api/v4/projects/7/jobs/240607/artifacts [--working-dir <dir>]
If this project does not have public pipelines, you will need to first:
  export GITLAB_PRIVATE_TOKEN=<generated_token>
... then follow the printed instructions.
```

When run locally, the `spack ci reproduce-build` command shown above will download and process the job artifacts from gitlab, then print out instructions you  can copy-paste to run a local reproducer of the CI job.

This PR includes a few other changes to the way pipelines work, see the documentation on pipelines for more details.

This  PR erelies on 
~- [ ] #23194 to be able to refer to uninstalled specs by DAG hash~
EDIT: that is going to take longer to come to fruition, so for now, we will continue to install specs represented by a concrete `spec.yaml` file on disk.
- [x] #22657 to support install a single spec already present in the active, concrete environment
2021-05-28 09:38:07 -07:00
psakievich
4262de6a32
Add cxxstd to trilinos deps in nalu-wind (#23976)
Co-authored-by: Philip Sakievich <psakiev@sanida.gov>
2021-05-28 09:17:52 -07:00
Glenn Johnson
4171ee6650
armadillo: update and allow build with MKL (#23875) 2021-05-28 17:27:15 +02:00
Olivier Cessenat
0054e9bb08
argon2: ensure libraries are installed under lib (#21805)
Make a standard installation for libs in lib not lib/x86_64-linux-gnu for cmake
2021-05-28 17:26:15 +02:00
Greg Becker
405314195e
aocc version detection (#23907) 2021-05-28 10:13:40 -05:00
Desmond Orton
e0fa0145e3
freebayes: add v1.3.5, move to MesonPackage (#23772) 2021-05-28 17:07:52 +02:00
Manuela Kuhn
a9197d6e6d
r-boot: add v1.3-28 (#23992) 2021-05-28 14:54:50 +00:00
Adam J. Stewart
2507929308
opencv: add v4.5.2 (#23913) 2021-05-28 16:50:25 +02:00
Seth R. Johnson
a975cad6c6
root: disable afterimage when ~x (#23962) 2021-05-28 10:48:06 -04:00
Manuela Kuhn
27c8aac3b6
r-matrix: add v1.3-3 (#23995) 2021-05-28 14:47:56 +00:00
archxlith
4365ed9205
openfst: add v1.8.1, add "python" variant (#23850) 2021-05-28 16:46:00 +02:00
Manuela Kuhn
fe302893ae
r-lattice: add v0.20-44 (#23994) 2021-05-28 14:39:29 +00:00
Seth R. Johnson
d593aa5048
vecgeom: add v1.1.15 (#23973) 2021-05-28 16:36:32 +02:00
Desmond Orton
ebf6f71355
modeltest-ng: add new package (#23765) 2021-05-28 16:35:18 +02:00
Manuela Kuhn
16d4b1ed32
r-mass: add v7.3-54 (#23996) 2021-05-28 14:34:21 +00:00
Manuela Kuhn
f0eb4ca2d8
r-nlme: add v3.1-152 (#23997) 2021-05-28 14:30:37 +00:00
Manuela Kuhn
e06a3b7d45
r-lme4: add v1.1-27 (#23998) 2021-05-28 14:26:21 +00:00
Manuela Kuhn
c2e1e48fdc
r-pbkrtest: add v0.5.1 (#23999) 2021-05-28 14:21:21 +00:00
Robert Mijakovic
50ea1f8577
singularity: add v3.7.4 (#23954)
Co-authored-by: Robert Mijakovic <robert.mijakovic@lxp.lu>
2021-05-28 15:56:40 +02:00
Martin Aumüller
0c290ef1c3
embree: add v3.13.0, fix build (#23986)
* embree: allow for compiling with gcc 7.3

strip out unsupported -mprefer-vector-width=256

* embree: fix build on AMD CPUs

The ISAs that embree is compiled for have to match the CPU
features enabled by the compiler, as embree derives theISA
that it compiles for from the latter.

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2021-05-28 13:50:03 +02:00
Jose E. Roman
1dd6bc2725
SLEPc: add v3.15.1 (#23987) 2021-05-28 13:46:24 +02:00
Brian Van Essen
f1dc49bf42
lbann: add v0.102, add variant to enable address sanitizer. (#23981) 2021-05-28 11:31:24 +02:00
dependabot[bot]
de6e83f566
build(deps): bump actions/cache from 2.1.5 to 2.1.6 (#23983)
Bumps [actions/cache](https://github.com/actions/cache) from 2.1.5 to 2.1.6.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.5...v2.1.6)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-28 11:24:56 +02:00
Martin Aumüller
6a9e2eeb83
botan: add v2.17.3, v2.18.0 and v2.18.1 (#23984) 2021-05-28 11:24:15 +02:00
Martin Aumüller
c4063b11fe
ispc: add v1.15.0 (#23985) 2021-05-28 11:23:46 +02:00
Todd Gamblin
6fc0e8dc9b
Use AWS CloudFront for source mirror (#23978)
Spack's source mirror was previously in a plain old S3 bucket. That will still
work, but we can do better. This switches to AWS's CloudFront CDN for hosting
the mirror.

CloudFront is 16x faster (or more) than the old bucket.

- [x] change mirror to https://mirror.spack.io
2021-05-28 00:18:30 -07:00
plamborn
031ef00a1f
libhio: added version 1.4.1.6 (#23975) 2021-05-28 00:19:12 -06:00
Ben Corbett
429b71bf57
Fix ZFP cuda build. (#23941) 2021-05-27 21:46:19 -06:00
Adam J. Stewart
850cac5ea3
py-cfgrib: add new version (#23916) 2021-05-28 03:14:44 +00:00
Adam J. Stewart
e2399bcd0e
py-geocube: add new package (#23909) 2021-05-27 19:40:54 -05:00
Desmond Orton
b375500134
py-gql: Added version and deps for @0.4.0 (#23927)
* Added version and deps for @0.4.0

* Switched to pypi, fixed deps

* deprecation removal
2021-05-28 00:13:27 +00:00
Desmond Orton
b255c698d5
New Package: py-google-apitools (#23968)
* New Package: py-google-apitools

* proper python constraints

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2021-05-28 00:03:15 +00:00
Desmond Orton
53e4f32a31
New package:py-coveralls (#23930)
* New package:py-coveralls

* dep fixes

* added python constraint

* pyyaml version constraint

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2021-05-27 17:40:13 -06:00
Desmond Orton
e74d10fd78
py-healpy: added missing dep (#23960)
* py-healpy: added missing dep

* added healpix and pkgconfig
2021-05-27 23:33:03 +00:00
romerojosh
f31bc986a8
Update nvshmem package to use public URL (#23933) 2021-05-27 23:25:12 +02:00
Adam J. Stewart
ef56462867
Add fuse virtual dependency, new macfuse package (#23904) 2021-05-27 23:21:11 +02:00
Greg Becker
b91dff4aaf
bugfix: mirror index shows missing packages (#23939)
- [x] add `in_buildcache` field to DB records to indicate what parts of an index, 
       which includes roots and dependencies, are in the buildcache.
- [x] add `mark()` method to DB for setting values on single nodes of the DAG.
2021-05-27 20:38:13 +00:00
Adam J. Stewart
214182529f
wget: add new version, fix macOS build (#23921) 2021-05-27 13:23:17 -07:00
Michael Kuhn
dd0bd179c5
gtkplus: add 3.24.29 (#23896)
This also fixes the build with %gcc@11:. According to upstream, the
proper solution is to disable -Werror=array-bounds since the stable
branch will not receive a patch for newer compilers.
2021-05-27 15:17:13 -05:00
Adam J. Stewart
f92b7eca5e
py-eccodes: add new package (#23906) 2021-05-27 13:16:44 -07:00
Adam J. Stewart
cc4029daab
py-datacube: add new package (#23905)
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2021-05-27 13:14:59 -07:00
Adam J. Stewart
4e8d87e5cc
plumed: add missing m4 dependency (#23957) 2021-05-27 14:45:31 -04:00
Sebastian Schmitt
30547f60d1
Update py-pint and fix runtime dependency on setuptools (#23950)
* Update py-pint and fix runtime dependency on setuptools

Without the runtime dependency on setuptools, importing pint yields:

0.11:

ModuleNotFoundError: No module named 'pkg_resources'

0.17:

ModuleNotFoundError: No module named 'packaging'

* Fix

* Address comments
2021-05-27 17:44:26 +00:00
Desmond Orton
84ad5e444a
New package: py-promise (#23936)
* New package: py-promise

* removed test deps, added missing dep
2021-05-27 17:18:46 +00:00
Tamara Dahlgren
cf15c42c1e
py-hatchet: update v1.3.0 checksum (#23902) 2021-05-27 09:40:34 -07:00
Adam J. Stewart
d990c93cab
py-rasterio: add v1.2.3 (#23945) 2021-05-27 10:28:20 -06:00