Commit graph

155 commits

Author SHA1 Message Date
Massimiliano Culpo
01ece824e1 Cap the maximum number of build jobs (#11373)
* config:build_jobs now controls the number of parallel jobs to spawn during
builds, but cannot ever exceed the number of cores on the machine.

* The default is set to 16 or the number of available cores, whatever
is lowest.

* Updated docs to reflect the changes done to limit parallel builds
2019-05-28 06:42:04 -07:00
t-karatsu
1e9bb8c512 Add Fujitsu compiler to Spack. (#11287)
* Add Fujitsu compiler to Spack.

* Fixes for flake8

* Chenges location of FCC to subdirectory called case-insensitive

* Add compiler tests for Fujitsu compiler

* Modify the logic of taking compiler version for new version of Fujitsu compiler
2019-05-21 20:31:14 -05:00
Chuck Atkins
251f3f5058
ninja: drop python as a run dep (#11347)
* ninja: Make python a build-only dependency

* ninja, ninja-fortran: allow the packages to provide eachother
2019-05-07 13:07:24 -04:00
Chuck Atkins
9f848205e4 mesa: re-written to new meson build system (#10482)
* mesa: re-writen to new meson build system

* xorg-server: Remove unneeded mesa dependency

* glx: provide the virtual GLX package

* Convert most "mesa" dependencies to use virtual gl and glx dependencies

* mesa: Switch to always building from the git repo instead of a tarball

* Use gl and glx version ranges instead of exact versions

* glx: provide a default package

* add auto to swr variant

* Revert "add auto to swr variant"

This reverts commit 2e7cd8a8aca07767c00657d0d09985ddd6306883.

* update mesa package to version 19.0

* set +glx by default only when running on linux

* fix style issues in geant4 package

* remove virtual package "egl"
2019-05-01 17:57:33 -05:00
Chris Green
763549fe7c mysql: Support client-only, cxxstd and more versions (#10911)
* add cxxstd variant
* add CMake constraints based on platform/version
* add older versions
* update boost dependency version constraints (which are closely
  tied to mysql version) and update boost cxxstd choice to be
  the same as the cxxstd chosen for mysql
* add client-only support (including a patch for 5.5.x)
* record the mysql package as a provider of the mysql-client virtual
2019-03-26 13:19:06 -05:00
Chris Green
6de6d5396c New package: mariadb-c-client (#7729)
* mariadb-c-client is a new package using the distinct, LGPL,
  MySQL-compatible client library from mariadb.com. It provides the
  virtual package mariadb-client
* mariadb is recorded as a provider of the mariadb-client virtual
* The mysql-client virtual package is also added, and mariadb-c-client
  is recorded as a provider for it
2019-03-15 14:12:30 -05:00
Mark W. Krentel
3ed6e78338 New package: ibm-java (#10777)
* Add binary package of the IBM Java SDK for big and little-endian
  powerpc (power7, 8 and 9).  The jdk and openjdk packages only install
  on x86_64.
* Add ibm-java as a java provider
* The jdk and openjdk packages only install on x86_64. Add conflicts
  for ppc64 and ppc64le to jdk and openjdk.
2019-03-12 18:05:47 -05:00
Greg Becker
f4d4322a41
Create option to build compilers as needed (#10761)
* Create option to build missing compilers and add them to config before installing packages that use them
* Clean up kwarg passing for do_install, put compiler bootstrapping in separate method
2019-03-07 17:30:48 -08:00
Scott Wittenburg
a6e8e889b2 release workflow: Add spack command for generating the .gitlab-ci.yml
This spack command adds a new schema for a file which describes the
builder containers available, along with the compilers availabe on
each builder.  The release-jobs command then generates the .gitlab-ci.yml
file by first expanding the release spec set, concretizing each spec
(in an appropriate docker container if --this-machine-only argument is
not provided on command line), and then combining and staging all the
concrete specs as jobs to be run by gitlab.
2019-02-21 15:37:35 -06:00
Elsa Gonsiorowski, PhD
74a5d92f07 Remove /nfs/tmp2 from default build_stage locations (#10170)
* Remove /nfs/tmp2 from default configuration
* /nfs/tmp2 is going away from LC... and doesn’t exist for the rest of the world.
* update documentation to remove /nfs/tmp2 as well
2018-12-21 02:03:54 -08:00
Adam J. Stewart
c227e1f02e Minor changes to Basic Settings docs for SC18 (#9809)
Grammar/spelling issues
2018-11-11 23:10:05 -06:00
Nichols A. Romero
236b34f3df Introduce fftw-api virtual package for Intel-MKL and FFTW (#9618)
* Introduce FFTW2 and FFT3 providers for Intel-MKL and FFTW Spack packages.

* make fftw default package for fftw-api virtual package

* virtual package test assertion now provides location of default virtual packages.

* Change name of virtual package to fftw-api and used versioned interface.
2018-11-09 08:16:11 -08:00
Michael Kuhn
7070d9fcd4 Allow setting language of compiler messages (#9486)
* Add a build_language config.yaml option which controls the language
  of compiler messages
* build_language defaults to "C", in which case the compiler messages
  will be in English. This allows Spack log parsing to detect and
  highlight error messages (since the regular expressions to find
  error messages are in English)
* The user can use the default language in their environment by setting
  the build_language config variable to null or ''
2018-10-18 12:55:58 -07:00
Greg Becker
d1a5113cfe permissions: add permission configuration to packages.yaml (#8773)
Spack can now be configured to assign permissions to the files installed by a package.

In the `packages.yaml` file under `permissions`, the attributes `read`, `write`, and `group` control the package permissions. These attributes can be set per-package, or for all packages under `all`. If permissions are set under `all` and for a specific package, the package-specific settings take precedence.  The `read` and `write` attributes take one of `user`, `group`, and `world`.

   packages:
    all:
      permissions:
        write: group
        group: spack
    my_app:
      permissions:
        read: group
        group: my_team
2018-10-11 14:29:07 -07:00
Greg Becker
7ece1a8676 Correct name for install_path_scheme in defaults config.yaml (#9482)
Default config.yaml mis-named `install_path_scheme` as `directory_layout`.
This commit corrects the error.
2018-10-10 18:54:58 -07:00
Peter Scheibel
28c0dd9148
Increase and customize lock timeouts (#9219)
Fixes #9166

This is intended to reduce errors related to lock timeouts by making
the following changes:

* Improves error reporting when acquiring a lock fails (addressing
  #9166) - there is no longer an attempt to release the lock if an
  acquire fails
* By default locks taken on individual packages no longer have a
  timeout. This allows multiple spack instances to install overlapping
  dependency DAGs. For debugging purposes, a timeout can be added by
  setting 'package_lock_timeout' in config.yaml
* Reduces the polling frequency when trying to acquire a lock, to
  reduce impact in the case where NFS is overtaxed. A simple
  adaptive strategy is implemented, which starts with a polling
  interval of .1 seconds and quickly increases to .5 seconds
  (originally it would poll up to 10^5 times per second).
  A test is added to check the polling interval generation logic.
* The timeout for Spack's whole-database lock (e.g. for managing
  information about installed packages) is increased from 60s to
  120s
* Users can configure the whole-database lock timeout using the
  'db_lock_timout' setting in config.yaml

Generally, Spack locks (those created using spack.llnl.util.lock.Lock)
now have no timeout by default

This does not address implementations of NFS that do not support file
locking, or detect cases where services that may be required
(nfslock/statd) aren't running.

Users may want to be able to more-aggressively release locks when
they know they are the only one using their Spack instance, and they
encounter lock errors after a crash (e.g. a remote terminal disconnect
mentioned in #8915).
2018-09-25 18:58:51 -07:00
Adam J. Stewart
7f419d34ac Set DYLD_LIBRARY_PATH on macOS (#9073) 2018-08-23 15:39:44 +02:00
Geoffrey Malcolm Oxberry
e380b08bab spack general packages.yaml defaults: add unwind
This commit adds 'libunwind' as the default 'unwind' provider in
spack. This preference should be overridden by the
darwin/packages.yaml file on macOS. Continues the changes discussed in
2018-08-06 22:01:50 -07:00
Geoffrey Malcolm Oxberry
ec0050a1bb darwin packages.yaml defaults: add unwind provider
This commit adds default unwind providers to the default packages.yaml
for darwin. Compiler versions are supplied with the apple-unwind
package so that apple-unwind is only used with Apple's clang fork, and
not with LLVM's clang.
2018-08-06 22:01:50 -07:00
Christoph Junghans
8bc3f7d726 Add ccache support (#3761)
If the user sets "ccache: true" in spack's config.yaml, Spack will use an available
ccache executable when compiling c/c++ code. This feature is disabled by default
(i.e. "ccache: false") and the documentation is updated with how to enable
ccache support
2018-07-09 14:06:10 -07:00
Todd Gamblin
c4c1d37fcd refactor: move templates from root to share/spack
- This complies with the unix directory hierarchy standard (which Spack
  attempts to follow)
- Also unclutters the repo root directory.
2018-06-24 16:38:36 -07:00
Todd Gamblin
54201e3c02
locks: add configuration and command-line options to enable/disable locks (#7692)
- spack.util.lock behaves the same as llnl.util.lock, but Lock._lock and
  Lock._unlock do nothing.

- can be disabled with a control variable.

- configuration options can enable/disable locking:
  - `locks` option in spack configuration controls whether Spack will use filesystem locks or not.
  - `-l` and `-L` command-line options can force-disable or force-enable locking.

- Spack will check for group- and world-writability before disabling
  locks, and it will not allow a group- or world-writable instance to
  have locks disabled.

- update documentation
2018-05-18 14:41:03 -07:00
Adam J. Stewart
8d681925b2
Change default elf provider on macOS (#7939) 2018-05-05 17:27:13 -05:00
Adam J. Stewart
5af4d4f0ac
Set default provider for every virtual package (#7784)
* Set default provider for every virtual package

* Add unit test to ensure that every virtual package has a default provider explicitly set
2018-05-05 17:26:47 -05:00
Veselin Dobrev
7f46ec49e7 Specify default providers for the glu virtual package. (#7733) 2018-04-12 13:30:49 -05:00
healther
9f07300982 fix outdated comments in config.yaml (#7594)
* `spack purge` now is `spack clean`
2018-03-25 08:49:55 -05:00
Mario Melara
2970a50ef6 Add the ability to separate architecture in path scheme (#4329)
* Add format to separate target and os for path

spec format can now handle separations of target and os for setting
up the path.

* Added ${PLATFORM} et al to spec.format()

${PLATFORM}, ${OS}, ${TARGET}

* Update tests

Updated tests and got rid of unnecessary code.

* Also update documentation to reflect this new ability.

* Add default path scheme to config.yaml

Added default path scheme to config.yaml. Users can overwrite this
section if they want.
2018-03-23 12:05:07 -07:00
Scott Wittenburg
d2c3441527 Update gl/qt options for vtk package (#6551)
This provides options for hardware and software rendering with the
gl API and updates the vtk package to make use of those options:

* Create new "gl" virtual package, provided by mesa
* Add external-only "opengl" package, which represents a system
  install that provides gl
* For vtk: prefer system gl implementation by default to get speed
  up from hardware rendering. When software rendering is specifically
  requested (+osmesa), try to use the llvmpipe approach, as it is
  much faster.
* Make qt dependency optional for vtk
* Add basic support for VTK on osx
* qt: Depend on virtual gl package, rather than mesa impl
2018-01-22 10:46:44 -08:00
Michael Kuhn
5bbbfe9446 Introduce virtual dependency pkgconfig (#5198)
There are two providers, pkgconf and pkg-config, with the former being
the default provider.
2017-11-23 08:05:38 -07:00
Massimiliano Culpo
b1d129e681 Modulefiles generated with a template engine (#3183)
* Module files now are generated using a template engine refers #2902 #3173

jinja2 has been hooked into Spack.

The python module `modules.py` has been splitted into several modules
under the python package `spack/modules`. Unit tests stressing module
file generation have been refactored accordingly.

The module file generator for Lmod has been extended to multi-providers
and deeper hierarchies.

* Improved the support for templates in module files.

Added an entry in `config.yaml` (`template_dirs`) to list all the
directories where Spack could find templates for `jinja2`.

Module file generators have a simple override mechanism to override
template selection ('modules.yaml' beats 'package.py' beats 'default').

* Added jinja2 and MarkupSafe to vendored packages.

* Spec.concretize() sets mutual spec-package references

The correct place to set the mutual references between spec and package
objects at the end of concretization. After a call to concretize we
should now be ensured that spec is the same object as spec.package.spec.

Code in `build_environment.py` that was performing the same operation
has been turned into an assertion to be defensive on the new behavior.

* Improved code and data layout for modules and related tests.

Common fixtures related to module file generation have been extracted
in `conftest.py`. All the mock configurations for module files have been
extracted from python code and have been put into their own yaml file.

Added a `context_property` decorator for the template engine, to make
it easy to define dictionaries out of properties.

The default for `verbose` in `modules.yaml` is now False instead of True.

* Extendable module file contexts + short description from docstring

The contexts that are used in conjunction with `jinja2` templates to
generate module files can now be extended from package.py and
modules.yaml.

Module files generators now infer the short description from package.py
docstring (and as you may expect it's the first paragraph)

* 'module refresh' regenerates all modules by default

`module refresh` without `--module-type` specified tries to
regenerate all known module types. The same holds true for `module rm`

Configure options used at build time are extracted and written into the
module files where possible.

* Fixed python3 compatibility, tests for Lmod and Tcl.

Added test for exceptional paths of execution when generating Lmod
module files.

Fixed a few compatibility issues with python3.

Fixed a bug in Tcl with naming_scheme and autoload + unit tests

* Updated module file tutorial docs. Fixed a few typos in docstrings.

The reference section for module files has been reorganized. The idea is
to have only three topics at the highest level:

  - shell support + spack load/unload use/unuse
  - module file generation (a.k.a. APIs + modules.yaml)
  - module file maintenance (spack module refresh/rm)

Module file generation will cover the entries in modules.yaml

Also:

  - Licenses have been updated to include NOTICE and extended to 2017
  - docstrings have been reformatted according to Google style

* Removed redundant arguments to RPackage and WafPackage.

All the callbacks in `RPackage` and `WafPackage` that are not build
phases have been modified not to accept a `spec` and a `prefix`
argument. This permits to leverage the common `configure_args` signature
to insert by default the configuration arguments into the generated
module files. I think it's preferable to handling those packages
differently than `AutotoolsPackage`. Besides only one package seems
to override one of these methods.

* Fixed broken indentation + improved resiliency of refresh

Fixed broken indentation in `spack module refresh` (probably a rebase
gone silently wrong?). Filter the writers for blacklisted specs before
searching for name clashes. An error with a single writer will not
stop regeneration, but instead will print a warning and continue
the command.
2017-09-19 12:34:20 -07:00
Sergey Kosukhin
a48b5a627c Make jpeg a virtual dependency. (#5190)
* Make jpeg a virtual dependency.

* Make 'libjpeg-turbo' the default implementation of 'jpeg'.
2017-08-24 10:30:35 +02:00
Adam J. Stewart
db657d938d Refactor IntelInstaller into IntelPackage base class (#4300)
* Refactor IntelInstaller into IntelPackage base class

* Move license attributes from __init__ to class-level

* Flake8 fixes: remove unused imports

* Fix logic that writes the silent.cfg file

* More specific version numbers for Intel MPI

* Rework logic that selects components to install

* Final changes necessary to get intel package working

* Various updates to intel-parallel-studio

* Add latest version of every Intel package

* Add environment variables for Intel packages

* Update env vars for intel package

* Finalize components for intel-parallel-studio package

Adds a +tbb variant to intel-parallel-studio.
The tbb package was renamed to intel-tbb.
Now both intel-tbb and intel-parallel-studio+tbb
provide tbb.

* Overhaul environment variables set by intel-parallel-studio

* Point dependent packages to the correct MPI wrappers

* Never default to intel-parallel-studio

* Gather env vars by sourcing setup scripts

* Use mpiicc instead of mpicc when using Intel compiler

* Undo change to ARCH

* Add changes from intel-mpi to intel-parallel-studio

* Add comment explaining mpicc vs mpiicc

* Prepend env vars containing 'PATH' or separators

* Flake8 fix

* Fix bugs in from_sourcing_file

* Indentation fix

* Prepend, not set if contains separator

* Fix license symlinking broken by changes to intel-parallel-studio

* Use comments instead of docstrings to document attributes

* Flake8 fixes

* Use a set instead of a list to prevent duplicate components

* Fix MKL and MPI library linking directories

* Remove +all variant from intel-parallel-studio

* It is not possible to build with MKL, GCC, and OpenMP at this time

* Found a workaround for locating GCC libraries

* Typos and variable names

* Fix initialization of empty LibraryList
2017-08-16 12:21:07 -05:00
snehring
db74f4c3a1 Add a new package for IcedTea (#4804)
* alsa-lib: new package

* cups: new package

* icedtea: new package

* icedtea: adding JAVA_HOME variable

* alsa: removing placeholder

* icedtea: typo fix

* alsa: fixing formattting

* icedtea: formatting fixes and cleanup

* icedtea: additional cleanup

* jdk: adding provides('java') to jdk, setting jdk to default java.

* icedtea: adding jdk as a dependency

* java: changing depends_on('jdk') and similar entries to depends_on('java')

* icedtea: removing unused imports, trying to placate flake8.

* fastqc: fixing flake8 error

* bazel: fixing typo in java dependency

* jdk: changing provides java to a range

* icedtea: cleaning up. Splitting up checksums.

* icedtea: jdk dependency is build only
2017-08-05 14:53:09 -05:00
Sergey Kosukhin
f6c2adc0ad New package libaec: a BSD-licensed replacement for the szip library. (#4437)
* Added package for 'libaec'.

* New version for package 'libaec'.
2017-08-04 10:38:54 -05:00
Mark Olesen
1f2e56e1f3 refactor openfoam packages (#3669)
* Several improvements for the openfoam packages

--

Refactor openfoam packages by adding an OpenfoamArch class

Use separate configure, build, install phases.

Provide FOAM_PROJECT_DIR dependent env for openfoam packages
- easier way to locate

Eliminate intermediate installation directories
- unneeded clutter.
- makes it less than easy to find the etc/bashrc file

Add versioning for all openfoam patches
- no certainty which parts (if any) will be needed in future versions,
  especially if we strive to ensure that the upstream version builds
  well with spack to begin with.

Support build of develop branches
- helps track build regressions for future openfoam releases

STYLE: use common/ and assets/ to provide additional (build) resources ...

* - adjust OpenFOAM provider

Move openfoam-com up front since this is the one being used as a base
for the others
2017-06-21 11:35:31 -05:00
Adam J. Stewart
bd1beedaf5 Allow users to set parallel jobs in config.yaml (#3812)
* Allow users to set parallel jobs in config.yaml

* Undo change from endash to emdash

* Remove parallel config, rename jobs to build_jobs
2017-04-15 08:31:00 -07:00
Adam J. Stewart
c0cfaacbc8 Set default providers for all virtual dependencies (#3634)
* Set default providers for everything

* Add default OpenFOAM provider
2017-04-02 14:48:27 -05:00
Adam J. Stewart
4866b4592f Add missing dependencies to gawk (#3481)
* Add missing dependencies to gawk

* Fix make check

* Add mawk packages and awk virtual dependency

* Use mawk instead of gawk to build ncurses

* Rearrange order of patches and dependencies
2017-03-18 19:13:32 -05:00
Tom Scogland
e0f5b12475 add ACLOCAL_PATH updates for packages that register m4 macros (#2518) 2016-12-07 13:53:57 -08:00
Adam J. Stewart
4e6d535058 Set Clang as the default compiler on macOS (#2225)
* Set OS-specific default compilers

* Fix flake8 warnings
2016-11-04 17:32:25 -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
c557e76565 refactor settings for install area and make them config options 2016-10-30 23:55:00 -07:00
Elizabeth Fischer
3352889d73 py-pil: Protect against building with Python3. (#1868)
* py-pil: Does not build with Python3.

* Set py-pillow to be the default pil provider

* Update package.py

* Change to comments requested by adamjstewart

* Remove version constraint from extends(), avoid a Spack bug.
2016-09-28 16:51:41 -04:00
Todd Gamblin
26480f14f9 Add "default" configuration scope.
- Default scope is versioned with spack and can be overridden by site
  or user config.

- Default scope provides sensible default concretization preferences
  for all of Spack.

- per-platform concretization scope can be added later (to force a
  particular MPI on, e.g., Cray systems)
2016-07-19 17:10:17 -07:00
Glenn Johnson
6d36ec3d76 Add share/man to prefix inspections.
The share/man path should be in prefix_inspections for MANPATH as
share/man is a common location for manual pages.
2016-07-11 13:35:22 -05:00
Ben Boeckel
973caa3a07 modules.yaml: use the right envvar for pkg-config
Fixes #1072.
2016-06-20 11:10:29 -04:00
Todd Gamblin
0216fa2a00 Simplify /etc/spack/modules.yaml formatting. 2016-05-11 09:05:24 -07:00
alalazo
f8f71b1c2c modules : prefix_inspections moved to modules.yaml 2016-05-10 13:37:03 +02:00
alalazo
7fc0b1ebd2 module file : reverted to sensible default 2016-04-05 13:33:11 +02:00
alalazo
d546d828d3 module file : added filtering based on environment variable name 2016-04-05 13:20:28 +02:00
alalazo
e4adc675e5 module files configuration : added default configuration 2016-03-24 10:04:02 +01:00
Todd Gamblin
cc349e9a32 Add default repos.yaml 2015-11-28 19:11:51 -08:00