Commit Graph

49 Commits

Author SHA1 Message Date
Harmen Stoppels
1d7babe955
dbcsr, cp2k: fix cuda arch conflicts in asp concretizer (#20784) 2021-01-12 18:01:32 +01:00
Todd Gamblin
a8ccb8e116 copyrights: update all files with license headers for 2021
- [x] add `concretize.lp`, `spack.yaml`, etc. to licensed files
- [x] update all licensed files to say 2013-2021 using
      `spack license update-copyright-year`
- [x] appease mypy with some additions to package.py that needed
      for oneapi.py
2021-01-02 12:12:00 -08:00
Tiziano Müller
5d2c09e19e
Add libvori and support for libvori (and spglib) in CP2K (#20508)
* packages: initial commit of libvori

* cp2k: add support for libvori

* cp2k: add support for spglib
2020-12-24 17:12:34 -06:00
Andrew W Elble
dcf3d8332a
cp2k: fix lmax variant to use tuple (#19780)
* cp2k: fix lmax variant to use tuple

discovered during testing #19501

@dev-zero

* retain conversion to string
2020-11-06 20:58:38 -06:00
Tiziano Müller
f921bcbe0b
cp2k, libxc, libint: fix builds with %intel, resp. intel-parallel-studio+mkl (#19522)
* cp2k: locate correct include dir when using intel-parallel-studio+mkl for fftw-api

* libxc: drop arch-specific intel opt. flags

fixes #17794

* libint: drop arch-specific intel opt. flags, always build Fortran example with FC

fixes #17509
2020-10-26 16:32:15 +01:00
Scott McMillan
0015dd0bf8
Enable packages to use the NVIDIA HPC SDK (#19452)
* Enable packages to use the NVIDIA HPC SDK

* fix linter and review items

* fix linter issue

Co-authored-by: Scott McMillan <smcmillan@nvidia.com>
2020-10-22 16:42:48 -05:00
Tiziano Müller
0d5c065678
libvdwxc: unbreak concretization, request fftw-api (#18688)
* libvdwxc: unbreak concretization, request fftw-api

mixing both fftw and fftw-api in a dependency tree can trigger the
following:

```
$ spack spec cp2k@master +sirius
==> [2020-09-16-12:36:06.552981] sirius applying constraint gsl
==> [2020-09-16-12:36:06.554270] sirius applying constraint openblas@0.3.10%gcc@7.5.0~consistent_fpcsr~ilp64+pic+shared threads=none arch=linux-opensuse_leap15-sandybridge
Traceback (most recent call last):
  File "./bin/spack", line 64, in <module>
    sys.exit(spack.main.main())
  File "/data/tiziano/debug-spack/spack2/lib/spack/spack/main.py", line 762, in main
    return _invoke_command(command, parser, args, unknown)
  File "/data/tiziano/debug-spack/spack2/lib/spack/spack/main.py", line 490, in _invoke_command
    return_val = command(parser, args)
  File "/data/tiziano/debug-spack/spack2/lib/spack/spack/cmd/spec.py", line 103, in spec
    spec.concretize()
  File "/data/tiziano/debug-spack/spack2/lib/spack/spack/spec.py", line 2228, in concretize
    user_spec_deps=user_spec_deps),
  File "/data/tiziano/debug-spack/spack2/lib/spack/spack/spec.py", line 2716, in normalize
    visited, all_spec_deps, provider_index, tests)
  File "/data/tiziano/debug-spack/spack2/lib/spack/spack/spec.py", line 2654, in _normalize_helper
    dep, visited, spec_deps, provider_index, tests)
  File "/data/tiziano/debug-spack/spack2/lib/spack/spack/spec.py", line 2613, in _merge_dependency
    visited, spec_deps, provider_index, tests)
  File "/data/tiziano/debug-spack/spack2/lib/spack/spack/spec.py", line 2654, in _normalize_helper
    dep, visited, spec_deps, provider_index, tests)
  File "/data/tiziano/debug-spack/spack2/lib/spack/spack/spec.py", line 2554, in _merge_dependency
    provider = self._find_provider(dep, provider_index)
  File "/data/tiziano/debug-spack/spack2/lib/spack/spack/spec.py", line 2489, in _find_provider
    providers = provider_index.providers_for(vdep)
  File "/data/tiziano/debug-spack/spack2/lib/spack/spack/provider_index.py", line 80, in providers_for
    return sorted(s.copy() for s in result)
  File "/data/tiziano/debug-spack/spack2/lib/spack/llnl/util/lang.py", line 249, in <lambda>
    lambda s, o: o is not None and s._cmp_key() < o._cmp_key())
TypeError: '<' not supported between instances of 'str' and 'NoneType'
```

while at the same point disallowing MKL as a fftw provider.
Solving both issues by depending on `fftw-api@3` instead and adding a
conflict on `^fftw~mpi` when using `+mpi` (thanks to alalazo).

* cp2k: use conflicts instead of runtime checks for fftw/openblas variants
2020-09-16 10:41:46 -05:00
Tiziano Müller
2bc9821c43
update CP2K pkg for 8+ (#18607)
* cp2k: do not support ~openmp for v8+

* sirius: version bump

* cp2k: fix overlapping deps for elpa

fixes #18029

* cp2k: update SIRIUS dependency for v8+

* spfft: requires CMake 3.11+

* cp2k: fix build with +sirius
2020-09-10 10:00:31 -05:00
t-nojiri
b0a1a7e9aa
cp2k: Add depend on libxc@4.3.4. (#18346)
* cp2k: Add depend on libxc@4.3.4.

* cp2k: The fix of depend of libxc@4.3.4 was redone.
2020-08-31 10:27:23 -05:00
darmac
c2cd728e03
cp2k: support for aarch64 (#17786) 2020-07-31 16:17:31 -05:00
Tiziano Müller
ec1237479e
cp2k: make libint optional (#17618) 2020-07-21 09:13:59 -07:00
Fabien Bruneval
6f824b598c
cp2k: variant tuning lmax was broken (#17266)
* cp2k: variant tuning `lmax` was broken

- `spack install cp2k lmax=6` now works

* Update var/spack/repos/builtin/packages/cp2k/package.py

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

* Update var/spack/repos/builtin/packages/cp2k/package.py

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

* Update var/spack/repos/builtin/packages/cp2k/package.py

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

* Update var/spack/repos/builtin/packages/cp2k/package.py

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

* Update var/spack/repos/builtin/packages/cp2k/package.py

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

* Update var/spack/repos/builtin/packages/cp2k/package.py

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

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2020-06-29 21:24:25 -05:00
Massimiliano Culpo
14599f09be
Separate Apple Clang from LLVM Clang (#17110)
* Separate Apple Clang from LLVM Clang

Apple Clang is a compiler of its own. All places
referring to "-apple" suffix have been updated.

* Hack to use a dash in 'apple-clang'

To be able to use autodoc from Sphinx we need
a valid Python name for the module that contains
Apple's Clang code.

* Updated packages to account for the existence of apple-clang

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

* Added unit test for XCode related functions

Co-authored-by: Gregory Becker <becker33@llnl.gov>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2020-06-25 11:18:48 -05:00
Tiziano Müller
3115b5c758
CP2K: arch file improvements and blas-dependency simplification (#16074)
* cp2k: prettify arch-file, call pkg-config directly

this allows to re-use the arch-file without having to load the complete
Spack environment, for example after a dev-build

* cp2k: use consistency check instead of blas lib enum

this makes using other BLAS/LAPACK implementations possible without
explicitly adding support for them

* cp2k: add basic support for Cray and XL Compilers, correct Intel fp mode

* cp2k: add myself as maintainer

* cp2k: use "master" to denote the git version

* cp2k: use spack_cc/fc/cxx when possible, set CXX explicitly

* cp2k: set __MKL when using the MKL, not just the Intel compiler

* cp2k: drop self. when referencing spec where possible

* cp2k: add forgotten elpa+openmp dep

* cp2k: set C++14 for recent versions
2020-04-27 19:42:33 -05:00
Tiziano Müller
f917f7149e
cp2k: add version 7.1 (#16037)
* cp2k: add version 7.1

* cp2k: add option to use COSMA for CP2K 8+
2020-04-14 13:33:49 -05:00
Todd Gamblin
4af6303086
copyright: update copyright dates for 2020 (#14328) 2019-12-30 22:36:56 -08:00
Glenn Johnson
3690bc44bd Set full xiar path when building cp2k with intel compiler (#14268) 2019-12-22 16:19:12 -06:00
Tiziano Müller
0a5c184a5d CP2K: drop json-fortran dependency and add support for the Nvidia V100 (#13468)
* cp2k: drop json-fortran dep since that's now handled in SIRIUS internally

* cp2k: gained support for Nvidias V100
2019-10-29 14:08:58 +01:00
Tiziano Müller
d99b92febd libint + cp2k: 2-stage build with 'tune' and 'fortran' variants (#12475)
* libint: switch to 2-stage build for 2.6.0+

* libint: add tune and fortran variants

* cp2k: add support for libint >= 2.0

* cp2k: use pkg-config for linking libxc
2019-10-02 21:31:19 +02:00
Massimiliano Culpo
31e5318c24
Removed references to '(-march|-mtune|-mcpu)=native' (#12948)
Now that Spack injects microarchitecture specific optimizations for
the selected target, packages should avoid adding flags that could
step over those.
2019-09-26 10:02:08 +02:00
Tiziano Müller
95fec7adfc CP2K/SIRIUS: add support for building with CUDA, fix CP2K build with MKL (#11418)
* cp2k/sirius: add CUDA support

* cp2k: fix building with MKL

* sirius: make sure to link against Spacks blas/lapack/scalapack
2019-08-13 19:59:08 +02:00
Tiziano Müller
92c4567404 elpa: override headers prop for common include-dir localization
... and apply this in SIRIUS, CP2K & QE.

Thanks to @scheibelp for the idea.
2019-05-10 03:43:02 +09:00
Tiziano Müller
f87722b74d packages/cp2k: require libxsmm 1.11+ 2019-05-10 03:43:02 +09:00
Tiziano Müller
4b3e43cc64 packages/cp2k: build with -ggdb with GNU for backtraces 2019-05-10 03:43:02 +09:00
Tiziano Müller
f343d6fc68 packages/cp2k: add support for sirius 2019-05-10 03:43:02 +09:00
Tiziano Müller
d2786ec064 CP2K package: add versions and tests, adjust optimization flags (#11263)
* Remove -ffast-math optimization flag
* Add 'develop' version which points to git repo
* Depend on libint for all versions >= 3.0
* Build directory is different for versions >= 7 (including develop)
* Add "make test" as post install check
2019-05-01 04:52:13 +09:00
Massimiliano Culpo
b3dd95bd62
cp2k is now a MakefilePackage (#10570)
* cp2k: archive the Makefile after a successful installation

* cp2k: all checksums are now sha256

* libint: all checksums are now sha256 + added versions 2.4.X

* libxc: all checksums are now sha256 + added version 4.3.2

* cp2k: os.path.join instead of join_path + simplified openmp flags

* cp2k: turned into a MakefilePackage

* cp2k: refactored edit method so that Makefile writing happens last
2019-02-14 07:11:20 +01:00
Todd Gamblin
6f50cd52ed copyright: update license headers for 2013-2019 copyright. 2019-01-01 00:44:28 -08: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
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
Adam J. Stewart
73c978ddd9 install_tree, copy_tree can install into existing directory structures (#8289)
Replace use of `shutil.copytree` with `copy_tree` and `install_tree` functions in `llnl.util.filesystem`.

- `copy_tree` copies without setting permissions.  It should be used to copy files around in the build directory.
- `install_tree` copies files and sets permissions.  It should be used to copy files into the installation directory.
- `install` and `copy` are analogous single-file functions.
- add more extensive tests for these functions
- update packages to use these functions.
2018-08-15 09:30:09 -07:00
Todd Gamblin
54f97d1dec
Update copyright on LLNL files for 2018. (#7592) 2018-03-24 12:13:52 -07:00
baip
697f3ea71d cp2k: add dependency on smm and libxc & new version 5.1 (#6194)
* cp2k: add libxsmm dependency

* cp2k: add libxc dependency

* cp2k: add smm variant to select from libxsmm or libsmm

* cp2k: add version 5.1
2017-11-15 16:49:08 -07: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
Michael Kuhn
84ae7872d3 Update copyright notices for 2017 (#5295) 2017-09-06 17:44:16 -10:00
Todd Gamblin
cac4362f64 Make LICENSE recognizable by GitHub. (#4598) 2017-06-24 22:22:55 -07:00
Massimiliano Culpo
087b3885f9 cp2k: added missing macros to the makefile (#88) (#4589) 2017-06-23 11:14:01 -05:00
Massimiliano Culpo
306f158c73 cp2k: fixed compilation issues for intel stack
Added DFLAGS to the `make.inc` file being written.
These macros are also added to the language specific variables
like CFLAGS, CXXFLAGS and FCFLAGS. Changed `spec.satisfies('foo')`
with `'foo' in spec` in `intel-mkl`, see #4135. Added a basic
build interface to `intel-mpi`.
2017-05-09 18:46:42 +02: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
Massimiliano Culpo
f9c0348891 cp2k: update to 4.1 + update of dependencies (#3561)
* libint: updated version, ported to AutotoolsPackage

* elpa: updated version, ported to AutotoolsPackage

* wannier90: updated version, ported to MakefilePackage

* pexsi: updated version, ported to MakefilePackage

* cp2k: updated version, removed wannier 90 from dependencies if cp2k@4.1

* plumed: updated version

Modifications:

* modules has been turned into a single variant, as different versions
  have different modules available
* added dictionaries for patches

* netlib-scalapack: ported to CMakePackage
2017-03-30 09:46:05 -05:00
Adam J. Stewart
a2d70a45fb Allow find_libraries to accept lists or strings (#3363)
* Allow find_libraries to accept lists or strings

* Convert one more example from list to string
2017-03-04 11:23:57 -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
Massimiliano Culpo
50fcade81b cp2k : added support for libint, fixed compilation issues on elpa (#1889) 2016-10-03 08:25:36 -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
Massimiliano Culpo
3254d2f8f9 cp2k : added dependencies (#1724)
* wannier90 : added package (#24)

* wannier90 : added package

* cp2k : added dependency on wannier90

* elpa : updated package, added cp2k dependency (#26)

Conflicts:
	var/spack/repos/builtin/packages/elpa/package.py
2016-09-21 00:53:06 -07:00
Massimiliano Culpo
497bbb3ae3 added package : pexsi (#1550)
* pexsi : added package
* cp2k : added pexsi (works for gcc+openmpi with and without plumed)
2016-09-03 08:13:47 -07:00
Ben Boeckel
0d17d90b29 packages: mark builddeps as type='build' 2016-08-15 10:45:19 -04:00
Massimiliano Culpo
15d9fb1879 plumed : adding dependents
* cp2k : added plumed
* gromacs : patched pme load balancing
* gromacs : added plumed
2016-08-09 09:23:53 +02:00
alalazo
ec09dfe5d1 cp2k : added package 2016-08-01 10:41:33 +02:00