Commit Graph

87 Commits

Author SHA1 Message Date
Taillefumier Mathieu
909f185f02
Update dbcsr and cp2k to latest version (#38939)
Co-authored-by: Mikael Simberg <mikael.simberg@iki.fi>
2023-07-18 11:48:42 +02:00
Taillefumier Mathieu
64c6d63675
Update cp2k recipe to use cmake or the current build system (#35718)
* Update cp2k recipe to use cmake or the current build system

Offers the possibility to build cp2k with the new cmake build system. commands like this are now supported

spack install cp2k@master build_system=cmake +.....

the recipe supports the following optional functionalities

- superlu, cosma, sirius, spglib, metis, spglib, libxc, libint, cuda/rocm, mkl/openblas/sci (and others), mpi, openmp, dbcsr
- dbcsr is built separately using the currently available recipe.

Two PRs need to be merged to be fully functional (cosma update in spack + one PR in cp2k github).

* Fix indentation

* Fix indentation

* Update libvori

* More typos

* Simplify BLAS/LAPACK

* Simplify BLAS/LAPACK

* Add A100 gpu value

* Fix typo

* Add the enable_regtests option

if -DCP2K_ENABLE_REGTESTS=ON (+enable_regtests with spack) then the location of the binary executables will be in the cp2k root directory under exe/build-cmake-*. This option is needed to run the regtests afterwards.

* Minor update

* more fixes

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

Co-authored-by: Mikael Simberg <mikael.simberg@iki.fi>

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

Co-authored-by: Mikael Simberg <mikael.simberg@iki.fi>

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

Co-authored-by: Mikael Simberg <mikael.simberg@iki.fi>

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

Co-authored-by: Mikael Simberg <mikael.simberg@iki.fi>

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

Co-authored-by: Mikael Simberg <mikael.simberg@iki.fi>

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

Co-authored-by: Mikael Simberg <mikael.simberg@iki.fi>

* small changes

* Remove any reference to nvidia architecture in the rocm list

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

Co-authored-by: Alberto Invernizzi <9337627+albestro@users.noreply.github.com>

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

Co-authored-by: Alberto Invernizzi <9337627+albestro@users.noreply.github.com>

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

Co-authored-by: Alberto Invernizzi <9337627+albestro@users.noreply.github.com>

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

Co-authored-by: Alberto Invernizzi <9337627+albestro@users.noreply.github.com>

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

Co-authored-by: Alberto Invernizzi <9337627+albestro@users.noreply.github.com>

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

Co-authored-by: Alberto Invernizzi <9337627+albestro@users.noreply.github.com>

* Final reformating

* Update py-fypp

---------

Co-authored-by: Mikael Simberg <mikael.simberg@iki.fi>
Co-authored-by: Alberto Invernizzi <9337627+albestro@users.noreply.github.com>
2023-07-10 14:02:52 +02:00
Adam J. Stewart
45838cee0b
Drop Python 2 super syntax (#38718) 2023-07-05 09:04:29 -05:00
AMD Toolchain Support
d30698d9a8
cp2k fixes for aocc (#37758) 2023-05-30 16:33:00 -07:00
Tiziano Müller
44705b0a6e
cp2k: fix builds on macOS, workaround reported issue with __contains__ (#35584)
Co-authored-by: Robert Cohn <rscohn2@gmail.com>
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2023-03-01 12:01:00 -08:00
Adam J. Stewart
603569e321
Style: black 23, skip magic trailing comma (#35351)
* Style: black 23, skip magic trailing commas

* isort should use same line length as black

* Fix unused import

* Update version of black used in CI

* Update new packages

* Update new packages
2023-02-16 23:06:12 -06:00
Mosè Giordano
5079086019
cp2k: explicitly use C99 standard (#34957) 2023-02-16 17:45:06 +01:00
Rémi Lacroix
a00b92a69f
cp2k: add v2023.1 (#35346) 2023-02-16 10:33:48 +01:00
Massimiliano Culpo
ddecf07045
Use the maintainers directive in all packages (#35201) 2023-02-01 21:07:25 -08:00
Harmen Stoppels
fce95e2efb
license year bump (#34921)
* license bump year
* fix black issues of modified files
* mypy
* fix 2021 -> 2023
2023-01-18 14:30:17 -08:00
Annop Wongwathanarat
10d5f14c85
cp2k: enable linking with armpl-gcc for BLAS and FFT (#34981) 2023-01-17 09:34:43 -08:00
Glenn Johnson
645faad379
cp2k: add v2022.2, update CUDA settings (#34757) 2023-01-16 14:13:40 +01:00
Adam J. Stewart
c5883fffd7
Python: drop EOL versions (#33898)
This PR removes [end of life](https://endoflife.date/python) versions of Python from Spack. Specifically, this includes all versions of Python older than 3.7.

See https://github.com/spack/spack/discussions/31824 for rationale. Deprecated in #32615. And #28003.

For anyone using software that relies on Python 2, you have a few options:

* Upgrade the software to support Python 3. The `3to2` tool may get you most of the way there, although more complex libraries may need manual tweaking.
* Add Python 2 as an [external package](https://spack.readthedocs.io/en/latest/build_settings.html#external-packages). Many Python libraries do not support Python 2, but you may be able to add older versions that did once upon a time.
* Use Spack 0.19. Spack 0.19 is the last release to officially support Python 3.6 and older
* Create and maintain your own [custom repository](https://spack.readthedocs.io/en/latest/repositories.html). Basically, you would need a package for Python 2 and any other Python 2-specific libraries you need.
2022-11-22 15:02:30 -08:00
AMD Toolchain Support
6fb13c0fc5
fixed cp2k libcp2k.pc (#32349)
Co-authored-by: Prasanthi <pdonthir@amd.com>
2022-08-25 12:01:02 -07:00
Maciej Wójcik
b24a068f3d
gromacs: add CP2K (#31836) 2022-08-08 18:13:31 +02:00
Todd Gamblin
f52f6e99db black: reformat entire repository with black 2022-07-31 13:29:20 -07:00
Tom Scogland
18c2f1a57a
refactor: packages import spack.package explicitly (#30404)
Explicitly import package utilities in all packages, and corresponding fallout.

This includes:

* rename `spack.package` to `spack.package_base`
* rename `spack.pkgkit` to `spack.package`
* update all packages in builtin, builtin_mock and tutorials to include `from spack.package import *`
* update spack style
  * ensure packages include the import
  * automatically add the new import and remove any/all imports of `spack` and `spack.pkgkit`
    from packages when using `--fix`
  * add support for type-checking packages with mypy when SPACK_MYPY_CHECK_PACKAGES
    is set in the environment
* fix all type checking errors in packages in spack upstream
* update spack create to include the new imports
* update spack repo to inject the new import, injection persists to allow for a deprecation period

Original message below:
 
As requested @adamjstewart, update all packages to use pkgkit.  I ended up using isort to do this,
so repro is easy:

```console
$ isort -a 'from spack.pkgkit import *' --rm 'spack' ./var/spack/repos/builtin/packages/*/package.py
$ spack style --fix
```

There were several line spacing fixups caused either by space manipulation in isort or by packages
that haven't been touched since we added requirements, but there are no functional changes in here.

* [x] add config to isort to make sure this is maintained going forward
2022-05-28 12:55:44 -04:00
Tiziano Müller
f5250da611
cp2k: fix unbound var use without cuda (#30736)
fixes #30631
2022-05-19 11:38:00 +02:00
Adam J. Stewart
5df10c04cd
Use stable URLs and ?full_index=1 for all github patches (#29239)
The number of commit characters in patch files fetched from GitHub can change,
so we should use `full_index=1` to enforce full commit hashes (and a stable
patch `sha256`).

Similarly, URLs for branches like `master` don't give us stable patch files,
because branches are moving targets. Use specific tags or commits for those.

- [x] update all github patch URLs to use `full_index=1`
- [x] don't use `master` or other branches for patches
- [x] add an audit check and a test for `?full_index=1`

Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2022-03-23 08:50:00 +01:00
Tiziano Müller
94ce7f5040
cray-libsci/cp2k: add constraints to get consistently linked executables (#29396)
* cray-libsci: only be a provider for scalapack with +mpi

If a package explicitly links the scalapack provider we might otherwise end up with different variants of libsci being linked: the explicitly linked one and the one added by the Cray compiler wrappers.

* cp2k: require cray-libsci+openmp with +openmp for consistency

otherwise we might get 2 different libsci linked: one explicitly, the other one via the Cray compiler wrappers, leading at least to segfaults during cleanup

* cp2k: depend on cray-fftw+openmp with +openmp
2022-03-08 19:32:15 +01:00
Tiziano Müller
37f021ef3c
cp2k: bump version to 9.1, fix building with CUDA (#29108)
first step towards fixing #28554
2022-02-22 11:26:47 +01:00
Todd Gamblin
93377942d1 Update copyright year to 2022 2022-01-14 22:50:21 -08:00
AMD Toolchain Support
6f95296972
cp2k: fix dependency libraries (#28128)
* fixing build issues in cp2k dependencies

* fixing style issues

* reverting elpa.prefix.lib and grammer correction

* addressing the suggestions
2022-01-03 10:32:26 -05:00
Tiziano Müller
08b00f8804
cp2k: fix build issues without cuda, and with elpa on openSUSE (#27738) 2021-12-01 17:00:01 -06:00
Massimiliano Culpo
5eba5dc271
Make CUDA and ROCm architecture conditional (#27185)
* Make CUDA and ROCm architecture conditional

fixes #14337

The variant to specify which architecture to use
for CUDA and ROCm are now conditional on +cuda and
+rocm respectively.

* cp2k: make all CUDA related variants conditional on +cuda
2021-11-22 07:54:19 -05:00
Harmen Stoppels
4acda0839b
cp2k: use variant propagation trick for virtuals (#26737) 2021-10-14 23:11:22 +02:00
Tiziano Müller
2ca58e91d6
cp2k: bugfix for intel oneapi (#26143) 2021-10-04 14:41:49 +02:00
Harmen Stoppels
b9e72557e8
Remove .99 from version ranges (#26422)
In most cases, .99 can be omitted thanks to #26402 .
2021-10-03 09:09:02 -04:00
Tiziano Müller
fa715c9892
cp2k: update elpa and sirius dependencies, fix build with mpich and gcc@10 (#24376)
* cp2k: fix build with GCC-10+ and MPICH

* cp2k: update SIRIUS and ELPA dependencies

* elpa: add version 2021.05.001, add ROCm support, include SVE flags
2021-08-09 13:46:15 +02:00
Joe Heaton
6547f41096
Rename cray compiler to cce (#24653)
cp2k was using the outdated and Incorrect compiler name `cray`.
2021-07-02 12:15:43 -07:00
Massimiliano Culpo
3d11716e54
Add when context manager to group common constraints in packages (#24650)
This PR adds a context manager that permit to group the common part of a `when=` argument and add that to the context:
```python
class Gcc(AutotoolsPackage):
    with when('+nvptx'):
        depends_on('cuda')
        conflicts('@:6', msg='NVPTX only supported in gcc 7 and above')
        conflicts('languages=ada')
        conflicts('languages=brig')
        conflicts('languages=go')
```
The above snippet is equivalent to:
```python
class Gcc(AutotoolsPackage):
    depends_on('cuda', when='+nvptx')
    conflicts('@:6', when='+nvptx', msg='NVPTX only supported in gcc 7 and above')
    conflicts('languages=ada', when='+nvptx')
    conflicts('languages=brig', when='+nvptx')
    conflicts('languages=go', when='+nvptx')
```
which needs a repetition of the `when='+nvptx'` argument. The context manager might help improving readability and permits to group together directives related to the same semantic aspect (e.g. all the directives needed to model the behavior of `gcc` when `+nvptx` is active). 

Modifications:

- [x] Added a `when` context manager to be used with package directives
- [x] Add unit tests and documentation for the new feature
- [x] Modified `cp2k` and `gcc` to show the use of the context manager
2021-07-02 08:43:15 -07:00
Robert Mijakovic
177750b215
cp2k: add v8.2 (#24265)
Co-authored-by: Robert Mijakovic <robert.mijakovic@lxp.lu>
2021-06-11 15:43:14 -06:00
Harmen Stoppels
e3c59264d8
cray: fix builds on Alps/Eiger (CSCS) (#23470)
Co-authored-by: Tiziano Müller <tiziano.mueller@chem.uzh.ch>
2021-05-18 02:25:14 -06:00
Tiziano Müller
aacba57e0a
cp2k: update libvori and libxc dependencies (#23553) 2021-05-11 11:09:47 +02:00
AMD Toolchain Support
9a453b2e74
adding AOCC support for CP2K 7.1 (#22641) 2021-03-31 13:22:04 +02:00
Tiziano Müller
3305a39c55
CP2K: update libxc dep, SIRIUS: update spla dep for 7+ (#22249) 2021-03-19 14:52:07 -06:00
AMD Toolchain Support
9eb5c8f843
cp2k: added support for AMD toolchain (#21371) 2021-02-08 11:03:56 +01:00
Tiziano Müller
5443558717
cp2k: add v8.1 (#20829) 2021-01-13 09:39:35 +01:00
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