Commit Graph

75 Commits

Author SHA1 Message Date
Massimiliano Culpo
c4521535e7 Multi-valued variants: better support for combinations (#9481)
This enforces conventions that allow for correct handling of
multi-valued variants where specifying no value is an option,
and adds convenience functionality for specifying multi-valued
variants with conflicting sets of values. This also adds a notion
of "feature values" for variants, which are those that are understood
by the build system (e.g. those that would appear as configure
options). In more detail:

* Add documentation on variants to the packaging guide
* Forbid usage of '' or None as a possible variant value, in
  particular as a default. To indicate choosing no value, the user
  must explicitly define an option like 'none'. Without this,
  multi-valued variants with default set to None were not parsable
  from the command line (Fixes #6314)
* Add "disjoint_sets" function to support the declaration of
  multi-valued variants with conflicting sets of options. For example
  a variant "foo" with possible values "a", "b", and "c" where "c"
  is exclusive of the other values ("foo=a,b" and "foo=c" are
  valid but "foo=a,c" is not).
* Add "any_combination_of" function to support the declaration of
  multi-valued variants where it is valid to choose none of the
  values. This automatically defines "none" as an option (exclusive
  with all other choices); this value does not appear when iterating
  over the variant's values, for example in "with_or_without" (which
  constructs autotools option strings from variant values).
* The "disjoint_sets" and "any_combination_of" methods return an
  object which tracks the possible values. It is also possible to
  indicate that some of these values do not correspond to options
  understood by the package's build system, such that methods like
  "with_or_without" will not define options for those values (this
  occurs automatically for "none")
* Add documentation for usage of new functions for specifying
  multi-valued variants
2019-01-04 19:02:34 -08:00
Todd Gamblin
6f50cd52ed copyright: update license headers for 2013-2019 copyright. 2019-01-01 00:44:28 -08:00
Matthias Diener
5434a25076 openblas: add version 0.3.4 (#10016) 2018-12-05 08:41:58 -06:00
Tiziano Müller
84bc1d6654 CP2K related fixes and update (#9308)
* openblas: enable parallel builds

* cp2k: enable parallel builds

* cp2k: fix building on multilib/Suse distros

use the actual directory path where files where installed to instead of
the default prefix+'/lib'

* cp2k: ensure we have a non-header-only libxsmm

* openblas: disable max num CPU detection on virtualized build

* cp2k: install data and set compiled-in DATA_DIR

* cp2k: make libxc an optional dependency (enabled by default)

* cp2k: link libint statically

* cp2k: declare statically linked library deps as type=build

* cp2k: add support for PGI compiler

* cp2k: rename smm=none to smm=blas for clarification

* cp2k: blacklist unsupported compilers

* cp2k: mark wannier90 a build-time dep since statically linked

* cp2k: make pexsi and elpa optional

* cp2k: add support for v6.1

* libxc: add version 4.2.3

* cp2k: use pkg-config to link properly to libxsmm

* cp2k: fix OpenMP support by making it explicit

Previously, CP2K accepted threaded ELPA or BLAS, leading to #(CPU) processes
being spawned even though no explicit OpenMP was requested. Now the
`popt` variant should truly be thread free while the `psmp` variant uses
threads also internally.

* cp2k: source tarballs moved to GitHub
2018-11-20 09:23:01 -08:00
Geoffrey Oxberry
605dc8bf85 openblas: add headers property (#9831)
This commit adds only the public headers from the full list of headers
installed by OpenBLAS; this list of headers is the same as in
netlib-lapack.
2018-11-14 21:35:42 -06:00
Todd Gamblin
eea786f4e8 relicense: replace LGPL headers with Apache-2.0/MIT SPDX headers
- remove the old LGPL license headers from all files in Spack
- add SPDX headers to all files
  - core and most packages are (Apache-2.0 OR MIT)
  - a very small number of remaining packages are LGPL-2.1-only
2018-10-17 14:42:06 -07:00
Denis Davydov
2914644b30 openblas: patch experimental USE_TLS makefile option for 0.3.3 (#9474) 2018-10-10 18:58:47 -07:00
Geoffrey Oxberry
4bdfa19d97 openblas: add @0.3.1, patch CMake export bug in @0.3.1:0.3.2 (#9123)
* openblas@0.3.1:0.3.2: patch CMake export bug

See https://github.com/xianyi/OpenBLAS/pull/1703.

* openblas@0.3.1: new version
2018-09-03 20:49:45 -05:00
Geoffrey Oxberry
d54a91fd2b openblas@0.3.3: new version (#9143) 2018-08-31 11:14:37 -07:00
Geoffrey Oxberry
e793f29173 openblas: add version 0.3.2 (#8833) 2018-08-01 19:14:48 -05:00
Adam J. Stewart
908d2dcd4d Add top-level attributes for git M-P packages 2018-07-25 23:10:10 -07:00
becker33
aab5488154 disable openblas intel openmp patch for versions > 0.2.20, fixed upstream (#8638) 2018-07-03 16:25:12 -05:00
Denis Davydov
b5fcd62891 openblas: add 0.3.0 (#8478) 2018-06-14 13:43:05 -05:00
Todd Gamblin
54f97d1dec
Update copyright on LLNL files for 2018. (#7592) 2018-03-24 12:13:52 -07:00
Massimiliano Culpo
cde5fdde20
Openblas needs FC, not F77 (#6435)
fixes #5591
2017-11-24 07:15:01 +01:00
Ondřej Čertík
7a2b3b2588 Add a patch for Intel 18.0.1 (#6392) 2017-11-23 07:28:35 -07:00
Benedikt Riedel
2eb7fabe62 Allow openblas to build on a VM (#6258)
This adds a "virtual_machine" boolean variant which adds build
options that enable building openblas on a VM.
2017-11-15 10:32:02 -08:00
Todd Gamblin
05fa302655
Replace github.com/llnl/spack with github.com/spack/spack (#6142)
We moved to a new GitHub org! Now make the code and docs reflect that.
2017-11-04 17:08:04 -07:00
Todd Gamblin
7dd79094b0 remove wildcards from make spack core and packages
- This removes all wildcard imports EXCEPT `from spack import *` in packages
2017-10-24 10:05:36 +02:00
Denis Davydov
22ef8efce9 openblas: remove extra develop version (#5750) 2017-10-13 12:10:05 +02:00
Brian Van Essen
bd185b8146 Lbann flags (#5747)
* Fixed the datatype flag in the LBANN package.  Also added develop
version to OpenBLAS.

* Fixed where the datatype flag should be set.
2017-10-12 20:23:38 -06:00
Denis Davydov
7f84de52a0 blas_lapack: add multithreading variant consistent in all implementations. (#5340)
* blas_lapack: add multithreading variant

* elemental: update

* intel-mkl: extend to macOS

* rename multithreading to threads

* intel-mkl: avoid long lines

* intel-mkl: make one install error a conflict

* openblas: fix a minor bug in the test
2017-09-23 13:27:42 -07:00
healther
bce26745e3 Add cpu_target variant to openblas (#5090) 2017-09-21 12:28:24 -07:00
Denis Davydov
5c24370512 openblas: add ilp64 option (#5289) 2017-09-12 08:40:28 +02:00
Michael Kuhn
84ae7872d3 Update copyright notices for 2017 (#5295) 2017-09-06 17:44:16 -10:00
Brian Van Essen
7b51791625 Openblas clang fix (#5065)
* Added a package for the MDAnalysis toolkit.

* Openblas now builds with clang when using 0.2.20

* Fixed flake8 error

* Added a guard to fail for openblas+openmp when on OSX systems

* Changed the guard to look for Apple's build of clang and to improve
the error messages.

* Removed blank line.
2017-08-15 16:57:11 -05:00
Jia Li
41361cffea Fixed OpenBLAS compilation error on POWER8 with GCC 7. (#4783)
* Fixed compilation error on POWER8 with GCC 7.

* Restrict patch to ppc64 with gcc.
2017-08-05 12:56:04 -05:00
Sergey Kosukhin
f8dfb6a486 OpenBLAS: one of the patches is not needed starting version 0.2.20. (#4971) 2017-08-04 09:34:58 -05:00
Denis Davydov
ddc1dcd084 openblas: add 0.2.20 (#4915) 2017-07-27 08:51:39 -05:00
Todd Gamblin
cac4362f64 Make LICENSE recognizable by GitHub. (#4598) 2017-06-24 22:22:55 -07:00
Diana Bite
a9a7805626 openblas: Fix build on aarch64. (#4487)
- invoke make with the correct TARGET for aarch64
- foforce PILERDRIVER as openblas cannot correctly detect CPU on aarch64
- update url to more recent version
2017-06-15 06:38:24 -05:00
Adam J. Stewart
ce3ab503de Python command, libraries, and headers (#3367)
## Motivation

Python installations are both important and unfortunately inconsistent. Depending on the Python version, OS, and the strength of the Earth's magnetic field when it was installed, the name of the Python executable, directory containing its libraries, library names, and the directory containing its headers can vary drastically. 

I originally got into this mess with #3274, where I discovered that Boost could not be built with Python 3 because the executable is called `python3` and we were telling it to use `python`. I got deeper into this mess when I started hacking on #3140, where I discovered just how difficult it is to find the location and name of the Python libraries and headers.

Currently, half of the packages that depend on Python and need to know this information jump through hoops to determine the correct information. The other half are hard-coded to use `python`, `spec['python'].prefix.lib`, and `spec['python'].prefix.include`. Obviously, none of these packages would work for Python 3, and there's no reason to duplicate the effort. The Python package itself should contain all of the information necessary to use it properly. This is in line with the recent work by @alalazo and @davydden with respect to `spec['blas'].libs` and friends.

## Prefix

For most packages in Spack, we assume that the installation directory is `spec['python'].prefix`. This generally works for anything installed with Spack, but gets complicated when we include external packages. Python is a commonly used external package (it needs to be installed just to run Spack). If it was installed with Homebrew, `which python` would return `/usr/local/bin/python`, and most users would erroneously assume that `/usr/local` is the installation directory. If you peruse through #2173, you'll immediately see why this is not the case. Homebrew actually installs Python in `/usr/local/Cellar/python/2.7.12_2` and symlinks the executable to `/usr/local/bin/python`. `PYTHONHOME` (and presumably most things that need to know where Python is installed) needs to be set to the actual installation directory, not `/usr/local`.

Normally I would say, "sounds like user error, make sure to use the real installation directory in your `packages.yaml`". But I think we can make a special case for Python. That's what we decided in #2173 anyway. If we change our minds, I would be more than happy to simplify things.

To solve this problem, I created a `spec['python'].home` attribute that works the same way as `spec['python'].prefix` but queries Python to figure out where it was actually installed. @tgamblin Is there any way to overwrite `spec['python'].prefix`? I think it's currently immutable.

## Command

In general, Python 2 comes with both `python` and `python2` commands, while Python 3 only comes with a `python3` command. But this is up to the OS developers. For example, `/usr/bin/python` on Gentoo is actually Python 3. Worse yet, if someone is using an externally installed Python, all 3 commands may exist in the same directory! Here's what I'm thinking:

If the spec is for Python 3, try searching for the `python3` command.
If the spec is for Python 2, try searching for the `python2` command.
If neither are found, try searching for the `python` command.

## Libraries

Spack installs Python libraries in `spec['python'].prefix.lib`. Except on openSUSE 13, where it installs to `spec['python'].prefix.lib64` (see #2295 and #2253). On my CentOS 6 machine, the Python libraries are installed in `/usr/lib64`. Both need to work.

The libraries themselves change name depending on OS and Python version. For Python 2.7 on macOS, I'm seeing:
```
lib/libpython2.7.dylib
```
For Python 3.6 on CentOS 6, I'm seeing:
```
lib/libpython3.so
lib/libpython3.6m.so.1.0
lib/libpython3.6m.so -> lib/libpython3.6m.so.1.0
```
Notice the `m` after the version number. Yeah, that's a thing.

## Headers

In Python 2.7, I'm seeing:
```
include/python2.7/pyconfig.h
```
In Python 3.6, I'm seeing:
```
include/python3.6m/pyconfig.h
```
It looks like all Python 3 installations have this `m`. Tested with Python 3.2 and 3.6 on macOS and CentOS 6

Spack has really nice support for libraries (`find_libraries` and `LibraryList`), but nothing for headers. Fixed.
2017-04-29 17:24:13 -07:00
Brian Van Essen
7f9acfa3b2 Various patches to Openblas for Intel (#4030)
* Added a patch to the openblas package to change the openmp flag for
icc to qopenmp.

* Fixed a linking problem where when using Intel compilers, it was still
pulling in -lgfortran
2017-04-28 14:54:59 -05:00
Adam J. Stewart
46d0ca9d01 Ensure that tests are optional (#3922) 2017-04-21 12:15:39 -05:00
Denis Davydov
0ed18de836 opneblas: fix compilation with clang (#3862)
* opneblas: fix compilation with clang

* indentation
2017-04-17 09:16:18 -05:00
Massimiliano Culpo
ffef681377 new directive: conflicts() (#3125)
* Add conflicts(<spec>) directive
* openblas: added conflicts for intel@16 refs #3119
* added brief docs and unit tests
2017-04-02 11:40:09 -07:00
Denis Davydov
a8c58551ae openblas: raise an error when using unsupported Apple clang (#3577) 2017-03-28 08:14:12 -05:00
Erik Schnetter
55e1550a59 openblas: Run tests only when requested (#3370)
The tests fail on some systems (e.g. Comet at SDSC) that impose limits on the number of processes or threads one can run simultaneously on the head node. Thus the tests should not be run by default.
2017-03-05 12:29:02 -06:00
Denis Davydov
003e841016 openblas: fix flags (#3344) 2017-03-03 19:30:35 -06:00
Massimiliano Culpo
ed582cef68 New interface for passing build information among specs (#1875)
- Added a new interface for Specs to pass build information
  - Calls forwarded from Spec to Package are now explicit
  - Added descriptor within Spec to manage forwarding
  - Added state in Spec to maintain query information
  - Modified a few packages (the one involved in spack install pexsi) to showcase changes

- This uses an object wrapper to `spec` to implement the `libs` sub-calls.
  - wrapper is returned from `__getitem__` only if spec is concrete
  - allows packagers to access build information easily
2017-03-02 10:01:29 -08:00
Denis Davydov
031cde6e25 openblas: add develop version to make it work with Kabylake CPUs (#3192)
* openblas: add develop version to make it work with Kabylake CPUs
* dealii: fix develop branch
2017-02-20 15:40:46 -08:00
健美猫
1de2c53935 Patch openblas Makefile only when version >= 0.2.16. (#3170) 2017-02-17 12:03:43 -08:00
Massimiliano Culpo
fc866ae0fe build systems: simpler, clearer decorators: run_after, run_before (#2860)
* PackageMeta: `run_before` is an alias of `precondition`, `run_after` an alias of `sanity_check`

* PackageMeta: removed `precondition` and `sanity_check`

* PackageMeta: decorators are now free-standing

* package: modified/added docstrings. Fixed the semantics of `on_package_attributes`.

* package: added unit test assertion as side effects of install

* build_systems: factored build-time test running into base class

* r: updated decorators in package.py

* docs: updated decorator names
2017-01-25 08:57:01 -07:00
Gregory Lee
592df25aef build fixes for openblas (#2601)
* build fixes for openblas

* avx2 in openblas nnot supported with older gcc

* merge fix for openblas
2016-12-17 17:04:59 -08:00
Massimiliano Culpo
87c9b01033 openblas: derives from MakefilePackage (#2488)
* MakefilePackage: changed build_args and install_args for consistency with #2464
openblas: derives from MakefilePackage

* MakefilePackage: changed default edit behavior
2016-12-15 10:15:52 -08:00
Barry Smith
3de26ff3d7 openblas: Fixes to get OpenBLAS to install with Intel compilers (#2101)
Funded-by: IDEAS
Project: IDEAS/xSDK
Time: 1 hour
2016-10-25 11:12:22 -07:00
Denis Davydov
1e10309ff7 some fixes to blas/lapack usage in packages (#1852)
* atlas: fix unit test

* openblas: remove symlinks; use lapack_libs.ld_flags in the test

* mkl: fix openmp variant of blas/lapack libs

* intel-parallel-studio: fix openmp variant of blas/lapack libs

* netlib-scalapack: fix blas/lapack for multilib case (e.g. mkl)

* arpack-ng: fix blas/lapack for multilib case (e.g. mkl)

* petsc: explicitly specify blas/lapack

* minor

* cantera: fix blas/lapack usage

* ipopt: fix blas/lapack usage

* netlib-lapack: fix external blas usage

* mfem: fix lapack/blas usage

* superlu-mt: fix blas usage

* flake8 fixes
2016-09-26 10:37:23 -07:00
Massimiliano Culpo
d848559f70 Reworking of lapack_shared_libs and similar properties (#1682)
* Turned <provider>_libs into an iterable

Modifications :
- added class LibraryList + unit tests
- added convenience functions `find_libraries` and `dedupe`
- modifed non Intel blas/lapack providers
- modified packages using blas_shared_libs and similar functions

* atlas : added pthread variant

* intel packages : added lapack_libs and blas_libs

* find_library_path : removed unused function

* PR review : fixed last issues

* LibraryList : added test on __add__ return type

* LibraryList : added __radd__ fixed unit tests

fix : failing unit tests due to missing `self`

* cp2k and dependecies : fixed blas-lapack related statements in package.py
2016-09-21 12:27:59 -07:00
Erik Schnetter
2e490050f6 Update OpenBLAS to 0.2.19 (#1702) 2016-09-20 02:13:25 -07:00
Todd Gamblin
84e331c586 Remove unneeded noqa comments. 2016-08-10 16:33:39 -07:00