Compare commits

...

1229 commits

Author SHA1 Message Date
Ole Schütt
11454568b3
Fix conventions in mode_selective.F (#5614) 2026-07-21 14:13:55 +02:00
SY Wang
2a9776c2cd
Libxc 7.1.1 -> 7.1.2 (#5612) 2026-07-21 10:43:21 +02:00
xysun
a0df33dd6a
Add MACE support interface (#5580)
Co-authored-by: Ole Schütt <ole@schuett.name>
2026-07-20 23:42:41 +02:00
SY Wang
290501bb7f
Libxc 7.0.0 -> 7.1.1 (#5607) 2026-07-20 17:55:05 +02:00
Franz Pöschel
3d5583cc72
Revert custom GauXC patches (#5610) 2026-07-20 11:43:17 +02:00
Johann Potot.
a05d36a5d9
Test native SKALA chunk routing across SCF iterations (#5555)
Co-authored-by: Johann Pototschnig <j.pototschnig@hzdr.de>
2026-07-20 11:42:52 +02:00
SY Wang
f4d43ab54f
Test xTB/regtest-3-spglib requires tblite (#5606) 2026-07-20 09:47:51 +02:00
dependabot[bot]
9111030217
Bump torch from 2.11.0 to 2.13.0 in /tools/pao-ml (#5604)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-17 23:04:52 +02:00
Franz Pöschel
be2d3823ac
GauXC caching: Cleanup (#5600)
Co-authored-by: AI Agent <ai-agent@localhost>
2026-07-17 14:44:52 +02:00
SY Wang
f6c0ee4712
Improve input keyword metadata rendering (#5569) 2026-07-17 14:34:23 +02:00
Jiacheng Xu
4ca962cc2c
CMake: Fix dependent option declarations (#5601) 2026-07-17 14:16:57 +02:00
SY Wang
8f16beb039
Move SCF MO k-point symmetry transform helper out of qs_wannier90 (#5598) 2026-07-17 14:14:45 +02:00
SY Wang
df8ab74de5
CMake: Move out-of-source builds requirement more ahead (#5585) 2026-07-17 13:05:07 +02:00
Frederick Stein
3caaa28e3b
Bump fortitude to version 0.9.0 and consider some of its new rules (#5597) 2026-07-17 08:19:44 +02:00
Franz Pöschel
39fe4c47c6
Gauxc object caching (#5340)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
Co-authored-by: Thomas Kuehne <kuehne88@users.noreply.github.com>
2026-07-15 13:48:13 +02:00
HE Zilong
ea663e99cf
Address issues #1498 and #4023 (#5588) 2026-07-15 13:35:03 +02:00
Ole Schütt
7a5c6862f4
Increase development version after 2026.2 release (#5593) 2026-07-15 13:25:49 +02:00
Dynamics of Condensed Matter
c92cc08b45
Fix TBLITE forces and stress for periodic k-point calculations (#5582)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-07-14 13:37:50 +02:00
Dynamics of Condensed Matter
97cfbf5b46
Fix Bloch phases for fully symmetry-reduced k-point grids (#5581)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-07-13 19:41:54 +02:00
Ole Schütt
668b9a7f8c
GLBOPT: Reduce output of tests (#5586) 2026-07-13 18:28:32 +02:00
Ole Schütt
c823c920aa
Increase tolerance of OH_NATIVE_GPW_PBE_UKS_REFERENCE.inp (#5587) 2026-07-13 18:27:48 +02:00
SY Wang
2c97d88377
(P)DOS: Restore default behavior of output data (#5564) 2026-07-13 16:22:13 +02:00
HE Zilong
d2d9c0e403
Docs: write build timstamp to page footer, link past releases in CP2K_INPUT, add acronyms, add notes about NaN/Inf, edit convergence.md (#5579) 2026-07-13 10:55:09 +02:00
SY Wang
7de47fd987
Remove unused beta routines and move digamma to mathlib (#5568) 2026-07-13 09:45:08 +02:00
SY Wang
d4bfb39614
Toolchain: Download ELPA and PLUMED from cp2k.org (#5583) 2026-07-12 17:35:05 +02:00
Matthias Krack
c835e6b7b6
Disable DLA-Future only with MPICH (#5578) 2026-07-11 16:53:23 +02:00
SY Wang
440cf4f012
CMake: Remove cmake_minimum_required from Config 2026-07-10 18:44:13 +00:00
Matthias Krack
113a7dbab1
Update local spack recipe for gauxc (#5574) 2026-07-10 18:09:11 +02:00
Ole Schütt
b2ac3daf86
PAO-ML: Add pao-diff.py tool (#5577) 2026-07-10 16:55:19 +02:00
Matthias Krack
e2d766a6da
Drop local spack recipe for dbcsr (#5576) 2026-07-10 16:14:53 +02:00
Matthias Krack
29578c7298
Sync CI dockerfiles (see #5462) (#5545) 2026-07-10 13:46:16 +02:00
Johann Potot.
a2edeeb2c6
small fix for correct energy printing in gfn (#5566)
Co-authored-by: Johann Pototschnig <j.pototschnig@hzdr.de>
2026-07-10 09:50:06 +02:00
Stefano Battaglia
ad1d558f05
refactor: Remove OneDFT branding from GauXC interface (#5563)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-10 09:05:04 +02:00
HE Zilong
3c427e6f4d
Docs: add troubleshooting.md, convergence.md, CONTRIBUTING.md symbolic link, and contributions to changelog (#5522) 2026-07-10 08:59:09 +02:00
SY Wang
867b9852cc
toolchain/build_cp2k.sh: Always re-create build dir if not --rebuild-only (#5560) 2026-07-09 23:16:33 +02:00
Matthias Krack
61b9195a45
Drop local spack recipe for libfci (#5567) 2026-07-09 20:53:15 +02:00
Matthias Krack
b7af1c16c0
Simplify spack recipe for libfci (#5562) 2026-07-09 16:58:20 +02:00
Matthias Krack
f7216f7eed
Drop local spack recipes for elpa, exchcxx and gau2grid (#5561) 2026-07-09 12:13:12 +02:00
Matthias Krack
0ea840e1ab
Drop local spack recipe for IntegratorXX (#5558) 2026-07-09 09:14:13 +02:00
SY Wang
1b0cc9d292
Expose libcp2k C API procedures explicitly (#5557) 2026-07-08 16:08:32 +02:00
Taillefumier Mathieu
7909f53bfa
Make the grid gpu code less opaque (#5540)
Co-authored-by: Mathieu Taillefumier <mathieu.taillefumier@free.fr>
2026-07-08 15:29:50 +02:00
Matthias Krack
39e6d08f13
Drop local spack recipe for libxs (#5556) 2026-07-08 15:18:04 +02:00
SY Wang
345b391c5e
make_cp2k.sh: Use Spack v1.2.0 (#5546) 2026-07-08 12:39:19 +02:00
SY Wang
cccb9b4cd4
Toolchain: PLUMED 2.10.1, ELPA 2026.02.002 (#5553) 2026-07-08 12:24:17 +02:00
Matthias Krack
6d68f17818
Update usage doc and version for make_cp2k.sh (#5543) 2026-07-08 11:06:37 +02:00
Matthias Krack
e9dba43327
elpa 2026.02.001 -> 2026.02.002 (spack) (#5554) 2026-07-08 10:58:30 +02:00
Matthias Krack
ffd91bc41a
plumed 2.10.0 -> 2.10.1 (bug fix release) (#5551) 2026-07-08 09:48:43 +02:00
Ole Schütt
dd9e322d3b
Fix conventions in libgint_wrapper.F (#5552) 2026-07-08 08:41:21 +02:00
Ole Schütt
f6e87dc039
CODEOWNERS: Add owners for post SCF methods (#5547) 2026-07-07 17:05:07 +02:00
Bibek Samal
1ae7fa728c
Fix perturbative SOC sign bug and molecular SOC path (#5513) 2026-07-07 11:53:22 +02:00
SY Wang
9ac08c90f1
Shorten New Pulay iteration label (#5544) 2026-07-07 11:51:59 +02:00
SY Wang
b07e6de83f
Docs: Clean old-Makefile mentions (#5541) 2026-07-07 11:46:50 +02:00
hforbert
fe787632bd
add BCMD to upcoming changelog (#5542) 2026-07-06 16:34:17 +02:00
Matthias Krack
be0a27374c
Enable spack build with libgint (#5524) 2026-07-06 16:12:20 +02:00
Matthias Krack
c7767d20a3
Append version tag to UZH database files (#5520) 2026-07-06 14:31:23 +02:00
HE Zilong
473752caaa
Emit a warning in CIF file about the tentative part of its format (#5536) 2026-07-06 11:19:52 +02:00
SY Wang
0ff4726358
Toolchain: Drop obsolete --without-slurm for MPICH (#5535) 2026-07-06 11:13:08 +02:00
SY Wang
291bd4d74a
Re-enable QS/regtest-negf-xtb-1 test (#5532) 2026-07-06 11:12:15 +02:00
SY Wang
dd16820ba1
Docs: Clarify Wannier90 SCF MO reuse requirements (#5531) 2026-07-06 11:10:43 +02:00
Ole Schütt
40fb6157bf
Docker: Disable PyTorch in generic toolchain tester (#5529) 2026-07-04 23:43:37 +02:00
SY Wang
f3e23541e8
Docker: Disable GauXC in generic toolchain tester (#5516) 2026-07-04 20:47:16 +02:00
SY Wang
b95687185d
Docker: Fix Intel testers (#5517) 2026-07-04 20:42:51 +02:00
Taillefumier Mathieu
f50e850e17
[cmake] Cleanup accross the entire build system (#5527)
Co-authored-by: Mathieu Taillefumier <mathieu.taillefumier@free.fr>
2026-07-04 20:36:14 +02:00
SY Wang
c75d734d70
Docs: Release Notes {part, draft} (#5526) 2026-07-04 20:30:46 +02:00
Frederick Stein
c24029e761
Some fixes to the development wiki (#5525) 2026-07-03 20:53:24 +02:00
Ole Schütt
8527535a81
Docs: Add changelog (#5523) 2026-07-03 18:42:59 +02:00
Ole Schütt
6d9f5ac9a2
Docs: Reduce footprint of development section in navbar (#5521) 2026-07-03 13:54:18 +02:00
Matthias Krack
3c90c97729
Apply ELPA patch from toolchain also in spack builds 2026-07-03 12:51:59 +02:00
Matthias Krack
a2d013d033
Remove obsolete dependency 2026-07-03 12:49:25 +02:00
HE Zilong
d275998fba
Precommit: check for CPASSERT(.FALSE.), and empty CPABORT() (#5491) 2026-07-03 12:09:01 +02:00
Max Graml
bfcb1ea1d6
BSE: update references (#5515) 2026-07-03 11:19:09 +02:00
Frederick Stein
1f9fd2c165
Migrate development-related wiki pages (#5503) 2026-07-02 20:29:31 +02:00
SY Wang
0a0a847578
Set OpenMPI default binding policy to none via environment variable (#5511) 2026-07-02 16:08:38 +02:00
SY Wang
2c0c9dd7bf
Libxc: Skip duplicate functional IDs when adding input sections (#5514) 2026-07-02 15:27:24 +02:00
Marcello Puligheddu
de7340f8be
PR for adding libGint to CP2K (#5446) 2026-07-02 14:30:11 +02:00
Matthias Krack
3a6a80ebfc
pytorch 2.12.0 -> 2.12.1 (#5507) 2026-07-02 12:20:55 +02:00
SY Wang
6bd99e96c6
Libxc: Preserve aliases when registering XC functional sections (#5510) 2026-07-02 12:20:38 +02:00
SY Wang
5976d25a45
Spack: Remove +dlaf from SIRIUS requirement (#5499) 2026-07-01 18:37:51 +02:00
SY Wang
906b8b3f0a
Toolchain: Remove parse_if.py (#5498) 2026-07-01 17:46:21 +02:00
SY Wang
701d1e8c46
[CMake] Make CP2K_USE_OPENPMD part of CP2K_USE_EVERYTHING 2026-07-01 16:37:23 +02:00
SY Wang
17c8f72c4c
make_cp2k.sh: Avoid expanding unset SPACK_ENV (#5506) 2026-07-01 16:31:07 +02:00
Matthias Krack
14b73dafd1
Add local spack recipe for libxstream (#5501) 2026-07-01 16:13:06 +02:00
Ziwei Chai
2c8265a529
Add Andreussi's Solvent Aware SCCS method (#5495) 2026-07-01 15:18:53 +02:00
SY Wang
9fc3e74bfe
Reorganize dependency and electronic-structure documentation (#5481) 2026-07-01 13:23:20 +02:00
Max Graml
2cf3252f98
Fix SCF_GUESS EHT abort under OT (#5502) 2026-07-01 12:37:57 +02:00
Ziwei Chai
23ff2abb53
Add grand canonical SCF for slab models (#5467)
Co-authored-by: Ole Schütt <ole@schuett.name>
2026-07-01 12:23:41 +02:00
SY Wang
e6548e2930
make_cp2k.sh: resume interrupted dependency builds (#5497) 2026-07-01 11:08:40 +02:00
Matthias Krack
620e8b13eb
Detect SKALA model path only if gauxc is found 2026-07-01 06:48:46 +00:00
Matthias Krack
eb4986017d
Update local spack recipe for libxsmm to v2.0.0
This commit contains the following:

- Version synchronization of dbcsr and libxsmm
- Simplification of the local spack recipe
2026-07-01 06:47:44 +00:00
SY Wang
0d88fc2a8e
Toolchain: Download libxsmm from cp2k.org (#5493) 2026-06-30 13:32:13 +02:00
SY Wang
faf9aae912
Toolchain: Update ELPA patch and libxsmm version (#5490) 2026-06-30 09:28:30 +02:00
Ole Schütt
9aade48c25
Tests: Rerun tests that only barely clear the slowness threshold (#5484) 2026-06-29 17:15:06 +02:00
SY Wang
cbb202218e
CMake: Move GPU architectures setup before calling find_package(dbcsr) (#5483) 2026-06-29 15:39:04 +02:00
Matthias Krack
88e874441f
Fix cleaning of the folders build and install (#5487) 2026-06-29 14:26:35 +02:00
Matthias Krack
5576033f5b
Increase timeouts and timelimits for CSCS CI jobs (#5486) 2026-06-29 13:49:05 +02:00
Ole Schütt
1ee2fa6ca7
Toolchain: Download libxs, libxstream, and DBCSR from cp2k.org (#5485) 2026-06-29 13:44:50 +02:00
Taillefumier Mathieu
ba9180c884
Reordering of coefficients calculations (#5478)
Co-authored-by: Mathieu Taillefumier <mathieu.taillefumier@free.fr>
2026-06-29 11:27:53 +02:00
Ole Schütt
9b6721164e
CODEOWNERS: Add /make_cp2k.sh to Spack team (#5480) 2026-06-29 10:51:04 +02:00
HE Zilong
31876b56ae
Reftraj: add option to wrap coordinates before calculation (#5479) 2026-06-28 22:20:33 +02:00
Matthias Krack
ed4c696b7e
make_cp2k.sh: add --build_path flag (#5477) 2026-06-28 22:19:02 +02:00
SY Wang
392e7d2ee1
CMake: Remove duplicated option setting (#5473) 2026-06-28 22:16:04 +02:00
SY Wang
39eddeee7a
Toolchain: Update libxs* and DBCSR; fix CUDA/HIP package discovery (#5472) 2026-06-28 22:15:19 +02:00
Matthias Krack
871dbd59fb
Spack: Switch to dbcsr 2.10.0 (#5475) 2026-06-28 06:48:27 +02:00
Matthias Krack
38657c2321
Spack: switch to libxs 1.0.0 (#5474) 2026-06-27 22:26:19 +02:00
Taillefumier Mathieu
fa3fa498c3
Fix performance regression in the grid backend (#5471)
Co-authored-by: Mathieu Taillefumier <mathieu.taillefumier@free.fr>
2026-06-27 14:38:46 +02:00
SY Wang
3b4514f196
GauXC/SKALA: Handle empty atom chunks in MPI runs (#5440) 2026-06-27 11:44:36 +02:00
Augustin Bussy
708cd67847
XAS_TDP| Bug fix in Q = 1 - SP projector (#5470) 2026-06-27 11:43:36 +02:00
SY Wang
cf1540c906
Toolchain cleanup: Follow-up fix and enhancement (#5468) 2026-06-27 11:41:52 +02:00
SY Wang
ab143295cb
CMake: Reformat status summary (#5466) 2026-06-27 11:39:25 +02:00
SY Wang
b76ce4ef50
Toolchain cleanup: Remove unused flags (stage0-2) (#5463) 2026-06-26 12:17:11 +02:00
SY Wang
9abfe98c3b
Revise export-ignore in .gitattributes (#5464) 2026-06-26 12:16:30 +02:00
SY Wang
1bd8e1629d
GauXC: Split regtests and add slow tests suppression (#5465) 2026-06-26 12:15:14 +02:00
SY Wang
1e0ab71985
Docker: Improve Spack image build caching (#5462) 2026-06-25 16:28:47 +02:00
SY Wang
02e5e7c6ee
Toolchain cleanup: Remove unused flags (stage3-6) (#5459) 2026-06-25 16:27:58 +02:00
Frederick Stein
d31e8a02de
Add the hint regarding FFTW to the description of libraries (#5461) 2026-06-25 15:17:07 +02:00
SY Wang
6ab90febad
Sync CMake configuration to cp2kConfig.cmake (#5458) 2026-06-25 12:45:15 +02:00
Frederick Stein
a0c7eec525
Add hint regarding missing FFTW3 (#5454) 2026-06-25 11:26:47 +02:00
SY Wang
c04ca93c7f
Toolchain cleanup: Remove unused flags (stage7-9) (#5447) 2026-06-25 11:23:37 +02:00
Hans Pabst
701334031c
Code comments on top of #5353 (#5457) 2026-06-25 11:23:04 +02:00
SY Wang
4af04f499e
toolchain/build_cp2k.sh: Write module environment to cp2k_env if exists (#5456) 2026-06-25 10:12:55 +02:00
Matthias Krack
f18113f003
Sync local exchcxx spack recipe with upstream version (#5450) 2026-06-25 10:04:24 +02:00
Matthias Krack
97c7ba5dd8
Sync local libxs spack recipe with upstream version (#5453) 2026-06-25 10:02:04 +02:00
Frederick Stein
e8f5963d8d
Remove the single-precision option for full matrices (#5448) 2026-06-25 00:08:30 +02:00
Matthias Krack
476f3006db
Sync local gau2grid spack recipe with upstream version (#5451) 2026-06-24 20:45:21 +02:00
Matthias Krack
12a514f0bd
Sync local integratorxx spack recipe with upstream version (#5452) 2026-06-24 20:44:35 +02:00
SY Wang
23252ab802
Revise k-points documentation (#5435) 2026-06-24 18:08:30 +02:00
Juerg Hutter
353aefe660
Integrated (absolute) spin density: correct output for GAPW (#5449) 2026-06-24 16:51:14 +02:00
Juerg Hutter
4b4ae76f9d
MAO output (#5443) 2026-06-24 14:52:20 +02:00
Matthias Krack
cd1e3d7b65
Update GauXC to dev20260608 (#5445) 2026-06-24 13:58:07 +02:00
SY Wang
f3f9c0959e
Toolchain: Move libFCI installation to stage7 (#5442) 2026-06-24 13:27:56 +02:00
Ole Schütt
16a96a07a2
CODEOWNERS: Allow everyone to add new source files (#5444) 2026-06-24 10:58:50 +02:00
Ole Schütt
af486029db
Add CODEOWNERS (#5431) 2026-06-24 09:39:30 +02:00
SY Wang
9ac56287d5
README.md: Update installation docs and binary paths (#5438) 2026-06-24 09:38:54 +02:00
SY Wang
5fdc47cff4
Toolchain: Add Eigen3 and Remove FindLibint2.cmake (#5427) 2026-06-23 21:49:03 +02:00
RitajTyagi
2894a3be3d
RIRS: Improve RI-RS GW implementation, enable Γ-point calculation for large cells and integrate compile-time fix (#5429)
Co-authored-by: Ritaj Tyagi <ritaj@pc1022553194.uni-regensburg.de>
2026-06-23 21:46:58 +02:00
SY Wang
60d41ebace
Docker: Remove Spack profile from cmake_cp2k.sh (#5436) 2026-06-23 21:46:09 +02:00
Taillefumier Mathieu
63bb4b1a93
Fix a race condition in the grid backend (#5437)
Co-authored-by: Mathieu Taillefumier <mathieu.taillefumier@free.fr>
2026-06-23 21:45:14 +02:00
Matthias Krack
e32986a768
Fix syntax error (#5432) 2026-06-23 17:37:26 +02:00
Ole Schütt
06a6a83eab
Relocate cmake_cp2k.sh and test matcher classes (#5433) 2026-06-23 13:28:58 +02:00
Dynamics of Condensed Matter
3c69fd194f
Support native-grid SKALA GAPW stress and k-points (#5421)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-06-22 21:41:30 +02:00
Ole Schütt
49a1a0f24d
offload: Complete removal of libxstream from mempool (#5417) 2026-06-22 19:44:46 +02:00
Matthias Krack
1efcb7b067
Fix typos (#5430) 2026-06-22 18:23:07 +02:00
Ole Schütt
2f0b7ede70
Adjust tolerances of H2_NATIVE_SKALA_GPW_STRESS.inp:M072 and H2_NATIV… (#5428) 2026-06-22 15:42:24 +02:00
Matthias Krack
1efe93f5c2
Fix image tag generation (#5425) 2026-06-22 14:19:06 +02:00
Max Graml
2085e8ca3a
RIRS-GW: optimize OMP parallelization (#5399)
Co-authored-by: Claude <noreply@anthropic.com>
2026-06-22 14:09:38 +02:00
HE Zilong
fc8b99b17a
Reftraj: parse extxyz for cell and deprecate EVAL_ENERGY_FORCES/EVAL_FORCES (#5401) 2026-06-22 14:07:26 +02:00
SY Wang
adc2cbe104
Use pdbg for Rawhide tester (#5419) 2026-06-22 13:28:55 +02:00
SY Wang
12598fa817
Toolchain: Block installation of pre-built libtorch for MKL path (#5424) 2026-06-22 12:12:00 +02:00
SY Wang
7fec14f9c5
Fix MKL target selection for Intel-threaded BLAS (#5418) 2026-06-22 12:06:37 +02:00
Ziwei Chai
fadf84a243
Add new Pulay density mixing for grand canonical calculations (#5407) 2026-06-22 12:01:09 +02:00
Taillefumier Mathieu
efe242d354
grid: Clean up GPU backend and fix race condition (#5338)
Co-authored-by: Mathieu Taillefumier <mathieu.taillefumier@free.fr>
2026-06-22 11:58:47 +02:00
Matthias Krack
e6ecf3375d
Add prerequisite for dlaf test folder (#5423) 2026-06-22 11:31:55 +02:00
Matthias Krack
47a39399f3
Disable libtorch with GCC 10 (#5420) 2026-06-22 10:18:52 +02:00
Matthias Krack
561f47539b
Update CSCS CI tester (#5415) 2026-06-21 07:39:04 +02:00
SY Wang
948aa9e1c1
Docker [Spack]: Default to system GCC and enable Rawhide ssmp testing (#5409) 2026-06-20 23:47:26 +02:00
Ole Schütt
c5e43a80a8
Grid: Fix CUDA build (#5416) 2026-06-20 19:10:57 +02:00
Ole Schütt
0c205b2296
Docker: Use debug build for minimal test to detect unused args (#5413) 2026-06-20 17:34:13 +02:00
Ole Schütt
50bd97db99
Fix conventions in qs_dispersion_s_dftd3.F and floquet_utils.F (#5414) 2026-06-20 16:58:15 +02:00
Johann Potot.
6250c82c2d
small fixes for D2/D3 (#5398)
Co-authored-by: Johann Pototschnig <j.pototschnig@hzdr.de>
2026-06-19 16:51:28 +02:00
HE Zilong
204dd8f0e1
Fix an erroneous loop size from #5395 (#5410) 2026-06-19 16:27:27 +02:00
SY Wang
3223761494
Update libxs* dependencies (#5404) 2026-06-19 16:18:04 +02:00
SY Wang
285cf9bdaf
OFFLOAD: Restore internal host mempool for LIBXS builds (#5406) 2026-06-19 16:16:21 +02:00
SY Wang
9ca34697db
Improve CP2K CMake package metadata exports (#5400) 2026-06-17 11:56:47 +02:00
Matthias Krack
c28f603b59
Remove -v flag from example (#5403) 2026-06-16 22:46:16 +02:00
SY Wang
25eb499bcb
Toolchain: Speed up ELPA and GauXC installation (#5402) 2026-06-16 11:37:02 +02:00
SY Wang
4d701726f9
Toolchain: Print categorized configuration summary (#5397) 2026-06-15 10:59:06 +02:00
Dynamics of Condensed Matter
9a1f30adbb
Support periodic native SKALA stress, k-points, and NLCC (#5394)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-06-15 05:44:06 +02:00
HE Zilong
785b9d9b63
Vibrational analysis: formats, notes and hessian output before mass weighting (#5395) 2026-06-14 23:13:04 +02:00
HE Zilong
3631906f04
Two small patches for extxyz output (#5396) 2026-06-14 13:29:45 +02:00
Johann Potot.
cf453c1872
error_type from wrong file (#5393)
Co-authored-by: Johann Pototschnig <j.pototschnig@hzdr.de>
2026-06-14 12:47:59 +02:00
Max Graml
b0342986ae
RIRS: fix bounds of grids for geometries with mixed atom kinds (#5391)
Co-authored-by: Claude <noreply@anthropic.com>
2026-06-14 12:47:27 +02:00
Shridhar Shanbhag
f9604532c0
Floquet physics (#5380) 2026-06-14 12:46:35 +02:00
SY Wang
74766aa487
Update conventions suppression (#5388) 2026-06-14 12:11:20 +02:00
SY Wang
85b8a9b49c
Attempt to fix CMake and toolchain behavior regarding LibXS path (#5365)
Co-authored-by: Taillefumier Mathieu <29380261+mtaillefumier@users.noreply.github.com>
Co-authored-by: Hans Pabst <hans.pabst@intel.com>
2026-06-13 14:58:02 +02:00
Vahideh Alizadeh
9dda3dd524
update xTB documentation (#5383) 2026-06-12 17:39:13 -06:00
HE Zilong
bd24f0ace7
Vibrational analysis: reduce width of data field (rework #4922) (#5387) 2026-06-12 16:38:25 +02:00
Matthias Krack
3154efc870
Revise Spack recipes for Gau2Grid and IntegratorXX (#5390) 2026-06-12 15:26:19 +02:00
SY Wang
1425815bee
Add documentation of MO output (#5370) 2026-06-12 15:06:33 +02:00
HE Zilong
3d922ff5b6
NEB: revamp output (#5382) 2026-06-12 11:41:51 +02:00
Matthias Krack
20ea36f044
Enable CUDA for py-torch in spack recipe (#5386) 2026-06-12 10:35:35 +02:00
Johann Potot.
424e1d4d46
Jvp d3 library (#5346)
Co-authored-by: Johann Pototschnig <j.pototschnig@hzdr.de>
2026-06-11 16:29:35 +02:00
Matthias Krack
a90b72f5f7
Add cuda_arch propagation to GauXC spack recipe (#5384) 2026-06-10 15:47:25 +02:00
Matthias Krack
64e569e4f4
Revise spack recipe for Exchcxx (#5381) 2026-06-09 22:09:37 +02:00
Matthias Krack
e2123eace2
Fix truncation warning in __shfl_down_sync mask (#5379) 2026-06-09 13:17:39 +02:00
HE Zilong
f5ef6ceffd
Two small patches for cell_methods.F and particle_methods.F (#5378) 2026-06-09 13:04:29 +02:00
Dynamics of Condensed Matter
4cf809f41f
Enable optional GauXC CUTLASS toolchain builds (#5374)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-06-08 15:59:23 -06:00
Dynamics of Condensed Matter
475236acc4
Update UZH basis sets and pseudopotentials (#5376)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-06-08 15:58:02 -06:00
SY Wang
cb2e80cfb6
RPM-build: Temporarily disable SMM backend until LibXS is provided in Fedora repo (#5373) 2026-06-08 17:47:24 +02:00
Matthias Krack
7b1171f5d6
Add fully developed CP2K spack recipe for GauXC (#5375) 2026-06-08 15:31:40 +02:00
Dynamics of Condensed Matter
be2ee82e43
Improve native SKALA CUDA routing and Torch execution (#5362)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-06-07 18:06:57 -06:00
Dynamics of Condensed Matter
45836a5605
Expose GauXC OneDFT GPU runtime controls (#5363)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-06-07 17:00:19 -06:00
Dynamics of Condensed Matter
aa8e65b1e0
Fix dashboard code regressions (#5361)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-06-07 16:57:56 -06:00
Ole Schütt
87942b8d46
Docs: Add fragment links and note about citation keys to syntax cheat sheet (#5372) 2026-06-07 16:46:02 +02:00
Matthias Krack
9c2e77385f
Add NOT APPLE condition to linker option guard (#5369) 2026-06-07 14:41:19 +02:00
Shridhar Shanbhag
c6fe882990
DOS section explicit required and added new unit for electric field (#5349) 2026-06-07 14:06:45 +02:00
HE Zilong
b4b5edf373
Expand documentation on MD and opt; add "Foreword and FAQ" (#5337) 2026-06-07 13:35:41 +02:00
HE Zilong
5f41a9ca5d
Add a few DFT-D3 functional parameters (#5329) 2026-06-07 10:53:29 +02:00
Matthias Krack
4738a5a401
Switch opensuse tester to GCC 13 (#5368) 2026-06-07 08:26:01 +02:00
SY Wang
dccd4e42be
Drop complex magnitude matching and use absolute values for k-point moment tests (#5364) 2026-06-06 23:40:05 +02:00
Matthias Krack
f229b202dd
Add local spack recipe for libxs (#5366) 2026-06-06 23:20:56 +02:00
Dynamics of Condensed Matter
2254d362dc
Restrict PTB UZH basis aliases to matching q values (#5367)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-06-06 20:40:16 +02:00
SY Wang
e0f0c17926
Adjust regtests and ignore tblite SCC mixer residual for OT/LS_SCF (#5357) 2026-06-06 00:14:32 +02:00
Dynamics of Condensed Matter
78cce949b3
Revert PR 5351 (#5358)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-06-05 22:21:03 +02:00
Hans Pabst
2e4a83415a
Reintegrate with LIBXS, LIBXSTREAM, and LIBXSMM (#5343)
* LIBXS (https://libxs.readthedocs.io/) foundational library.
  - Implements SMMs with different JIT providers, e.g., MKL-JIT.
  - LIBXSMM only provides kernels (reg. upstream version).
* LIBXSTREAM (https://libxstream.readthedocs.io/).
  - Revised OpenCL backend now formally separate.
* CMake and Toolchain
  - Eliminated mkl_sequential/mkl_gnu_thread mismatch.
  - Toolchain adjusted for libxs/libxstream/libxsmm.
  - Case-insensitive CP2K_USE_ACCEL.  
    DBCSR originally wanted lower case.  
    This is to harmonize with DBCSR.
  - Allow CP2K's FYPP to be used for DBCSR.
    This enables DBCSR Tarball versions.
* Regenerated all Docker recipes.
  - This make FYPP available for DBCSR build.
  - This enables DBCSR Tarball versions.
2026-06-05 20:23:52 +02:00
Dynamics of Condensed Matter
446a0bc27e
Keep GPU grid classification consistent (#5351)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-06-05 17:35:06 +02:00
Dynamics of Condensed Matter
39800b25ec
Enable SKALA GAPW pseudopotential energy calculations (#5350)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-06-05 17:34:17 +02:00
rrullan
5b4bf874c7
Open-Shell implementation of ALMO (#5345)
Co-authored-by: Stephan Steinmann <67366413+ssteinma@users.noreply.github.com>
2026-06-05 17:01:19 +02:00
Juerg Hutter
0ad2206467
Fix output unit handling for EC modules. (#5356) 2026-06-05 13:31:50 +02:00
SY Wang
7c237e455b
Install SIRIUS for CUDA testers (#5355) 2026-06-05 13:25:58 +02:00
SY Wang
d41503088a
Smearing: various fixes (#5354) 2026-06-05 13:24:39 +02:00
SY Wang
06f838dc4a
Toolchain: Revise default behaviors (#5347) 2026-06-04 17:25:12 +02:00
Hans Pabst
0d07625766
DBM: fixes and code cleanup (#5353)
- Avoid excessive scans (hashtable_insert/dbm_shard_lookup).
- Fixed upload_pack and improved meta-data.
- Fixed data race in dbm_maxeps.
- Improved comm slightly. Avoid allt2all to figure out data amount.
  This was an open TODO in the code.
2026-06-04 13:37:19 +02:00
Hans Pabst
76dcc75b62
OFFLOAD: slightly revised init/deinit (#5352) 2026-06-04 13:36:27 +02:00
Ole Schütt
8dea62cad1
Reorganize dashboard and reduce Spack testing cadence (#5344) 2026-06-03 23:47:56 +02:00
Matthias Krack
7fabd04827
Install GauXC Skala with spack (#5269) 2026-06-03 17:24:08 +02:00
SY Wang
78a7633e0d
Reorganize electronic-structure analysis docs (#5341) 2026-06-03 14:28:43 +02:00
SY Wang
49523fb0eb
Nest PDOS controls inside DOS print section and add documentation (#5335) 2026-06-02 11:40:05 +02:00
Ole Schütt
e9e4980e05
Adjust tolerance of simple_non-ortho_grid_dgemm.inp (#5336) 2026-06-01 22:30:40 +02:00
Franz Pöschel
23153d14b2
Fix builds without libtorch (#5333) 2026-06-01 20:04:00 +02:00
SY Wang
45bd6cb1d1
Refactor DOS and PDOS input sections and output options (#5326) 2026-06-01 17:34:34 +02:00
Ole Schütt
afa401ae9a
Tests: Add libint to requirements of auto-ref dirs (#5332) 2026-06-01 16:58:39 +02:00
SY Wang
7c86815ba8
Add a warning regarding SCCS with k-points (#5330) 2026-06-01 12:50:11 +02:00
SY Wang
8b3d8f24eb
Fix CMake config issue as behavior of finding pace changes (#5331) 2026-06-01 12:37:45 +02:00
Dynamics of Condensed Matter
d5c4d393fe
Add native-grid SKALA CUDA atom chunk controls (#5323)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-31 23:29:09 +02:00
SY Wang
a64d610e39
Spack [pace]: Use upstream CMake install rules instead (#5328) 2026-05-31 20:17:32 +02:00
Ole Schütt
f06fd7fe03
Docker: Disable GauXC for toolchain ARM builds (#5327) 2026-05-31 20:15:46 +02:00
Dynamics of Condensed Matter
ec1c78fe08
Reject NLCC with native-grid Skala (#5325)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-31 17:17:29 +02:00
Taillefumier Mathieu
d7d0232213
Grid improvements (#5277)
Co-authored-by: Mathieu Taillefumier <mathieu.taillefumier@free.fr>
2026-05-31 15:24:48 +02:00
HE Zilong
71c7144468
Fix some format and convention of WRITE statements in cp_lbfgs.F (#5324) 2026-05-31 14:38:29 +02:00
SY Wang
db060cbc84
Toolchain: lammps-pace (ACE) 2023.11.25.fix2 -> 2025.12.4.p1 (#5320) 2026-05-31 14:37:26 +02:00
Ole Schütt
2d9c73baf3
Toolchain: Download tblite from cp2k.org (#5322) 2026-05-31 14:36:45 +02:00
Dynamics of Condensed Matter
59397cdcc8
Handle periodic image coordinates for native-grid SKALA (#5321)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-31 13:29:29 +02:00
SY Wang
1446772304
CMake: Fix libint2 Fortran module finding (#5317) 2026-05-31 12:05:28 +02:00
Dynamics of Condensed Matter
acf1d0e357
Add native GPW Skala grid evaluation (#5319)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-31 09:05:59 +02:00
Dynamics of Condensed Matter
099792108e
Add conservative AUTO default for cell canonicalization (#5318)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-30 20:11:58 +02:00
Ole Schütt
bff9b1f227
Docker: Disable GauXC for toolchain cuda builds (#5316) 2026-05-29 18:44:43 +02:00
annahehn
75e331fa99
Printout for interface with ROSE (Lukas Guhl) (#5302) 2026-05-29 18:44:04 +02:00
Dynamics of Condensed Matter
44edd53b36
Fix high-l real spherical harmonic rotations (#5313)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-29 16:12:41 +02:00
Johann Potot.
c046af2178
autodetection reference functional (#5296)
Co-authored-by: Johann Pototschnig <j.pototschnig@hzdr.de>
2026-05-29 15:56:36 +02:00
HE Zilong
8c4b069db3
Dimer: add control of initialization method and implement read from molden (#5312) 2026-05-29 14:40:08 +02:00
Shridhar Shanbhag
1d38d6d94d
Regtesting for secondary output files (#5315) 2026-05-29 14:37:11 +02:00
Dynamics of Condensed Matter
df7755d011
Fix periodic e-field force prefactors (#5308)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-29 00:40:54 +02:00
Dynamics of Condensed Matter
8c42d232ef
Avoid full k-point symmetry for skew cells (#5309)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-28 21:16:39 +02:00
Dynamics of Condensed Matter
48c63364e3
Canonicalize general input cells consistently (#5307)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-28 00:09:27 +02:00
SY Wang
3ba675f68a
Add a clear warning message regarding USE_PREV_RHO_R (#5304) 2026-05-27 23:10:08 +02:00
SY Wang
ddfed05c5a
Implement k-point PDOS with Lowdin projections (#5299) 2026-05-27 23:09:27 +02:00
SY Wang
cdd8209268
Improve MD step header output (#5306) 2026-05-27 23:08:02 +02:00
SY Wang
0cecd9b435
Fix current coding conventions issues (#5305) 2026-05-27 23:07:30 +02:00
Dynamics of Condensed Matter
d000247bb9
Avoid full k-point symmetry for noncanonical cells (#5301)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-27 21:37:09 +02:00
Dynamics of Condensed Matter
310d93447c
Fix USE_PREV_RHO_R density rebuild (#5300)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-27 15:45:08 +02:00
SY Wang
18dd494853
toolchain/build_cp2k.sh: Improve logging and add "--rebuild-only" flag (#5294) 2026-05-27 11:00:22 +02:00
Ziwei Chai
802500c0c8
pcc: Add input handling and KS integration for planar countercharge and PAEP (#5064)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-27 10:53:48 +02:00
Dynamics of Condensed Matter
f506c3be65
TREXIO: Export full k-point grids from symmetry-reduced SCF (S. Azadi) (#5297)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-26 20:02:55 +02:00
Dynamics of Condensed Matter
032766d08b
Add CASINO gwfn.data export for Quickstep orbitals (S. Azadi) (#5288)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-26 18:20:36 +02:00
Sebastian Ehlert
ba924cc32c
Add libxsmm explicitly to the link libraries (#5292) 2026-05-26 12:53:08 +02:00
Ole Schütt
7ac807a875
Adjust tolerance of ch2o_tblite_mixer.inp and si_uks_kp_tblite_mixer_… (#5291) 2026-05-26 11:30:56 +02:00
HE Zilong
3274ff38b0
Expose LBFGS print control as input keyword, increase default verbosity, and expand document for optimization (#5274) 2026-05-26 11:05:23 +02:00
Ole Schütt
a7cc81a68e
Drop support for GCC 8 (#5290) 2026-05-26 10:44:04 +02:00
Ole Schütt
cd7394cb51
Tests: Add tblite as requirement for xTB/regtest-stda (#5289) 2026-05-26 10:04:05 +02:00
SY Wang
f51a18d89b
Add broadened DOS/PDOS output with shared OT LUMO generation (#5287) 2026-05-26 08:35:40 +02:00
SY Wang
f0dc442c7c
Enable analytical periodic-subspace stress for 2D systems with ANALYTIC/MT (#5282) 2026-05-26 08:12:26 +02:00
Ole Schütt
9fc00bd92e
Motion: Add citation for BFGS model Hessian (#5286) 2026-05-26 00:10:40 +02:00
marisaschneider75-commits
d8760e491c
Avoid tblite TDDFPT OECORR COULOMB neighborlist crash (#5281)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-26 00:08:18 +02:00
Ole Schütt
ee34242743
Docker: Move to Phonopy main branch (#5285) 2026-05-26 00:02:17 +02:00
SY Wang
559586193c
Refactor MO_KP output (#5284) 2026-05-25 22:44:52 +02:00
kirk0830
6f4be11194
Correct author name in BASIS_MOLOPT_LnPP1 (#5276) 2026-05-25 22:35:08 +02:00
Franz Pöschel
7641cd99dd
Follow up GauXC: Remove patch from GauXC installation (#5266) 2026-05-24 23:51:40 +02:00
Dynamics of Condensed Matter
2e14aebe56
Parallelize build_tblite_matrices pair loop with OpenMP (Issue #5273) (#5279)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-24 22:45:16 +02:00
Franz Pöschel
37b6460902
GauXC: HDF5 debug output (#5270)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-24 15:27:50 +02:00
annahehn
0bf0ab0367
Printing Cartesian overlap matrix in line with Cartesian MOs such tha… (#5271)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-24 15:27:23 +02:00
kousuke-nakano
9de61f8478
Fix MO coefficients phase adjustment in trexio_utils.F for complex wavefunctions (#5278)
Well done! 

Greetings, 
Thomas
2026-05-24 10:26:17 +02:00
Dynamics of Condensed Matter
0622d442e4
Fix K290 symmetry for nonstandard cells and large k-point meshes (H. Mirhosseini) (#5275)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-23 18:28:15 +02:00
SY Wang
6768d83bf2
Apply popt/sopt symlinks to Fedora RPM-build (#5268) 2026-05-22 23:35:18 +02:00
SY Wang
c1bf2799a1
Rewrite documentation of molecular dynamics and structure optimization (#5240) 2026-05-22 23:34:00 +02:00
SY Wang
8c09d754e0
Libint required for regtest-hybrid-ace-gs (#5267) 2026-05-22 17:22:26 +02:00
Matthias Krack
5a6c0a78a3
Revise static build (#5261) 2026-05-22 15:05:42 +02:00
Dynamics of Condensed Matter
92c5e5ec96
Add q-vSZPs tight-binding basis data (#5265)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-22 13:23:37 +02:00
SY Wang
bcc6cf9f18
Allow FIT line search mode for cell optimization (#5262) 2026-05-22 11:51:05 +02:00
Dynamics of Condensed Matter
418b37c462
GauXC: use finite-difference GAPW XC gradients for SKALA and high-l bases (#5263)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-22 09:41:49 +02:00
Dynamics of Condensed Matter
919a8b9f61
GauXC: improve molecular OneDFT/SKALA support and validation (#5260)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-21 23:48:17 +02:00
Ole Schütt
61e2520981
Motion: Remove &CELL_OPT/TYPE keyword (#5257) 2026-05-21 17:31:40 +02:00
Ritama Kar
1581497297
Add Adaptively Compressed Exchange (ACE) option for hybrid DFT ground-state calculations (#5238)
Co-authored-by: ritama@1996 <karritama@gmail..com>
2026-05-21 16:32:36 +02:00
陈浩南
b3e9e277bd
fix cmake build when multiple gpu architectures are specified (#5248) 2026-05-21 09:42:44 +02:00
SY Wang
56c3704036
Add two conventions issues from "qs_dispersion_d4.F" to suppression file (#5258) 2026-05-21 09:42:18 +02:00
Max Graml
36a0d11aaa
Restart-backup races under MPI + slow filesystems: two fixes + one open question (#5253)
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 14:45:51 +02:00
Matthias Krack
d1631c1d3e
Disable GauXC for the ubuntu ssmp tester (#5256) 2026-05-20 14:33:23 +02:00
Matthias Krack
3a68eb34aa
Drop local spack recipe for tblite; disable bytecode generation (#5255) 2026-05-20 13:31:36 +02:00
Matthias Krack
c0b4819b30
Disable feature GauXC for Spack/CMake builds and (#5254) 2026-05-20 11:58:28 +02:00
Matthias Krack
0eb17dafdc
Update spack tester for OpenSUSE: 15.6 -> 16.0 (#5252) 2026-05-19 21:38:18 +02:00
Juerg Hutter
55e05fe139
Bug fix for TDDFPT oscillator strength for unrestricted calculations (#5251) 2026-05-19 21:05:03 +02:00
Matthias Krack
0e00971d48
Switch to spack packages version from May 19, 2026 (#5250) 2026-05-19 17:28:28 +02:00
Dynamics of Condensed Matter
b8318cf64b
Follow up GauXC/SKALA integration after #5084 (#5244)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-19 16:05:06 +02:00
Dynamics of Condensed Matter
d16a7bc263
Reuse SCF k-point dipoles in MOMENTS output (#5241)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-19 15:17:51 +02:00
Matthias Krack
5f5be17510
Exclude curl and readline from spack view (#5249) 2026-05-19 14:34:59 +02:00
Matthias Krack
8452982c9b
Rename spack psmp tester and add new gcc 16 tester (#5239) 2026-05-19 13:08:07 +02:00
hforbert
e068a9b9a7
add BCMD propagator to PINT (#5247) 2026-05-19 09:57:35 +02:00
Dynamics of Condensed Matter
f658ef2d91
Write cube values with explicit three-digit exponents (#5245)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-19 05:38:47 +02:00
Dynamics of Condensed Matter
666f2d7d18
Honor element KIND masses for PDB atoms (#5246)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-19 02:10:11 +02:00
Franz Pöschel
1dd88fb0fa
[WIP] Skala functional via GauXC for XC energy evaluation using deep learning models (#5084)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-18 18:37:12 +02:00
SY Wang
d5322d6847
GExt extrapolation methods for k-points (#5229) 2026-05-18 17:02:23 +02:00
SY Wang
ea7c263a32
Spack docker tester: Restore cache setup and access via host endpoint (#5236) 2026-05-18 16:41:25 +02:00
Matthias Krack
fac8184df2
Add more detailed documentation on installing cp2k with conda (#5237) 2026-05-18 15:57:06 +02:00
Ole Schütt
4d809f8023
Docker: Migrate test to Phonopy v4 (#5235) 2026-05-18 15:07:45 +02:00
SY Wang
b70f40af56
Relax tolerance (#5232) 2026-05-18 14:13:08 +02:00
Dynamics of Condensed Matter
52b5bac6eb
Test installed CP2K CMake package config (#5231)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-18 09:08:48 +02:00
Dynamics of Condensed Matter
358cae4de3
Fix Wannier90 k-point export path for symmetry-reconstructed SCF MOs (#5233)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-17 22:20:32 +02:00
Dynamics of Condensed Matter
5311037518
Improve REFTRAJ label mismatch error (#5230)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-17 20:51:06 +02:00
Dynamics of Condensed Matter
b11aa6139c
Extend built-in DFT-D3 parameters to late actinides (#5228)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-17 19:53:47 +02:00
SY Wang
14c5ee2a57
Fix PBC image phase for k-point WFN extrapolation (#5219) 2026-05-17 18:55:04 +02:00
Dynamics of Condensed Matter
daf821cd15
Reuse symmetry-reduced SCF MOs in the Wannier90 k-point export (H. Mirhosseini)
Reuse symmetry-reduced SCF MOs in the Wannier90 k-point export.
2026-05-17 18:30:20 +02:00
Dynamics of Condensed Matter
8039b896f5
cuSOLVERMp: allow scheduler GPU binding (#5227)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-17 18:29:39 +02:00
SY Wang
ef9d0990c2
Molden: Replace [Nval] with [Pseudo] and enable marking ghost atoms (#5226) 2026-05-17 17:15:38 +02:00
Dynamics of Condensed Matter
16ac5b65f8
Move SCF k-point dipoles to qs_moments (#5222)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-17 17:15:16 +02:00
SY Wang
8ba4bd1763
Spack docker tester: Use a dedicated cache network instead of host (#5218) 2026-05-17 17:14:54 +02:00
SY Wang
bb9ae24f89
Docker: Use Ubuntu 26.04 for toolchain testings (#5210) 2026-05-17 11:15:00 +02:00
SY Wang
52dc25883c
Toolchain: Fix CMAKE_INSTALL_LIBDIR and adjust hints (#5224) 2026-05-17 09:49:26 +02:00
Ole Schütt
3d3abc6804
Dashboard: Remove defunct regtest survey (#5220) 2026-05-16 21:41:12 +02:00
SY Wang
c22e5003df
Toolchain: tblite 0.5.0 -> 0.6.0 (#5215) 2026-05-16 21:05:06 +02:00
SY Wang
bbbecc6f4e
TBlite: add v0.6.0, CMake only [Spack] (#5214) 2026-05-16 20:06:18 +02:00
Taillefumier Mathieu
695da86d0c
Grid gpu engines merge (#5206)
Co-authored-by: Mathieu Taillefumier <mathieu.taillefumier@free.fr>
2026-05-16 19:18:57 +02:00
Dynamics of Condensed Matter
024a11eaca
Support lower-dimensional Kubo transport (V. Efremkin) (#5216)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-16 16:10:41 +02:00
Dynamics of Condensed Matter
479cecb1b0
Add SCF_MOMENT dipoles for k-point TDDFPT KERNEL NONE (#5199)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-16 16:08:05 +02:00
Ole Schütt
a91f8bf3b4
Adjust three tolerances (#5213) 2026-05-16 12:09:22 +02:00
Matthias Krack
a58acb6329
Ignore top-level folders starting with "spack" (#5212) 2026-05-16 09:27:07 +02:00
Dynamics of Condensed Matter
d43dca4c75
Add finite-volume Kubo transport property (E. Prodan) (#5209)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-15 20:38:26 +02:00
Ole Schütt
7f57f22fd5
Docker: Disable LibFCI for toolchain cuda builds (#5207) 2026-05-15 20:01:07 +02:00
Juerg Hutter
56b351daa3
Refactoring of TDDFT oscillator strength calculation (#5205) 2026-05-15 19:43:05 +02:00
Dynamics of Condensed Matter
2256cec575
Support ROKS active-space FCI solver (#5203)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-15 14:15:44 +02:00
Dynamics of Condensed Matter
0f818b0565
Add UZH-paired static tight-binding basis data (H. Mirhosseini) (#5204)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-15 14:15:02 +02:00
Lukas Schreder
e2e702f92e
Add localization of time-dependent orbitals (#5166) 2026-05-15 12:32:21 +02:00
Juerg Hutter
324f9af104
Regtests for TDDFPT Oscillator Strength (#5192) 2026-05-15 10:16:25 +02:00
Dynamics of Condensed Matter
41cb81381e
Enable restricted Gamma-point OT for CP2K/tblite (#5196)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-14 22:49:10 +02:00
Ole Schütt
e8cf128e24
CMake: Enable Fypp line numbering for GNU Make (#5197) 2026-05-14 22:36:35 +02:00
Ole Schütt
adac3d1e08
PAO: Handle empty gradient tensors (#5195) 2026-05-14 21:40:34 +02:00
Dynamics of Condensed Matter
64e7805eb9
Test explicit active-space NONE solver (#5194)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-14 20:37:58 +02:00
Matthias Krack
3119073cda
Add requirement spglib for more test folders (#5193) 2026-05-14 18:52:30 +02:00
Dynamics of Condensed Matter
91e51cab28
Add MPC pseudopotentials (#5188) 2026-05-14 17:10:11 +02:00
Matthias Krack
554cbd321b
Update list of folders which should not be copied into a container (#5191) 2026-05-14 13:42:29 +02:00
Matthias Krack
7dd8ee8ff3
Add requirement spglib for some test folders (#5189) 2026-05-14 11:17:34 +02:00
Dynamics of Condensed Matter
618e1781db
Support independent-particle TDDFPT with k-points (#5187) 2026-05-14 07:49:30 +02:00
Matthias Krack
11661d76ba
Switch to tblite@main until a new release will become available (#5186) 2026-05-14 05:56:25 +02:00
Dynamics of Condensed Matter
20f179c892
Improve TB/xTB SCC mixer handling for LS_SCF and UKS k-point cases (#5182)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-13 20:06:09 +02:00
SY Wang
12bc3b21f2
Fix Ubuntu tester not to use libfci (#5180) 2026-05-13 19:46:50 +02:00
Johann Potot.
1233a2ca2a
small fixes for testing (#5177)
Co-authored-by: Johann Pototschnig <j.pototschnig@hzdr.de>
2026-05-13 18:05:44 +02:00
Matthias Krack
1641128544
Add feature flag for libfci to make_cp2k.sh (#5185) 2026-05-13 18:00:49 +02:00
Matthias Krack
cbf8333c87
Make .gitignore less general (#5183) 2026-05-13 14:54:43 +02:00
Matthias Krack
e8712accb1
Add local spack recipe for libfci (#5181) 2026-05-13 14:17:27 +02:00
Dynamics of Condensed Matter
42dbd02aed
Wannier90: export SCF k-point meshes (#5179)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-13 01:08:59 +02:00
Dynamics of Condensed Matter
02caa0904f
Extend k-point symmetry backends to closed GENERAL sets (#5173)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-13 00:19:52 +02:00
RitajTyagi
c77770f004
RIRS GW: Resolve Coding Convention issues (#5175)
Co-authored-by: Ritaj Tyagi <ritaj.tyagi@gmail.com>
2026-05-12 22:09:07 +02:00
Dynamics of Condensed Matter
c523002d91
Add LibFCI active-space solver (#5167)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-12 19:36:10 +02:00
Ole Schütt
37a23bdd17
Docker: Upgrade python packages (#5172) 2026-05-12 13:31:01 +02:00
Ole Schütt
49c4bc4af3
Docker: Reduce number of pinned python packages (#5171) 2026-05-12 11:44:33 +02:00
Johann Potot.
bec0900f94
Remove debug infrastructure from tblite_interface.F (#5169)
Co-authored-by: Johann Pototschnig <j.pototschnig@hzdr.de>
2026-05-11 21:31:03 +02:00
Johann Potot.
fc8ffeed2f
Jvp terok build (#5168)
Co-authored-by: Johann Pototschnig <j.pototschnig@hzdr.de>
2026-05-11 18:06:14 +02:00
Dynamics of Condensed Matter
432ceb16cc
Improve k-point symmetry for Gamma-centered meshes and moving geometries (#5165)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-10 20:40:56 +02:00
Dynamics of Condensed Matter
95e0cafc31
Add active-space embedding density mixing (#5164)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-10 15:04:12 +02:00
SY Wang
4ce35e5f9f
Add specific Gamma-centered shifting in Monkhorst-Pack scheme (#5161) 2026-05-10 12:44:55 +02:00
Dynamics of Condensed Matter
6aff1db465
Add modified Broyden density mixing (#5163)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-10 01:35:57 +02:00
Dynamics of Condensed Matter
6a4e44fd68
"Make it nice": GFN2-xTB (#5162)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-10 01:34:44 +02:00
Matthias Krack
4104e3fc41
Use base image ubuntu 26.04 and gcc 14 as default for the spack tester (#5154) 2026-05-09 21:45:11 +02:00
Ole Schütt
46d6027c6b
Adjust tolerances on cc_s02.inp and H2O_gfn0_yz_kp_debug.inp (#5160) 2026-05-09 16:56:10 +02:00
SY Wang
6f9c336789
toolchain/build_cp2k.sh: Fix reading "--install-all" (#5158) 2026-05-09 16:19:33 +02:00
Ole Schütt
b84f141a34
Use para_env instead of MPI in gw_large_cell_gamma_ri_rs.F (#5159) 2026-05-09 16:16:21 +02:00
RitajTyagi
cd80f14804
Real Space Resolution of Identity for GW Calculations (#5157)
Looks good to me and can be merged.
Co-authored-by: Ritaj Tyagi <ritaj.tyagi@gmail.com>
2026-05-09 12:07:14 +02:00
SY Wang
9781f732f4
Add Fedora Rawhide toolchain tester (#5148) 2026-05-08 22:50:12 +02:00
Dynamics of Condensed Matter
ef37d02fde
Finalize GFN2/tblite k-point stress for remaining pathological cases (#5156)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-08 21:50:37 +02:00
Dynamics of Condensed Matter
72f118eab7
Expand TB force/stress coverage and improve GFN2/tblite k-point stress of remaining pathological cases (#5155)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-08 21:05:08 +02:00
Matthias Krack
59927b9229
make_cp2k.sh: Introduce --use_cache flag (#5149) 2026-05-08 09:59:03 +02:00
Dynamics of Condensed Matter
495eafe514
Improve tblite GFN k-point stress handling (#5153)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-08 02:53:09 +02:00
Dynamics of Condensed Matter
f8ec882662
Refine k-point symmetry reductions and guards (#5152)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-08 01:57:22 +02:00
Dynamics of Condensed Matter
55d01f6722
Improve DFTB/xTB stress handling, k-point reductions, and UKS coverage (#5144)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-07 23:01:43 +02:00
SY Wang
cfc8a4eba2
Adjust regtests (#5147) 2026-05-07 15:34:27 +02:00
HE Zilong
223025a8ce
Generalize FINAL_CIF to FINAL_STRUCTURE with XYZ output (#5140) 2026-05-07 14:12:52 +02:00
SY Wang
92364bbe53
toolchain/build_cp2k.sh: Enable debug building (#5146) 2026-05-07 14:03:08 +02:00
Juerg Hutter
b6fed2ab57
Adjust regtests for Harris-KP (#5145) 2026-05-07 13:12:50 +02:00
Dynamics of Condensed Matter
ce370e297b
Update DFTD4/simple-dftd3 toolchain patches 2026-05-07 10:05:37 +02:00
SY Wang
c29306b3a8
Toolchain: dftd4 4.1.1 -> 4.2.0 (#5141) 2026-05-06 21:33:20 +02:00
SY Wang
2748f813de
Toolchain: Remove unnecessary flags of tblite installation (#5138) 2026-05-06 15:01:04 +02:00
Dynamics of Condensed Matter
064654b83c
Generalize DDAPC Ewald to non-orthorhombic cells (#5136)
# Generalize DDAPC Ewald to non-orthorhombic cells

## Summary

This PR removes the orthorhombic-cell restriction from the DDAPC Bloechl Ewald
terms.

- Evaluate the real-space DDAPC Ewald contribution using full cell-vector image
  offsets and fractional-coordinate image bounds.
- Evaluate reciprocal-space G vectors from the inverse cell matrix for
  non-orthorhombic cells, while preserving the existing orthorhombic cutoff
  behavior.
- Keep the spline interpolation path restricted to orthorhombic cells and fall
  back to the analytic G-space term for non-orthorhombic cells, where the spline
  grid is not valid.
- Add orthorhombic and non-orthorhombic DEBUG_FORCES coverage, plus a
  non-orthorhombic run-only test that exercises the automatic analytic fallback
  without explicitly requesting `ANALYTICAL_GTERM`.
- Use the explicit `Blöchl1995` citation key for the Bloechl reference.

## Testing

- Built `cp2k.psmp` with the local CMake/Homebrew MPI build:
  `/tmp/cp2k-ddapc-homebrew-build/bin/cp2k.psmp`.
- Ran the new non-orthorhombic fallback test:
  `tests/QS/regtest-gpw-3/H2O-bloechl-nonortho.inp`.
- Ran the new orthorhombic DEBUG_FORCES test:
  `tests/QS/regtest-gpw-3/H2O-bloechl-force-ortho.inp`
  (`DEBUG| Sum of differences: 0.00000031`).
- Ran the new non-orthorhombic DEBUG_FORCES test:
  `tests/QS/regtest-gpw-3/H2O-bloechl-force-nonortho.inp`
  (`DEBUG| Sum of differences: 0.00000057`).
- Ran existing DDAPC/Bloechl checks:
  `H2O-bloechl.inp` and `H2O-bloechl-Spl.inp`.
- Ran `tools/precommit/format_fortran.py` on changed Fortran files.
- Ran `tools/precommit/format_input_file.py` on new input files.
- Ran `tools/precommit/precommit.py` on new input/TOML files.
- Ran `git diff --check`.
2026-05-06 13:07:37 +02:00
SY Wang
eb5a73070c
Toolchain: Download dftd4 from cp2k.org (#5137) 2026-05-06 12:56:13 +02:00
SY Wang
62f9a736be
Make spin-channel representation consistent in reciprocal-space mixing (#5126) 2026-05-06 12:55:32 +02:00
Matthias Krack
565e00f97f
Fix Cray tester (#5135) 2026-05-06 09:56:12 +02:00
Dynamics of Condensed Matter
cccd2f3934
Fix TB gradients, virials, and k-point symmetry
# Fix TB gradients, virials, tblite reference checks, and k-point symmetry

## Summary

This PR continues the CP2K/tblite interface work originally started by Johann Pototschnig
(`jpoto`) and relies in part on Sebastian Ehlert's `tblite` library. It makes the CP2K tight
binding paths substantially more consistent for nuclear gradients, virials/stress tensors, and
k-point symmetry, especially for DFTB, CP2K-native GFN0/GFN1, and `&XTB &TBLITE` GFN1/GFN2/IPEA1.

Main changes:

- fix several CP2K/tblite force and virial terms for periodic systems,
- add a native `tblite` CLI reference path under `&XTB &TBLITE &REFERENCE_CLI`,
- enable and test k-point symmetry reduction for CP2K-native TB and CP2K/tblite TB paths,
- improve DFTB SCC/Ewald virials and update affected DFTB references,
- add/extend regtests for molecular and truly periodic systems, including force/stress DEBUG checks,
- update the CP2K toolchain patches for `tblite`/embedded DFTD4 and standalone DFTD4.

## User-visible input changes

- `&DFT &XTB` can now select the library implementation via
  `GFN_TYPE TBLITE`; in that case an `&XTB &TBLITE` section is required.
- `&XTB &TBLITE` supports `METHOD GFN1`, `METHOD GFN2`, and `METHOD IPEA1`.
- `&XTB &TBLITE` has an optional `REFERENCE_CLI` keyword and a lone
  `&REFERENCE_CLI` subsection. If present/enabled, CP2K writes a `.gen` geometry, runs native
  `tblite run --grad`, and compares energy, gradient, and virial.
- `SCC_MIXER TBLITE` is documented as a modified Broyden mixer; the associated controls are named
  `TBLITE_MIXER_DAMPING` and `TBLITE_MIXER_MAX_SCF`.
- `DO_EWALD` remains available as a deprecated/debug override; the manual now documents the required
  periodic `POISSON` setup for CP2K-native DFTB/xTB and the `TBLITE` exception.
- CP2K warns if `CELL%PERIODIC` and `POISSON%PERIODIC` differ, but still runs.

## What was fixed

### CP2K/tblite GFN1/GFN2/IPEA1

- Periodic image-cell matrix construction now fills all image cells instead of only image cell 1.
- H0, overlap/potential, GFN2 multipole, CN-chain-rule, and D4-related virial paths were checked
  term by term against finite differences.
- Periodic self-image virial signs/factors were corrected in the CP2K/tblite interface.
- The previously bad strongly distorted Si8/GFN2 Gamma stress case was traced to a hard D4 two-body
  cutoff discontinuity and fixed by adding a smooth switching region in the D4 path.
- `RUN_TYPE DEBUG` force/stress checks now behave consistently for molecular and periodic
  CP2K/tblite GFN1/GFN2 cases; isolated stress is allowed for tblite with a warning because it is a
  diagnostic virial, not a physical isolated-system stress.

### Native tblite CLI reference

The `REFERENCE_CLI` path initially showed good molecular agreement but poor periodic virials for
Ar-fcc:

- GFN1 periodic virial diff was about `1.15e-2`,
- GFN2 periodic virial diff was about `2.95e-2`.

The parser, units, row order, and sign convention were checked and were correct. The remaining error
was in native `tblite`: periodic H0 self-image pairs (`iat == jat`, non-zero translation) used the
normal pair sigma factor `0.5`. The correct symmetrized cell-derivative factor for these self-image
pairs is `0.25`.

Updated `REFERENCE_CLI` comparison after the native tblite H0 sigma fix:

| Case | SCF | Energy diff | Gradient diff sum/max | Virial diff sum/max |
| --- | ---: | ---: | ---: | ---: |
| CH2O/GFN1, molecular | 12 | `6.775398020409e-10` | `3.296429618975e-08` / `1.577689361792e-08` | `2.884140131919e-08` / `2.625531908551e-08` |
| CH2O/GFN2, molecular | 15 | `6.651852402229e-10` | `1.437665769393e-07` / `6.050656990025e-08` | `1.240845506761e-07` / `8.358997352631e-08` |
| Ar-fcc/GFN1, periodic | 7 | `3.595097552989e-09` | `1.125627343711e-09` / `3.688615600028e-10` | `5.441065574157e-09` / `1.653417298474e-09` |
| Ar-fcc/GFN2, periodic | 20 | `8.975906240494e-09` | `2.140900031075e-08` / `4.424293700931e-09` | `3.094086449720e-07` / `8.057020835922e-08` |

`REFERENCE_CLI` is intentionally skipped/guarded for CP2K multi-k-point runs: native `tblite` CLI is
a useful Gamma reference, but it is not a CP2K-equivalent k-point/symmetry implementation.

### DFTB and CP2K-native xTB/GFN0/GFN1

- DFTB SCC/Ewald background handling was fixed so the homogeneous background contributes to energy
  and atomic properties without entering the SCC overlap virial as a constant potential shift.
- The TB real-space Ewald self-image virial prefactor was fixed.
- CP2K-native DFTB/GFN0/GFN1 k-point symmetry support was extended and tested with the CP2K atomic
  backend and SPGLIB backend.
- Full atomic k-point symmetry is used for high-symmetry production geometries; for displaced DEBUG
  geometries the reduced symmetry is recomputed instead of reusing an invalid high-symmetry map.
- DFTB3 forces, Gamma stress, k-point forces, and k-point stress were tested and covered by new
  regtests.


## What was tried

The debugging was deliberately systematic rather than a single-code-path patch:

- molecular and truly periodic crystals were checked separately; large vacuum cells were not used as
  periodic substitutes,
- GFN1 and GFN2 were tested with tight `EPS_DEFAULT`/`EPS_SCF`, DX scans, and high `MAX_SCF`,
- CP2K/tblite results were compared to native `tblite` CLI for energy, gradient, and virial,
- H0, overlap/potential, Coulomb/multipole, CN-chain-rule, D4, D3/s-D3, DFTD4 and SCC/Ewald pieces
  were isolated where practical and checked against finite differences,
- CP2K-native DFTB, DFTB3, GFN0, GFN1, CP2K/tblite GFN1/GFN2/IPEA1, and native `tblite` CLI were
  tested separately,
- k-point full grids, CP2K atomic symmetry, SPGLIB symmetry, displaced atoms, skew cells, and
  MPI-rank reproducibility were checked,
- 1D/2D periodicity, charged systems, and open-shell/spin behavior were probed.

What helped:

- restoring periodic H0/CN self-image contributions,
- fixing self-image virial signs/factors,
- fixing the native tblite H0 self-image sigma factor,
- fixing the DFTB SCC/Ewald background gauge contribution,
- recomputing k-point symmetry for lowered-symmetry DEBUG geometries,
- smoothing the hard D4 two-body cutoff in the stress-sensitive GFN2/Si8 case,
- updating the external library toolchain patches and DFTB reference values.

What did not help or was not the root cause:

- simply tightening `EPS_SCF`, `EPS_DEFAULT`, `DX`, or `MAX_SCF`,
- changing only SCC damping/mixer parameters for the hard GFN2 stress cases,
- treating the native `tblite` CLI periodic virial as authoritative before fixing its own H0 sigma
  self-image term,
- using large vacuum boxes as stand-ins for true periodic crystals,
- assuming all heteronuclear crystals are good regtests: several are dominated by overlap
  conditioning/SCF-state sensitivity rather than a clean force/stress bug.

## What works now

- CP2K/tblite GFN1/GFN2 molecular force DEBUG checks are at `~1e-8`.
- CP2K/tblite GFN2 isolated diagnostic stress is `~4e-9`.
- CP2K/tblite GFN1/GFN2 Ar-fcc k-point force/stress DEBUG runs with `64 -> 4` k-point reduction.
- CP2K/tblite GFN2 `PERIODIC XZ` Ar-layer k-point stress DEBUG is reduced from the reproduced `5.83e-4` remainder to `2.66e-5`; forces are `2.29e-6`.
- CP2K/tblite GFN1/GFN2 skew/asym Si8 Gamma stress is now in the `~1e-6` range rather than
  `~1e-3`.
- CP2K/tblite IPEA1 runs with k-point reduction and force/stress DEBUG coverage.
- CP2K-native DFTB non-SCC/SCC and GFN0/GFN1 k-point symmetry paths pass the new tests.
- DFTB3 force, Gamma stress, k-point force, and k-point stress tests pass.
- DFTD4/DFTD3/D3(BJ) CP2K tests pass with the updated build; external DFTD4/tblite patches are ready
  for the toolchain.

Representative final regtest values:

| Path | Representative result |
| --- | ---: |
| CP2K/tblite GFN2 CH2O force DEBUG | `M042 = 1e-8` |
| CP2K/tblite GFN2 CH2O isolated stress DEBUG | `M042 = 4.067e-9` |
| CP2K/tblite GFN2 Si8 Gamma stress DEBUG | `M042 = 4.76966e-7` |
| CP2K/tblite GFN2 Ar-fcc k-point stress DEBUG | `M042 = 3.33e-7`, `N_special_kpoints = 4` |
| CP2K/tblite GFN2 Ar-layer XZ k-point stress DEBUG | `M042 = 2.66e-5`, `N_special_kpoints = 2` |
| CP2K/tblite GFN1 Ar-fcc k-point stress DEBUG | `M042 = 1.6417e-8`, `N_special_kpoints = 4` |
| CP2K/tblite IPEA1 Ar-fcc k-point stress DEBUG | `M042 = 2.4656e-8`, `N_special_kpoints = 4` |
| CP2K-native GFN0 Si k-point symmetry | `N_special_kpoints = 4`; displaced geometry `12` |
| DFTB non-SCC Si k-point stress | `M042 = 3.807e-9`, `N_special_kpoints = 4` |
| DFTB SCC C k-point stress | `M042 = 5.409e-9` |
| DFTB SCC ZnS k-point stress | `M042 = 2.18113e-7`, `N_special_kpoints = 4` |
| DFTB3 H2O k-point stress | `M042 = 6.89e-10`, `N_special_kpoints = 4` |

## Remaining limitations

- The reproduced `PERIODIC XZ` CP2K/tblite GFN2 Ar-layer k-point virial remainder is now much smaller (`2.66e-5` instead of `5.83e-4`), but not yet in the `1e-6` range; forces are good.
- `PERIODIC X` full stress DEBUG is limited by the general CP2K cell/Poisson/stress machinery, not by
  a TB-specific quick fix.
- CP2K/tblite open-shell/LSD still aborts intentionally:
  `LSD option not compatible with tblite library`.
- Native `tblite` CLI remains a serial external Gamma-reference path; it is not a k-point/symmetry
  reference implementation.
- Some heteronuclear CP2K/tblite crystals with k-points are sensitive to overlap conditioning and
  SCF state; Ar/Si remain the robust PR regtest choices.

## Verification

- formatting:
  - `tools/precommit/format_fortran.py` on changed Fortran files,
  - `tools/precommit/format_input_file.py` on changed/new CP2K inputs,
  - `tools/precommit/precommit.py -m` on non-Fortran/non-input files.
- patch checks:
  - `tblite-0.5.0-gradient-fixes.patch`: `patch -p1 --dry-run` against fresh `tblite-0.5.0`,
  - `dftd4-4.1.0-gradient-fixes.patch`: `patch -p1 --dry-run` against fresh `dftd4-4.1.0`.
- build:
  - `cmake --build build-tblite-mpi-check --target cp2k-bin -- -j 8`
- regtests with `mpiranks=2`, `ompthreads=1`:
  - `xTB/regtest-tblite-gfn2`, `xTB/regtest-tblite-gfn1-grad`,
    `xTB/regtest-tblite-ipea1`, `DFTB/regtest-scc-2`: `49 / 49` correct,
  - `DFTB/regtest-scc`, `DFTB/regtest-nonscc`: after updating affected references,
    `89 / 89` correct,
  - additionally checked in the same PR-ready run: `xTB/regtest-1`, `xTB/regtest-3`,
    `xTB/regtest-gfn0`, `QS/regtest-dft-vdw-corr-4`; those were green, with only the old DFTB
    references requiring the follow-up update above.
2026-05-06 00:47:46 +02:00
Dynamics of Condensed Matter
c7270bbdb5
Diagonalization: add opt-in direct generalized eigensolvers (#5108)
Co-authored-by: DCM-Uni-Paderborn <DCM-Uni-Paderborn@users.noreply.github.com>
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-05 16:26:45 +02:00
Juerg Hutter
4a77a3b84e
Harris functional k-points symmetry (#5134) 2026-05-05 15:28:00 +02:00
Matthias Krack
81d4c4d8b9
Fix example printout (#5133) 2026-05-05 14:24:47 +02:00
Dynamics of Condensed Matter
4733e3f172
GAPW: final accurate XC integration coverage toward a future default (#5127)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-04 14:21:54 +02:00
Dynamics of Condensed Matter
263a783590
GAPW: take first steps toward accurate XC integration by default (#5125)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-04 11:45:19 +02:00
Dynamics of Condensed Matter
1b43baddf4
Support all 2D periodicities for the Wavelet Poisson solver (#5122)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-04 11:42:37 +02:00
Dynamics of Condensed Matter
9cf845759d
Add k-point symmetry backends and guards (#5124)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-04 11:09:36 +02:00
Dynamics of Condensed Matter
33b928ff10
Add k-point symmetry reduction methods (#5123)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-05-03 12:48:36 +02:00
Dmitry Ryndyk
b3d087c131
spack* added to .gitignore (#5128) 2026-05-02 19:46:30 +02:00
HE Zilong
d78ff4c862
Write CIF after optimization (#5118) 2026-05-01 13:34:09 +02:00
Matthias Krack
b871c87cfc
libfabric 2.4.0 -> 2.5.1 (spack) (#5120) 2026-05-01 13:33:30 +02:00
SY Wang
2d33723005
Toolchain: Don't install fmt when SIRIUS is disabled (#5115) 2026-04-30 18:55:31 +02:00
Dynamics of Condensed Matter
f9f50dc2f5
Optimize GAPW meta-GGA tau contractions (#5116)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-04-30 13:15:06 +02:00
Dynamics of Condensed Matter
e704af8e31
Improve GAPW one-center atom-grid performance (#5103)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-04-29 14:32:10 +02:00
Matthias Krack
80f306345e
Update spack packages (#5114) 2026-04-29 07:07:37 +02:00
Matthias Krack
6f80f8717e
Prepend ERROR to failure message (#5113) 2026-04-28 21:34:07 +02:00
Matthias Krack
e3f6089ae9
Update leak suppressions for OpenMPI tester (#5112) 2026-04-28 17:59:41 +02:00
Matthias Krack
02a6ce975b
Finalise image even if tests failed (#5110) 2026-04-28 11:48:05 +02:00
Matthias Krack
fcf49867ac
Add spack OpenMPI debug tester (pdbg) (#5104) 2026-04-28 10:03:02 +02:00
HE Zilong
cacd179657
Revise some abort messages and fix an extxyz format (#5107) 2026-04-27 17:00:01 +02:00
Dynamics of Condensed Matter
300cfa0c23
grid: improve OpenMP use in task setup and memory loops (#5099)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-04-27 16:38:20 +02:00
Franz Pöschel
e7dba46940
openPMD output: Implement missing scientific metadata (#5096)
Co-authored-by: AI Agent <ai-agent@localhost>
Co-authored-by: Blablador <noreply@hzdr.de>
2026-04-27 16:37:16 +02:00
Max Graml
90d8299cb6
lsGW: minor bugfix for read of restart files (#5105) 2026-04-27 16:34:10 +02:00
SY Wang
96eb417b72
Fix cp2k_env exporting (#5106) 2026-04-27 16:33:21 +02:00
SY Wang
1d63da52da
Toolchain: Updates of FFTW and OpenBLAS (#5102) 2026-04-27 10:20:21 +02:00
SY Wang
3a22a26910
Toolchain SIRIUS (#5098) 2026-04-26 22:07:14 +02:00
SY Wang
f577188f47
Toolchain: Replace "scripts/generate_cmake_options.sh" with "build_cp2k.sh" (#5080)
Co-authored-by: HE Zilong <159878975+he-zilong@users.noreply.github.com>
2026-04-26 12:40:37 +02:00
Dynamics of Condensed Matter
c92e8381f7
docs: add Quickstep getting-started material (#5100)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-04-26 12:02:00 +02:00
Dynamics of Condensed Matter
e887d2c5ab
FIST: add silicon EIP Stillinger-Weber and Tersoff models (#5095)
Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
2026-04-25 15:11:05 +02:00
Matthias Krack
7ab56ede36 Fix type mismatch 2026-04-25 09:43:56 +02:00
Matthias Krack
35dc0ecb7d Add image tag name flag to usage example in the dockerfile headers
That image tag name is picked up by make_cp2k.sh as IMAGE_TAG
2026-04-25 09:43:56 +02:00
he-zilong
439b37ba4c Switch to Fist tests per mkrack's suggestion 2026-04-25 09:39:16 +02:00
he-zilong
7a5c285540 Lower max_iter to 1 2026-04-25 09:39:16 +02:00
he-zilong
7838f83832 Fix flawed implementation 2026-04-25 09:39:16 +02:00
he-zilong
f8737fe1fe Decrease trust_radius and max_scf 2026-04-25 09:39:16 +02:00
he-zilong
5e3f86fde9 Switch xTB to PBE 2026-04-25 09:39:16 +02:00
he-zilong
daa1fe0eaa Adjust regtests introduced in #5086 for stability 2026-04-25 09:39:16 +02:00
Matthias Krack
5ce8c4d842 Drop keepalive for spack dbg tester
- The LeakSanitizer (LSAN) does not work properly in that mode
- Print used LSAN options for dbg tester
- Introduce IMAGE_TAG variable in make_cp2k.sh
2026-04-24 15:16:15 +02:00
Dynamics of Condensed Matter
317f6be72a
Allocate grid replay work arrays on the heap (#5094)
Co-authored-by: Thomas Kühne <tkuehne@MacBook-Pro-von-Thomas-3.local>
2026-04-24 14:12:44 +02:00
Dynamics of Condensed Matter
ed52f450bb
Abort cleanly when Libint lacks a 3-center ERI kernel (#5093)
Co-authored-by: Thomas Kühne <tkuehne@MacBook-Pro-von-Thomas-3.local>
2026-04-24 14:09:20 +02:00
Dynamics of Condensed Matter
0262abc151
Prefer include directories from the selected Libint package (#5092)
Co-authored-by: Thomas Kühne <tkuehne@MacBook-Pro-von-Thomas-3.local>
2026-04-24 14:08:16 +02:00
Ole Schütt
cb5d5fc1d4
Increase precision of cell and remove quotes from Properties in extended XYZ format (#5089) 2026-04-23 13:09:37 +02:00
SY Wang
c955a22e6e
Test-Farm: Revert to Lmod environment (#5088) 2026-04-23 10:21:38 +02:00
HE Zilong
d749a202a6
CELL_OPT: implement optimization with fixed cell volume (#5086) 2026-04-22 14:17:54 +02:00
Frederick Stein
d79ec3fd85
Turn off the latest NEGF tests (#5087) 2026-04-21 17:04:31 +02:00
Frederick Stein
c2658d3dab
Fix GW with larger number of MPI ranks (#5085) 2026-04-20 21:00:54 +02:00
Dmitry Ryndyk
48db7ef82b NEGF: xTB added 2026-04-20 16:10:10 +02:00
Matthias Krack
ff7b8ebec0 COSMA 2.8.2 -> COSMA 2.8.4 (spack) 2026-04-20 13:14:29 +02:00
Matthias Krack
6f1ede0c7d Adapt tolerances 2026-04-20 10:53:59 +02:00
Matthias Krack
a0e40544ba Do not run tests in QS/regtest-gw with 4 MPI ranks
These tests run very long with 4 MPI ranks and 2 OpenMP threads and timeout eventually
2026-04-20 10:53:59 +02:00
Growl
e82a6a61c8 Adjust slow test regtest-rtbse-gxac/h2_pade_ft.inp 2026-04-20 10:10:18 +02:00
SY Wang
a1d43364c5
Toolchain: COSMA 2.8.2 -> 2.8.4 (#5076) 2026-04-19 13:09:08 +02:00
Ole Schütt
8b341f7d8e
Docker: Switch manual to pdbg (#5074) 2026-04-18 21:57:16 +02:00
SY Wang
30e889138e
Toolchain: Avoid additional dependencies of libint and rollback COSMA upgrade (#5072) 2026-04-18 18:17:31 +02:00
SY Wang
d5b0302fb9
Add spin-channel-specific mixing parameters (#5061) 2026-04-17 12:14:36 +02:00
Growl
c4157ab6c8 Toolchain: COSMA 2.8.2 -> 2.8.3 2026-04-17 10:14:22 +02:00
Matthias Krack
8f971e11a4 Run spack regression tests with keepalive 2026-04-16 12:14:17 +02:00
Matthias Krack
d1af2e6193 Ignore leak in getMyFQN until a new (fixed) xrootd version is available 2026-04-16 12:14:17 +02:00
Matthias Krack
03cdb6fe7d Increase spack's download timeout (10s -> 30s) 2026-04-15 13:55:04 +02:00
HE Zilong
87e20491ac
Refactor: drop cell input from qs_init() and qs_subsys_create() (#5060) 2026-04-15 13:36:55 +02:00
Juerg Hutter
af0c710417
Reference benchmark (#5063) 2026-04-14 13:09:36 +02:00
dependabot[bot]
30cea4fbde
Bump pillow from 12.1.1 to 12.2.0 in /tools/pao-ml (#5062)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-14 12:48:11 +02:00
Ole Schütt
25be7e468a
benchmarks: Add QS_reference for water different functionals (#5058) 2026-04-13 18:04:53 +02:00
Juerg Hutter
dbc63552ef
Protect GPW from ACC_XCINT flag active (#5049)
Protect GPW from ACC_XCINT flag active
Kpoint enabled restart file for Harris functional: bug fix for change…
2026-04-13 14:50:19 +02:00
SY Wang
5fb5ea801f
MPICH 4.3.2 -> 5.0.1 (#5036) 2026-04-13 12:45:15 +02:00
SY Wang
ba1c648ec0
Fix false warnings and LFOMO/HOMO detection for MP/MV smearing (#5056) 2026-04-13 12:36:02 +02:00
HE Zilong
563e6d5d46
Refactor: when calling cp_subsys_create() do not call read_cell() again (#5048) 2026-04-13 12:34:27 +02:00
mnottoli
0e652e763d
Fix for gext extrapolation. (#5053) 2026-04-10 11:14:03 +02:00
exopoiesis
a4d6b945d4
Initialize matrices before parallel_gemm in make_basis_lowdin (#5044)
Co-authored-by: Igor Morozov <igor.m@namecheap.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 21:28:37 +02:00
Ole Schütt
61fc45c646
grid: Swap loop order in block_to_cab of GPU backend (#5051) 2026-04-09 19:46:33 +02:00
Ole Schütt
4c4babd79f
PAO-ML: Fix NaNs in forces (#5052) 2026-04-09 19:44:26 +02:00
HE Zilong
7d4b1410b6
Fix convention error in #5024 (#5050) 2026-04-09 16:30:50 +02:00
BelizSertcan
59e0b9b155
Bugfix: Reset state_spin and state_spin2 (#5047) 2026-04-08 11:54:50 +02:00
Juerg Hutter
7a2a232568
Refactoring dft+u/lowdin (#5046) 2026-04-07 17:34:25 +02:00
HE Zilong
c607de2d1f
MD: prepare for adapting thermostat region temperatures to thermal region temperatures (#5024) 2026-04-07 17:03:56 +02:00
Juerg Hutter
90719213be
Lowdin population analysis with k-points (#5045) 2026-04-07 13:06:54 +02:00
dependabot[bot]
e51a9ede8a
Bump aiohttp from 3.13.3 to 3.13.4 in /tools/pao-ml (#5041)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-07 12:38:38 +02:00
mnottoli
569f59fb3b
GExt extrapolation in CP2K (#5043) 2026-04-07 10:29:55 +02:00
Frederick Stein
3db43b466e
Some improvements to the active space code (#5039) 2026-04-02 13:46:51 +02:00
Matthias Krack
7c0fd7cb22 Deepmdkit 3.1.2 -> 3.1.3 (spack) 2026-04-02 11:04:20 +02:00
SY Wang
c957a64971
Fix issues regarding native DFT-D4 codes (#5030) 2026-04-01 17:23:28 +02:00
Juerg Hutter
3fd7cf798f
Remove warnings on S^2 estimation not available. (#5038) 2026-04-01 12:44:59 +02:00
Juerg Hutter
e10630fd5b
Speed up regtest in harris-kp (#5037) 2026-04-01 11:20:03 +02:00
Augustin Bussy
f664ec648c Updates to RI-HFXk docs 2026-03-31 13:34:48 +02:00
Juerg Hutter
6f8ffad0f6
Energy Correction Harris functional with k-points (#5031) 2026-03-31 11:05:17 +02:00
Ole Schütt
0f88175366
Testing: Fix Python 3.8 compatibility (#5035) 2026-03-31 00:41:05 +02:00
Ole Schütt
ff67897823
Remove tools/package_planner/ (#5034) 2026-03-30 21:15:37 +02:00
Ole Schütt
b60b5a3ee7
Toolchain: Download ScalaPACK from cp2k.org (#5033) 2026-03-30 21:15:31 +02:00
Ole Schütt
1eed5c3895
BSE: Fix conventions (#5032) 2026-03-30 18:51:37 +02:00
Ole Schütt
7a21789bb5
Conventions: Stop reading PACKAGE files (#5026) 2026-03-30 17:39:28 +02:00
Ole Schütt
3146d13d65
Dashboard: Fix typo (#5027) 2026-03-30 17:33:13 +02:00
Ole Schütt
ab20d2cda6
CI: Increase cpu/ram limit for misc test (#5029) 2026-03-30 17:11:58 +02:00
Matthias Krack
9c39c24774 Use definition of last flag occurrence 2026-03-30 16:27:53 +02:00
Matthias Krack
13b189a51e Disable dftd4 in template file by default 2026-03-30 16:27:53 +02:00
SY Wang
08e545abef
Docker: Use Ubuntu 26.04 for GCC 15 testing (#5022) 2026-03-30 15:14:11 +02:00
SY Wang
1814b3554d
Test-Farm: Use environment variables directly until Lua issue is resolved (#5021) 2026-03-30 11:25:53 +02:00
SY Wang
1a3cdd10ab
PAO-ML: Resolve conflicts in Misc testing (#5015) 2026-03-30 11:25:09 +02:00
Dmitry Ryndyk
d10c76ea8a
NEGF: restart for NEGF SCF (#5023) 2026-03-30 10:38:21 +02:00
annahehn
ed08826bad
Sternheimer BSE 1.Version parallel (#4832) 2026-03-30 10:15:54 +02:00
Growl
b4df9bbab3 DBCSR 2.9.0 -> 2.9.1 (toolchain) 2026-03-28 09:49:06 +01:00
Growl
7eda62c809 Update to the latest HIP container
For compatibility of CMake >=4.0
2026-03-28 09:49:06 +01:00
Matthias Krack
d5892a0e67 Fix logic for dependency between deepmd and libtorch 2026-03-28 05:51:26 +01:00
Matthias Krack
1acfce1e18 Enable deepmd for spack dbg tester again 2026-03-28 05:51:26 +01:00
Matthias Krack
0df199bbba Disable libtorch for CI tester 2026-03-28 05:51:26 +01:00
Growl
f4bd8eca22 Apply outside "-ef/-df" logic 2026-03-28 00:16:54 +01:00
Growl
8a6febacc1 Spack: Disable standalone dftd4 when tblite is enabled 2026-03-28 00:16:54 +01:00
Shridhar Shanbhag
0498dc7f2d
Ehrenfest.md and qs_moments (#5019) 2026-03-27 14:46:43 +01:00
Stepan Marek
391a3b0a11
RTBSE : Output readability (#5014)
Co-authored-by: Štěpán Marek <stepan.marek@physik.uni-regensburg.de>
2026-03-27 10:56:55 +01:00
Growl
3642c6ec98 Spack: dftd4 3.7.0 -> 4.0.2 2026-03-27 09:45:42 +01:00
Matthias Krack
12618bd43f Disable deepmd package in dbg tester 2026-03-26 16:09:45 +01:00
Matthias Krack
3d85b50ea0 PyTorch 2.10.0 -> 2.11.0 (spack) 2026-03-26 16:09:45 +01:00
Matthias Krack
ba189885c6 ScaLAPACK 2.2.2 -> 2.2.3 (spack) 2026-03-26 12:49:00 +01:00
Matthias Krack
8a7c549b73 Trigger only spack pdbg test automatically 2026-03-26 12:49:00 +01:00
Matthias Krack
670253b6df COSMA master -> 2.8.2 (spack) 2026-03-26 11:06:27 +01:00
Matthias Krack
bc1bef0758 Print OS information if available 2026-03-26 11:06:27 +01:00
Growl
6832432bba Toolchain: ScaLAPACK 2.2.2 -> 2.2.3 2026-03-26 09:49:44 +01:00
Growl
f361350b76 Toolchain: COSMA 2.8.1 -> 2.8.2 2026-03-26 09:49:44 +01:00
Growl
b879abb953 Toolchain: Update CMake, OpenBLAS and HDF5 2026-03-26 09:49:44 +01:00
Matthias Krack
7b94146043 Add flag for building a static CP2K library in make_cp2k.sh 2026-03-25 16:11:45 +01:00
HE Zilong
9f397624dc
MD: implement temperature function (#5002) 2026-03-25 15:02:16 +01:00
Matthias Krack
a78533eb1f Apply prettifier again to spack package files 2026-03-25 13:11:56 +01:00
Matthias Krack
ccd79c8d73 Remove local spack recipe for OpenBLAS; switch to newer spack repo 2026-03-25 13:11:56 +01:00
SY Wang
c6fc4eb94e
Add v4.0.x API of DFT-D4 (#4964) 2026-03-25 09:40:09 +01:00
Ole Schütt
cce4b85ea5
LS-SCF: Add tests for forces and stress tensor (#4997) 2026-03-24 22:58:09 +01:00
Matthias Krack
721f4afe15 OpenBLAS 0.3.31 -> 0.3.32 2026-03-24 22:22:28 +01:00
Matthias Krack
74799fca7c Drop local spack recipe for HDF5; switch to newer spack-packages version 2026-03-24 14:45:24 +01:00
Ole Schütt
0fa5d6463e
PAO: Abort when analytical stress tensor is requested (#4998) 2026-03-24 13:41:02 +01:00
Matthias Krack
1411fc9238 Use COSMA master intermediately
until a new COSMA release will become available (see https://github.com/eth-cscs/COSMA/pull/165)
2026-03-24 12:08:29 +01:00
Matthias Krack
40671c9b2f Activate Fedora rawhide tester (spack) 2026-03-24 12:08:29 +01:00
Ole Schütt
201a7457b8
Remove PACKAGE files (#4996) 2026-03-24 11:18:35 +01:00
SY Wang
5a6802b4bc
Toolchain: OpenMPI 5.0.9 -> 5.0.10 (#4995) 2026-03-24 10:00:35 +01:00
SY Wang
2ed09c55f5
Fix test-farm failure of RPM build (#4987) 2026-03-24 09:59:43 +01:00
André Nyberg Borrfors
d04fa31c63
Add header when printing CURRENT_INT in RTP/EMD (#4993) 2026-03-23 17:49:25 +01:00
Ole Schütt
0361b50231 Testing: Add check for nested test dirs 2026-03-23 17:48:46 +01:00
Ole Schütt
44d4b3fceb Testing: Split LIBTEST directory 2026-03-23 17:48:46 +01:00
Ole Schütt
554bc177a1 Testing: Move QS/C.inp into QS/regtest-gpw-2-2 2026-03-23 17:48:46 +01:00
André Nyberg Borrfors
482f4e8cbe
update RTP/EMD docs (#4990) 2026-03-23 16:44:07 +01:00
Ole Schütt
80a9227797
Testing: Add assertion against infinite recursion (#4988) 2026-03-23 14:32:35 +01:00
SY Wang
079df36cf9
Use Newton's minimization method for MP and MV smearing (#4985) 2026-03-23 12:37:13 +01:00
SY Wang
82afa516d5
Make MO_MOLDEN pick up mo_set even if MO output is not triggered on (#4986) 2026-03-23 10:01:28 +01:00
HE Zilong
34a1bdb69b
Add explanation and error message about CELL/SYMMETRY (#4974) 2026-03-21 22:41:24 +01:00
Ole Schütt
7765b1ffe2
Docs: Temporary fix for broken link in ehrenfest.md (#4984) 2026-03-21 21:06:34 +01:00
HE Zilong
ef7d4745b6
Regtest: suppress wavefunction restart file in some huge tests (#4983) 2026-03-21 20:51:52 +01:00
André Nyberg Borrfors
1155b05826
remove projMO REFERENCE_TYPE (#4979) 2026-03-20 17:49:51 +01:00
Matthias Krack
501b191426 Revise build from source instructions 2026-03-20 14:53:03 +01:00
SY Wang
8210a32729
Toolchain: Update ELPA to 2026.02.001 (#4975) 2026-03-20 12:48:56 +01:00
Matthias Krack
a15f595c46 py-torch 2.9.0 -> 2.10.0
because py-torch versions prior to 2.10.0 are deprecated due to memory CVEs
2026-03-20 12:03:19 +01:00
Matthias Krack
97815d35ec Remove local spack recipe for HDF5 2026-03-20 12:03:19 +01:00
Matthias Krack
4f8101ccea Switch to newer spack packages repo 2026-03-20 12:03:19 +01:00
Matthias Krack
afd0677457 ELPA 2025.06.001 -> 2026.02.001 (spack)
Add local spack recipe for ELPA intermediately
2026-03-19 17:12:22 +01:00
Matthias Krack
a41965c2f4 Update local spack recipe for HDF5 2026-03-19 17:12:22 +01:00
Growl
43be45d206 Relax tolerance 2026-03-19 12:37:54 +01:00
Growl
64b2f279eb Simplify CMake options output in toolchain 2026-03-19 12:37:54 +01:00
HE Zilong
5557c943c6
Revamp cell parser and allow for fallback to parse from coordinate file (#4971) 2026-03-18 18:20:42 +01:00
SY Wang
5828a1ae1e
Toolchain: Update to CMake 4.2.3, TREXIO 2.6.1, and workaround COSMA linking issue (#4954) 2026-03-18 16:26:04 +01:00
SY Wang
2b3ee83444
Toolchain: Update to CMake 4.2.3, TREXIO 2.6.1, and workaround COSMA linking issue (#4954) 2026-03-18 16:24:13 +01:00
SY Wang
e8d1ac1fd2
Fix dashboard issues (#4969) 2026-03-17 11:49:42 +01:00
HE Zilong
5bb96acea1
Add alias EXTXYZ for XYZ option of CELL_FILE_FORMAT in #4960 (#4963) 2026-03-17 11:46:57 +01:00
Growl
a28318810d Update documentation about dependencies 2026-03-17 11:16:36 +01:00
Matthias Krack
c3e4ebb575 OpenMPI 5.0.9 -> 5.0.10 (spack) 2026-03-17 10:08:36 +01:00
he-zilong
4f84fd8807 Omit COORD_FILE_NAME from restart file 2026-03-17 09:58:35 +01:00
SY Wang
f8e94810a9
Implementation of alternative smearing methods (#4958)
This PR shows an attempt to implement Gaussian smearing method.

The broading of it is much narrower than Fermi-Dirac distribution, and in most cases it should give a very resonable result. However, although Gaussian smearing is useful in practice, it does not have a clear physical meaning and therefore cannot be used in situations where electronic temperature or thermal excitations are of interest.

Most of the logic is adapted from how the Fermi–Dirac method works; the main differences lie in the mathematical formulas. In addition, an analytical form of df_i/dε_j is attempted here.
2026-03-16 15:09:56 +01:00
Juerg Hutter
60bb2b342c
Refactoring for k-point extension (#4953) 2026-03-16 11:51:08 +01:00
HE Zilong
3b19434825
Parse cell information from extxyz and pdb formats (#4960)
The input keyword &FORCE_EVAL/&SUBSYS/&CELL/CELL_FILE_FORMAT allows periodic
boundary condition to be set via external file. This PR extends parser logic so
that xyz and pdb can also be parsed for cell information in addition to
cp2k, cif and xsc, specifically the Lattice= tag in the comments on the
second line of the extended xyz format and the CRYST1 field of the pdb format.
2026-03-16 11:04:51 +01:00
Matthias Krack
eeadd9fdbb Fix occupied orbital printout for GUESS atomic and RESTART off 2026-03-14 18:14:28 +01:00
Matthias Krack
983a8784de Adapt ADDED_MOS automatically for the requested orbital information output 2026-03-14 16:37:05 +01:00
HE Zilong
01d6ff2c5b
Toolchain: improve generate_cmake_options.sh (#4928) 2026-03-13 22:28:38 +01:00
Growl
3b8dca457e Print energy with extrapolation to T->0 when smearing is used 2026-03-13 21:55:51 +01:00
Frederick Stein
f35d2ee3d9 Raise warnings or aborts in case of ambiguous/invalid cell definitions 2026-03-13 16:41:25 +01:00
Frederick Stein
5421a894f9 Fix AS calculations with Half-transformed integrals and inactive occupied orbitals 2026-03-13 14:00:29 +01:00
dependabot[bot]
2f0b2b8824
Bump black from 26.1.0 to 26.3.1 in /tools/precommit (#4948)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-13 12:55:13 +01:00
Growl
84a7b2d54c Unify extrapolation logic and update fallback to USE_PREV_WF (for k-points) 2026-03-13 08:31:42 +01:00
Matthias Krack
212c5a64b9 Spack: HDF 1.14.6 -> 2.1.0 2026-03-13 07:26:24 +01:00
Frederick Stein
039bc03734
Fix double allocation of the SPGR components (#4946) 2026-03-12 17:17:56 +01:00
HE Zilong
128d32b635
HFX: respect CUTOFF_RADIUS input with shortrange potential (#4945) 2026-03-12 14:37:55 +01:00
Matthias Krack
12cd710753 Enable openpmd with Spack pdbg tester 2026-03-12 12:19:33 +01:00
Matthias Krack
f5b900e883 Make string lengths compatible 2026-03-12 12:19:33 +01:00
Matthias Krack
8df37ddd93 Remove unused parameters and use optional argument title 2026-03-12 12:19:33 +01:00
Growl
1b046fb4e9 Implement PS for k-points 2026-03-12 12:17:26 +01:00
Growl
4769eec200 Fix test-farm failure of RPM build 2026-03-12 10:45:23 +01:00
Franz Pöschel
da857bea87 Explicitly open Iteration 2026-03-12 08:46:31 +01:00
Franz Pöschel
cab4d1cd6a Fix parallel HDF5 hangup
This is a workaround, the error points to a bug somewhere in openPMD
2026-03-12 08:46:31 +01:00
Matthias Krack
23d6dbe1c2 Exclude PEXSI with GCC 15 always 2026-03-11 19:22:13 +01:00
Franz Pöschel
ed85b1d719
openPMD output routines: Fix indexing (#4931) 2026-03-11 19:21:29 +01:00
Matthias Krack
c6abaaea11
Remove unused option and update messages (#4934) 2026-03-11 15:32:57 +01:00
SY Wang
d0346f3a66
Add [Cell] and [Nval] sections to Molden output (#4926) 2026-03-11 13:16:56 +01:00
Juerg Hutter
074b59337c
Reshuffel regtest-acc-X dirs (#4935) 2026-03-11 12:38:47 +01:00
Matthias Krack
f7bb64f48e
Include pexsi into pdbg tester (#4930) 2026-03-11 07:26:51 +01:00
BelizSertcan
ce05c0257a
RIXS| Support for RES-TDDFT (#4917) 2026-03-10 21:31:10 +01:00
HE Zilong
9782edaafd
Vibrational analysis: extend width of data field (#4922)
The old format for printing out IR and Raman intensities from a vibrational
analysis job is 3(1X,F12.6,8X), whose fixed 12-character width for float
type data may be faced with overflow in practice; this PR proposes sacrificing
width of trailing blank and extending width of data field with a new format
3(1X,ES18.6E3,2X) that is less likely to become a string of asterisks (****)
and obscure the data result. Note that this does not imply that an abnormally
high intensity from vibrational analysis is free from numeric error and/or
chemically sensible; the user is still responsible of verifying data.

For downstream output file parsers, this should be fine unless a restriction
of data type F12.6 is expected.
2026-03-09 14:21:41 +01:00
SY Wang
ff0bbe84df
Allow virtual orbital output in molden files with OT (#4924)
Get virtual orbital energies and coefficients from existing OT eigensolver and output it to .molden, which can meet a part of the feature request in #4353.

Users should generate this function through FORCE_EVAL%DFT%PRINT%MO_MOLDEN%OT_NLMO keyword (e.g. OT_NLUMO 30).
2026-03-09 14:19:40 +01:00
he-zilong
0ca8b53e62
Toolchain: use new function to check filename and sha256sum of packages (#4909) 2026-03-09 08:57:56 +01:00
Matthias Krack
9a4037812a
Use pre-built libint archive with spack (2.11.2 -> 2.13.1) (#4923) 2026-03-08 06:44:57 +01:00
Matthias Krack
3e9557df5d Increase time limit 2026-03-07 12:54:33 +01:00
Matthias Krack
b44873c12d Increase number of packages built in parallel for the CI tester 2026-03-07 12:54:33 +01:00
Growl
c7d5dbb4ca Print EEQ information only when PRINT_LEVEL >= MEDIUM 2026-03-07 12:14:58 +01:00
Growl
b1a093f7fe Avoid generating "*_localLog_p*.out" when calculating EEQ charges 2026-03-07 12:14:58 +01:00
SY Wang
5503130f6f
Fix dashboard issue of ssmp/sdbg (#4916) 2026-03-06 12:31:07 +01:00
Matthias Krack
10a8bd2f78 Drop additional layer of parallelism (make) for building the dependencies with spack
Rely completely on spack's internal parallelisation approach.
See issue #4860 and PR draft #4914.
2026-03-06 11:46:45 +01:00
Matthias Krack
d4a3af1188 Add flag for maximum number of packages built by spack 2026-03-06 11:46:45 +01:00
Growl
253de76f08 Toolchain: Lower optimization level of KXC functionals of libxc for GCC 2026-03-06 10:32:36 +01:00
Matthias Krack
cb252ca479 Add CI test inputs for 64 H2O 2026-03-05 16:34:04 +01:00
SY Wang
b83d40d81f
Toolchain: Updates of COSMA and HDF5 (#4910) 2026-03-05 14:52:31 +01:00
Matthias Krack
dca1a64c47 Do not enforce the use of externals with CUDA any longer 2026-03-05 13:33:22 +01:00
Matthias Krack
db655840ef COSMA 2.7.1 -> 2.8.1 (switch to recent spack packages version) 2026-03-05 12:29:09 +01:00
SY Wang
6b78964dbc
Toolchain: libint 2.6.0 -> 2.13.1 (#4865) 2026-03-04 23:50:49 +01:00
SY Wang
d125541000
Adjust slow tests (#4907) 2026-03-04 23:47:15 +01:00
SY Wang
5f5464d9b4
ASPC (along with USE_PREV_WF) for k-points (#4884) 2026-03-04 19:02:31 +01:00
SY Wang
7eec016f8b
Libint-cp2k: adjust build procedure (#4904) 2026-03-04 14:18:46 +01:00
Juerg Hutter
dac0cef031
Allow "smearing" in energy correction (no forces) (#4905) 2026-03-04 13:12:50 +01:00
Matthias Krack
aff660cba5 Add spack sdbg and pdbg tester to dashboard 2026-03-04 07:57:18 +01:00
Matthias Krack
5064cfc14c
Add spack based sdbg and pdbg tester (#4902) 2026-03-04 06:31:36 +01:00
Matthias Krack
52e9c85c0d make_cp2k.sh 1.6: Enable dbg builds 2026-03-03 18:46:38 +01:00
Matthias Krack
7290937375
Test for exact pattern match wrt the number of blanks (#4900) 2026-03-03 17:47:45 +01:00
Gabriele Tocci
ab353c7fcf
force_fields: Unify and upgrade NequIP and Allegro interfaces (#4898) 2026-03-03 16:41:12 +01:00
Ole Schütt
f66d47d961
Docs: Fix references in tddft.md (#4899) 2026-03-03 11:28:52 +01:00
SY Wang
b41a177dff
Reduce allowed minimum distance to 0.6 angstrom squared in DFT-MC (#4897) 2026-03-03 10:35:01 +01:00
Ole Schütt
277415ca78
Add scripts for building libint bundles (#4896) 2026-03-02 23:01:22 +01:00
Ole Schütt
549a88e91f
Toolchain: Revert back to ELPA 2024.05.001 due to CUDA issues (#4894) 2026-03-02 15:53:30 +01:00
Luis I Hernández Segura
223abcc058
Added more info for spinflip TDDFPT manual and updated citations (#4883) 2026-03-02 12:32:33 +01:00
Juerg Hutter
8546d8d3c7
DFT+U with k-points, only MULLIKEN option (#4855) 2026-03-02 09:47:32 +01:00
Matthias Krack
0ec2378a6c Fix typo; drop prerequisite for test run 2026-03-01 15:22:04 +01:00
SY Wang
1d3eaad00e
Update documentation of building from source (#4881)
Co-authored-by: Ole Schütt <ole@schuett.name>
2026-02-28 17:38:26 +01:00
Matthias Krack
4d40f9cc73 Fix spack recipe file for CUDA build 2026-02-28 14:12:41 +01:00
Matthias Krack
4180bf53f7 Add timeout flag and allow for flags using make_pretty.sh
Using "make_pretty.sh -j 1 -t 2" is often more likely to work than increasing the (hardwired) timeout value
2026-02-27 20:42:16 +01:00
Matthias Krack
70b5527ee6 Fix circular dependency 2026-02-27 20:42:16 +01:00
Matthias Krack
da287098b2 Add separate benchmark runs for ELPA to CI test 2026-02-27 20:42:16 +01:00
Ole Schütt
f04c6cb9c2
precommit: Add helpful message (#4888) 2026-02-27 16:43:22 +01:00
Ole Schütt
aaa93fa739
precommit: Increase timeout for shellcheck to 30s (#4887) 2026-02-27 16:14:28 +01:00
Matthias Krack
07b1930b13 Add GPU and CUDA compatibility checks; do not build libfabric with CUDA 2026-02-27 14:49:38 +01:00
Matthias Krack
23351c359f Allow GPU selection by CUDA arch number 2026-02-27 06:23:52 +01:00
Matthias Krack
e9d504f5c1 Use mpiexec in command example 2026-02-26 20:35:03 +01:00
Matthias Krack
52a73339f4 Initialize matrix tmp for parallel_gemm to avoid COSMA failure 2026-02-26 20:35:03 +01:00
Matthias Krack
738cd77190 Add CUDA environment setup and run only tests with ELPA 2026-02-26 20:35:03 +01:00
Matthias Krack
db02cc849e Remove feature gdrcopy when CUDA is disabled 2026-02-26 20:35:03 +01:00
Matthias Krack
d7e922a052 Allow feature selection for static binary builds 2026-02-26 20:35:03 +01:00
Matthias Krack
3f90738f87 Add separate benchmark tests for ELPA 2026-02-26 20:35:03 +01:00
Matthias Krack
03322a09a5 Revise CUDA activation for libfabric 2026-02-26 20:35:03 +01:00
Matthias Krack
aaa5d4d1c6 Add CUDA arch 75 (T400) 2026-02-26 20:35:03 +01:00
Matthias Krack
0cad5cb6b1 Add ELPA test 2026-02-26 20:35:03 +01:00
Matthias Krack
dadd5bfba6 make pretty 2026-02-26 20:35:03 +01:00
Matthias Krack
56c4d063ae Keep optional line commented 2026-02-26 20:35:03 +01:00
Matthias Krack
ca0617f2ae Disable cuda for libfabric 2026-02-26 20:35:03 +01:00
Matthias Krack
37e9a773c6 Check if the selected features are available for building a serial CP2K binary 2026-02-26 20:35:03 +01:00
Matthias Krack
0cc6abc953 COSMA 2.7.0 -> 2.7.1 2026-02-26 20:35:03 +01:00
Matthias Krack
d62da8a974 Switch to a newer spack packages commit 2026-02-26 20:35:03 +01:00
Matthias Krack
94bf4269f7 Do not restrict CI benchmark tests to ScaLAPACK (use ELPA if available) 2026-02-26 20:35:03 +01:00
Matthias Krack
25e5760d41 Activate CUDA support of COSMA explicitely when available 2026-02-26 20:35:03 +01:00
Matthias Krack
06f39e1b88 Sync tester configuration 2026-02-26 20:35:03 +01:00
Frederick Stein
428ecd7c49
Improve documentation regarding the use of the ATOM section (#4880) 2026-02-26 17:19:19 +01:00
SY Wang
116267a333
MO wavefunction text output for k-point calculations (#4858) 2026-02-26 16:34:12 +01:00
Leonard-P
eaf4b1a8fb
GW: Fix RI metric eigenvalue printing (#4879) 2026-02-26 16:32:13 +01:00
SY Wang
10ea07553d
Fix Spack-test failure (#4878) 2026-02-26 10:32:47 +01:00
SY Wang
ed9ef77eae
Fix behavior of -ef/-df dlaf and allow running as root with OpenMPI by default (#4877) 2026-02-25 15:50:05 +01:00
sliwowitz
7ed86d19fa
Add cuSOLVERMp generalized eigensolver for no-k-point code path (#4875) 2026-02-25 12:06:43 +01:00
Ole Schütt
4e03334606 precommit: Update Python packages and re-format 2026-02-24 17:11:52 +01:00
Johann Potot.
9079630cc5
fixing dipole, quadrupole adding contributions from all cells (#4873)
A fix for periodic GFN2, that adds contributions from other cells
2026-02-24 14:06:48 +01:00
SY Wang
52b94d0137
CMake: Make "require out-of-source builds" valid (#4876) 2026-02-24 12:06:05 +01:00
Matthias Krack
d54fdbb405
H100: Add benchmark stage and test more features (#4870) 2026-02-23 20:32:05 +01:00
he-zilong
8ed64b91c2 Toolchain: fix tblite-0.5.0.tar.xz install behavior 2026-02-23 10:29:47 +01:00
Matthias Krack
a9a9e09f53
Various fixes for the Cray H100 tester (#4869)
- Set unique PERSIST_IMAGE_NAME and fix typo
- Allow for change of BASE_IMAGE
- Fix short-name resolution issue
- Fix disable all features for libxsmm
- Add test runs to tester
- Add stage test to list
- Fix tag and add device flag
- Use netmod ofi instead of ucx
2026-02-23 09:40:41 +01:00
Matthias Krack
65c71bef51
Add Cray psmp H100 tester (#4868) 2026-02-22 19:51:33 +01:00
Matthias Krack
bec65495dc
Fix Cray tester (#4866)
- Drop openpmd feature for Daint
- Reduce default number of OMP_NUM_THREADS from 8 to 2 in launch script
- Use popt binary for benchmark runs
- Use old libfabric 1.22.0 for CSCS tester instead of version 2.4.0
- Add feature flags and increase time limit for Cray tester
- Use py-torch 2.9.0 instead of 2.10.0
2026-02-22 08:55:25 +01:00
Matthias Krack
993cc6f902 Split container builds in 3 stages to imorove caching 2026-02-21 00:36:37 +01:00
Matthias Krack
eeba7ca83e Include libcp2k in search 2026-02-20 20:56:44 +01:00
Matthias Krack
d21f74fb32 Recover Cray specific settings 2026-02-20 20:56:44 +01:00
Matthias Krack
fe07ba5a00 Replace the unreliable ldd by ldconfig
to detect all library paths needed by the CP2K binary
- Pin ninja version after removing the package from the base image installation
- Update Rocky Linux version from 9.3 to 10 (latest)
- Remove CMake cleaning step, because it causes that CP2K is always recompiled from scratch which is a feature already covered by the --rebuild_cp2k flag on user request
- Move back from lscpu to nproc, because lscpu provides always a host view also within containers whereas nproc shows the container-visible CPUs (cgroup limits)
2026-02-20 20:56:44 +01:00
he-zilong
5dbd8b0fb1
Toolchain: new tool_kit.sh function for tail excerpt of log files (#4861) 2026-02-20 16:08:54 +01:00
Growl
0ada215eeb Along with minor fixes to make_cp2k.sh 2026-02-20 09:20:35 +01:00
Growl
aab5fe999c Reset default libdir in CMakeLists.txt 2026-02-20 09:20:35 +01:00
Johann Potot.
0b9d12659e
fix for partial occupation numbers from tblite (#4857)
Co-authored-by: Johann Pototschnig <j.pototschnig@hzdr.de>
2026-02-19 16:14:33 +01:00
Frederick Stein
b35dc3d099
Add support for ROHF/ROKS in the active space module (#4859)
Currently, ROHF calculations are just run as UHF calculations in the active space module. This PR calculates ERIs and dumps ERIs and Fock matrix elements only once for the first spin channel.
Fix: I replaced the scf_control%restricted with dft_control%roks (and one check with scf_control%roks_scheme) because scf_control%restricted only works with the OT solver.
2026-02-19 13:41:49 +01:00
SY Wang
e4d53b9f1c
PAO-ML: Pin versions of all Python packages 2026-02-18 11:45:48 +01:00
Matthias Krack
f5f4884382 Minor fixes for make_cp2k.sh
- Silence (garbage) output of spack compiler find
- Process only non-empty SED_PATTERN_LIST
- Add -e flag to sed command
2026-02-18 09:50:35 +01:00
Matthias Krack
08977f0e78 Remove ninja-build package from base images 2026-02-18 09:50:35 +01:00
Matthias Krack
c44663d83f Add spack based rockylinux 9.3 tester 2026-02-18 09:50:35 +01:00
Mathieu Taillefumier
2064daf5fd Add DBCSR cmake configuration check. Apply only to DBCSR > 2.9.1 2026-02-17 18:11:09 +01:00
Matthias Krack
45ef852182 Drop --non-buildable flag from spack find externals
Fix python version check and print always the detected version
2026-02-17 16:18:23 +01:00
Ole Schütt
fc91f74b85 precommit: Increase timeout for shellcheck 2026-02-17 12:32:20 +01:00
Matthias Krack
f24c03a905 Set CUDA_CACHE_DISABLE 2026-02-17 10:32:16 +01:00
Matthias Krack
e75f387824 Try to fix LD_LIBRARY_PATH 2026-02-17 10:32:16 +01:00
he-zilong
66befe4c16
Toolchain: remove some legacy mentions 2026-02-17 10:25:20 +01:00
Matthias Krack
eaadeeb9d3 Enable OpenPMD explicitly (not done by default) 2026-02-16 17:02:23 +01:00
Ole Schütt
4e811310d5 Fix conventions in negf_env_types.F and qs_moments.F 2026-02-16 14:58:37 +01:00
SY Wang
33018c95e6
Resolve issues with Intel compilers 2026-02-16 14:57:16 +01:00
SY Wang
71814aae36
Fix Fedora rpm-build failure 2026-02-16 12:35:35 +01:00
he-zilong
6056ab6385
Toolchain: revamp help message, extend --dry-run output in install_cp2k_toolchain.sh 2026-02-16 12:03:43 +01:00
Matthias Krack
0acacb5a85 make_cp2k.sh: Add flags to enable/disable features selectively
"-ef all -df sirius -df deepmd" enables all feature except sirius and deepmdkit
"-df all -ef libxc -ef tblite" disables all optional features except libxc and tblite
2026-02-16 10:49:35 +01:00
SY Wang
6f2c87018f
Update toolchain README documentation (#4839) 2026-02-16 10:18:19 +01:00
Matthias Krack
07a43cf683 Disable PEXSI when CUDA is used 2026-02-15 14:05:49 +01:00
Matthias Krack
0c3f48da69 Add spack based psmp CUDA P100 tester 2026-02-15 14:05:49 +01:00
Matthias Krack
8000e662f5 Fix elpa pkg-config file when CUDA is used 2026-02-15 14:05:49 +01:00
Andrea Grisafi
9ea93394cc
Fixed printing overflow of RI basis set contraction coefficients (#4834)
This PR fixes a field-width overflow (***** output) when printing RI basis set contraction coefficients from src/basis_set_output.F.
2026-02-13 20:23:44 +01:00
Matthias Krack
04652bb80a Show ldd output also for statically linked binaries 2026-02-13 18:14:23 +01:00
Matthias Krack
3d9e421291 Update CI docker files and adapt make_cp2k script
- fix spack path in docker file
- drop cray flag
- drop hwloc and libhwloc in base image
- adapt sed command for MPI selection
- disable extra fabrics for the time being
- print CUDA version only if defined
2026-02-13 17:11:16 +01:00
Matthias Krack
d09aed86f6 Switch to newer spack-packages version
- provides spglib version 2.6 and 2.7
- remove local spack recipe for spglib
- add more sirius features
- remove xpmem from configuration
2026-02-13 17:11:16 +01:00
Matthias Krack
3e37b7b58e libfabric 1.22.0 -> 2.4.0 2026-02-12 23:05:50 +01:00
Matthias Krack
a36ee8f466 OpenMPI 5.0.8 -> 5.0.9 2026-02-12 23:05:50 +01:00
Matthias Krack
0129da2b8a Openpmd 0.16.1 -> 0.17.0 2026-02-12 23:05:50 +01:00
Matthias Krack
189bf0f600 adios2 2.10.2 -> 2.11.0 2026-02-12 23:05:50 +01:00
Matthias Krack
e663abcc80 libvdwxc 0.4.0 -> 0.5.0 2026-02-12 23:05:50 +01:00
Matthias Krack
94d08d3e79 Sirius 7.9.0 -> 7.10.0 2026-02-12 23:05:50 +01:00
Matthias Krack
1311ce0a61 py-torch 2.9.0 -> 2.10.0 2026-02-12 23:05:50 +01:00
Matthias Krack
249fbc2679 libint 2.11.1 -> 2.11.2 2026-02-12 23:05:50 +01:00
Matthias Krack
c8571928d6 Add recent commit tag for spack-packages 2026-02-12 19:24:22 +01:00
Matthias Krack
3d34b48a59 Drop download of spack-packages 2026-02-12 19:24:22 +01:00
Matthias Krack
ed239ab163 Format package file 2026-02-12 19:24:22 +01:00
Matthias Krack
b42935cf8e Sync local with upstream recipe 2026-02-12 19:24:22 +01:00
Matthias Krack
9a73445b87 Drop local spack recipe for plumed 2026-02-12 19:24:22 +01:00
Matthias Krack
b47042f53f Remove local spack recipe for mimic_mcl 2026-02-12 19:24:22 +01:00
Matthias Krack
26c4b8eb1f Remove local spack recipe for greenx 2026-02-12 19:24:22 +01:00
Matthias Krack
c6101b5ca7 Remove local spack recipe for deepmdkit 2026-02-12 19:24:22 +01:00
Matthias Krack
474557d837 Remove local spack recipe for dbcsr 2026-02-12 19:24:22 +01:00
Matthias Krack
e1a350d663 Augment prefix inspections 2026-02-12 13:37:02 +01:00
Matthias Krack
3c434384a8 Drop version from spack folder name 2026-02-12 13:37:02 +01:00
Matthias Krack
c6529ff58f Spack 1.1.0 -> 1.1.1 2026-02-12 13:37:02 +01:00
marcella
c5ae7f89c8
missing term (#4823) 2026-02-12 12:07:17 +01:00
Shridhar Shanbhag
06e04e9fbf
Add qs_moment_kpoints_deep 2026-02-12 10:01:17 +01:00
Matthias Krack
a43c0409d8 Augment search path for CUDA 2026-02-11 15:19:56 +01:00
Matthias Krack
dd84f02cdf Export LD_LIBRARY_PATH 2026-02-11 15:19:56 +01:00
Matthias Krack
058fcb96a8 Remove printout of undefined variables 2026-02-11 15:19:56 +01:00
Matthias Krack
de8fe47947 Drop CUDA environment setup within the container 2026-02-11 15:19:56 +01:00
Matthias Krack
f83b2f40dd Sync CUDA version with docker container 2026-02-11 15:19:56 +01:00
Matthias Krack
e0d5c8ef3d Add spack based ssmp CUDA P100 tester 2026-02-11 15:19:56 +01:00
Juerg Hutter
2f8dfa158c
D4: correctly set CN rc cutoff (#4821) 2026-02-11 15:04:18 +01:00
Juerg Hutter
0805bbdd34
Fix for tblite to not use OT optimizer (#4804) 2026-02-11 14:03:42 +01:00
Dmitry Ryndyk
6bd5426dd7
NEGF: restart files for scattering region initial Hamiltonian and ove… (#4800) 2026-02-11 10:13:07 +01:00
SY Wang
70636b18d4
Toolchain: Updates of OpenBLAS, PLUMED and Spglib 2026-02-10 16:33:36 +01:00
Matthias Krack
03b8f6183c make_cp2k.sh 1.3: Add CUDA GPU support 2026-02-10 13:33:09 +01:00
Matthias Krack
7d693f415a Recover packages hwloc and libhwloc-dev for Cray 2026-02-10 12:16:39 +01:00
SY Wang
c3c8c31c59
CMake: Restore creation of popt/sopt symlink 2026-02-10 12:00:34 +01:00
Matthias Krack
c4c8d7be26 Fix path of launch script and PEXSI detection 2026-02-10 09:52:07 +01:00
Matthias Krack
026a55ffeb Sync CI docker files (launch script name) 2026-02-10 09:22:07 +01:00
Matthias Krack
4c552869df Fix case when GCC_VERSION is set to "auto" 2026-02-09 18:59:37 +01:00
Matthias Krack
8173ab3892 Add docker files for testing fedora rawhide using GCC 16
- CP2K ssmp: Binary is built successfully but gives immediately a segfault at runtime
- CP2K psmp: Building the dependencies fails (COSMA issue #160)
2026-02-09 18:59:37 +01:00
Matthias Krack
9767e520d0 Simplify: merge entrypoint and launch script 2026-02-09 17:53:43 +01:00
Matthias Krack
119b1e800a Add output redirection 2026-02-09 17:53:43 +01:00
Matthias Krack
48070a008c Allow for selecting GCC 16 2026-02-09 17:53:43 +01:00
Matthias Krack
8de6fc2277 Mute zypper command 2026-02-09 17:53:43 +01:00
Matthias Krack
54302ca1a4 Test with base image fedora:latest instead of fedora:43 2026-02-09 17:53:43 +01:00
Matthias Krack
cd2fe8df35 Add forgotten -- to ldd command 2026-02-09 17:53:43 +01:00
Matthias Krack
ef5a920802 Add forgotten -- to ldd command 2026-02-09 17:53:43 +01:00
Matthias Krack
55d334afdb Add spack psmp tester for openSUSE (leap 15.6) 2026-02-09 17:53:43 +01:00
Frederick Stein
f02ad998b0 Generalize the determination of integration groups with RPA and use the max memory more consistently 2026-02-09 11:54:43 +01:00
Matthias Krack
07cc380991 Add spack based fedora:43 psmp tester
Fedora:43 provides GCC 15.2.1 which includes backports and fixes missing in the GCC 15.2.0 version
2026-02-09 08:11:37 +01:00
Matthias Krack
fad18cd9cc Remove accidentily added package findutils 2026-02-08 23:35:27 +01:00
Matthias Krack
136a596132 Make ldd command more robust
Disable PEXSI when the dependency is missing
2026-02-08 23:35:27 +01:00
Matthias Krack
6e2f6d2d0a Allow for different base images with spack 2026-02-08 23:35:27 +01:00
Ole Schütt
7c2fd9f766 PAO-ML: Split samples into training and validation set 2026-02-08 18:37:33 +01:00
Ole Schütt
0a876ee833 PAO: Abort on convergence failure 2026-02-08 18:37:33 +01:00
Ole Schütt
991d15c049 PAO: Fix race condition in pao_calc_AB_equi 2026-02-08 18:37:33 +01:00
Matthias Krack
bc61e0093c Spack: PLUMED 2.9.2 -> 2.10.0 2026-02-08 12:46:13 +01:00
Matthias Krack
93901f99c1 Spack: OpenBLAS 0.3.30 -> 0.3.31 2026-02-08 12:46:13 +01:00
Matthias Krack
2ad40c2f4b Spack: Spglib 2.5.0 -> 2.7.0 2026-02-07 22:08:39 +01:00
Matthias Krack
c4d211555b Add spack based static ssmp tester 2026-02-07 19:32:03 +01:00
Matthias Krack
9654b273e8 Remove local GCC version only when present 2026-02-07 19:32:03 +01:00
Matthias Krack
00eebaaad3 Suppress pretty for spack package files 2026-02-07 19:32:03 +01:00
Matthias Krack
5da81e0082 Add docker file for building statically linked CP2K binaries 2026-02-07 19:32:03 +01:00
Matthias Krack
a829f3211f Add spack configuration file for static builds 2026-02-07 19:32:03 +01:00
Matthias Krack
a1aefec7b7 make_cp2k.sh 1.2: Add option for static build 2026-02-07 19:32:03 +01:00
Matthias Krack
45098ffe6d Add local spack recipe for openblas
- Add variant static to enable static library builds
- Add latest version 0.3.31
2026-02-07 19:32:03 +01:00
Matthias Krack
c8face9be8 Add local spack recipe for spglib
- Add variant shared to enable static library builds
- Add new versions 2.6.0 and 2.7.0
2026-02-07 19:32:03 +01:00
Growl
4c0ecfe9d1 Toolchain: Decrease unnecessary environment variables in install/setup 2026-02-07 16:06:24 +01:00
Ole Schütt
76a1fba2f3 Fix OpenMP in qs_moment_kpoints 2026-02-07 15:03:48 +01:00
Growl
7a8bbbd46a Toolchain: Small fixes following up #4784 and #4787 2026-02-07 11:41:18 +01:00
SY Wang
77f1922497
Fix Ubuntu GCC test issue 2026-02-06 16:27:42 +01:00
Sebastian Wellig
e0aa991fa9
Improve docs for function strings 2026-02-06 14:26:07 +01:00
Max Graml
9b8827b5d4 fix blocksize-dependent (MPI, Mem_per_proc) deviations 2026-02-06 14:22:55 +01:00
BelizSertcan
b06d3a975b
TDDFT| delete outdated description (#4786) 2026-02-05 17:55:20 +01:00
bramlinden
fde685aa93 Update input_cp2k_xc.F
Changed description scaling parameters Grimme dispersion corrections to make clear that 0 values do not trigger automatic parameter determination. See also the forum https://groups.google.com/g/cp2k/c/dY9nQWnWeIQ
2026-02-05 11:39:14 +01:00
Growl
b66543e858 Fix issue #4762
Integrate the suggestions from #4762 into the scripts to avoid errors similar to those reported in this issue.
2026-02-05 11:38:07 +01:00
Hans Pabst
63b8883d67 HDF5: initialize output_unit in wrapper
- Rely on cp_logger_get_default_io_unit()
2026-02-05 11:29:40 +01:00
Juerg Hutter
dbde302009
GAPW increase accuracy for XC integration (#4779) 2026-02-04 17:51:19 +01:00
Matthias Krack
3375d7e96a Revert output reduction for spack env activate 2026-02-04 17:47:21 +01:00
Matthias Krack
99201c48e0 Fix typo 2026-02-04 17:47:21 +01:00
Matthias Krack
9bec092fd1 Reduce non-verbose output 2026-02-04 17:47:21 +01:00
Matthias Krack
a85da213f3 Relax tolerance 2026-02-04 17:47:21 +01:00
BelizSertcan
37fe518a58 TDDFPT| define tddfpt section and control only once 2026-02-04 17:02:21 +01:00
Matthias Krack
d945cc3509 Simplify: just include the GCC version as spec 2026-02-04 14:48:55 +01:00
Matthias Krack
2b0c3cd6e0 Add new GCC 15 tester to dashboard 2026-02-04 14:48:55 +01:00
Matthias Krack
78e4bf51c4 Add spack based tester for GCC 15
- Drop overriding compiler commands
- Try to use externals to accelerate the build
2026-02-04 14:48:55 +01:00
Sebastian Wellig
8b1f5daa69
Add support for functions with multiple arguments to fparser 2026-02-04 10:40:02 +01:00
ssande7
a133cbe98f Toolchain: fix include and lib paths for Cray builds 2026-02-04 10:38:37 +01:00
Matthias Krack
51fc4cdbdb Add launch script for builds with make_cp2k.sh outside a container
- The launch script performs the envrionment setup like the entrypoint.sh script within a container
- Improve and extend the usage hint messages
2026-02-03 13:33:10 +01:00
Matthias Krack
57d0aac4b7 Revise printout 2026-02-02 17:44:18 +01:00
Matthias Krack
b79721a12d Allow for selecting the GCC version 2026-02-02 17:44:18 +01:00
Jiří Vyskočil
e7b8a776ce Add NCCL support for CuSolverMP 2026-02-02 16:17:48 +01:00
Matthias Krack
e84522140f Make a note of a successful dependencies build 2026-02-02 16:09:47 +01:00
SY Wang
e644ccc3b3
Toolchain: Several tweaks and fixes 2026-02-02 12:30:54 +01:00
Matthias Krack
5d1292bd6a Remove also the folders build and install when building from scratch 2026-02-02 12:13:56 +01:00
Matthias Krack
6694314201 Fix -j flag parsing 2026-02-02 12:13:56 +01:00
Matthias Krack
d2b3edacdf Update CP2K installation path 2026-02-02 07:46:33 +01:00
Matthias Krack
10126dff3c Add NUM_PROCS; discard test run after install step 2026-02-02 07:46:33 +01:00
Matthias Krack
e1834e69bf Disable local cache for CI/CD testing 2026-02-02 07:46:33 +01:00
Matthias Krack
54614f0173 Relocate -i flag to correct position 2026-02-02 07:46:33 +01:00
Matthias Krack
1bb5f7d1d6 Use make_cp2k.sh script for CI/CD testing 2026-02-02 07:46:33 +01:00
Matthias Krack
cd22e438c1 make_cp2k.sh: Add Cray specific configuration 2026-02-02 07:46:33 +01:00
Matthias Krack
a709f7f1fc Relax test tolerance 2026-01-31 07:25:48 +01:00
Matthias Krack
9395d2b7a1 make pretty 2026-01-31 07:25:48 +01:00
Matthias Krack
3385008a7f Include last missing package TBLITE in spack build 2026-01-31 07:25:48 +01:00
Matthias Krack
dabbdeb19f Add spack based tester for GCC 10, 11, 12, and 14 2026-01-30 23:43:04 +01:00
Matthias Krack
0329e72911 Add --disable_local_cache flag in make_cp2k.sh 2026-01-30 16:59:58 +01:00
Matthias Krack
3462af1f7c Perform multi-stage docker builds to reduce image size
- Create also more layers for a smaller average size per layer
- The created containers are essentially ready for production
2026-01-30 14:17:19 +01:00
Matthias Krack
e749b09f73 Fix library name 2026-01-30 13:17:41 +01:00
Matthias Krack
710be7e663 Disable MPI if a serial CP2K build is selected 2026-01-30 13:17:41 +01:00
Matthias Krack
7e97e3de77 Fix hint message 2026-01-30 13:17:41 +01:00
Matthias Krack
1661aba86b Use CP2K search function 2026-01-30 13:17:41 +01:00
Matthias Krack
c55ce8db39 Do not use ACE internal yaml with spack 2026-01-30 13:17:41 +01:00
Matthias Krack
7f9c01eb84 Use a more informative variable value 2026-01-30 13:17:41 +01:00
Matthias Krack
5a17cb8158 Drop update of EXIT_CMD 2026-01-29 18:27:00 +01:00
Matthias Krack
8408de7462 Add printout for new flag 2026-01-29 18:27:00 +01:00
Matthias Krack
c1d0850744 Add --build_deps_only flag in make_cp2k.sh 2026-01-29 18:27:00 +01:00
Frederick Stein
c2f2ab1e3c Actually use a single core per subgroup to calculate ERIs in AS module if requested+Fix 2026-01-29 17:00:27 +01:00
Frederick Stein
b330c0f5f4 Add current+maximum cutoff radius to the warning of too large cutoff radius in HFX 2026-01-29 17:00:27 +01:00
Matthias Krack
77dd534c16 Add missing docker file 2026-01-29 15:18:17 +01:00
Matthias Krack
9dd2f63cea Replace old spack-based testers with new ones (use make_cp2k.sh) 2026-01-29 15:18:17 +01:00
he-zilong
80da8b86e6
Toolchain: disable libvdwxc and spfft build without sirius (and spla if also without GPU) 2026-01-29 11:11:44 +01:00
Michael Cho
0a5a51bf32 CMake: Fix ssmp build with CP2K_BLAS_VENDOR set 2026-01-29 11:09:57 +01:00
Matthias Krack
d5a04416c5 Fix container detection 2026-01-28 21:00:10 +01:00
Matthias Krack
e915ac4f9d libint-2.11.1 requires at least gcc10 2026-01-28 21:00:10 +01:00
Matthias Krack
88a4689002 Discard output of spack create and activate 2026-01-28 21:00:10 +01:00
Matthias Krack
e227b41fd7 Replace docker file for gcc15 by gcc10 2026-01-28 21:00:10 +01:00
Matthias Krack
89bea08878 Fix hard-wired version in docker file
Add arguments for GCC version and test options (TESTOPTS)
Add two spack based testers (gcc15 and 4x2)
2026-01-28 21:00:10 +01:00
Matthias Krack
c92322cfae Minor fixes 2026-01-28 21:00:10 +01:00
Matthias Krack
2c68f22196 Add OpenMPI tester using make_cp2k.sh
Drop hwloc installation for the base image with spack
2026-01-28 21:00:10 +01:00
Matthias Krack
ca3340cbb5 make_cp2k.sh 0.6: Add MPI flag and revise flag parsing
Add entrypoint script file
2026-01-28 21:00:10 +01:00
Matthias Krack
ccfa571fc8 Build OpenMPI without internal hwloc using spack 2026-01-28 21:00:10 +01:00
SY Wang
6d8a8e2a96 Toolchain: Add support for enabling "CP2K_USE_MPI_F08" when generating CMake options 2026-01-28 17:48:01 +01:00
Max Graml
35340893dd
GW: performance improvements 2026-01-28 17:47:31 +01:00
Shridhar Shanbhag
e60cd36aed
open shell code added to qs_moment_kpoints 2026-01-28 17:44:54 +01:00
he-zilong
c043a46d7e Toolchain: add --enable-sse2 option for fftw with target-cpu=native 2026-01-28 15:02:25 +01:00
SY Wang
6b5fb56659 Toolchain: Remove redundant "export PKG_CONFIG_PATH" commands 2026-01-28 14:57:33 +01:00
marcella
7bb81b159f
FIX of BUG FIX RMD + ADMM + LSD (#4749) 2026-01-28 14:36:48 +01:00
Ole Schütt
a062912343 Toolchain: chmod +x generate_cmake_options.sh 2026-01-27 15:19:25 +01:00
Ole Schütt
d460b44812 Add MAX_FILE_SIZE_MB to other CUBE printkeys 2026-01-27 11:30:29 +01:00
Ole Schütt
d52ff1256a Testing: Change default workbasedir to ./regtesting 2026-01-27 09:33:02 +01:00
marcella
ada2ee8b55
BUG FIX: EMD + LSD + ADMM (#4739) 2026-01-26 18:56:45 +01:00
Ole Schütt
b049e7ca4f Dashboard: Only check OK reports for complete plots 2026-01-26 13:35:32 +01:00
Ole Schütt
de6826d5f0 ELPA: Fix unused dummy arguments 2026-01-26 13:35:32 +01:00
Ole Schütt
425d944692 Docker: Reduce output after build failure 2026-01-26 13:35:32 +01:00
SY Wang
fe536af7c6
Toolchain: Fix zlib support in install_hdf5.sh 2026-01-26 12:59:45 +01:00
BelizSertcan
cb3738280a mo transformation and mem improvements 2026-01-26 12:53:28 +01:00
SY Wang
9513a73f5c
Make Toolchain automatically generate CMake options 2026-01-26 08:58:46 +01:00
Matthias Krack
fd1a950bc3 Revert "Change SPACK_CACHE"
This reverts commit a8a95e500c.
2026-01-25 21:02:19 +01:00
Matthias Krack
a8a95e500c Change SPACK_CACHE 2026-01-25 19:56:30 +01:00
Matthias Krack
70efc141fe Add hint message on failure 2026-01-25 19:56:30 +01:00
Matthias Krack
13943525c3 Use padded_length for prefix 2026-01-25 19:56:30 +01:00
Matthias Krack
ca6b8f8fc6 Add two testers for make_cp2k.sh build script 2026-01-24 20:00:50 +01:00
Matthias Krack
0d91bdb03c Adapt make_cp2k.sh script for use within a container 2026-01-24 16:16:16 +01:00
Matthias Krack
27b758b4a0 Retrieve error code via PIPESTATUS 2026-01-24 16:16:16 +01:00
Hans Pabst
5671e2c755 ELPA: turn section PRINT_ELPA into a lone keyword ELPA_PRINT
- Adjusted test/input files accordingly.
- Removed print key from benchmarks.
- Improved descriptions/comments.
- Simplified ELPA wrapper API.
2026-01-23 17:51:56 +01:00
Frederick Stein
baed3e2f42
Fix checks for contiguity in case of zero-sized arrays (#4729)
Apparently, there are problems when dealing with contiguous arrays of size 0 in the MPI wrapper. With GCC, they are not anymore contiguous after passing them to a function. We circumvent that by requiring the array to be contiguous or of size 0.
2026-01-23 17:39:17 +01:00
Matthias Krack
980780834b make_cp2k.sh 0.4: Improve error handling and provide more hints 2026-01-22 16:57:51 +01:00
Ioachim Dusa
c196de5d7f
Fix boundary condition handling in I-PI driver 2026-01-22 15:21:36 +01:00
Matthias Krack
5092e67aec make_cp2k.sh: fix bd flag and install venv after spack 2026-01-22 13:33:22 +01:00
Matthias Krack
240ff40f90 make_cp2k.sh 0.3: Add no_externals flag and perform more checks 2026-01-22 13:33:22 +01:00
Hans Pabst
41057b29f4 Fixed conventions
- Suppressed RANDOM_NUMBER and RANDOM_SEED.
2026-01-22 09:50:10 +01:00
Hans Pabst
8ebf9ad0d0 ELPA: introduced ELPA_ONE_STAGE and revised ELPA_QR/UNSAFE
- Introduced ELPA_ONE_STAGE (see #4683).
- QR factorization (unsafe is now internal).
- Removed keyword ELPA_QR_UNSAFE.
- Updated to ELPA 2025.06.002.
- Disabled IEEE exceptions.
- Test coverage.
2026-01-21 13:33:40 +01:00
Matthias Krack
d24a13c9a8 Increase minimum version for CMake to 3.27 and add python 2026-01-21 12:17:13 +01:00
Matthias Krack
631f12d81a Version 0.2 of make_cp2k.sh
- Add more flags and checks
- Minor fixes
2026-01-21 12:17:13 +01:00
Hans Pabst
1faee7cb7e PW/FFT: code cleanup 2026-01-21 08:12:42 +01:00
Matthias Krack
e68d6fd0ba Relax minimum requirement for gmake version from 4.3 to 4.2 2026-01-20 14:39:43 +01:00
Matt Thompson
1d2e12d9be
Add reference to make_cp2k.sh script in INSTALL.md 2026-01-20 13:16:14 +01:00
Matthias Krack
e0d697471b PEXSI 2.0.0 requires OpenBLAS to be built with Makefile
When OpenBLAS is built with CMake, the CMake error "Could NOT find BLAS (missing: BLAS_LINK_OK)" appears when PEXSI 2.0.0 is built.
2026-01-20 13:13:00 +01:00
Matthias Krack
ff02d6f2fc Make pretty 2026-01-20 13:13:00 +01:00
Matthias Krack
40083c484c Adapt sed command for double-quoted specs 2026-01-20 13:13:00 +01:00
Matthias Krack
ee3ed4defb Update Spack config file
- Define preferred Spack build_system and CMake BUILD_TYPE
- Double-quote all specs even if this is only needed for a few entries
- Add build tools to specs to ensure that these are built by Spack in case the minimum version requirement is not fulfilled
2026-01-20 13:13:00 +01:00
Matthias Krack
e12c633724 Merge local Spack recipe for lammps_user_pace with recipe pace from spack-packages 2026-01-20 13:13:00 +01:00
Juerg Hutter
a0e5186601
RIGPW bug fixes and add a regtest (#4707) 2026-01-19 17:04:37 +01:00
Frederick Stein
6233382a0d
Fix io unit in kpsym (#4706) 2026-01-19 13:03:18 +01:00
Matthias Krack
2dab80f166 Use the same libxsmm version with Spack as with the toolchain 2026-01-17 17:11:27 +01:00
Matthias Krack
90e4872bed Fix sed command for switching MPICH to OpenMPI 2026-01-17 13:37:43 +01:00
Matthias Krack
7ebcc369d2 Include libxsmm in Spack builds and use it for DBCSR
A local Spack package file for libxsmm is included with only a minor modification:
The build dependency on "binutils+ld+gas@2.33:" is commented.
2026-01-16 18:09:52 +01:00
Matthias Krack
b8dc6169e0 Keep "prefer" until variants are defined for all dependencies 2026-01-16 13:13:03 +01:00
Matthias Krack
945069766d Rework spack configuration files 2026-01-16 13:13:03 +01:00
Frederick Stein
4e96ea1a00
Fix typos with Cs in BASIS_ccGRB_UZH (#4698) 2026-01-15 16:03:30 +01:00
Matthias Krack
30099c3b2a Update mimic_mcl recipe after adding it to the Spack packages repository 2026-01-14 21:01:17 +01:00
Ole Schütt
cc4239a96c CMake: Set -D__NO_STATM_ACCESS on BSD 2026-01-13 13:58:58 +01:00
Shridhar
3c2ea2d94a removed repeated kpoint_init_cell_index_simple from gw_utils and removed wrong and unnecessary subroutine remove_soc_outside_energy_window_ao from soc_pseudopotential_methods.F 2026-01-13 13:00:07 +01:00
Matthias Krack
3bf5ae02eb Update Spack recipe for MimicMcl 2026-01-10 23:29:35 +01:00
Matthias Krack
4cfb50dc9e Check for mandatory packages (Spack/CMake) 2026-01-10 22:01:14 +01:00
Teodoro Laino
abf89380ae Patch CMake logic to link Fortran API to core library and force MPI wrappers for stable discovery. 2026-01-09 21:51:22 +01:00
Teodoro Laino
3fbb25eb00 Modernize build with cmake -S/-B and add portable, idempotent sed fix for GCC 15 compatibility. 2026-01-09 21:51:22 +01:00
Teodoro Laino
63e52d8d69 Remove GNU-specific linker flags and disable affinity checking on macOS (Darwin). 2026-01-09 21:51:22 +01:00
Teodoro Laino
18470e9b20 Remove literal single quotes from LDFLAGS to fix path resolution and directory lookup. 2026-01-09 21:51:22 +01:00
Teodoro Laino
d7d97efce9 Patch pkg-config files on macOS to remove GNU-specific -l:libfoo.a syntax. 2026-01-09 21:51:22 +01:00
Teodoro Laino
ae49bc015b Use absolute paths for static library linking and remove literal single quotes to ensure portable path resolution. 2026-01-09 21:51:22 +01:00
Teodoro Laino
73c10110b1 Modernize find_package handling and add LAPACK::LAPACK alias to support dependencies like tblite. 2026-01-09 21:51:22 +01:00
Teodoro Laino
d0570b1f9a Modernize find_package handling and add standard BLAS::BLAS alias for external package compatibility. 2026-01-09 21:51:22 +01:00
Teodoro Laino
831f44817e Use -mcpu=native instead of -march=native for GCC on Apple Silicon to fix invalid architecture errors. 2026-01-09 21:51:22 +01:00
Teodoro Laino
c44cda2601 Use string(APPEND) for linker flags to prevent unintentional semicolon-separated list conversion. 2026-01-09 21:51:22 +01:00
Ole Schütt
b842bfb1e3 Adjust tolerance of UO2-Morelon-5x5x5-cell_opt.inp 2026-01-09 19:40:46 +01:00
Ole Schütt
a39db778ca Fix 8 slow tests 2026-01-09 19:40:46 +01:00
Ole Schütt
65915158d7 Docker: COPY tests dir after build 2026-01-09 19:40:46 +01:00
Matthias Krack
811f107262 Apply requested changes to the deepmdkit recipe 2026-01-09 17:03:52 +01:00
Matthias Krack
c70ac3ac8f Fixes required by shellcheck 2026-01-09 11:56:57 +01:00
Matthias Krack
5b4ee1e0cd Add script to build CP2K using Spack/CMake locally
This script should facilitate the CP2K development as a replacement for
the Makefile and the Toolchain while keep everything local and versatile.

It builds CP2K using Spack and CMake locally within the folder CP2K_ROOT
which defaults to the current working directory. This should be a
"cp2k/" folder containing the CP2K source tree.

The script can either be sourced with

> source ./make_cp2k.sh

or run in a subshell with

> ./make_cp2k.sh

The flags -h or --help print the available options.

The first run will take longer as it will build all CP2K dependencies
with Spack. The Spack installation is kept fully local in the subfolder
cp2k/spack which corresponds to the tools/toolchain/install folder
created by the CP2K toolchain.

Subsequent runs of the script will use the software stack from that
cp2k/spack/ folder.

A rebuild of all CP2K dependencies can be enforced simply by removing
or renaming the folder cp2k/spack. The latter allows for keeping different
software stacks.

It is recommended to install podman to take advantage of a spack cache.
This will accelerate the build of the CP2K dependencies with Spack
significantly.

After the CP2K dependencies are built with Spack, CP2K itself is built
and installed using CMake in the subfolders cp2k/build and cp2k/install.

Subsequent runs of the script will use the CMake configuration in the
subfolder cp2k/build. A rebuild of CP2K from scratch can be enforced
by removing or renaming that subfolder.

A CP2K regression run can be launched automatically by adding the flag
-t "" (or --test ""). This flag expects a string with the TESTOPTS, e.g.

> source ./make_cp2k.sh -t "--restrictdir QS/regtest-gpw-1"

Alternatively, the script cp2k/install/run_tests can be launched after
a successful CP2K build.
2026-01-09 11:56:57 +01:00
Hans Pabst
ffde6a3702 ELPA: compile-time choice for solver-kind
- For the OpenCL based GPU code-path, or by choice, ELPA may not be built with GPU support.
- Introduced __NO_OFFLOAD_ELPA to allow CPU-only ELPA (related to #4617).
- Allow compile-time selection of ELPA solver-kind (1-stage vs 2-stage).
- For ELPA/SYCL, use 1-stage ELPA solver by default for the time being.
- ELPA/SYCL (MKL in general?) has an index-fix currently only in a branch.

Index/ILP issue (undefined behavior):
- ELPA eventually mismatches index-kinds (LP64 vs ILP64 when linking BLAS/MKL).
- For static linkage it usually does not not matter (at least CPU-only).
- CP2K links the correct BLAS flavor (SO and GPU-build may be affected?).
- ELPA 2-stage may be even affected beyond MKL (or for GPU in general).
- ELPA 1-stage is apparently not affected by index issue.
2026-01-09 10:44:52 +01:00
dependabot[bot]
62f3f8ee30 Bump werkzeug from 3.1.4 to 3.1.5 in /tools/precommit
Bumps [werkzeug](https://github.com/pallets/werkzeug) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/pallets/werkzeug/releases)
- [Changelog](https://github.com/pallets/werkzeug/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/werkzeug/compare/3.1.4...3.1.5)

---
updated-dependencies:
- dependency-name: werkzeug
  dependency-version: 3.1.5
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-09 08:55:31 +01:00
Matthias Krack
477b1f15e7 Update Spack configuration files 2026-01-08 22:27:41 +01:00
BelizSertcan
c162b90cfe bugfix dipole accumulation for multiple excitations 2026-01-08 10:19:53 +01:00
Juerg Hutter
1f1a7a2a43
Response force error calculation from external sampling (#4672) 2026-01-07 16:23:01 +01:00
Matthias Krack
78931c6763 Spack requires "spack_repo" to be in the repo path 2026-01-07 15:59:19 +01:00
Ole Schütt
04040e4da0 Docker: Run spack-psmp-4x2 only weekly 2026-01-06 15:44:37 +01:00
Ole Schütt
166a3353c1 openPMD: Rename some files and fix conventions 2026-01-06 15:44:37 +01:00
Ole Schütt
96ff2b3e60 Docs: Mention cmake -LH in build-from-source.md 2026-01-06 15:44:37 +01:00
Ole Schütt
391ac323bf precommit: Increase local timeout to 30 seconds 2026-01-06 15:44:37 +01:00
Franz Pöschel
7c648bcc1f
Add openPMD output 2026-01-06 12:57:32 +01:00
Ole Schütt
731b0ae562 Increase development version after 2026.1 release 2026-01-06 11:04:01 +01:00
Matthias Krack
5e54ba2094 Remove unnecessary CG optimizer input section 2026-01-05 18:02:27 +01:00
Matthias Krack
33847a9122 Fix issues from #4632 2026-01-05 18:02:27 +01:00
Matthias Krack
6ac42b5082 Fix for tests failing with OpenMPI
By contrast to MPICH, OpenMPI returns no valid value for the MPI_TAG_UB attribute.
As a workaround the minimum value for the upper bound of 32767 guaranteed by the MPI standard is used.
2026-01-05 13:54:58 +01:00
Matthias Krack
d26d4aaf2b Add Spack tester for 4 MPI ranks and 2 OpenMP threads 2026-01-05 10:33:25 +01:00
Ole Schütt
71983cdebc Docker: Disable SIRIUS for psmp to workaround COSMA performance issue 2026-01-04 21:57:54 +01:00
Ole Schütt
ec136938e7 CMake: Remove defunct option CP2K_USE_STATIC_BLAS 2026-01-04 21:57:54 +01:00
Matthias Krack
d6a688d249 Use command line flag to set CP2K_DATA_DIR 2026-01-03 22:09:57 +01:00
Matthias Krack
86f2eaf404 Remove hard-set CP2K_DATA_DIR in do_regtest.py (#4659) 2026-01-03 22:09:57 +01:00
Ole Schütt
59cf93c597 Fix C-levelshift.inp with 4 ranks 2026-01-02 23:39:35 +01:00
Ole Schütt
8fb51244e9 Adjust tolerance of CO_xastpxfh_150Ry.inp 2026-01-02 23:39:35 +01:00
Ole Schütt
299f0f2030 Toolchain: Build DBCSR with libxsmm 2026-01-02 20:54:24 +01:00
Ole Schütt
4e4045cf90 Fix slow tests 2026-01-02 17:36:45 +01:00
Ole Schütt
ea09ec711c Conventions: Add suppressions for tblite 2026-01-02 17:36:45 +01:00
Ole Schütt
ac5e2791ec Docker: Plot total times of benchmarks 2026-01-02 13:37:07 +01:00
Ole Schütt
0542fe1253 Docker: Fix Ubuntu based tests 2026-01-02 13:37:07 +01:00
Ole Schütt
fae7406ac6 Toolchain: Install tblite from .tar.xz instead of .tar.gz 2026-01-02 12:39:21 +01:00
Ole Schütt
ca6acaeee7 Docker: Re-enable --keepalive and --flagslow 2026-01-01 22:31:26 +01:00
Ole Schütt
8455e73121 Toolchain: Download all packages from cp2k.org 2026-01-01 22:31:26 +01:00
Ole Schütt
34d1091965 Toolchain: Remove libgrpp as it's now part of CP2K 2026-01-01 22:31:26 +01:00
Ole Schütt
3cf2332049 Add Spack OpenMPI tester to CI 2026-01-01 18:20:47 +01:00
Ole Schütt
1296fc9c28 update to 2026 2026-01-01 16:06:41 +01:00
Matthias Krack
339af6c9b5 Ensure consistency with generator script 2025-12-31 21:54:55 +01:00
Matthias Krack
12f2d868d1 Add Spack OpenMPI tester 2025-12-31 21:54:55 +01:00
Ole Schütt
ae67b7efe0 Various little tweaks 2025-12-31 17:51:34 +01:00
Matthias Krack
b13274d47d Add patch for Spack/CMake build of greenX library 2025-12-30 22:31:56 +01:00
Matthias Krack
b7374a062a Add library path for MiMiC (MCL) 2025-12-30 21:39:06 +01:00
Matthias Krack
33f1a4553a Add local Spack package file for MiMiC (MCL) 2025-12-30 21:39:06 +01:00
Matthias Krack
ca7092adcb ACE: 2023.11.25.fix2 -> 2025.12.4 2025-12-29 21:51:07 +01:00
Matthias Krack
b48505711d ACE: 2023.11.25.fix2 -> 2025.12.4 2025-12-29 21:51:07 +01:00
Ole Schütt
7f1b8e30e7 MiMiC: Fix builds and conventions" 2025-12-28 23:15:30 +01:00
Ole Schütt
3c12c6fa2c Toolchain: Improve wording of final message 2025-12-28 15:02:56 +01:00
Dmitry Ryndyk
d60f360160 NEGF: restart files for electrode Hamiltonian and overlap matrices. 2025-12-28 15:01:36 +01:00
antalik
ee2a10ba22
Add interface to the MiMiC framework for multiscale simulations 2025-12-28 15:00:33 +01:00
Growl1234
09db961365 Fix HDF5 installation path detection
The command `cut -d: -f2` results in a leading space in the output path, such as "` /opt/hdf5`" instead of `/opt/hdf5`. This causes CMake to fail in locating the HDF5 path, reporting the error: "`Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS C Fortran) (found version "")`". Alternatively, replacing `cut -d: -f2` with `awk '{print $3}'` can avoid the problem.
2025-12-28 14:05:11 +01:00
Ole Schütt
f4c5feac1b Update README.md and INSTALL.md 2025-12-27 17:45:13 +01:00
Ole Schütt
f0e047f783 Docs: Emphasis links to tech section in build-from-source.md 2025-12-27 17:45:13 +01:00
Ole Schütt
d710185059 Docker: Cleanup after Makefile removal 2025-12-27 17:45:13 +01:00
Ole Schütt
00026b9b8e Toolchain: Remove generate_arch_files.sh and update help texts 2025-12-27 17:45:13 +01:00
Ole Schütt
2c79fd46c4 Remove arch directory 2025-12-27 17:45:13 +01:00
Juerg Hutter
1971565b89
PP optimization: Reference can be also a PP (#4635) 2025-12-27 16:51:21 +01:00
Shridhar Shanbhag
e5ce795793
Implementation of moments for k-point calculations 2025-12-27 13:23:28 +01:00
Matthias Krack
c23c79bdb8 Install xpmem library with Spack 2025-12-26 16:32:53 +01:00
Matthias Krack
6cdbf22566 Update of library versions for Spack build
- deepmdkit: 3.1.0 -> 3.1.2
- elpa: 2025.01.001 -> 2025.06.001
- libint: 2.9.0 -> 2.11.1
- py-torch: 2.7 -> 2.9.0
- sirius: 7.7.0 -> 7.9.0
2025-12-26 16:32:53 +01:00
Matthias Krack
803cd0e069 Split long code line 2025-12-26 16:32:53 +01:00
Matthias Krack
3ecab328bf Remove unneeded file copy 2025-12-26 16:32:53 +01:00
Matthias Krack
2fd388b732 Add local Spack recipe for DBCSR and update library versions
- This fixes the Spack ssmp build for DBCSR
- DBCSR 2.8.0 -> 2.9.1
- MPICH 4.3.0 -> 4.3.2
- OpenMPI 5.0.8 -> 5.0.9
- OpenBLAS 0.3.29 -> 0.3.30
2025-12-26 16:32:53 +01:00
Matthias Krack
0c2c573e9a Remove local spack recipe for PEXSI 2025-12-26 16:32:53 +01:00
Matthias Krack
e1f45583bb Spack packages 2025.07.0 -> 2025.11.0 2025-12-26 16:32:53 +01:00
Matthias Krack
a795472a78 Spack 1.0.0 -> 1.1.0 2025-12-26 16:32:53 +01:00
Ole Schütt
12e669820f CI: Add spack-psmp/ssmp tests 2025-12-25 17:37:23 +01:00
Matthias Krack
5ec5ad8e02 Add spack ssmp tester 2025-12-23 15:58:32 +01:00
BelizSertcan
87fe8d4523
RIXS| initialisation for tddft%res 2025-12-22 23:25:51 +01:00
Matthias Krack
0667fa4c56 Update paths 2025-12-22 15:43:55 +01:00
Matthias Krack
4bfb9b15cf Install Spack view in install_tree 2025-12-22 15:43:55 +01:00
Taillefumier Mathieu
ab76537063
[cmake] Added CRAY power management counters support 2025-12-20 10:52:32 +01:00
Ole Schütt
d88cc65c55 Remove flag __LIBGRPP 2025-12-19 15:01:55 +01:00
Ole Schütt
449fa423b8 Remove flag __FFTW3_UNALIGNED 2025-12-19 15:01:55 +01:00
Matthias Krack
759b24ff12 OpenMPI 5.0.8 -> 5.0.9 2025-12-19 13:28:51 +01:00
Taillefumier Mathieu
388ddf7259
Fix typo in vdw functional name and various CMake issues 2025-12-19 11:31:12 +01:00
Matthias Krack
2a23ee716d MPICH 4.3.1 -> 4.3.2 2025-12-19 10:22:17 +01:00
Ole Schütt
a53587514b Docs: Move content from INSTALL.md to manual and adopt to CMake 2025-12-18 17:44:29 +01:00
Ole Schütt
f0e2e694aa Add make_pretty.sh script 2025-12-18 15:49:46 +01:00
Ole Schütt
c8cf32602f Remove DBCSR submodule 2025-12-18 15:49:46 +01:00
Ole Schütt
e525afefe5 Remove Makefile 2025-12-18 15:49:46 +01:00
Ole Schütt
633ab399f6 CMake: Make __OFFLOAD_PROFILING flag accessible 2025-12-18 14:59:53 +01:00
Ole Schütt
53d694d2f1 FM: Use __OFFLOAD flags for ELPA as well 2025-12-18 14:59:53 +01:00
Ole Schütt
7bf99f7a74 Remove old flags __HAS_PATCHED_CUFFT_70, __NO_MPI_THREAD_SUPPORT_CHECK, and __MINGW 2025-12-18 14:59:53 +01:00
Matthias Krack
8580e8378d Fix HDF5 installation path detection 2025-12-18 14:22:43 +01:00
Matthias Krack
b589562648 TREXIO 2.5.0 -> 2.6.0 2025-12-18 14:22:43 +01:00
Stefano Battaglia
740ab355e2 Remove overlap and KS matrix dump 2025-12-18 13:56:29 +01:00
Stefano Battaglia
aa463e24fc Prettify and avoid writing state_energy due to weird bug 2025-12-18 13:56:29 +01:00
Stefano Battaglia
3fd08db925 AO normalization for spherical Gaussians and unnormalized contraction coeffs 2025-12-18 13:56:29 +01:00
Stefano Battaglia
9aa3fa776b Spherical AO dump works for contracted l<=1 + uncontracted l>1 2025-12-18 13:56:29 +01:00
Stefano Battaglia
7162a4879c Normalization nightmare almost fixed 2025-12-18 13:56:29 +01:00
Stefano Battaglia
7daec750da WIP to fix normalization factor bug 2025-12-18 13:56:29 +01:00
Stefano Battaglia
2bcb5bcd76 Dump overlap matrix in trexio 2025-12-18 13:56:29 +01:00
Stefano Battaglia
f7b30401bb Bug fix ao normalization ordering 2025-12-18 13:56:29 +01:00
Stefano Battaglia
6791cc05ba Bug fix k-points list and reorder of ao_normalization factors 2025-12-18 13:56:29 +01:00
Ole Schütt
de43aba82f Remove QUIP 2025-12-18 13:07:03 +01:00
Ole Schütt
b99ca74f88 Docker: Migrate Intel tests to CMake 2025-12-17 16:05:53 +01:00
Ole Schütt
9e35fc8c04 Precommit: Add Check for docu of CMake options 2025-12-17 15:56:06 +01:00
Ole Schütt
88de2562c6 Precommit: Update check for build flags 2025-12-17 15:56:06 +01:00
Ole Schütt
ddb311dbc9 Toolchain: Upgrade to DBCSR 2.9.0 2025-12-16 21:30:18 +01:00
Ole Schütt
f88b2072f0 Dashboard: Add psmp test running with 4 MPI ranks 2025-12-16 20:09:54 +01:00
BelizSertcan
956c35fc90 toogle section params 2025-12-16 17:32:43 +01:00
BelizSertcan
a72b713f44 keyword to reduce excited state space 2025-12-16 15:46:42 +01:00
Frederick Stein
07c9450e20
Fix AS module with intel compiler (#4602) 2025-12-12 11:14:10 +01:00
Ole Schütt
53a46e880a Add MAX_FILE_SIZE_MB keyword to MO_CUBES section 2025-12-11 18:34:18 +01:00
Ole Schütt
9050283254 Add extended XYZ format for trajectories 2025-12-11 14:50:20 +01:00
BelizSertcan
4672866f5b
Vibronic spectroscopy post-processing tools 2025-12-10 18:16:03 +01:00
Štěpán Marek
860932f659 kpoint : Wrong component in derivative fixed
The original code committed recently had unfortunately a bug in the
determination of the derivative in kpoint sum - multiplicative factor of
imaginary unit was missing.

This commit fixes this problem.
2025-12-10 13:10:25 +01:00
Juerg Hutter
fdb532c570
Simplified FM matrix generation (for tmp matrices) (#4599) 2025-12-09 16:11:40 +01:00
Gina Sitaraman
cb19969af3
Call out HIP support in CP2K docs 2025-12-08 21:14:37 +01:00
RemiPasquier
c2d4c13835 Add reference Graml2024 for the large cell GW code and Pasquier2025 for the small cell GW code 2025-12-08 13:34:59 +01:00
Dmitry Ryndyk
edd650bda2 NEGF: new option - energy shift to a common zero-potential level. 2025-12-08 10:36:45 +01:00
Jan Wilhelm
fd1133a1d7 Sligt improvements of comments in gw_small_cell_full_kp.F 2025-12-06 15:14:52 +01:00
Dmitry Ryndyk
5b564c2081 NEGF: memory leak fixed. 2025-12-05 18:15:20 +01:00
Matthias Krack
b7551b79a1 Stabilize test case (fixes partially #4592) 2025-12-05 10:40:18 +01:00
Ole Schütt
3a1353c159 Docker: Add psmp test running with 4 MPI ranks 2025-12-05 00:04:25 +01:00
Ole Schütt
c469d76320 Docker: Upgrade Python packages of misc test 2025-12-04 22:59:29 +01:00
Juerg Hutter
4b8ab3090f
Write Hcore and density matrix in CSR format (#4590) 2025-12-04 17:36:30 +01:00
Matthias Krack
68fb0d9163 Check initialization status of Sirius library first 2025-12-04 16:03:40 +01:00
Matthias Krack
37bc1a4b6f Add printout routine for virtual site constraint 2025-12-04 16:03:40 +01:00
Juerg Hutter
e4927a8c73
TDDFPT: Restricted excitation space SOC module (#4588) 2025-12-04 14:40:02 +01:00
Ole Schütt
30139564d8 Dashboard: Run performance tests daily 2025-12-04 10:23:48 +01:00
Ole Schütt
2fa06f6b70 Dashboard: Only send emails for status FAILED 2025-12-04 10:23:48 +01:00
Ole Schütt
acd3ab155c Fix implicit saves in trexio_utils.F 2025-12-04 09:25:20 +01:00
Ole Schütt
0e6a057b38 Docker: Migrate conventions test to CMake 2025-12-04 09:25:20 +01:00
Matthias Krack
936074a4cb Make dummy function public 2025-12-03 19:51:44 +01:00
Matthias Krack
4d9e313266 Add dummy function for serial case when the Sirius library is not included, because it requires MPI. 2025-12-03 19:51:44 +01:00
Matthias Krack
0c0e995813 Initialize SIRIUS library only if needed (fixes #4564) 2025-12-03 19:51:44 +01:00
Juerg Hutter
fff89e6870
Option added to write effective nuclear charge to Cube files. (#4584) 2025-12-03 15:03:46 +01:00
Frederick Stein
cc894c0ab4
Fix ERI calculation in the active space model with subgroups (#4583)
Fixes the incorrect context for subgroups in the ERI calculation of active space calculation and unifies the ranges of both implemented integration schemes and removes some CPABORTs by merging them with the related branches (if someone wants to make use of this feature).
2025-12-03 14:53:08 +01:00
Juerg Hutter
cf6d138533
FLANG workaround (#4582) 2025-12-03 10:42:34 +01:00
Juerg Hutter
6b2ed39932
Make initialization of array in cp_fm_create optional. (#4579) 2025-12-03 09:21:11 +01:00
Ole Schütt
421338ca7d Docker: Remove duplicate install_dbcsr.sh script 2025-12-02 17:17:45 +01:00
dependabot[bot]
ccabb9a0f8 Bump werkzeug from 3.0.6 to 3.1.4 in /tools/precommit
Bumps [werkzeug](https://github.com/pallets/werkzeug) from 3.0.6 to 3.1.4.
- [Release notes](https://github.com/pallets/werkzeug/releases)
- [Changelog](https://github.com/pallets/werkzeug/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/werkzeug/compare/3.0.6...3.1.4)

---
updated-dependencies:
- dependency-name: werkzeug
  dependency-version: 3.1.4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-02 14:42:43 +01:00
Matthias Krack
8d66ef06a2 Improve abort messages 2025-12-01 17:42:29 +01:00
Matthias Krack
c611db5d49 Facilitate change of decoration character 2025-12-01 16:29:23 +01:00
Matthias Krack
a360aa3aea Comment deprecated input sections when dumped
Comment also deprecated keywords instead of skipping them (#4570)
2025-12-01 15:18:17 +01:00
Dmitry Ryndyk
c43746297c
NEGF: Fermi level computation improved and new output subroutine 2025-12-01 14:02:31 +01:00
Stefano Battaglia
07059287c0
Add support for a separate XC section within the AS module 2025-12-01 14:01:10 +01:00
Matthias Krack
26c18786f4 Fix convention (incorrect kind) 2025-12-01 13:14:39 +01:00
Ole Schütt
ec11232dba Docker: Disable DeePMD for generic test 2025-11-29 14:52:21 +01:00
Ole Schütt
c1a7aeaa91 CMake: Add -Wall;-Wextra;-Werror to CFLAGS 2025-11-29 13:02:46 +01:00
Ole Schütt
e2508df7e6 Docker: Migrate HIP build test to CMake 2025-11-29 12:05:50 +01:00
Matthias Krack
f8a71710fb Do not write deprecated keywords (fixes #4564 partially) 2025-11-28 17:58:25 +01:00
andsinya
286dc69ff7
Fix rare matrix distribution bug 2025-11-28 13:46:45 +01:00
Matthias Krack
00144abe61 Fix repeated echo of input 2025-11-28 13:33:18 +01:00
Stepan Marek
3867b6a0b7
kpoint : Transformations for trivial kpoint parallelism 2025-11-28 13:02:11 +01:00
Stepan Marek
c4276aa97c
mathlib: Add utility functions for square matrix gemm
In many codes, multiplication of square matrices representing
a rotation of basis or similar is done via LAPACK zgemm/dgemm routines,
which are unnecessarily general for the applied use case.

The proposed interface checks the validity of supplied arguments and
aborts in case arguments are not valid. Also, due to square nature,
significantly reduces the number of arguments required for the routine
itself.
2025-11-28 12:23:47 +01:00
Juerg Hutter
552e9fd4d1
Restricted Space Excitations for TDDFPT (#4560) 2025-11-27 10:36:19 +01:00
Matthias Krack
83d8041689 Add fix atom constraint printout 2025-11-27 10:31:36 +01:00
Matthias Krack
ad11ec03f8 Add G3x3 and G4X6 constraint printout 2025-11-26 14:06:40 +01:00
Tianxiang Wang
24b873588d
Fix random NaN problem in RPA_AXK_H2O_hfx.inp for CUDA regtest (#4554)
This commit initializes communication buffers to ensure correct energies with RPA-AXK.
2025-11-26 11:34:52 +01:00
Hans Pabst
815c0b86ef Adjusted workarounds for IFORT
- Fixed handling with_ifx (rely on __DONTUSE__ instead of "no").
2025-11-26 08:15:07 +01:00
Matthias Krack
b42f527122 Add collective constraint printout 2025-11-25 22:45:42 +01:00
Hans Pabst
5a0e2acee9 Updated ARCH-files for Intel Compiler
- Updated workaround (IFORT only).
2025-11-25 12:54:26 +01:00
BelizSertcan
de504671eb
Revert: restore original tddft force printing (#4551) 2025-11-25 12:09:26 +01:00
Hans Pabst
b0ff3e3a03 Adjusted CRITICIAL section names for Intel Fortran Compiler
- Revised some workarounds for Intel Compiler.
- Improved applying workaround (if needed).
2025-11-24 13:06:49 +01:00
Ole Schütt
b2e41f9e62 Docker: Disable tblite until dftd4 installation is fixed 2025-11-20 09:12:58 +01:00
Dmitry Ryndyk
b060210385 NEGF: MPI at finite voltage corrected. 2025-11-19 15:10:59 +01:00
Hans Pabst
aaa8d4945a DBT: improved TAS reshape/replicate/merge
- Use iprocs for multiple parallel regions (dbt_tas_replicate).
- Added OpenMP for unpacking the buffer.
- Properly deallocate OpenMP locks.
2025-11-19 15:10:34 +01:00
Hans Pabst
4fc668e809 Reduced redundant KBK batching and skipped empty contractions 2025-11-19 15:10:19 +01:00
Hans Pabst
1a833536b0 Cleanup workarounds for T3E and old OMPI
- F08 interface also cannot be USEd between implementation.
- USE statements for mpi and mpi_f08 cannot be relied on.
- Cleanup workaround for unaligned access errors on T3E.
- Avoid unnecessary allocation in key-routine.
- Allocations negatively impact scalability.
- Cleanup broadcasting array of strings.
- Use SOURCE argument (ALLOCATE).
- Fixed subroutine comments.

* Supposed unaligned access errors were wrong
  implementations in the first place. Instead,
  it is necessary to clear the bcast-message:
- If src-message-length is zero, or
- If dst-msg is larger msglen.

* No need to broadcast size (string-length)
- Instead of LEN_TRIM and actual length,
  broadcast entire variable (SIZEOF).
- This can also apply to array of strings,
  which are required to be blobs like
  CONTIGUOUS strings of the same length.
2025-11-19 15:09:55 +01:00
Hans Pabst
85bf778871 Fixed typos and cleanup 2025-11-19 08:56:25 +01:00
Hans Pabst
a0e5e5e395 Improved OpenMP synchronization
- Make use of ATOMCS WRITE/UPDATE instead of critical.
- Named critical sections.
2025-11-19 08:14:54 +01:00
Štěpán Marek
fc14b13a63 RT-X : Default values to fix dashboard 2025-11-18 16:08:33 +01:00
Hans Pabst
807da47b7e Check if deriv is associated 2025-11-18 14:54:22 +01:00
BelizSertcan
7020464b7a
RIXS| bugfix xc shortcut (#4538) 2025-11-18 14:28:49 +01:00
BelizSertcan
f56c6e39ea
RIXS| Open-Shell (#4533) 2025-11-14 13:20:10 +01:00
antalik
c29834a4af
Monovalent atoms (#4535)
Added an option to turn any atomic kind into monovalent, i.e., with nuclear charge 1.0 and contributing a single electron. It is primarily intended for saturating dangling bonds in QM/MM and should ideally be used in conjunction with pseudopotentials developed for such a purpose.
2025-11-14 13:01:58 +01:00
Hans Pabst
c01e6a4e89 Fixed PACKAGE manifest 2025-11-13 09:36:18 +01:00
Stepan Marek
5ef3a49d68
RT-TDDFT+RT-BSE : Fourier Transform Outputs (#4527)
Co-authored-by: Štěpán Marek <stepan.marek@physik.uni-regensburg.de>
2025-11-12 16:36:34 +01:00
Dmitry Ryndyk
fe01d36a92 NEGF: matrix desymmetrization in negf_copy_contact_matrix improved. 2025-11-11 11:51:38 +01:00
Dmitry Ryndyk
33f5bf236d NEGF: bug correction of f4fc7e3. 2025-11-09 17:30:30 +01:00
Dmitry Ryndyk
f4fc7e3a19 NEGF: Improved contact Fermi level calculation and minor. 2025-11-09 11:44:41 +01:00
Luis Ignacio Hernandez Segura
c6af51da12 Added citation for SF-TDDFT 2025-11-08 13:21:47 +01:00
Ole Schütt
44e3845b0f Enable Fortitude rule missing-exit-or-cycle-label 2025-11-07 16:48:14 +01:00
Ole Schütt
9e1cd629dd Enable Fortitude rule unnamed-end-statement 2025-11-07 16:48:14 +01:00
Ole Schütt
b08f77308b Enable Fortitude rule deprecated-relational-operator 2025-11-07 16:48:14 +01:00
Ole Schütt
47c81db72a Enable Fortitude rule old-style-array-literal 2025-11-07 16:48:14 +01:00
Johann Potot.
90fa6b80bc
fixes for stress tensor in tblite (#4406)
Co-authored-by: Johann Pototschnig <j.pototschnig@hzdr.de>
2025-11-07 15:43:36 +01:00
Ole Schütt
51bfb724f4 Enable some fortitude rules 2025-11-06 16:37:03 +01:00
Ole Schütt
06728efc41 precommit: Move exclusion list into fortitude.toml 2025-11-06 16:37:03 +01:00
Ole Schütt
6bdde325c8 precommit: Get fortitude auto-fixing to work 2025-11-06 16:37:03 +01:00
Ole Schütt
bfa23ca8e4 PW: Improve variable names in fftw3_create_plan_1dm 2025-11-06 16:37:03 +01:00
Ole Schütt
81d9eb2d59 precommit: Simplify some files to help Fortitude 2025-11-05 16:52:17 +01:00
Ole Schütt
0620b4537c precommit: Add Fortitude linter 2025-11-05 16:52:17 +01:00
Ole Schütt
73f2880be2 tddfpt2: Call parallel_gemm instead of cp_fm_gemm 2025-11-04 22:56:51 +01:00
Ole Schütt
64946413c9 Temporarily disable tests/QS/regtest-tddfpt-bse 2025-11-04 10:03:21 +01:00
Dmitry Ryndyk
298f7c48fd NEGF: New method to extract the matrix Hamiltonians for electrodes and minor changes. 2025-11-03 12:51:18 +01:00
Hans Pabst
e68414f036 Various minor tweaks
- Conditionally prepare max_contraction arrays.
- Make more use of SOURCE argument (ALLOCATE).
- OpenMP parallelized loop (lattice_sum).
- Change loop order.
2025-10-29 16:44:35 +01:00
Hans Pabst
09343da68f DBM: minor adjustments to the kernel
- Leverage c_dbcsr_acc_opencl_use_cmem.
- Introduced DBM_MULTIPLY_RO.
2025-10-29 15:14:49 +01:00
Juerg Hutter
0b11ff4cc6
Reset atomic state after response basis calculation. (#4515) 2025-10-29 10:32:28 +01:00
Juerg Hutter
5f3bc36082
UPF files: fix bug for wavefunctions, interoperability with response basis calculation (#4514) 2025-10-27 12:37:00 +01:00
Matthias Krack
e4d6f4841e Detail abort messages and add warning for bad electron count 2025-10-27 11:34:29 +01:00
Hans Pabst
4a2d255c13 GRID: leverage offload mempool 2025-10-25 21:10:23 +02:00
Hans Pabst
9c0f83189b Disable IEEE exceptions for LAPACK
- FP-exceptions for ScaLAPACK are disabled since a long time.
- __HAS_IEEE_EXCEPTIONS denotes intrinsic module available.
- Harmonized some CFM/FM code format/comments.
2025-10-24 16:59:03 +02:00
Ole Schütt
a6dc286aa2 CMake: Set __SHORT_FILE__ on Fortran program files 2025-10-24 16:46:09 +02:00
Hans Pabst
2a4e9c4b3c Enabled DBM_MULTIPLY_COMM_MEMPOOL
- Reproduces #4428 (or not).
- Related to #4503 effort.
2025-10-24 15:01:59 +02:00
Ole Schütt
8dd14c0b2b Fix CMake builds with SpLA and CUDA 2025-10-23 22:13:22 +02:00
Ole Schütt
f3d57eb2e0 Improve abort messages in local_gemm_api.F 2025-10-23 22:13:22 +02:00
Hans Pabst
0ce55f53af Revert "Performance: show total time as part if the title"
This reverts commit f5d0261ccb.
2025-10-23 12:38:03 +02:00
Ole Schütt
bb352791de Docker: Enable ELPA for CMake CUDA builds 2025-10-22 22:48:49 +02:00
Ole Schütt
e1f948e013 Docker: Enable SpLA GEMM offloading for CMake CUDA builds 2025-10-22 22:48:49 +02:00
Hans Pabst
f5d0261ccb Performance: show total time as part if the title
- Related to #4503.
2025-10-22 20:37:09 +02:00
Juerg Hutter
b31c023c7b
GAPW DC-DFT + EC EXTERNAL (#4502) 2025-10-21 16:14:06 +02:00
Hans Pabst
26dec59499 Minor optimizations
- Adjusted order of severak loops.
- Adjusted build_3c_integrals.
- Release temporaries earlier.
2025-10-21 10:50:05 +02:00
Hans Pabst
2e13a6a37a Fixed warnings about unset intent-out 2025-10-21 10:49:50 +02:00
Hans Pabst
8e2f697c66 Get the number of distributed systems
- Removed unused mp_get_node_global_rank routine.
- Determine and print node count.
- Improved output format.
2025-10-20 21:14:30 +02:00
Ole Schütt
5f8386580f Docker: Remove HIP CUDA tests 2025-10-20 11:26:59 +02:00
Ole Schütt
28de6a4bd4 Docker: Remove nvhpc test 2025-10-20 11:26:59 +02:00
Ole Schütt
8f947f7b13 Docker: Remove Makefile from tests without build 2025-10-20 11:26:59 +02:00
Hans Pabst
da6e80dad1 Adjusted tolerance
- Follow-up on #4494.
2025-10-19 19:48:20 +02:00
Hans Pabst
badb79934a Use git ls-files instead of os.walk with pattern
- Avoids processing unrelated files.
2025-10-17 15:25:21 +02:00
Hans Pabst
ad3ce71a45 Restore BSD-3 license for C-based MPI-wrapper 2025-10-17 09:54:57 +02:00
Hans Pabst
bfa518009f Adjusted tolerance
- Ubuntu, GCC 13 (ssmp).
2025-10-17 09:54:44 +02:00
Hans Pabst
c09f6e5e3b Ensure ceiling of size if originated as real value 2025-10-16 10:35:56 +02:00
Hans Pabst
0b5980dc4c Rely on mathconstants for gaussi/ione, z_one, and z_zero 2025-10-16 10:35:31 +02:00
Hans Pabst
d2523b8a1f Adjusted tolerance and gold value 2025-10-16 10:30:27 +02:00
Hans Pabst
5fbb6783ca Updated real-valued diagonalization
- Introduced cp_fm_error and avoided intermediate allocations.
- Query workspace for PDSYEVD via PDORMTR (workaround).
- Introduced __SCALAPACK_NO_WA (disable workaround/s).
- Cleanup workaround (cp_fm_syevd_base).
- Cleanup (cp_fm_cholesky.F).
2025-10-15 12:32:50 +02:00
Max Graml
b5558c7a53 BSE: update H2 example in manual 2025-10-13 13:41:03 +02:00
Matthias Krack
c59fcdc27d Enable lone keyword value for xmgrace 2025-10-13 12:09:01 +02:00
Matthias Krack
e3530d45db Add missing blank 2025-10-13 12:09:01 +02:00
Max Graml
f93931d803
BSE: Minor features
- correct print of TDA on/off statement
- add cross-correlation matrix to print
- clarify structure of transition moment vector
- correct indices for cross-correlation matrix
- polish print of cross-correlation matrix
- remove 1/sqrt2 scaling of transition amplitudes X/Y
2025-10-13 10:32:30 +02:00
Frederick Stein
ad2d693003 Merge device calls for better performance 2025-10-11 13:29:43 +02:00
Matthias Krack
b25f040aad Print XC functional in upf file dump if available 2025-10-10 16:32:56 +02:00
Ole Schütt
602a6f7074 Docker: Migrate performace tests to CMake 2025-10-07 19:55:04 +02:00
Ole Schütt
65f1c93e16 Docker: Migrate cuda tests to CMake 2025-10-07 17:58:29 +02:00
Hans Pabst
08d68f4645 Revised #4477
- Enabled some of the MPI-C wrappers to handle MPI_COMM_NULL.
- MPI_COMM_NULL used as if single-rank application.
2025-10-07 14:11:45 +02:00
Thomas Durrant
f702eccae6
Add option to initialise cp2k on an existing comm
The init_mpi function was set up to assume that if mpi is already
initialised, that cp2k should be initialised on the
MPI_COMM_WORLD communicator.

This patch adds an optional argument mpi_comm, that can be used
to initialise cp2k on a specific existing communicator instead
2025-10-07 13:09:55 +02:00
Ole Schütt
2432d2109b Docker: Use our own MPICH for CUDA tests 2025-10-06 21:00:40 +02:00
Matthias Krack
cb9df732d3 Update Darwin arch files: exclude tblite 2025-10-06 15:56:33 +02:00
Hans Pabst
76a57384b1 Account for baseline architecture
- Rely on CUDA 12 instead of CUDA 13.
2025-10-06 13:50:43 +02:00
Hans Pabst
b7b3bfa849 Adjusted print_func similar to Offload and DBM library
- Print grid statistics (only if non-zero counter exists).
- Removed dependency from string_utilities (strlcpy_c2f).
- No copy of the message is necessary.
- Reduced PACKAGE dependencies.
- Print offload memory stats.
2025-10-06 13:30:36 +02:00
Ole Schütt
18dadc1cd4 PAO-ML: Fix cell shifts vectors 2025-10-06 13:27:20 +02:00
Hans Pabst
4acbff5f37 DBM: resolve assertion or hang
- Miniapp to request zero nblocks, e.g.:
  ./dbm_miniapp.x 16x16x16 128x1x1
- Resolved assertion.
- Visit all barriers.
2025-10-06 11:38:19 +02:00
Hans Pabst
b5af9a36c8 DBM/OCL: select and print kernel kind
- Offload/mempool: adjusted indentation.
2025-10-06 11:38:00 +02:00
Hans Pabst
ca6bbbe3c0 Updated to SIRIUS 7.7.1
- See https://github.com/cp2k/cp2k/pull/4469#issuecomment-3361694889
2025-10-06 11:34:39 +02:00
Hans Pabst
1662426979 Revised #4462 and avoid missing case labels
- Missing cases on older CUDA (still providing the enums).
2025-10-06 10:59:24 +02:00
Ole Schütt
61791e17d2 Fix Makefile 2025-10-02 16:02:11 +02:00
Ole Schütt
b9da3089cf Move __DATA_DIR to C code to avoid Fortran's line length limit 2025-10-02 14:51:44 +02:00
Hans Pabst
b396de2029 Resolve CUDA performance regression
- Tried OpenMPI vs MPICH in several version flavors.
- Tried Docker "to reproduce exactly".
- Tried Spack and CUDA 11.9.
- Related to #4428.
2025-10-02 11:57:03 +02:00
Anna Hehn
fdff660ab3 Sternheimer BSE (1. Version with W matrix given) 2025-10-02 10:55:48 +02:00
Hans Pabst
67ae283c5d Fixed Dashboard
- Fixed line-truncation (#4461).
- Fixed GCC 8/9/10 (#4460).
2025-10-02 10:03:16 +02:00
Ole Schütt
e966546746 PAO-ML: Migrate to NequIP framework 2025-10-01 16:25:41 +02:00
Hans Pabst
bb70684353 DBM: determine if anything needs to be printed 2025-10-01 14:06:37 +02:00
Hans Pabst
8f495778c0 Removed vanished enums
- Newer/recent HPC toolkits around CUDA 13 seem to miss some enums.
2025-10-01 11:20:51 +02:00
Hans Pabst
3375e59ad2 Adjusted print_func similar to offload library
- Removed dependency from string_utilities (strlcpy_c2f).
- No copy of the message is necessary.
2025-10-01 10:03:29 +02:00
Hans Pabst
4b78685af9 Void signatures
- Ensure no arguments taken.
- Rather than variadic.
2025-10-01 10:03:20 +02:00
Hans Pabst
50b0971e18 DBM mempool to offload and mpi/c to mpiwrap
- Introduced offload_mempool_stats_print to Fortran API.
- Print memory statistics independent of DBM (and grid).
- Avoid circular dependency (string_utilities/strlcpy_c2f).
- Use up-leveled MPI/C wrapper.

* MPI/C wrapper (dbm_mpi_ to cp_mpi_)
  - Adjusted license of C-MPI wrapper (consequence of mpiwrap).
  - Moved wrapper for C languages in to mpiwrap directory.
  - Avoid name clash (same basename as for Fortran).
  - Renamed prefix of all MPI wrapper functions.

* Other (DBM):
  - Improved handling errors (OFFLOAD_CHECK before launch).
  - Permit/Adjusted preprocessor symbol (precommit hook).
  - Avoid multi-line control-flow w/o curly braces.
  - Double-check #4428 (DBM_MULTIPLY_COMM_MEMPOOL).

* TODO
  - Apply offload/print_func pattern to GRID's print_func.
  - Leverage offload_mempool for grid backend.
2025-09-30 16:02:16 +02:00
Hans Pabst
4924227403 HFX: fixed misaligned output 2025-09-30 13:56:29 +02:00
BelizSertcan
06bd950d54
improve linres section description (#4456) 2025-09-26 15:36:15 +02:00
Augustin Bussy
99574d054d Fix HFX initialization perf issue 2025-09-25 16:49:37 +02:00
Hans Pabst
0fcd32efd1 Follow-up on #4440
- Instead of adjusting reference.
- Reasonably raised tolerance.
2025-09-25 10:00:55 +02:00
Hans Pabst
50a45f9ea9 IFX: omit more tests 2025-09-24 14:01:28 +02:00
Hans Pabst
ca78fc5063 Adjusted sscanf format specifiers
- No assertions with side-effects (even if NDEBUG is never defined).
- Follow-up on #4414.
2025-09-24 10:52:13 +02:00
Juerg Hutter
b5de2754d8
Refactor xc_atom, factor EPR code out. (#4450) 2025-09-23 12:16:50 +02:00
Hans Pabst
df3e9bda48 Print ls_scf_env%do_pao only once
- Prints "Polarized Atomic Orbitals (PAO)".
- Duplicated info printing "Using PAO".
- Print logicals consistently.
2025-09-22 12:00:54 +02:00
Hans Pabst
e7ce2a5f4f Adjusted dbcsr_matrix_vector_mult
- Get pcol after cycling.
2025-09-22 12:00:31 +02:00
Hans Pabst
6968ac7747 DBM: miniapp makefile
- Miniapp: rely on OpenBLAS instead of ref-BLAS.
- OpenCL: fixed using DBCSR inside of DBM.
2025-09-22 11:55:20 +02:00
Luis I Hernández Segura
b69419fcbe
SF-TDDFT implementation (#4446)
The linear-response TDDFT module was extended to spin-flip excitations. This extension is
capable to make collinear and noncollinear SF-TDDFT calculations. Some key details of the
implementation are:

  - The noncollinear kernel used is the Wang & Ziegler kernel with a screening in the
    denominator to stabilize it
  - The noncollinear kernel derivative is calculated by finite differences
2025-09-21 10:31:49 +02:00
Hans Pabst
916bf6ee98 Fixed convention 2025-09-17 20:18:23 +02:00
Hans Pabst
0e17fcc417 Adjusted tolerance 2025-09-17 16:03:54 +02:00
Hans Pabst
b17b32804c Removed redundant dummy arguments
- TODO: remove from structured data types as well.
- Assert corresponding sizes.
2025-09-15 14:49:23 +02:00
Matthias Krack
0446f17dce Fix molecule indexing when using MULTIPLE_UNIT_CELL
Revise forcefield output
2025-09-12 23:05:06 +02:00
Hans Pabst
8bdb955e8a Make suppressed tests explicit
- See #4429.
2025-09-12 16:35:03 +02:00
Hans Pabst
8b7c40c4d4 Avoid short-cycled IF-condition 2025-09-12 13:09:11 +02:00
Hans Pabst
eab93308cb Renamed oneAPI testers and fixed/suppressed issues
- Distinction is IFORT vs IFX or "classic vs new/next-gen".
- Intel Fortran Classic is available up to and incl. 2024.2 packages.
- Intel Fortran (next-gen) is default (still not ready for CP2K).
- Fix bug about Autoconf spilling -loopopt option into link list.
- Drop names derived from packaging images like "hpckit".
- Renamed Dockerfiles for tests and internal names.
- Suppress "libint" flag until regtests pass.
- Introduced "ifx" flag and suppress tests.
2025-09-12 12:03:43 +02:00
Hans Pabst
86bfb12bff Fixed #4431 2025-09-12 10:41:45 +02:00
BelizSertcan
51092d044b
Add tests for force constant 2025-09-12 09:43:02 +02:00
Hans Pabst
c564feb569 Use OpenMP named critical sections and nowait
- Named criticals in an attempt to slightly reduce contention (qs_tensors.F).
- Rely on NOWAIT to omit implicit barriers when unnecessary.
2025-09-11 15:19:31 +02:00
Rocco Meli
dd06dd4b38 inplace 2025-09-11 11:10:18 +02:00
Rocco Meli
bd486b8e57 enable xpmem 2025-09-11 11:10:18 +02:00
Hans Pabst
c08dc9e0b6 Fixes and out-of-place trsm/trmm
- Removed cp_fm_cholesky_restore from cp_fm_basic_linalg
- Thereby reduced duplicated code (cp_fm_cholesky_restore).
- Prefer cp_fm_cholesky to provide this routine.
- Fixed cp_fm_cholesky_restore for pos=right.
- Fixed cp_fm_triangular_multiply for side=R.
- Removed unused variables.
- Adjusted some INTENTs.
2025-09-10 15:44:47 +02:00
BelizSertcan
fde9df4dde pretty 2025-09-10 15:13:23 +02:00
BelizSertcan
76faf341a9 bugfix in force constant calculation 2025-09-10 15:13:23 +02:00
Hans Pabst
a92fbe4355 DBM: reduced consuming host/offload aka page-locked memory
- Replaced DBM_OVERCOMMIT_DEVICE/HOST with DBM_ALLOCATION_FACTOR-
- Thereby reduce overcommit factor for host (scarce resource).
- Comm related routines to rely on MPI's malloc.
  - Even if buffer is subsequently transferred (GPU-transfer).
  - Because dbm_mempool_host_malloc is delicate resource.
2025-09-10 10:03:46 +02:00
Matthias Krack
657c8db65a Improve documentation for H2O force fields 2025-09-08 11:51:25 +02:00
Tennisatw
8d80afcb45 Fix typo in DFT+U energy warning messages 2025-09-07 13:59:16 +02:00
Hans Pabst
f2130a5a34 DBM/CMake: fixed CUDA compilation
- Cleanup variables in related CMake section (CP2K_DBM_SRCS_GPU_C).
- The reason for GPU-SRCs is a separate compiler is req. (CUDA/HIP).
- On case of OpenCL, no ahead-of-time compiler needed.
- Before dbm/dbm_multiply_gpu.c was missing with CUDA.
2025-09-05 14:59:02 +02:00
Hans Pabst
b3f27d980e CMake: fixed OpenCL build dependency
- Rely on add_custom_command.
- Improved status messages.
2025-09-04 20:28:39 +02:00
Hans Pabst
7face5689e DBM/OFFLOAD: prepared for hybrid execution
- Split backend_upload_packs into two phases on GPU.
- Initial phase is chosen to have not triggered upload.
- Offload: offloadEventQuery to check if GPU is busy.
- Removed dbm_multiply_gpu_download_results
- Transfers are launched as early as possible.
- Improved overlap between transfer/compute.
- Idea: proceed on CPU if GPU is busy.

Other changes:
- Documented way to perform validation (ctx=NULL).
- Permit DBM_ prefix for preprocessor symbols.
- Removed C-shard pointer from GPU-context.
- Per-shard event stored/provided by shard.
- Migrated CPU-options into context.
- Miniapp: allow to omit validation.
- Use preincrement (atomic).
2025-09-04 13:27:08 +02:00
zc62
63a7c4bee4 CNEO documentation 2025-09-03 10:35:28 +02:00
Hans Pabst
48ec5b046c Fixed short-cycled condition 2025-09-02 14:21:09 +02:00
Hans Pabst
172730220f offloadStreamWaitEvent: removed unused argument
- Rather add another function if flags are needed ever.
- Avoid promoting obscure flag-based API.
2025-09-02 14:20:54 +02:00
Hans Pabst
4cfe30b6ff DBM: avoid offload_activate_chosen_device in internal routines
- GPU device was activated earlier (once in dbm_multiply).
- Otherwise dbm_multiply calls it multiple times (loop).
2025-09-02 14:20:38 +02:00
zc62
15c1bfc0d2 CNEO: CNEO-DFT energy and force
Energy and force for constrained nuclear-electronic orbital density
functional theory (J. Chem. Theory Comput. 2025, 21, 16, 7865–7877).

`POTENTIAL CNEO` triggers CNEO calculations for certain atom kinds
(hydrogen is the most common, but no limit in principle) and nuclear
basis functions are supplied by `BASIS_SET NUC basis_name`. PB series
basis sets for proton are provided in `data/NUCLEAR_BASIS_SETS`.

The `MASS` can be tuned to simulate isotopes such as deuterium, however,
one should be careful that basis functions need to be changed
accordingly. One simple modification to PB4-D with scaled exponents that
is suitable for deuterium is also added to `data/NUCLEAR_BASIS_SETS`

Note that GAPW is mandatory for atoms with quantum nuclei in CNEO-DFT
calculations, and pseudopotentials or even `GPW_TYPE T` can be used for
atom kinds with conventional classical nuclei.

For the electronic part, k-points can be enabled. However, this k-points
setting will not affect the quantum nuclear part. This is because even
quantum nuclei are delocalized as compared to conventional classical
point charges, they are still relatively localized. Therefore, a
distinguishable-particle approximation is used for quantum nuclei. This
is similar to the Gamma-point approximation for indistinguishable
quantum nuclei, with the added benefit that each quantum nucleus only
involves a small Kohn-Sham equation with localized basis functions, and
multiple quantum nuclei create multiple coupled Kohn-Sham equations,
instead of a giant one in the indistinguishable fermion case.
2025-09-01 12:36:37 +02:00
Frederick Stein
59b61dd70d Remove lrho1_eq_lrho0
It was never set explicitly.
2025-08-31 10:53:44 +02:00
Ole Schütt
97501a3e34 grid: Workaround variable arguments bug on macOS 2025-08-30 15:11:57 +02:00
Ole Schütt
2a42462bc8 DBM: Move mempool chunk resizing out of critical region 2025-08-30 13:58:11 +02:00
Frederick Stein
b11b8edb9a Fix typo in Zhang's given name 2025-08-28 18:06:09 +02:00
Frederick Stein
cab4dd3a75 Remove a few pointer attributes 2025-08-28 18:06:09 +02:00
Hans Pabst
fb5ce05189 Fixed some typos 2025-08-28 17:25:43 +02:00
Hans Pabst
a3edcc8fd9 DBT: removed grain-size from omp-schedule
- Fixed performance in general.
2025-08-28 16:32:10 +02:00
Hans Pabst
f5d0f77abf DBM: simplify memory pool and resize chunk within critical section
- Previous objective memory allocation contending the section for a long time.
- This may resolve #4270 (ARM has weaker ordering on regular LD/ST, etc).
- Resizing chunk since outside of critical was perhaps x86-only.
- Use preincrement in face of atomic instructions.
- Atomic postincrement is more costly.
- Subsumes #4336.
2025-08-28 16:07:31 +02:00
Ole Schütt
ff36ab2728 DBM: Simplify memory pool 2025-08-28 16:07:31 +02:00
Frederick Stein
8059e59ab9 Fix incorrectly spelled name of Zhang 2025-08-28 10:19:07 +02:00
Hans Pabst
22df08cad2 Fixed compilation (ssmp) on Ubuntu GCC 8
- Complements #4397.
2025-08-27 09:42:27 +02:00
Hans Pabst
e523a49c32 DBM: result validation
- Removed compile-time option (DBM_VALIDATE_AGAINST_LIBXSMM).
- Allow to enable validation at runtime (DBM_MULTIPLY_VERIFY).
  - DBM_MULTIPLY_VERIFY=1: print warning message (console).
  - DBM_MULTIPLY_VERIFY=2 (or !=1): exit on error.
  - DBM_MULTIPLY_MAXEPS: threshold, e.g., 1E-8.
- Fail instead of warning if difference is discovered/exceeded.
- Fix: use master thread for MPI-communication
  - Avoid to depend on MPI-initialization or support-level.
  - Funneled support-level is invalid with "omp single".
- Introduced dbm_multiply_cpu_options to select, e.g., BLAS.
  - Validate host/xsmm and device results against BLAS.
- Built-in/transparent validation for miniapp/driver.
  - Reuses the same code as built-in validation.
  - Keep performance/validation pass separate.
- Miniapp now uses non-trivial matrix values.
- Miniapp now uses non-trivial block sizes.
- Validation uses largest relative difference.
2025-08-26 20:57:22 +02:00
Yury
674956f215
Update docs: RELAX_MULTIPLICITY + OT relation 2025-08-26 17:53:29 +02:00
Hans Pabst
5ac43f10d0 DBM/OpenCL: fixed condition 2025-08-26 14:37:58 +02:00
Hans Pabst
d7e378bd80 Fixed intent of mepos
- Code cleanup.
2025-08-26 13:43:13 +02:00
Juerg Hutter
e3076134ed
Refactioring of kinetic energy and core matrices calls. (#4393) 2025-08-26 11:22:41 +02:00
Johann Potot.
448620dc73
Fix gradient for peridic systems with tblite (#4397)
Co-authored-by: Johann Pototschnig <j.pototschnig@hzdr.de>
2025-08-26 11:07:28 +02:00
Matthias Krack
0255b04d5a Use CP2K_USE_EVERYTHING flag 2025-08-22 17:24:13 +02:00
Matthias Krack
4606c84223 Fix typo "=" -> ":' 2025-08-22 17:24:13 +02:00
Matthias Krack
4050fae6af Use CMAKE_BUILD_TYPE generic for RPM build 2025-08-22 17:24:13 +02:00
Yury
851dfd464f Update RELAX_MULTIPLICITY description 2025-08-22 16:21:28 +02:00
Matthias Krack
bd63e738b4 Use RPM macro _lib 2025-08-20 12:48:12 +02:00
Matthias Krack
1aa03dac43 Do not set INSTALL_LIBDIR 2025-08-20 10:53:47 +02:00
Matthias Krack
247cf46b5a Do not set LIBDIR path 2025-08-20 00:56:06 +02:00
Matthias Krack
53e3e9f1a8 Update Apple M1 arch file (macOS Darwin) 2025-08-19 17:46:51 +02:00
Matthias Krack
16f9eaee01 Try to fix lib path for RPM build 2025-08-19 17:10:18 +02:00
Matthias Krack
3006134d9a Add MPI switch 2025-08-19 15:21:46 +02:00
Juerg Hutter
c34e3d62eb
UPF file convertion: Add wavefunction info for SOC (#4380) 2025-08-19 15:08:44 +02:00
Johann Potot.
fe6e26c2fc
tblite update (periodic gfn2?) (#4382)
Co-authored-by: Johann Pototschnig <j.pototschnig@hzdr.de>
2025-08-19 13:41:25 +02:00
Johann Potot.
3fb66f9101
wrong variable name (#4367)
Co-authored-by: Johann Pototschnig <j.pototschnig@hzdr.de>
2025-08-19 11:50:11 +02:00
Matthias Krack
fa5680730c Fix arg list for do_regtest.py 2025-08-19 11:47:41 +02:00
Hans Pabst
f4adc7902c Partially reverted #4378 2025-08-18 15:29:49 +02:00
Hans Pabst
774192a499 CMake/OpenCL: fixed dependency
- Under some circumstances (CMake), add_custom_command does not run.
- However, add_custom_target using a command always runs.
- This combines the two and seems to get minimal rebuild.
- Some cleanup (C-sources only in case of OpenCL, etc.).
2025-08-18 14:31:45 +02:00
Matthias Krack
e7be727c70 Rename datum to timestamp 2025-08-16 19:22:20 +02:00
Matthias Krack
ee07559ffb Fix ASE test 2025-08-16 19:22:20 +02:00
Hans Pabst
577c707782 OpenCL: fixed finding backend if dbcsr is external
- Fixed rebuild/race: add_custom_command instead of add_custom_target.
- Find external DBCSR via CMAKE_PREFIX_PATH or DBCSR_DIR.
- Renamed CP2K_OPENCL_TOOLDIR to CP2K_OPENCL_BACKEND.
- Warning message about legacy tool directory.
- Search DBCSR prior to relying on DBCSR_DIR.
- General: improved output (CMake/configure).
- Missing include directory.
2025-08-16 13:34:44 +02:00
Matthias Krack
6b8cdea8ac From now on consider character truncations as errors during debug compilations 2025-08-15 16:48:10 +02:00
Matthias Krack
24c3c22616 Fix all character (string) truncations 2025-08-15 16:48:10 +02:00
Matthias Krack
3c19a8c560 Remove unused module mao_types from 2016 2025-08-15 11:05:33 +02:00
Matthias Krack
06a87a9398 Simplify code: drop atomic_kind_list parameter 2025-08-15 08:11:10 +02:00
RemiPasquier
674a0aca99 Correct the error metric terminology in the BASIS_RI_AUG_MOLOPT file 2025-08-14 19:56:10 +02:00
Matthias Krack
83ff6f7200 Add special upper MO index -1 for the printout of all available orbitals
Fix on/off switch of the DFT/PRINT/MO input section
2025-08-14 16:11:46 +02:00
Juerg Hutter
d69078cdc6
Activate handling of GTH-SOC PP in Sirius (#4363)
Enable SOC in Sirius calculations using GTH PP format.
Updates Atom code conversion of GTH SOC enabled PP to UPF format.
Basic tests pass, but extended testing and cross validation still needed.
2025-08-14 15:46:53 +02:00
Matthias Krack
f74290cd64 Adjust tolerance 2025-08-14 08:14:03 +02:00
Matthias Krack
8f3b900115 Adjust tolerances 2025-08-14 08:14:03 +02:00
Matthias Krack
54f27cfddd Fix bug part of issue #4353
When using OT, the occcupied orbital eigenvalues are now
- written after SCF convergence to the CP2K output file if requested
- dumped to the binary wavefunction restart file and are printed upon restart if requested
- printed to the MOLDEN output file
- not printed during the OT SCF cycle (only the final orbitals after convergence are printed for the given index range)
2025-08-14 08:14:03 +02:00
Hans Pabst
dfe34b93d0 OpenCL: support Spack/externally built DBCSR 2025-08-13 13:27:33 +02:00
Hans Pabst
92dc7a32a0 Cleaned up profile output 2025-08-13 11:46:02 +02:00
Hans Pabst
d3507fb5dc DBM/OCL: experimental single precision compute
- Internal option to trigger single-precision compute.
- Fixed/consider 1<sgsize as support for subgroups.
- Note: SP-compute still requires DP-capability.
2025-08-13 11:11:55 +02:00
Stefano Battaglia
d69845916c
Update of active space module (#4357)
Co-authored-by: Max Rossmannek <oss@zurich.ibm.com>
2025-08-12 12:08:25 +02:00
Hans Pabst
a485dec4e1 OpenCL: find tool directory 2025-08-12 10:16:24 +02:00
Hans Pabst
8eacfa5fd3 LIBXSMM: support BUILD_SHARED_LIBS
- Fixes BUILD_SHARED_LIBS with LIBXSMM linked statically to CP2K and DBCSR.
- Note: Spack based builds rely on BUILD_SHARED_LIBS by default.
2025-08-11 13:47:05 +02:00
Hans Pabst
f51a819b6a Adhere to conventions 2025-08-11 10:59:57 +02:00
RemiPasquier
17dfffb596 data: Add the new BASIS_AUG_MOLOPT and BASIS_RI_AUG_MOLOPT basis sets (all electron) 2025-08-11 09:51:03 +02:00
Hans Pabst
f7ddad04c1 Improved check_diag
- Only print one deviating value (if there is one).
- Reduced amount of code and stuff in arith. loop.
2025-08-08 20:15:10 +02:00
Matthias Krack
6f51621162 Simplify: drop CP2K build type 2025-08-08 08:34:12 +02:00
Matthias Krack
afc468d7fa Adjust tolerances 2025-08-05 09:28:40 +02:00
Ole Schütt
42dac4a844 Docker: Fix coverage test 2025-07-25 14:14:18 +02:00
Ole Schütt
a31768716e Docker: Speed up coverage test 2025-07-24 21:30:40 +02:00
Ole Schütt
7a33b045ee Adjust tolerance of QS/regtest-gpw-4/spin_restraint.inp 2025-07-24 21:30:40 +02:00
Ole Schütt
e4c8c769b3 Dashboard: Run pdbg test more often 2025-07-24 21:30:40 +02:00
Ole Schütt
8e43b5cd4d Docker: Migrate arm64 test to CMake 2025-07-24 21:30:40 +02:00
Juerg Hutter
fa01f37413
Bug fix for initial guess with ECP potentials (#4343) 2025-07-24 18:09:30 +02:00
Ole Schütt
665dafcec4 Docker: Simplify generate_dockerfiles.py 2025-07-24 15:48:42 +02:00
Ole Schütt
aaa8291090 Docker: Migrate manual test to CMake 2025-07-24 15:48:42 +02:00
Ole Schütt
a99a1edcfd Docker: Migrate coverage test to CMake 2025-07-24 15:48:42 +02:00
Ole Schütt
e82c618570 Increase development version after 2025.2 release 2025-07-23 13:02:06 +02:00
3290 changed files with 333728 additions and 106548 deletions

View file

@ -1,6 +1,7 @@
exe
lib
obj
build
regtesting
tools/toolchain/install
tools/toolchain/build
@ -9,3 +10,6 @@ docs/CP2K_INPUT
.git*
*~
\#*\#
/install
/spack
/spack_cache

5
.gitattributes vendored
View file

@ -1,5 +1,4 @@
CODEOWNERS export-ignore
.gitattributes export-ignore
.git-blame-ignore-revs export-ignore
.gitignore export-ignore
.gitmodules export-ignore
.pre-commit-config.yaml export-ignore
.github/** export-ignore

11
.gitignore vendored
View file

@ -1,18 +1,16 @@
# base directory structure
/bin/
/build*/
/doxygen/
/exe/
/install*/
/lib/
/obj/
/bin/
/doxygen/
/regtesting/
/install/
# ignore former git submodules
/tools/prettify/fprettify
# ignore local arch files not meant to be shared
/arch/local*
# ensure people are not accidentally committing an old .svnignore when copying their stuff
.svnignore
@ -100,6 +98,7 @@ build*/
# Spack
build-*
.spack_patched
/spack*/
### CMake Patch ###
# External projects

4
.gitmodules vendored
View file

@ -1,4 +0,0 @@
[submodule "exts/dbcsr"]
path = exts/dbcsr
url = https://github.com/cp2k/dbcsr
branch = master

File diff suppressed because it is too large Load diff

73
CODEOWNERS Normal file
View file

@ -0,0 +1,73 @@
# Top-level files
/* @cp2k/cp2k-admins
# Data
/data/ @mkrack @juerghutter
# CMake
/cmake/ @mkrack @mtaillefumier @RMeli
/CMakeLists.txt @mkrack @mtaillefumier @RMeli
# Spack
/tools/spack/ @mkrack @mtaillefumier @RMeli
/make_cp2k.sh @mkrack @mtaillefumier @RMeli
# Toolchain
/tools/toolchain/ @mkrack @oschuett
# Testing + Conventions
/tools/conventions/ @mkrack @oschuett
/tools/precommit/ @mkrack @oschuett
/tools/dashboard/ @mkrack @oschuett
/tools/docker/ @mkrack @oschuett
# Load bearing APIs and files
/src/fm/ @fstein93 @oschuett
/src/pw/ @fstein93 @oschuett
/src/pw_env/ @fstein93 @oschuett
/src/mpiwrap/ @fstein93 @oschuett
/src/dbm/ @fstein93 @oschuett
/src/dbt/ @fstein93 @oschuett
/src/dbx/ @fstein93 @oschuett
/src/base/ @fstein93 @oschuett
/src/start/ @fstein93 @oschuett
/src/f77_interface.F @fstein93 @oschuett
/tests/do_regtest.py @fstein93 @oschuett
/tests/matcher_classes.py @fstein93 @oschuett
# Offload + Grid
/src/offload/ @mtaillefumier @oschuett
/src/grid/ @mtaillefumier @oschuett
# SIRIUS
/src/sirius_interface.F @mtaillefumier @RMeli
/src/*pwdft* @mtaillefumier @RMeli
# DLA-Future
/src/fm/*dlaf* @RMeli @mtaillefumier
# PAO
/src/pao_* @oschuett
/tools/pao-ml/ @oschuett
# Path integrals and NNP
/src/motion/pint_* @hforbert
/src/motion/helium_* @hforbert
/src/nnp_* @hforbert
# Dispersion + tblite
/src/qs_dispersion_* @jpoto
/src/tblite_* @jpoto
# NEGF
/src/negf_* @dryndyk
# Post Hartree-Fock
/src/mp2_* @JWilhelm @fstein93
/src/rpa_* @JWilhelm @fstein93
/src/gw_* @JWilhelm @fstein93
# Post SCF
/src/qs_scf_post_* @marci73 @juerghutter
#EOF

1
CONTRIBUTING.md Symbolic link
View file

@ -0,0 +1 @@
./docs/development/onboarding.md

View file

@ -10,8 +10,33 @@ For more details on downloading CP2K, see <https://www.cp2k.org/download>.
## 2. Install prerequisites
The easiest way to build CP2K with all its dependencies is as a
[Docker container](./tools/docker/README.md).
### Method 1: make_cp2k.sh
The easiest way to build CP2K with its dependencies is via the `make_cp2k.sh` script, which builds
CP2K using Spack and CMake locally within the CP2K_ROOT folder.
The script can either be sourced with:
```shell
source ./make_cp2k.sh
```
or run in a subshell with:
```shell
./make_cp2k.sh
```
You can run the following command to get information about how to use this script:
```shell
./make_cp2k.sh --help
```
Note: it is recommended to install podman to take advantage of a spack cache. This will accelerate
the build of the CP2K dependencies with Spack significantly.
### Method 2: Toolchain
Alternatively, the [toolchain script](./tools/toolchain/install_cp2k_toolchain.sh) can also be run
directly.
@ -27,644 +52,45 @@ cd tools/toolchain/
./install_cp2k_toolchain.sh --help
```
- Launch toolchain script (example option choice)
CP2K supports GPU acceleration via CUDA (for NVIDIA GPUs), HIP/ROCm (for AMD GPUs), and OpenCL (for
a range of devices). If you wish to build with GPU support, please see the
[manual](https://manual.cp2k.org/trunk/technologies/accelerators/index.html).
- Launch toolchain script (example option choice for NVIDIA/CUDA):
```shell
./install_cp2k_toolchain.sh --with-libxsmm=install --with-openblas=system \
--with-fftw=system --with-reflapack=no --enable-cuda
--with-fftw=system --enable-cuda
```
- Once the script has completed successfully, follow the instructions given at the end of its
output. Note that the pre-built arch files provided by the toolchain are for the GNU compiler,
users must adapt them for other compilers. It is possible to use the provided [arch files](./arch)
as guidance.
There are [arch files](./arch) for a few specific platforms (e.g.
[Linux-gnu-x86_64](./arch/Linux-gnu-x86_64.psmp),
[Linux-intel-x86_64](./arch/Linux-intel-x86_64.psmp)) which include a toolchain build. Sourcing such
an arch file in the cp2k folder launches a toolchain build, e.g.
```
source ./arch/Linux-gnu-x86_64.psmp
```
After a successful toolchain build, run one of the suggested `make` commands
```
make -j ARCH=Linux-gnu-x86_64 VERSION=psmp
```
Check also the corresponding [HowTos](https://www.cp2k.org/howto/) for
[Apple M1 (macOS)](https://www.cp2k.org/howto:compile_on_macos/) and
[Cray XC40/50 (Piz Daint, CSCS)](https://www.cp2k.org/howto:compile_on_cray_cscs/).
Sub-points here discuss prerequisites needed to build CP2K. Copies of the recommended versions of
3rd party software can be downloaded from <https://www.cp2k.org/static/downloads/>.
Generally, CP2K supports only one version for each of its dependencies. These are defined by the
[toolchain scripts](./tools/toolchain/scripts/). Other versions might work too, but we don't test
them. So, your mileage may vary.
### 2a. GNU make (required, build system)
GNU make should be on your system (gmake or make on linux) and used for the build, go to
<https://www.gnu.org/software/make/make.html> download from <https://ftp.gnu.org/pub/gnu/make/>.
### 2b. Python (required, build system)
Python 3.5+ is needed to run the dependency generator. On most system Python is already installed.
For more information visit: <https://www.python.org>
### 2c. Fortran and C Compiler (required, build system)
A Fortran 2008 compiler and matching C99 compiler should be installed on your system. We have good
experience with gcc/gfortran (gcc >=4.6 works, later version recommended). Be aware that some
compilers have bugs that might cause them to fail (internal compiler errors, segfaults) or, worse,
yield a mis-compiled CP2K. Report bugs to compiler vendors; they (and we) have an interest in fixing
them. A list of tested compiler can be found [here](https://www.cp2k.org/dev:compiler_support).
Always run a `make -j test` (See point 5.) after compilation to identify these problems.
### 2d. BLAS and LAPACK (required, base functionality)
BLAS and LAPACK should be installed. Using vendor-provided libraries can make a very significant
difference (up to 100%, e.g., ACML, MKL, ESSL), not all optimized libraries are bug free. Use the
latest versions available, use the interfaces matching your compiler, and download all patches!
- The canonical BLAS and LAPACK can be obtained from the Netlib repository:
- <http://www.netlib.org/blas/>
- <http://www.netlib.org/lapack/> and see also
- <http://www.netlib.org/lapack-dev/>
- Open fast alternatives, include:
- <http://www.openblas.net>
- <http://math-atlas.sourceforge.net>
- <https://www.tacc.utexas.edu/research-development/tacc-software/gotoblas2>
Please note that the BLAS/LAPACK implementation used by CP2K needs to be thread-safe (OpenMP).
Examples are the sequential variant of the Intel MKL, the Cray libsci, the OpenBLAS OpenMP variant
and the reference BLAS/LAPACK packages. If compiling with MKL, users must define `-D__MKL` to ensure
the code is thread-safe. MKL with multiple OpenMP threads in CP2K requires that CP2K was compiled
with the Intel compiler. If the `cpp` precompiler is used in a separate precompilation step in
combination with the Intel Fortran compiler, `-D__INTEL_LLVM_COMPILER` (`-D__INTEL_COMPILER`) must
be added explicitly (the Intel compiler sets `D__INTEL_LLVM_COMPILER` otherwise automatically).
On the Mac, BLAS and LAPACK may be provided by Apple's Accelerate framework. If using this
framework, `-D__ACCELERATE` must be defined to account for some interface incompatibilities between
Accelerate and reference BLAS/LAPACK.
When building on/for Windows using the Minimalist GNU for Windows (MinGW) environment, you must set
`-D__MINGW`, `-D__NO_STATM_ACCESS` and `-D__NO_SOCKETS` to avoid undefined references during
linking, and to respectively avoid errors while printing the statistics.
### 2e. MPI and ScaLAPACK (optional, required for MPI parallel builds)
MPI (version 3) and SCALAPACK are needed for parallel code. (Use the latest versions available and
download all patches!).
:warning: Note that your MPI installation must match the used Fortran compiler. If your computing
platform does not provide MPI, there are several freely available alternatives:
- MPICH2 MPI: <http://www-unix.mcs.anl.gov/mpi/mpich/> (may require `-fallow-argument-mismatch` when
building with GCC 10)
- OpenMPI MPI: <http://www.open-mpi.org/>
- ScaLAPACK:
- <http://www.netlib.org/scalapack/>
- <http://www.netlib.org/lapack-dev/>
- ScaLAPACK can be part of ACML or cluster MKL. These libraries are recommended if available.
- Recently a [ScaLAPACK installer](http://www.netlib.org/scalapack/scalapack_installer.tgz) has
been added that simplifies the installation.
CP2K assumes that the MPI library implements MPI version 3. Older versions of MPI (e.g., MPI 2.0)
are not supported and the old flag `-D__MPI_VERSION` in the arch file will be ignored. CP2K can make
use of the mpi_f08 module. If its use is requested, set the flag `-D__MPI_F08`.
### 2f. FFTW (optional, improved performance of FFTs)
FFTW can be used to improve FFT speed on a wide range of architectures. It is strongly recommended
to install and use FFTW3. The current version of CP2K works with FFTW 3.X (use `-D__FFTW3`). It can
be downloaded from <http://www.fftw.org>
FFTW is also provided by MKL. Use `-D__FFTW3_MKL` to use the correct import path.
:warning: Note that FFTW must know the Fortran compiler you will use in order to install properly
(e.g., `export F77=gfortran` before configure if you intend to use gfortran).
:warning: Note that FFTW configured for SIMD vectorization, requires buffers aligned to SIMD width.
If this cannot be ensured for the compiler used (e.g., NAG f95, Intel IA32/gfortran), one should
either configure FFTW without SIMD support or otherwise set the define `-D__FFTW3_UNALIGNED`. Since
CP2K is OpenMP parallelized, the FFTW3 threading library libfftw3_threads (or libfftw3_omp) is
required.
### 2g. LIBINT (optional, enables methods including HF exchange)
- Hartree-Fock exchange (optional, use `-D__LIBINT`) requires the LIBINT package to be installed.
- Recommended way to build LIBINT: Download a CP2K-configured LIBINT library from
[libint-cp2k](https://github.com/cp2k/libint-cp2k). Build and install LIBINT by following the
instructions provided there. Note that using a library configured for higher maximum angular
momentum will increase build time and binary size of CP2K binary (assuming static linking).
- CP2K is not hardwired to these provided libraries and any other LIBINT library (version >= 2.5.0)
should be compatible as long as it was compiled with `--enable-eri=1` and default ordering.
- Avoid debugging information (`-g` flag) for compiling LIBINT since this will increase library size
by a large factor.
- In the arch file of CP2K: add `-D__LIBINT` to the `DFLAGS`. Add
`-L$(LIBINT_DIR)/lib -lint2 -lstdc++` to `LIBS` and `-I$(LIBINT_DIR)/include` to `FCFLAGS`.
`lstdc++` is needed if you use the GNU C++ compiler.
- Libint 1 is no longer supported and the previously needed flags `-D__LIBINT_MAX_AM` and
`-D__LIBDERIV_MAX_AM1` are ignored.
- `-D__MAX_CONTR=4` (default=2) can be used to compile efficient contraction kernels up to l=4, but
the build time will increase accordingly.
### 2h. LIBXSMM (optional, improved performance for matrix multiplication)
- A library for matrix operations and deep learning primitives:
<https://github.com/libxsmm/libxsmm/>.
- Add `-D__LIBXSMM` to enable it, with suitable include and library paths, e.g.,
`FCFLAGS += -I${LIBXSMM_DIR}/include -D__LIBXSMM` and
`LIBS += -L${LIBXSMM_DIR}/lib -lxsmmf -lxsmmext -lxsmm -ldl`
- LIBSMM is not used if LIBXSMM is enabled.
### 2i. CUDA (optional, improved performance on GPU systems)
- Specify OFFLOAD_CC (e.g., `OFFLOAD_CC = nvcc`) and OFFLOAD_FLAGS (e.g.,
`OFFLOAD_FLAGS = -O3 -g -w --std=c++11`) variables. Remember to include the support for the C++11
standard.
- Use `-D__OFFLOAD_CUDA` to generally enable support for Nvidia GPUs
- Use the `-D__DBCSR_ACC` and `OFFLOAD_TARGET = cuda` to enable accelerator support for matrix
multiplications.
- Add `-lstdc++ -lcudart -lnvrtc -lcuda -lcublas` to LIBS.
- Specify the GPU type (e.g., `GPUVER = P100`), possible values are K20X, K40, K80, P100, V100,
A100, H100, A40.
- Specify the C++ compiler (e.g., `CXX = g++`) and the CXXFLAGS to support the C++11 standard.
- CUFFT 7.0 has a known bug and is therefore disabled by default. NVIDIA's webpage list a patch (an
upgraded version cufft i.e. >= 7.0.35) - use this together with `-D__HAS_PATCHED_CUFFT_70`.
- Use `-D__OFFLOAD_PROFILING` to turn on Nvidia Tools Extensions. It requires to link
`-lnvToolsExt`.
- Link to a BLAS/ScaLAPACK library that accelerates large DGEMMs (e.g., libsci_acc)
- Use `-D__NO_OFFLOAD_GRID` to disable the GPU backend of the grid library.
- Use `-D__NO_OFFLOAD_DBM` to disable the GPU backend of the sparse tensor library.
- Use `-D__NO_OFFLOAD_PW` to disable the GPU backend of FFTs and associated gather/scatter
operations.
### 2j. LIBXC (optional, wider choice of xc functionals)
- The version 5.1.0 (or later) of LIBXC can be downloaded from
<https://www.tddft.org/programs/libxc>
- CP2K does not make use of fourth derivates such that LIBXC may be configured with './configure
--disable-lxc \<other LIBXC configuration flags>'.
- During the installation, the directories `$(LIBXC_DIR)/lib` and `$(LIBXC_DIR)/include` are
created.
- Add `-D__LIBXC` to DFLAGS, `-I$(LIBXC_DIR)/include` to FCFLAGS and
`-L$(LIBXC_DIR)/lib -lxcf03 -lxc` to LIBS.
- :warning: Note that the deprecated flags `-D__LIBXC2` and `-D__LIBXC3` are ignored.
### 2k. ELPA (optional, improved performance for diagonalization)
Library ELPA for the solution of the eigenvalue problem
- ELPA replaces the ScaLAPACK `SYEVD` to improve the performance of the diagonalization
- A version of ELPA can be downloaded from <http://elpa.rzg.mpg.de/software>.
- During the installation the `libelpa_openmp.a` is created.
- Minimal supported version of ELPA is 2018.05.001.
- Add `-D__ELPA` to `DFLAGS`
- Add `-D__ELPA_NVIDIA_GPU`, `-D__ELPA_AMD_GPU`, or `-D__ELPA_INTEL_GPU` to `DFLAGS` to enable GPU
support for the respective vendor.
- Add `-I$(ELPA_INCLUDE_DIR)/modules` to `FCFLAGS`
- Add `-I$(ELPA_INCLUDE_DIR)/elpa` to `FCFLAGS`
- Add `-L$(ELPA_DIR)` to `LDFLAGS`
- Add `-lelpa` to `LIBS`
- For specific architectures it can be better to install specifically optimized kernels (see BG)
and/or employ a higher optimization level to compile it.
### 2l. cuSOLVERMp (experimental, improved performance for diagonalization on Nvidia GPUs)
NVIDIA cuSOLVERMp is a high-performance, distributed-memory, GPU-accelerated library that provides
tools for the solution of dense linear systems and eigenvalue problems.
- cuSOLVERMp replaces the ScaLAPACK `SYEVD` to improve the performance of the diagonalization
- A version of cuSOLVERMp can be downloaded from <https://docs.nvidia.com/hpc-sdk/cusolvermp>.
- Add `-D__CUSOLVERMP` to `DFLAGS`
- Add `-lcusolverMp -lcusolver -lcal -lnvidia-ml` to `LIBS`
### 2m. DLA-Future (optional, improved performance for diagonalization on Nvidia and AMD GPUs)
[DLA-Future](https://github.com/eth-cscs/DLA-Future) is a high-performance, distributed-memory,
GPU-accelerated library that provides tools for the solution of eigenvalue problems, based on the
[pika](https://pikacpp.org/) runtime.
[DLA-Future-Fortran](https://github.com/eth-cscs/DLA-Future-Fortran) provides a Fortran interface to
DLA-Future.
- DLA-Future-Fortran replaces the ScaLAPACK `SYEVD`, `HEEVD`, and `HEGVD` to improve performance of
the diagonalization
- DLA-Future is available at <https://github.com/eth-cscs/DLA-Future>
- DLA-Future-Fortran is available at <https://github.com/eth-cscs/DLA-Future-Fortran>
- DLA-Future is available via the [Spack](https://packages.spack.io/package.html?name=dla-future)
package manager
- DLA-Future-Fortran is available via the
[Spack](https://packages.spack.io/package.html?name=dla-future-fortran) package manager
- `-D__DLAF` is defined by CMake when `-DCP2K_USE_DLAF=ON`
### 2n. PEXSI (optional, low scaling SCF method)
The Pole EXpansion and Selected Inversion (PEXSI) method requires the PEXSI library and two
dependencies (ParMETIS or PT-Scotch and SuperLU_DIST).
- PEXSI is only available via a Spack build of CP2K.
- Add `-D__PEXSI` to DFLAGS.
Below are some additional hints that may help in the compilation process:
- For building PT-Scotch, the flag `-DSCOTCH_METIS_PREFIX` in `Makefile.inc` must not be set and the
flag `-DSCOTCH_PTHREAD` must be removed.
- For building SuperLU_DIST with PT-Scotch, you must set the following in `make.inc`:
- For AMD/ROCm/HIP support, use:
```shell
METISLIB = -lscotchmetis -lscotch -lscotcherr
PARMETISLIB = -lptscotchparmetis -lptscotch -lptscotcherr
./install_cp2k_toolchain.sh --with-libxsmm=install --with-openblas=system \
--with-fftw=system --enable-hip
```
### 2o. QUIP (optional, wider range of interaction potentials)
- Build and install CP2K with prepared toolchain environment:
QUIP - QUantum mechanics and Interatomic Potentials Support for QUIP can be enabled via the flag
`-D__QUIP`.
```shell
./build_cp2k.sh
```
For more information see <http://www.libatoms.org>.
It is also available to make installed program and dependencies outside the source tree:
### 2p. PLUMED (optional, enables various enhanced sampling methods)
CP2K can be compiled with PLUMED 2.x (`-D__PLUMED2`).
See <https://cp2k.org/howto:install_with_plumed> for full instructions.
### 2q. spglib (optional, crystal symmetries tools)
A library for finding and handling crystal symmetries
- The spglib can be downloaded from <https://github.com/atztogo/spglib>
- For building CP2K with the spglib add `-D__SPGLIB` to DFLAGS
### 2r. SIRIUS (optional, plane wave calculations)
SIRIUS is a domain specific library for electronic structure calculations.
- The code is available at <https://github.com/electronic-structure/SIRIUS>
- For building CP2K with SIRIUS add `-D__SIRIUS` to DFLAGS.
- Add `-D__LIBVDWXC` if support is activated in SIRIUS.
- See <https://electronic-structure.github.io/SIRIUS-doc/> for more information.
- Add `-D__SIRIUS_DFTD4` when sirius is compiled with dftd3 and dftd4 support.
- Add `-D__SIRIUS_NLCG` when sirius is compiled with nlcg support.
- Add `-D__SIRIUS_VCSQNM` when sirius is compiled with variable cell relaxation support.
### 2s. FPGA (optional, plane wave FFT calculations)
- Use `-D__PW_FPGA` to enable FPGA support for PW (fft) calculations. Currently tested only for
Intel Stratix 10 and Arria 10 GX1150 FPGAs.
- Supports single precision and double precision fft calculations with the use of dedicated APIs.
- Double precision is the default API chosen when set using the `-D__PW_FPGA` flag.
- Single precision can be set using an additional `-D__PW_FPGA_SP` flag along with the `-D__PW_FPGA`
flag.
- Kernel code must be synthesized separately and copied to a specific location.
- See <https://github.com/pc2/fft3d-fpga/> for the kernel code and instructions for synthesis.
- Read `src/pw/fpga/README.md` for information on the specific location to copy the binaries to.
- Currently supported FFT3d sizes - 16^3, 32^3, 64^3.
- Include aocl compile flags and `-D__PW_FPGA -D__PW_FPGA_SP` to `CFLAGS`, aocl linker flags to
`LDFLAGS` and aocl libs to `LIBS`.
- When building FPGA and OFFLOAD together then `-D__NO_OFFLOAD_PW` must be used.
### 2t. COSMA (Distributed Communication-Optimal Matrix-Matrix Multiplication Algorithm)
- COSMA is an alternative for the pdgemm routine included in ScaLAPACK. The library supports both
CPU and GPUs.
- Add `-D__COSMA` to the DFLAGS to enable support for COSMA.
- See <https://github.com/eth-cscs/COSMA> for more information.
### 2u. LibVori (Voronoi Integration for Electrostatic Properties from Electron Density)
- LibVori is a library which enables the calculation of electrostatic properties (charge, dipole
vector, quadrupole tensor, etc.) via integration of the total electron density in the Voronoi cell
of each atom.
- Add `-D__LIBVORI` to the DFLAGS to enable support for LibVori.
- See <https://brehm-research.de/libvori> for more information.
- LibVori also enables support for the BQB file format for compressed trajectories, please see
<https://brehm-research.de/bqb> for more information as well as the `bqbtool` to inspect BQB
files.
### 2v. Torch (Machine Learning Framework needed for NequIP)
- The C++ API of PyTorch can be downloaded from https://pytorch.org/get-started/locally/.
- Add `-D__LIBTORCH` to the DFLAGS to enable support for libtorch.
### 2w. ROCM/HIP (Support for AMD GPU)
The code for the HIP based grid backend was developed and tested on Mi100 but should work out of the
box on Nvidia hardware as well.
- Use `-D__OFFLOAD_HIP` to generally enable support for AMD GPUs
- Use `-D__NO_OFFLOAD_GRID` to disable the GPU backend of the grid library.
- Use `-D__NO_OFFLOAD_DBM` to disable the GPU backend of the sparse tensor library.
- Use `-D__NO_OFFLOAD_PW` to disable the GPU backend of FFTs and associated gather/scatter
operations.
- Add `-D__OFFLOAD_UNIFIED_MEMORY` to enable unified memory support (experimental and only supports
Mi250X and above)
- Add `GPUVER=Mi50, Mi60, Mi100, Mi250`
- Add `OFFLOAD_CC = hipcc`
- Add `-lamdhip64` to the `LIBS` variable
- Add
`OFFLOAD_FLAGS = '-munsafe-fp-atomics -fopenmp -m64 -pthread -fPIC -D__GRID_HIP -O2 --offload-arch=gfx908 --rocm-path=$(ROCM_PATH)'`
where `ROCM_PATH` is the path where the rocm sdk resides. Architectures Mi300(A,X) (gfx1103),
Mi250 (gfx90a), Mi100 (gfx908), Mi50 (gfx906) the hip backend for the grid library supports nvidia
hardware as well. It uses the same code and can be used to validate the backend in case of access
to Nvidia hardware only. To get the compilation working, follow the steps above and set the
`OFFLOAD_FLAGS` with right `nvcc` parameters (see the cuda section of this document). The
environment variable `HIP_PLATFORM` should be set to `HIP_PLATFORM=nvidia` to indicate to hipcc to
use the nvcc compiler instead.
- Specify the C++ compiler (e.g., `CXX = g++`). Remember to set the CXXFLAGS flags to support C++11
standard and OpenMP.
- When the HIP backend is enabled for DBCSR using `-D__DBCSR_ACC`, then add `-D__HIP_PLATFORM_AMD__`
to `CXXFLAGS` and set `OFFLOAD_TARGET = hip`.
- Use `-D__OFFLOAD_PROFILING` to turn on the AMD ROC TX and Tracer libray. It requires to link
`-lroctx64 -lroctracer64`.
### 2x. OpenCL Devices
OpenCL devices are currently supported for DBCSR and DBM/DBT, and can cover GPUs and other devices.
Kernels can be automatically tuned.
Note: the OpenCL backend uses some functionality from LIBXSMM (dependency). CP2K's offload-library
serving DBM/DBT and other libraries depends on DBCSR's OpenCL backend.
- Installing OpenCL and preparing the runtime environment
- Installing an OpenCL runtime depends on the operating system and the device vendor. Debian for
instance brings two packages called `opencl-headers` and `ocl-icd-opencl-dev` which can be
present in addition to a vendor-specific installation. The OpenCL header files are only
necessary if CP2K/DBCSR is compiled from source. Please note, some implementations ship with
outdated OpenCL headers which can prevent using latest features (if an application discovers
such features only at compile-time). When building from source, for instance `libOpenCL.so` is
sufficient at link-time (ICD loader). However, an Installable Client Driver (ICD) is finally
necessary at runtime.
- Nvidia CUDA, AMD HIP, and Intel OneAPI are fully equipped with an OpenCL runtime (if
`opencl-headers` package is not installed, CPATH can be needed to point into the former
installation, similarly `LIBRARY_PATH` for finding `libOpenCL.so` at link-time). Installing a
minimal or stand-alone OpenCL is also possible, e.g., following the instructions for Debian (or
Ubuntu) as given for every [release](https://github.com/intel/compute-runtime/releases) of the
[Intel Compute Runtime](https://github.com/intel/compute-runtime).
- The environment variable `ACC_OPENCL_VERBOSE` prints information at runtime of CP2K about
kernels generated (`ACC_OPENCL_VERBOSE=2`) or executed (`ACC_OPENCL_VERBOSE=3`) which can be
used to check an installation.
- Building CP2K with OpenCL-based DBCSR
- CP2K's toolchain supports `--enable-opencl` to select DBCSR's OpenCL backend. This can be
combined with `--enable-cuda` (`--gpu-ver` is then imposed) to use a GPU for CP2K's GRID and PW
components (no OpenCL support yet) with DBM's CUDA implementation to be preferred.
- For manually writing an ARCH-file, add `-D__OPENCL` and `-D__DBCSR_ACC` to `CFLAGS` and add
`-lOpenCL` to the `LIBS` variable, i.e., `OFFLOAD_CC` and `OFFLOAD_FLAGS` can duplicate `CC` and
`CFLAGS` (no special offload compiler needed). Please also set `OFFLOAD_TARGET = opencl` to
enable the OpenCL backend in DBCSR. For OpenCL, it is not necessary to specify a GPU version
(e.g., `GPUVER = V100` would map/limit to
`exts/dbcsr/src/acc/opencl/smm/params/tune_multiply_V100.csv`). In fact, `GPUVER` limits tuned
parameters to the specified GPU, whereas by default all tuned parameters are embedded
(`exts/dbcsr/src/acc/opencl/smm/params/*.csv`) and applied at runtime. If auto-tuned parameters
are not available for DBCSR, well-chosen defaults will be used to populate kernels at runtime.
- Auto-tuned parameters are embedded into the binary, i.e., CP2K does not rely on a hard-coded
location. Setting `OPENCL_LIBSMM_SMM_PARAMS=/path/to/csv-file` environment variable can supply
parameters for an already built application, or `OPENCL_LIBSMM_SMM_PARAMS=0` can disable using
tuned parameters. Refer to <https://cp2k.github.io/dbcsr/> on how to tune kernels (parameters).
- Building CP2K with OpenCL-based DBM library
- For manually writing an ARCH-file, add `-D__OFFLOAD_OPENCL` to `CFLAGS` in addition to following
above instructions for "Building CP2K with OpenCL-based DBCSR". An additional Makefile rule can
be necessary to transform OpenCL code into a ressource header file.
### 2y. matrix-matrix multiplication offloading on GPU using SPLA
The SPLA library is a hard dependency of SIRIUS but can also be used as a standalone library. It
provides a generic interface to the blas gemm family with offloading on GPU. Offloading supports
both CUDA and ROCM.
To make the functionality available, add the flag `-D__SPLA -D__OFFLOAD_GEMM` to the `DFLAGS`
variable and compile SPLA with Fortran interface and GPU support. Please note that only the
functions replacing the dgemm calls with `offload_dgemm` will eventually be offloaded to the GPU.
The SPLA library has internal criteria to decide if it is worth to do the operation on GPU or not.
Calls to `offload_dgemm` also accept pointers on GPU or a combination of them.
### 2y. libgrpp (optional, enables calculations with ECPs)
libgrpp is a library for the calculation of integrals with GTOs and ECPs. The source code of the
library is part of cp2k.
- Add `-D__LIBGRPP` to DFLAGS.
<!---
### 2y. LibMaxwell (External Maxwell Solver)
- LibMaxwell is a library to solve the time-dependent Maxwell equations
and use the resulting electric field in MD runs or real-time propagation.
- Add `-D__LIBMAXWELL` to DFLAGS to enable support for LibMaxwell.
- See <https://brehm-research.de> for more information.
-->
### 2y. DeePMD-kit (optional, wider range of interaction potentials)
DeePMD-kit - Deep Potential Molecular Dynamics. Support for DeePMD-kit can be enabled via the flag
`-D__DEEPMD`.
- DeePMD-kit C interface can be downloaded from
<https://docs.deepmodeling.com/projects/deepmd/en/master/install/install-from-c-library.html>
- For more information see <https://github.com/deepmodeling/deepmd-kit.git>.
### 2y. ACE (optional, atomic cluster expansion ML potentials)
Atomic cluster expansion for accurate and transferable interatomic potentials support can be enabled
via the flag `-D__ACE`.
- the library files can be downloaded from <https://github.com/ICAMS/lammps-user-pace>
- use cmake/make to compile. There is no install, just ensure that the cp2k build process links in
all three libraries (libpace, libyaml-cpp-pace and libcnpy). Access to ML-PACE/ace
ML-PACE/ace-evaluator and yaml-cpp/include from the library is also needed (see toolchain for
example).
### 2z. DFTD4 (optional, dispersion correction)
- dftd4 - Generally Applicable Atomic-Charge Dependent London Dispersion Correction.
- For more information see <https://github.com/dftd4/dftd4>
- Add `-D__DFTD4` to DFLAGS, `-ldftd4 -lmstore -lmulticharge -lmctc-lib` to LIBS and
`-I'${DFTD4_DFTD4}/../..' -I'${DFTD4_DFTD4}' -I'${DFTD4_MCTC}'` to CFLAGS
### 2y. libsmeagol (optional, electron transport calculation with current-induced forces)
- libsmeagol is an external library to compute electron transport properties using Non-Equilibrium
Green Functions (NEGF) method. The library can be downloaded from
<https://github.com/StefanoSanvitoGroup/libsmeagol>.
- libsmeagol depends on an MPI library and can only be linked with MPI parallel CP2K binaries.
- During the installation, the directories `$(LIBSMEAGOL_DIR)/lib` and `$(LIBGRPP_DIR)/obj` are
created.
- Add `-D__SMEAGOL` to DFLAGS, `-I$(LIBSMEAGOL_DIR)/obj` to FCFLAGS and
`-L$(LIBSMEAGOL_DIR)/lib -lsmeagol` to LIBS
### 2z. TREXIO (optional, unified computational chemistry format)
TREXIO - Open-source file format and library. Support for TREXIO can be enabled via the flag
`-D__TREXIO`.
- TREXIO library can be downloaded from <https://github.com/trex-coe/trexio>
- For more information see <https://trex-coe.github.io/trexio/index.html>.
### 2z-a. GREENX (optional, basically functionality for GreenX methods (RPA, GW, Laplace-MP2 etc.)
greenX - Open-source file format and library. Support for greenX can be enabled via the flag
`-D__GREENX`.
- GREENX library can be downloaded from <https://github.com/nomad-coe/greenX>
- For more information see <https://nomad-coe.github.io/greenX/>.
### 2z-b. TBLITE (optional, semiempirical method)
- tblite - Light-weight tight-binding framework
- For more information see <https://github.com/tblite/tblite>
- Add `-D__TBLITE` to DFLAGS
```shell
./install_cp2k_toolchain.sh --install-dir=/opt/cp2k/toolchain
./build_cp2k.sh --prefix /opt/cp2k
```
## 3. Compile
### 3a. ARCH files
The location of compiler and libraries needs to be specified. Examples for several common
architectures can be found in [arch folder](./arch/). The names of these files match
`architecture.version` e.g., [Linux-gnu-x86_64.psmp](./arch/Linux-gnu-x86_64.psmp). Alternatively,
<https://dashboard.cp2k.org> provides sample arch files as part of the testing reports (click on the
status field, search for 'ARCH-file').
Conventionally, there are six versions:
| VERSION | Meaning |
| ------- | -------------------------------- |
| sdbg | OpenMP + debug settings |
| sopt | OpenMP + OMP_NUM_THREADS=1 |
| ssmp | OpenMP |
| pdbg | MPI + OpenMP + debug settings |
| popt | MPI + OpenMP + OMP_NUM_THREADS=1 |
| psmp | MPI + OpenMP |
You'll need to modify one of these files to match your system's settings.
Some architecture files like the file [Linux-gnu-x86_64.psmp](./arch/Linux-gnu-x86_64.psmp) are
sourceable (see above), i.e.
```shell
source arch/Linux-gnu-x86_64.psmp
```
will launch a build of the CP2K toolchain which will build all dependencies needed for compiling
CP2K. Building a `psmp` version will also create a `popt` CP2K binary and vice versa. The same is
true for the `ssmp` and `sopt` versions of CP2K.
You can now build CP2K using these settings (where -j N allows for a parallel build using N
processes):
```shell
make -j N ARCH=architecture VERSION=version
```
e.g.
```shell
make -j N ARCH=Linux-gnu-x86_64 VERSION=psmp
```
A CP2K binary should appear in the `./exe/ARCH/` folder.
All compiled files, libraries, binaries, etc. of all architectures and versions can be removed with
```shell
make distclean
```
To remove only `*.o` and `*.mod` files (i.e. keep CP2K binaries in exe) for a given ARCH/VERSION use
```shell
make ARCH=Linux-gnu-x86_64 VERSION=psmp clean
```
To remove everything for a given ARCH/VERSION use
```shell
make ARCH=Linux-gnu-x86_64 VERSION=psmp realclean
```
### 3b. Compilation Flags
The following flags should be present (or not) in the arch file, partially depending on installed
libraries (see 2.)
- `-D__parallel` builds an MPI parallel CP2K binary (implies the use and thus the availabiltity of
the ScaLAPACK/BLACS libraries)
- `-D__LIBINT` use LIBINT (needed for HF exchange)
- `-D__LIBXC` use LIBXC
- `-D__LIBGRPP` use libgrpp (for calculations with ECPs)
- `-D__ELPA` use ELPA in place of SYEVD to solve the eigenvalue problem
- `-D__FFTW3` FFTW version 3 is recommended
- `-D__MKL` link the MKL library for linear algebra and/or FFT
- `-D__GRID_CORE=X` (with X=1..6) specific optimized core routines can be selected. Reasonable
defaults are [provided](./src/grid/collocate_fast.f90) but trial-and-error might yield (a small
~10%) speedup.
- `-D__PILAENV_BLOCKSIZE`: can be used to specify the blocksize (e.g.,
`-D__PILAENV_BLOCKSIZE=1024`), which is a hack to overwrite (if the linker allows this) the
PILAENV function provided by ScaLAPACK. This can lead to much improved PDGEMM performance. The
optimal value depends on hardware (GPU?) and precise problem. Alternatively, Cray provides an
environment variable to this effect (e.g., `export LIBSCI_ACC_PILAENV=4000`)
- `-D__STATM_RESIDENT` or `-D__STATM_TOTAL` toggles memory usage reporting between resident memory
and total memory
- `-D__CRAY_PM_ACCEL_ENERGY` or `-D__CRAY_PM_ENERGY` switch on energy profiling on Cray systems
- `-D__NO_ABORT` to avoid calling abort, but STOP instead (useful for coverage testing, and to avoid
core dumps on some systems)
- `-D__HDF5` enables hdf5 support. This is a hard dependency for SIRIUS and TREXIO, but can also be
used by itself to allow read/write functionalities of QCSchema files in the active space module
- `-D__TREXIO` enables TREXIO I/O support
- `-D__GREENX` enables GREENX support (minimax grids and analytic continuation component)
Features useful to deal with legacy systems
- `-D__NO_MPI_THREAD_SUPPORT_CHECK` - Workaround for MPI libraries that do not declare they are
thread safe (serialized).
- `-D__NO_SOCKETS` disables the socket interface in case of troubles compiling on systems that do
not support POSIX sockets.
- `-D__HAS_IEEE_EXCEPTIONS` disables trapping temporarily for libraries like ScaLAPACK.
- The Makefile automatically compiles in the path to the data directory via the flag `-D__DATA_DIR`.
If you want to compile in a different path, set the variable `DATA_DIR` in your arch-file.
- `-D__NO_STATM_ACCESS` - Do not try to read from /proc/self/statm to get memory usage information.
This is otherwise attempted on several. Linux-based architectures or using with the NAG, gfortran,
compilers.
- `-D__CHECK_DIAG` Debug option which activates an orthonormality check of the eigenvectors
calculated by the selected eigensolver
### 3c. Building CP2K as a library
You can build CP2K for use as a library by adding `libcp2k` as an option to your `make` command,
e.g.
```shell
make -j N ARCH=Linux-gnu-x86_64 VERSION=psmp libcp2k
```
This will create `libcp2k.a` in the relevant subdirectory of `./lib/`. You will need to add this
subdirectory to the library search path of your compiler (typically via the `LD_LIBRARY_PATH`
environment variable or the `-L` option to your compiler) and link to the library itself with
`-lcp2k`.
In order to use the functions in the library you will also require the `libcp2k.h` header file. This
can be found in `./src/start/` directory. You should add this directory to the header search path of
your compiler (typically via the `CPATH` environment variable or the `-I` option to your compiler).
For Fortran users, you will require the module interface file (`.mod` file) for every MODULE
encountered in the source. These are compiler specific and are to be found in the subdirectory of
`./obj/` that corresponds to your build, e.g.,
```shell
./obj/Linux-gnu-x86_64/psmp/
```
In order for your compiler to find these, you will need to indicate their location to the compiler
as is done for header files (typically via the `CPATH` environment variable or the `-I` option to
your compiler).
This section has been moved to the
[manual](https://manual.cp2k.org/trunk/getting-started/build-from-source.html).
## 4. If it doesn't work
If things fail, take a break... go back to 2a (or skip to step 6).
If things fail, take a break... go back to step 2.
## 5. Regtesting
@ -672,7 +98,7 @@ If compilation works fine, it is recommended to test the generated binary, to ex
libraries, or miscompilations, etc.
```shell
make -j ARCH=... VERSION=... test
./tests/do_regtest.py ./build/bin/ ${VERSION}
```
should work if you can locally execute CP2K without the need for, e.g., batch submission.

576
Makefile
View file

@ -1,576 +0,0 @@
#
# make -j 16 ssmp psmp
#
# will now perform a parallel build of 4 cp2k executables
#
SHELL = /bin/sh
#
# the home dir is taken from the current directory.
ifeq ($(CP2KHOME),)
CP2KHOME := $(abspath $(shell pwd))
export CP2KHOME
endif
ARCH := local
export VERSION=ssmp
MAKEFILE := $(CP2KHOME)/Makefile
ARCHDIR := $(CP2KHOME)/arch
DATA_DIR := $(CP2KHOME)/data
MAINEXEDIR := $(CP2KHOME)/exe
MAINLIBDIR := $(CP2KHOME)/lib
MAINOBJDIR := $(CP2KHOME)/obj
MAINTSTDIR := $(CP2KHOME)/regtesting
PRECOMMITDIR := $(CP2KHOME)/obj/precommit
PRETTYOBJDIR := $(CP2KHOME)/obj/prettified
DOXIFYOBJDIR := $(CP2KHOME)/obj/doxified
TOOLSRC := $(CP2KHOME)/tools
SRCDIR := $(CP2KHOME)/src
EXEDIR := $(MAINEXEDIR)/$(ARCH)
REVISION := $(shell $(CP2KHOME)/tools/build_utils/get_revision_number $(SRCDIR))
EXTSDIR := exts
EXTSHOME := $(CP2KHOME)/$(EXTSDIR)
EXTSPACKAGES := $(shell cd $(EXTSHOME) ; find * -maxdepth 0 -type d | grep -v build_ )
PYTHON := /usr/bin/env python3
# Common Targets ============================================================
default_target: all
# Discover programs =========================================================
ifeq ($(ALL_EXE_FILES),)
export ALL_EXE_FILES := $(sort $(shell $(TOOLSRC)/build_utils/discover_programs.py $(SRCDIR)))
endif
EXE_NAMES := $(basename $(notdir $(ALL_EXE_FILES)))
# Once we are down to a single version ======================================
# this only happens on stage 3 and 4
ifneq ($(ONEVERSION),)
MODDEPS = "lower"
include $(ARCHDIR)/$(ARCH).$(ONEVERSION)
LIBDIR := $(MAINLIBDIR)/$(ARCH)/$(ONEVERSION)
PKGCONFIGDIR := $(LIBDIR)/pkgconfig
PKGCONFIG := $(PKGCONFIGDIR)/libcp2k.pc
LIBEXTSDIR := $(LIBDIR)/$(EXTSDIR)
OBJDIR := $(MAINOBJDIR)/$(ARCH)/$(ONEVERSION)
OBJEXTSDIR := $(OBJDIR)/$(EXTSDIR)
OBJEXTSINCL := $(foreach dir,$(EXTSPACKAGES),-I'$(OBJEXTSDIR)/$(dir)')
TSTDIR := $(MAINTSTDIR)/$(ARCH)/$(ONEVERSION)
ifneq ($(LD_SHARED),)
ARCHIVE_EXT := .so
else
ARCHIVE_EXT := .a
endif
include $(EXTSHOME)/Makefile.inc
endif
# Declare PHONY targets =====================================================
.PHONY: $(VERSION) $(EXE_NAMES) \
dirs makedep default_target all \
toolversions exts extversions extclean \
libcp2k cp2k_shell pkgconfig python-bindings \
pre-commit pre-commit-clean \
pretty precommit precommitclean doxygenclean doxygen \
fpretty fprettyclean \
doxify doxifyclean \
install clean realclean distclean help \
test testbg testclean \
data \
$(EXTSPACKAGES)
# Discover files and directories ============================================
#
# File type is derived from name. Only the following extensions are supported:
# .F -> Fortran
# .c -> C
# .h -> C header
# .cu -> CUDA or HIP kernel
ALL_SRC_DIRS := $(shell find $(SRCDIR) -type d | awk '{printf("%s:",$$1)}')
ALL_PKG_FILES = $(shell find $(SRCDIR) -name "PACKAGE")
OBJ_SRC_FILES = $(shell cd $(SRCDIR); find . -name "*.F")
OBJ_SRC_FILES += $(shell cd $(SRCDIR); find . -name "*.c")
ifneq ($(filter nvcc hipcc, $(notdir $(OFFLOAD_CC))),)
OBJ_SRC_FILES += $(shell cd $(SRCDIR); find . -name "*.cu")
endif
# Begrudgingly tolerated because PyTorch has no C API.
OBJ_SRC_FILES += $(SRCDIR)/torch_c_api.cpp
#same as PyTorch
OBJ_SRC_FILES += $(SRCDIR)/ace_c_api.cpp
# Included files used by Fypp preprocessor
INCLUDED_SRC_FILES = $(notdir $(shell find $(SRCDIR) -name "*.fypp"))
# Include also source files which won't compile into an object file
ALL_SRC_FILES = $(strip $(subst $(NULL) .,$(NULL) $(SRCDIR),$(NULL) $(OBJ_SRC_FILES)))
ALL_SRC_FILES += $(shell find $(SRCDIR) -name "*.h")
ALL_OBJECTS = $(addsuffix .o, $(basename $(notdir $(OBJ_SRC_FILES))))
ALL_EXE_OBJECTS = $(addsuffix .o, $(EXE_NAMES))
ALL_NONEXE_OBJECTS = $(filter-out $(ALL_EXE_OBJECTS), $(ALL_OBJECTS))
# stage 1: Call make recursively with each element in $(VERSION) as a target,
# The actual target is stored in ORIG_TARGET.
# Make can then parallelize over multiple versions targets.
ifeq ($(ONEVERSION),)
ORIG_TARGET = default_target
fes:
@+$(MAKE) --no-print-directory -f $(MAKEFILE) $(VERSION) ORIG_TARGET=graph
$(EXE_NAMES) all toolversions extversions extclean libcp2k cp2k_shell exts $(EXTSPACKAGES) python-bindings test testbg:
@+$(MAKE) --no-print-directory -f $(MAKEFILE) $(VERSION) ORIG_TARGET=$@
# stage 2: Store the version target in $(ONEVERSION),
# Call make recursively with $(ORIG_TARGET) as target.
$(filter-out sopt, popt, $(VERSION)):
@+$(MAKE) --no-print-directory -f $(MAKEFILE) $(ORIG_TARGET) ORIG_TARGET="" VERSION="" ONEVERSION=$@
sopt:
@+echo "Version sopt is now an alias for ssmp with OMP_NUM_THREADS=1."
@+$(MAKE) --no-print-directory -f $(MAKEFILE) $(ORIG_TARGET) ORIG_TARGET="" VERSION="" ONEVERSION="ssmp"
popt:
@+echo "Version popt is now an alias for psmp with OMP_NUM_THREADS=1."
@+$(MAKE) --no-print-directory -f $(MAKEFILE) $(ORIG_TARGET) ORIG_TARGET="" VERSION="" ONEVERSION="psmp"
else
# stage 3: Include arch-file, create dirs, and run makedep.py for given $(ONEVERSION).
# Afterwards, call make recursively again with -C $(OBJDIR) and INCLUDE_DEPS=true
ifeq ($(INCLUDE_DEPS),)
$(EXE_NAMES): makedep | dirs exts
@+$(MAKE) --no-print-directory -C $(OBJDIR) -f $(MAKEFILE) $(EXEDIR)/$@.$(ONEVERSION) INCLUDE_DEPS=true
all: makedep | dirs exts
@+$(MAKE) --no-print-directory -C $(OBJDIR) -f $(MAKEFILE) all INCLUDE_DEPS=true
# compilation for testing happens here
test: dirs makedep all
@$(TOOLSRC)/regtesting/print_environment.sh $(ARCH) $(ONEVERSION)
@+$(MAKE) --no-print-directory -C $(TSTDIR) -f $(MAKEFILE) test INCLUDE_DEPS=true
testbg: dirs makedep all
@+$(MAKE) --no-print-directory -C $(TSTDIR) -f $(MAKEFILE) testbg INCLUDE_DEPS=true
libcp2k: pkgconfig makedep | dirs exts
@+$(MAKE) --no-print-directory -C $(OBJDIR) -f $(MAKEFILE) $(LIBDIR)/libcp2k$(ARCHIVE_EXT) INCLUDE_DEPS=true
python-bindings: libcp2k
@cd $(SRCDIR)/start/python ; \
env CC='$(CC)' LDSHARED='$(LD) -shared' CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS) $(LDFLAGS_C) $(LIBS)' \
$(PYTHON) setup.py build_ext \
--build-temp="$(OBJDIR)/python" \
--build-lib="$(LIBDIR)/python" \
--library-dirs="$(LIBDIR)" \
--libraries="$(patsubst -l%,%,$(filter -l%,$(LIBS)))"
exts: $(EXTSPACKAGES)
dirs:
@mkdir -p $(OBJDIR)
@mkdir -p $(OBJEXTSDIR)
@mkdir -p $(LIBDIR)
@mkdir -p $(PKGCONFIGDIR)
@mkdir -p $(LIBEXTSDIR)
@mkdir -p $(EXEDIR)
@mkdir -p $(TSTDIR)
pkgconfig: dirs
@echo "Writing pkg-config $(PKGCONFIG)"
@echo "Name: libcp2k" > $(PKGCONFIG)
@echo "Description: CP2K as a library" >> $(PKGCONFIG)
@echo "URL: https://www.cp2k.org" >> $(PKGCONFIG)
@echo "Version: $(REVISION)" >> $(PKGCONFIG)
@echo "includedir=$(SRCDIR)/start" >> $(PKGCONFIG)
@echo "Cflags: -I\$${includedir}" >> $(PKGCONFIG)
@echo "libdir=$(LIBDIR)" >> $(PKGCONFIG)
@echo "Libs: -L\$${libdir} -Wl,-rpath=\$${libdir} -lcp2k $(LDFLAGS) $(LIBS)" >> $(PKGCONFIG)
toolversions:
ifneq ($(FC),)
@echo "=========== FC ($(ONEVERSION)) ==========="
ifeq (Cray,$(shell $(CC) -V 2>&1 | head -n1 | cut -d' ' -f1))
$(FC) -V
else ifeq (IBM,$(shell $(CC) -qversion 2>&1 | head -n1 | cut -d' ' -f1))
$(FC) -qversion
else
$(FC) --version
endif
endif
ifneq ($(CC),)
@echo "=========== CC ($(ONEVERSION)) ==========="
ifeq (Cray,$(shell $(CC) -V 2>&1 | head -n1 | cut -d' ' -f1))
$(CC) -V
else ifeq (IBM,$(shell $(CC) -qversion 2>&1 | head -n1 | cut -d' ' -f1))
$(CC) -qversion
else
$(CC) --version
endif
endif
ifneq ($(OFFLOAD_CC),)
@echo "========== OFFLOAD_CC ($(ONEVERSION)) =========="
$(OFFLOAD_CC) --version
@echo ""
endif
ifneq ($(AR),)
ifeq (Linux,$(shell uname -s))
@echo "=========== AR ($(ONEVERSION)) ==========="
$(firstword $(AR)) V
@echo ""
endif
endif
@echo "========== Make ($(ONEVERSION)) =========="
$(MAKE) --version
@echo ""
@echo "========= Python ($(ONEVERSION)) ========="
$(PYTHON) --version
else
# Force CP2K recompilations if exts are updated
$(ALL_OBJECTS): $(EXTSDEPS_MOD)
$(ALL_EXE_OBJECTS): $(EXTSDEPS_LIB)
# stage 4: Include $(OBJDIR)/all.dep, expand target all and libcp2k, and perform actual build.
ifeq ("$(ONEVERSION)","psmp")
all: $(foreach e, $(EXE_NAMES) cp2k_shell, $(EXEDIR)/$(e).$(ONEVERSION)) $(EXEDIR)/cp2k.popt
else ifeq ("$(ONEVERSION)","ssmp")
all: $(foreach e, $(EXE_NAMES) cp2k_shell, $(EXEDIR)/$(e).$(ONEVERSION)) $(EXEDIR)/cp2k.sopt
else
all: $(foreach e, $(EXE_NAMES) cp2k_shell, $(EXEDIR)/$(e).$(ONEVERSION))
endif
$(LIBDIR)/libcp2k$(ARCHIVE_EXT) : $(ALL_NONEXE_OBJECTS)
# Create always a cp2k.[ps]opt soft link for each cp2k.[ps]smp executable
$(EXEDIR)/cp2k.sopt: $(EXEDIR)/cp2k.ssmp
cd $(EXEDIR); ln -sf cp2k.ssmp cp2k.sopt
$(EXEDIR)/cp2k.popt: $(EXEDIR)/cp2k.psmp
cd $(EXEDIR); ln -sf cp2k.psmp cp2k.popt
$(EXEDIR)/cp2k_shell.$(ONEVERSION): $(EXEDIR)/cp2k.$(ONEVERSION)
cd $(EXEDIR); ln -sf cp2k.$(ONEVERSION) cp2k_shell.$(ONEVERSION)
test:
@$(CP2KHOME)/tests/do_regtest.py --workbasedir $(TSTDIR) $(EXEDIR) $(ONEVERSION) $(TESTOPTS)
testbg:
@echo "testing: $(ONEVERSION) : full log in $(TSTDIR)/regtest.log "
@$(CP2KHOME)/tests/do_regtest.py --workbasedir $(TSTDIR) $(EXEDIR) $(ONEVERSION) $(TESTOPTS) > $(TSTDIR)/regtest.log 2>&1
@grep -e "Summary:" -e "Status:" $(TSTDIR)/regtest.log
endif
endif
OTHER_HELP += "test : run the regression tests"
OTHER_HELP += "testbg : run the regression tests in background"
OTHER_HELP += "toolversions : Print versions of build tools"
OTHER_HELP += "extversions : Print versions of external modules"
OTHER_HELP += "extclean : Clean build of external modules"
# extract help text from doxygen "\brief"-tag
help:
@echo "=================== Binaries ===================="
@echo "all Builds all executables (default target)"
@for i in $(ALL_EXE_FILES); do \
basename $$i | sed 's/^\(.*\)\..*/\1/' | awk '{printf "%-28s", $$1}'; \
grep "brief" $$i | head -n 1 | sed 's/^.*\\brief\s*//'; \
done
@echo "libcp2k Builds CP2K as a single library archive"
@echo "cp2k_shell Creates symlink for backward compatibility"
@echo ""
@echo "===================== Tools ====================="
@printf "%s\n" $(TOOL_HELP) | awk -F ':' '{printf "%-28s%s\n", $$1, $$2}'
@echo ""
@echo "================= Other Targets ================="
@printf "%s\n" $(OTHER_HELP) | awk -F ':' '{printf "%-28s%s\n", $$1, $$2}'
@echo "help Print this help text"
#
# so far CP2K does not install, but give a hint to the user
#
install:
@echo ""
@echo "The CP2K executable is $(foreach v, $(VERSION), $(EXEDIR)/cp2k.$(v))"
@echo ""
OTHER_HELP += "install : Print installation help"
#
# delete the intermediate files, but not the libraries and executables, or created directories.
# Most useful to save space on the disk or e.g. for recompiles with PGO that still needs the .gcda files in the objdir
#
# To avoid printing out all non-gcda files within a directory with 'make clean',
# a list of all non-gcda file extensions within a directory is first created with the get_extensions macro,
# and a wildcard expression is then used to remove the appropriate files
# cleaning stuff ============================================================
define get_extensions
$(shell test -d $(1) && find $(1) -type f -name "*.*" ! -name "*.gcda" | sed 's|.*\.||' | sort -u)
endef
clean:
@echo rm -rf $(foreach v, $(VERSION), $(MAINOBJDIR)/$(ARCH)/$(v))
@$(foreach v, $(VERSION), $(foreach ext, $(call get_extensions, $(MAINOBJDIR)/$(ARCH)/$(v)/), $(shell rm -rf $(MAINOBJDIR)/$(ARCH)/$(v)/*.$(ext))))
rm -rf $(foreach v, $(VERSION), $(MAINLIBDIR)/$(ARCH)/$(v))
OTHER_HELP += "clean : Remove intermediate object and mod files, but not the libraries and executables, for given ARCH and VERSION"
# The Intel compiler creates a corresponding .dbg file for each executable when static linking of the Intel MPI library is requested (flag -static_mpi)
# and also potential soft links (.popt and .sopt files) have to be cleaned
execlean:
rm -rf $(foreach v, $(VERSION), $(EXEDIR)/*.$(v) $(EXEDIR)/*.$(v).dbg) $(EXEDIR)/cp2k.[ps]opt
OTHER_HELP += "execlean : Remove the executables, for given ARCH and VERSION"
#
# delete the intermediate files, the programs and libraries and anything that might be in the objdir or libdir directory
# Use this if you want to fully rebuild an executable (for a given compiler and or VERSION)
#
realclean: extclean clean execlean
rm -rf $(foreach v, $(VERSION), $(MAINOBJDIR)/$(ARCH)/$(v))
rm -rf $(foreach v, $(VERSION), $(MAINLIBDIR)/$(ARCH)/$(v))
OTHER_HELP += "realclean : Remove all files for given ARCH and VERSION"
testclean:
rm -rf $(foreach v, $(VERSION), $(MAINTSTDIR)/$(ARCH)/$(v)/TEST-* $(MAINTSTDIR)/$(ARCH)/$(v)/regtest.log)
OTHER_HELP += "testclean : Remove all TEST-* files for given ARCH and VERSION"
#
# Remove all files from previous builds
#
distclean: precommitclean fprettyclean doxifyclean
rm -rf $(DOXYGENDIR) $(MAINEXEDIR) $(MAINOBJDIR) $(MAINLIBDIR) $(MAINTSTDIR)
OTHER_HELP += "distclean : Remove all files from previous builds"
# Prettyfier stuff ==========================================================
vpath %.pretty $(PRETTYOBJDIR)
fpretty: $(addprefix $(PRETTYOBJDIR)/, $(ALL_OBJECTS:.o=.pretty)) $(addprefix $(PRETTYOBJDIR)/, $(INCLUDED_SRC_FILES:.f90=.pretty_included))
TOOL_HELP += "fpretty : Reformat all Fortran source files in a pretty way."
fprettyclean:
-rm -rf $(PRETTYOBJDIR)
TOOL_HELP += "fprettyclean : Remove prettify marker files and preprettify directories"
$(PRETTYOBJDIR)/%.pretty: %.F $(DOXIFYOBJDIR)/%.doxified
@mkdir -p $(PRETTYOBJDIR)
cd $(dir $<); $(TOOLSRC)/precommit/format_fortran.py --do-backup --backup-dir=$(PRETTYOBJDIR) $(notdir $<)
@touch $@
$(PRETTYOBJDIR)/%.pretty_included: %.f90 $(DOXIFYOBJDIR)/%.doxified_included
@mkdir -p $(PRETTYOBJDIR)
cd $(dir $<); $(TOOLSRC)/precommit/format_fortran.py --do-backup --backup-dir=$(PRETTYOBJDIR) $(notdir $<)
@touch $@
$(PRETTYOBJDIR)/%.pretty: %.c $(DOXIFYOBJDIR)/%.doxified
# TODO: call indent here?
@mkdir -p $(PRETTYOBJDIR)
@touch $@
$(PRETTYOBJDIR)/%.pretty: %.cpp $(DOXIFYOBJDIR)/%.doxified
# TODO: call indent here?
@mkdir -p $(PRETTYOBJDIR)
@touch $@
# Doxyifier stuff ===========================================================
vpath %.doxified $(DOXIFYOBJDIR)
doxify: $(addprefix $(DOXIFYOBJDIR)/, $(ALL_OBJECTS:.o=.doxified)) $(addprefix $(DOXIFYOBJDIR)/, $(INCLUDED_SRC_FILES:.f90=.doxified_included))
TOOL_HELP += "doxify : Autogenerate doxygen headers for subroutines"
doxifyclean:
-rm -rf $(DOXIFYOBJDIR)
TOOL_HELP += "doxifyclean : Remove doxify marker files"
$(DOXIFYOBJDIR)/%.doxified: %.F
$(TOOLSRC)/doxify/doxify.sh $<
@mkdir -p $(DOXIFYOBJDIR)
@touch $@
$(DOXIFYOBJDIR)/%.doxified_included: %.f90
$(TOOLSRC)/doxify/doxify.sh $<
@mkdir -p $(DOXIFYOBJDIR)
@touch $@
$(DOXIFYOBJDIR)/%.doxified: %.c
@mkdir -p $(DOXIFYOBJDIR)
@touch $@
$(DOXIFYOBJDIR)/%.doxified: %.cpp
@mkdir -p $(DOXIFYOBJDIR)
@touch $@
# doxygen stuff =============================================================
doxygenclean:
-rm -rf $(CP2KHOME)/doxygen
TOOL_HELP += "doxygenclean : Remove the generated doxygen documentation"
doxygen: doxygenclean
$(TOOLSRC)/doxify/generate_doxygen.sh
TOOL_HELP += "doxygen : Generate the doxygen documentation"
# Precommit stuff ===========================================================
pretty: precommit
TOOL_HELP += "pretty : Alias for precommit."
precommit:
$(TOOLSRC)/precommit/precommit.py --allow-modifications
TOOL_HELP += "precommit : Run precommit checks."
precommitclean:
-rm -rf $(PRECOMMITDIR)
TOOL_HELP += "precommitclean : Remove temporary files from precommit checks."
# pre-commit script for manual execution ====================================
pre-commit:
@$(TOOLSRC)/pre-commit-install.sh
@$(CP2KHOME)/.pre-commit-env/bin/pre-commit run -a
TOOL_HELP += "pre-commit : Install pre-commit tools, register git hooks and run a full pre-commit check"
pre-commit-clean:
-@$(CP2KHOME)/.pre-commit-env/bin/pre-commit uninstall
-@$(CP2KHOME)/.pre-commit-env/bin/pre-commit clean
-rm -rf $(CP2KHOME)/.pre-commit-env
TOOL_HELP += "pre-commit-clean : Uninstall git hooks, drop the pre-commit tool cache and remove its environment"
# data stuff ================================================================
data: data/POTENTIAL
@:
data/POTENTIAL: data/GTH_POTENTIALS data/HF_POTENTIALS data/NLCC_POTENTIALS data/ALL_POTENTIALS
@echo "(re-)generating $@ ..."
@cat $^ > $@
OTHER_HELP += "data : (re-)generate merged data files (e.g. data/POTENTIALS)"
# automatic dependency generation ===========================================
MAKEDEPMODE = "normal"
ifeq ($(HACKDEP),yes)
MAKEDEPMODE = "hackdep"
else
ifneq ($(MC),)
MAKEDEPMODE = "mod_compiler"
endif
endif
# this happens on stage 3
makedep: $(ALL_SRC_FILES) $(ALL_PKG_FILES) dirs
ifeq ($(LD_SHARED),)
@echo "Removing stale archives for $(ONEVERSION) ... "
@$(TOOLSRC)/build_utils/check_archives.py $(firstword $(AR)) $(SRCDIR) $(LIBDIR)
endif
@echo "Resolving dependencies for $(ONEVERSION) ... "
@$(TOOLSRC)/build_utils/makedep.py $(OBJDIR)/all.dep cp2k $(MODDEPS) $(MAKEDEPMODE) $(ARCHIVE_EXT) $(SRCDIR) $(OBJ_SRC_FILES)
# on stage 4, load the rules generated by makedep.py
ifeq ($(INCLUDE_DEPS), true)
include $(OBJDIR)/all.dep
endif
# ================= Stuff need for compiling (stage 4) ======================
# These rules are executed in a recursive call to make -C $(OBJDIR)
# The change of $(CURDIR) allows to find targets without abs paths and vpaths.
### Slave rules ###
vpath %.F $(ALL_SRC_DIRS)
vpath %.h $(ALL_SRC_DIRS)
vpath %.f90 $(ALL_SRC_DIRS)
vpath %.cu $(ALL_SRC_DIRS)
vpath %.c $(ALL_SRC_DIRS)
vpath %.cpp $(ALL_SRC_DIRS)
#
# Add additional dependency of cp2k_info.F to git-HEAD.
# Ensuring that cp2k prints the correct source code revision number in its banner.
#
GIT_REF := ${MAINOBJDIR}/git-ref
# use a force (fake) target to always rebuild this file but have Make consider this updated
# iff it was actually rewritten (a .PHONY target is always considered new)
$(GIT_REF): FORCE
echo $(REVISION) > "$@.tmp"
@cmp "$@.tmp" "$@" || mv -f "$@.tmp" "$@"
FORCE: ;
cp2k_info.o: $(GIT_REF)
# Add some practical metadata about the build.
FCFLAGS += -D__COMPILE_ARCH="\"$(ARCH)\""\
-D__COMPILE_DATE="\"$(shell date)\""\
-D__COMPILE_HOST="\"$(shell hostname 2>/dev/null || hostnamectl --transient)\""\
-D__COMPILE_REVISION="\"$(strip $(REVISION))\""\
-D__DATA_DIR="\"$(DATA_DIR)\""
# $(FCLOGPIPE) can be used to store compiler output, e.g. warnings, for each F-file separately.
# This is used e.g. by the convention checker.
FYPPFLAGS ?= -n
%.o: %.F
$(TOOLSRC)/build_utils/fypp $(FYPPFLAGS) $< $*.F90
$(FC) -c $(FCFLAGS) -D__SHORT_FILE__="\"$(subst $(SRCDIR)/,,$<)\"" -I'$(dir $<)' $(OBJEXTSINCL) $*.F90 $(FCLOGPIPE)
%.o: %.c
$(CC) -c $(CFLAGS) $<
%.o: %.cu
$(OFFLOAD_CC) -c $(OFFLOAD_FLAGS) $<
# Disable built-in rules for C++.
%.o: %.cc
@echo "Error: C++ is not supported: $<"; false
%.o: %.cpp
@echo "Error: C++ is not supported: $<"; false
%.o: %.C
@echo "Error: C++ is not supported: $<"; false
# Begrudgingly tolerated because PyTorch has no C API.
torch_c_api.o: torch_c_api.cpp
$(CXX) -c $(CXXFLAGS) $<
# same as PyTorch
ace_c_api.o: ace_c_api.cpp
$(CXX) -c $(CXXFLAGS) $<
ifneq ($(LIBDIR),)
$(LIBDIR)/%:
ifneq ($(LD_SHARED),)
@echo "Creating shared library $@"
@$(LD_SHARED) $(LDFLAGS) -o $(@:.a=.so) $^ $(LIBS)
else
@echo "Updating archive $@"
@$(AR) $@ $?
endif
ifneq ($(RANLIB),)
@$(RANLIB) $@
endif
endif
# module compiler magic =====================================================
ifeq ($(MC),)
#
# here we cheat... this tells make that .mod can be generated from .o (this holds in CP2K) by doing nothing
# it avoids recompilation if .o is more recent than .F, but .mod is older than .F
# (because it didn't change, as e.g. g95 can do)
#
# this is problematic if the module names are uppercase e.g. KINDS.mod (because this rule expands to kinds.mod)
#
%.mod: %.o
@true
else
#
# if MC is defined, it is our 'module compiler' which generates the .mod file from the source file
# it is useful in a two-stage compile.
#
%.mod: %.F
$(MC) -c $(FCFLAGS) -D__SHORT_FILE__="\"$(subst $(SRCDIR)/,,$<)\"" $<
endif
#EOF

View file

@ -2,9 +2,8 @@
[![Release Status][release-badge]][release-link] [![Debian Status][debian-badge]][debian-link]
[![Fedora Status][fedora-badge]][fedora-link] [![Ubuntu Status][ubuntu-badge]][ubuntu-link]
[![Arch Status][arch-badge]][arch-link] [![Homebrew Status][homebrew-badge]][homebrew-link]
[![Docker Status][docker-badge]][docker-link] [![Spack Status][spack-badge]][spack-link]
[![Conda Status][conda-badge]][conda-link]
[![Homebrew Status][homebrew-badge]][homebrew-link] [![Docker Status][docker-badge]][docker-link]
[![Spack Status][spack-badge]][spack-link] [![Conda Status][conda-badge]][conda-link]
CP2K is a quantum chemistry and solid state physics software package that can perform atomistic
simulations of solid state, liquid, molecular, periodic, material, crystal, and biological systems.
@ -16,18 +15,17 @@ Monte Carlo, Ehrenfest dynamics, vibrational analysis, core level spectroscopy,
and transition state optimization using NEB or dimer method.
CP2K is written in Fortran 2008 and can be run efficiently in parallel using a combination of
multi-threading, MPI, and CUDA.
multi-threading, MPI, and GPU acceleration (CUDA for NVIDIA GPUs, HIP/ROCm for AMD GPUs, and
OpenCL).
## Downloading CP2K source code
To clone the current master (development version):
```shell
git clone --recursive https://github.com/cp2k/cp2k.git cp2k
git clone https://github.com/cp2k/cp2k.git cp2k
```
Note the `--recursive` flag that is needed because CP2K uses git submodules.
To clone a release version v*x.y*:
```shell
@ -39,10 +37,14 @@ help on git, see [Git Tips & Tricks](https://github.com/cp2k/cp2k/wiki/Git-Tips-
## Install CP2K
The easiest way to build CP2K with all of its dependencies is as a
[Docker container](./tools/docker/README.md).
CP2K manual provides installation instructions for below available methods:
For building CP2K from scratch see the [installation instructions](./INSTALL.md).
- [Build from Source](https://manual.cp2k.org/trunk/getting-started/build-from-source.html)
- [Build with Spack](https://manual.cp2k.org/trunk/getting-started/build-with-spack.html)
- [Install from Distribution](https://manual.cp2k.org/trunk/getting-started/distributions.html)
For building CP2K from scratch, including GPU acceleration for NVIDIA (CUDA), AMD (HIP/ROCm), or
OpenCL devices, also see the [installation instructions](./INSTALL.md).
## Links
@ -59,22 +61,12 @@ For building CP2K from scratch see the [installation instructions](./INSTALL.md)
## Directory organization
- [`arch`](./arch): Collection of definitions for different architectures and compilers
- [`benchmarks`](./benchmarks): Inputs for benchmarks
- [`data`](./data): Simulation parameters e.g. basis sets and pseudopotentials
- [`exts`](./exts): Access to external libraries via GIT submodules
- [`src`](./src): The source code
- [`data`](./data): Simulation parameters e.g. basis sets and pseudopotentials
- [`tests`](./tests): Inputs for tests and regression tests
- [`tools`](./tools): Mixed collection of useful scripts related to cp2k
- [`benchmarks`](./benchmarks): Inputs for benchmarks
Additional directories created during build process:
- `lib`: Libraries built during compilation
- `obj`: Objects and other intermediate compilation-time files
- `exe`: Where the executables will be located
[arch-badge]: https://img.shields.io/aur/version/cp2k
[arch-link]: https://aur.archlinux.org/packages/cp2k
[conda-badge]: https://img.shields.io/conda/vn/conda-forge/cp2k
[conda-link]: https://anaconda.org/conda-forge/cp2k
[debian-badge]: https://img.shields.io/debian/v/cp2k

View file

@ -1,18 +0,0 @@
# With GCC 4.9 or later, for gcc and gfortran
# With a recent OpenMPI and scalapack installed
# libxc is installed in LIBXC_INCLUDE_DIR / LIBXC_LIB_DIR
# libint is installed in LIBINT_INCLUDE_DIR / LIBINT_LIB_DIR
CC = gcc
FC = mpifort
LD = mpifort
AR = ar -r
RANLIB = ranlib
CFLAGS = -O2 -fopenmp -g
DFLAGS = -D__parallel \
-D__NO_STATM_ACCESS -D__ACCELERATE -D__LIBXC -D__LIBINT
FCFLAGS = -I $(LIBXC_INCLUDE_DIR) -I $(LIBINT_INCLUDE_DIR) -fopenmp -O2 -g \
-funroll-loops -ftree-vectorize -ffree-form $(DFLAGS)
LDFLAGS = $(FCFLAGS)
LIBS = -framework Accelerate -lscalapack \
-L$(LIBXC_LIB_DIR) -lxcf03 -lxc \
-L$(LIBINT_LIB_DIR) -lint2 -lstdc++

View file

@ -1,16 +0,0 @@
# With GCC 4.9 or later, for gcc and gfortran
# libxc is installed in LIBXC_INCLUDE_DIR / LIBXC_LIB_DIR
# libint is installed in LIBINT_INCLUDE_DIR / LIBINT_LIB_DIR
CC = gcc
FC = gfortran
LD = gfortran
AR = ar -r
RANLIB = ranlib
CFLAGS = -O2 -fopenmp -g
DFLAGS = -D__NO_STATM_ACCESS -D__ACCELERATE -D__LIBXC -D__LIBINT
FCFLAGS = -I $(LIBXC_INCLUDE_DIR) -I $(LIBINT_INCLUDE_DIR) -fopenmp -funroll-loops \
-ftree-vectorize -ffree-form -O2 -g $(DFLAGS)
LDFLAGS = $(FCFLAGS)
LIBS = -framework Accelerate \
-L$(LIBXC_LIB_DIR) -lxcf03 -lxc \
-L$(LIBINT_LIB_DIR) -lint2 -lstdc++

View file

@ -1,359 +0,0 @@
#!/bin/bash
#
# CP2K Darwin arch file for a parallel arm64 binary
# (https://www.cp2k.org/howto:compile_on_macos)
#
# Tested with: GNU 14.3.0 and OpenMPI 5.0.7 on an Apple M1 (macOS 15.5 Sequoia)
#
# Usage: Source this arch file and then run make as instructed.
# Ensure the links in /opt/homebrew/bin to the gcc version
# and "brew unlink openmpi" (or mpich) if installed.
#
# Last update: 12.06.2025
#
# \
if [[ "${0}" == "${BASH_SOURCE}" ]]; then \
echo "ERROR: Script ${0##*/} must be sourced"; \
echo "Usage: source ${0##*/}"; \
exit 1; \
fi; \
this_file=${BASH_SOURCE##*/}; \
cd tools/toolchain; \
rm -rf build; \
[[ -z "${mpi_implementation}" ]] && mpi_implementation="openmpi"; \
[[ -z "${target_cpu}" ]] && target_cpu="native"; \
if $(command -v brew >/dev/null 2>&1); then \
brew install coreutils; \
brew install fftw; \
brew install gawk; \
brew install gcc@14; \
brew install gmp; \
brew install gsed; \
brew install gsl; \
brew install hdf5; \
brew install libaec; \
brew install libxc; \
brew install ninja; \
brew install openblas; \
brew install pkg-config; \
brew install wget; \
brew install zlib; \
else \
echo "ERROR: Homebrew installation not found"; \
echo ' Run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"'; \
cd ../..; \
return 1; \
fi; \
./install_cp2k_toolchain.sh --install-all -j${maxtasks} --no-arch-files --target-cpu=${target_cpu} \
--with-elpa=no --with-fftw=$(brew --prefix fftw) --with-gcc=system --with-gsl=$(brew --prefix gsl) \
--with-hdf5=$(brew --prefix hdf5) --with-libxc=$(brew --prefix libxc) --with-ninja=$(brew --prefix ninja) \
--with-openblas=$(brew --prefix openblas) --with-${mpi_implementation} --with-gmp=$(brew --prefix gmp) \
--with-libgrpp --with-libsmeagol --with-libtorch=no --with-deepmd=no; \
source ./install/setup; \
cd ../..; \
echo; \
echo "Check the output above for error messages and consistency!"; \
echo; \
echo "If everything is OK, you can build a CP2K production binary with"; \
echo " make -j ARCH=${this_file%.*} VERSION=${this_file##*.} TARGET_CPU=${target_cpu}"; \
echo; \
echo "The Accelerate framework is used instead of OpenBLAS with"; \
echo " make -j ARCH=${this_file%.*} VERSION=${this_file##*.} TARGET_CPU=${target_cpu} USE_OPENBLAS="; \
echo; \
echo "Run always the following command before using the CP2K binary"; \
echo " source ${PWD}/tools/toolchain/install/setup"; \
echo; \
return
# Set options
DO_CHECKS := no
TARGET_CPU := native
# Retrieve package versions
GNU_VER := $(shell gcc -dumpfullversion)
USE_ACE := $(ACE_VER)
USE_COSMA := $(COSMA_VER)
USE_DFTD4 := $(DFTD4_VER)
USE_GREENX := $(GREENX_VER)
USE_LIBGRPP := install
USE_LIBINT := $(LIBINT_VER)
USE_LIBSMEAGOL := $(LIBSMEAGOL_VER)
USE_LIBVORI := $(LIBVORI_VER)
USE_LIBXSMM := $(LIBXSMM_VER)
USE_OPENBLAS := $(OPENBLAS_VER)
USE_PLUMED := $(PLUMED_VER)
USE_SCALAPACK := $(SCALAPACK_VER)
USE_SIRIUS := $(SIRIUS_VER)
USE_SPFFT := $(SPFFT_VER)
USE_SPGLIB := $(SPGLIB_VER)
USE_SPLA := $(SPLA_VER)
USE_TBLITE := $(TBLITE_VER)
USE_TREXIO := $(TREXIO_VER)
LMAX := 5
MAX_CONTR := 4
CC := mpicc
FC := mpifort
LD := mpifort
AR := ar -r -s
CFLAGS := -O2 -fopenmp -fopenmp-simd -ftree-vectorize -funroll-loops -g -mtune=$(TARGET_CPU)
DFLAGS := -D__parallel
DFLAGS += -D__MPI_F08
DFLAGS += -D__MAX_CONTR=$(strip $(MAX_CONTR))
DFLAGS += -D__NO_STATM_ACCESS
INSTALL_PATH := $(PWD)/tools/toolchain/install
# Settings for regression testing
ifeq ($(DO_CHECKS), yes)
DFLAGS += -D__CHECK_DIAG
FCFLAGS_DEBUG := -fcheck=bounds,do,recursion,pointer
FCFLAGS_DEBUG += -fcheck=all,no-array-temps
# FCFLAGS_DEBUG += -ffpe-trap=invalid,overflow,zero
FCFLAGS_DEBUG += -fimplicit-none
FCFLAGS_DEBUG += -finit-derived
FCFLAGS_DEBUG += -finit-real=snan
FCFLAGS_DEBUG += -finit-integer=-42
FCFLAGS_DEBUG += -finline-matmul-limit=0
WFLAGS := -Werror=aliasing
WFLAGS += -Werror=ampersand
WFLAGS += -Werror=c-binding-type
WFLAGS += -Werror=conversion
WFLAGS += -Werror=intrinsic-shadow
WFLAGS += -Werror=intrinsics-std
WFLAGS += -Werror=line-truncation
WFLAGS += -Wrealloc-lhs
WFLAGS += -Werror=tabs
WFLAGS += -Werror=target-lifetime
WFLAGS += -Werror=underflow
WFLAGS += -Werror=unused-but-set-variable
WFLAGS += -Werror=unused-dummy-argument
WFLAGS += -Werror=unused-variable
endif
ifneq ($(USE_PLUMED),)
USE_PLUMED := $(strip $(USE_PLUMED))
PLUMED_LIB := $(INSTALL_PATH)/plumed-$(USE_PLUMED)/lib
DFLAGS += -D__PLUMED2
LIBS += $(PLUMED_LIB)/libplumed.a
endif
ifneq ($(USE_LIBVORI),)
USE_LIBVORI := $(strip $(USE_LIBVORI))
LIBVORI_LIB := $(INSTALL_PATH)/libvori-$(USE_LIBVORI)/lib
DFLAGS += -D__LIBVORI
LIBS += $(LIBVORI_LIB)/libvori.a
endif
LIBXC_HOME := $(shell brew --prefix libxc)
CFLAGS += -I$(LIBXC_HOME)/include
DFLAGS += -D__LIBXC
LIBS += -L$(LIBXC_HOME)/lib -lxcf03 -lxc
ifeq ($(USE_TBLITE),)
ifneq ($(USE_DFTD4),)
USE_DFTD4 := $(strip $(USE_DFTD4))
DFTD4_INC := $(INSTALL_PATH)/dftd4-$(USE_DFTD4)/include
DFTD4_LIB := $(INSTALL_PATH)/dftd4-$(USE_DFTD4)/lib
CFLAGS += -I$(DFTD4_INC)/dftd4/GNU-$(GNU_VER)
DFLAGS += -D__DFTD4
LIBS += -L$(DFTD4_LIB) -ldftd4 -lmstore -lmulticharge -lmctc-lib
endif
endif
ifneq ($(USE_LIBGRPP),)
USE_LIBGRPP := $(strip $(USE_LIBGRPP))
DFLAGS += -D__LIBGRPP
endif
ifneq ($(USE_ACE),)
USE_ACE := $(strip $(USE_ACE))
ACE_INC := $(INSTALL_PATH)/lammps-user-pace-$(USE_ACE)/include
ACE_LIB := $(INSTALL_PATH)/lammps-user-pace-$(USE_ACE)/lib
CFLAGS += -I$(ACE_INC)
DFLAGS += -D__ACE
LIBS += $(ACE_LIB)/libpace.a
LIBS += $(ACE_LIB)/libyaml-cpp-pace.a
LIBS += $(ACE_LIB)/libcnpy.a
endif
ifneq ($(USE_GREENX),)
USE_GREENX := $(strip $(USE_GREENX))
GREENX_INC := $(INSTALL_PATH)/greenX-$(USE_GREENX)/include/modules
GREENX_LIB := $(INSTALL_PATH)/greenX-$(USE_GREENX)/lib
CFLAGS += -I$(GREENX_INC)
DFLAGS += -D__GREENX
LIBS += -L$(GREENX_LIB) -lGXCommon -lgx_ac -lgx_minimax
endif
ifneq ($(USE_LIBINT),)
USE_LIBINT := $(strip $(USE_LIBINT))
LMAX := $(strip $(LMAX))
LIBINT_INC := $(INSTALL_PATH)/libint-v$(USE_LIBINT)-cp2k-lmax-$(LMAX)/include
LIBINT_LIB := $(INSTALL_PATH)/libint-v$(USE_LIBINT)-cp2k-lmax-$(LMAX)/lib
CFLAGS += -I$(LIBINT_INC)
DFLAGS += -D__LIBINT
LIBS += $(LIBINT_LIB)/libint2.a
endif
ifneq ($(USE_SPGLIB),)
USE_SPGLIB := $(strip $(USE_SPGLIB))
SPGLIB_INC := $(INSTALL_PATH)/spglib-$(USE_SPGLIB)/include
SPGLIB_LIB := $(INSTALL_PATH)/spglib-$(USE_SPGLIB)/lib
CFLAGS += -I$(SPGLIB_INC)
DFLAGS += -D__SPGLIB
LIBS += $(SPGLIB_LIB)/libsymspg.a
endif
ifneq ($(USE_LIBXSMM),)
USE_LIBXSMM := $(strip $(USE_LIBXSMM))
LIBXSMM_INC := $(INSTALL_PATH)/libxsmm-$(USE_LIBXSMM)/include
LIBXSMM_LIB := $(INSTALL_PATH)/libxsmm-$(USE_LIBXSMM)/lib
CFLAGS += -I$(LIBXSMM_INC)
DFLAGS += -D__LIBXSMM
LIBS += $(LIBXSMM_LIB)/libxsmmf.a
LIBS += $(LIBXSMM_LIB)/libxsmmext.a
LIBS += $(LIBXSMM_LIB)/libxsmm.a
endif
ifneq ($(USE_SIRIUS),)
USE_SIRIUS := $(strip $(USE_SIRIUS))
LIBVDWXC_INC := $(INSTALL_PATH)/libvdwxc-$(LIBVDWXC_VER)/include
LIBVDWXC_LIB := $(INSTALL_PATH)/libvdwxc-$(LIBVDWXC_VER)/lib
PUGIXML_LIB := $(INSTALL_PATH)/pugixml-$(PUGIXML_VER)/lib
SIRIUS_INC := $(INSTALL_PATH)/sirius-$(USE_SIRIUS)/include/sirius
SIRIUS_LIB := $(INSTALL_PATH)/sirius-$(USE_SIRIUS)/lib
CFLAGS += -I$(LIBVDWXC_INC)
CFLAGS += -I$(SIRIUS_INC)
DFLAGS += -D__LIBVDWXC
DFLAGS += -D__SIRIUS
LIBS += $(SIRIUS_LIB)/libsirius.a
LIBS += $(SIRIUS_LIB)/libsirius_cxx.a
LIBS += $(PUGIXML_LIB)/libpugixml.a
LIBS += $(LIBVDWXC_LIB)/libvdwxc.a
endif
ifneq ($(USE_SPFFT),)
USE_SPFFT := $(strip $(USE_SPFFT))
SPFFT_INC := $(INSTALL_PATH)/SpFFT-$(USE_SPFFT)/include
SPFFT_LIB := $(INSTALL_PATH)/SpFFT-$(USE_SPFFT)/lib
CFLAGS += -I$(SPFFT_INC)
DFLAGS += -D__SPFFT
LIBS += $(SPFFT_LIB)/libspfft.a
endif
ifneq ($(USE_SPLA),)
USE_SPLA := $(strip $(USE_SPLA))
SPLA_INC := $(INSTALL_PATH)/SpLA-$(USE_SPLA)/include/spla
SPLA_LIB := $(INSTALL_PATH)/SpLA-$(USE_SPLA)/lib
CFLAGS += -I$(SPLA_INC)
DFLAGS += -D__SPLA
LIBS += $(SPLA_LIB)/libspla.a
endif
ifneq ($(USE_LIBSMEAGOL),)
USE_LIBSMEAGOL := $(strip $(USE_LIBSMEAGOL))
LIBSMEAGOL_LIB := $(INSTALL_PATH)/libsmeagol-$(USE_LIBSMEAGOL)/lib
LIBSMEAGOL_INC := $(INSTALL_PATH)/libsmeagol-$(USE_LIBSMEAGOL)/include
CFLAGS += -I$(LIBSMEAGOL_INC)
DFLAGS += -D__SMEAGOL
LIBS += $(LIBSMEAGOL_LIB)/libsmeagol.a
endif
HDF5_HOME := $(shell brew --prefix hdf5)
CFLAGS += -I$(HDF5_HOME)/include
DFLAGS += -D__HDF5
LIBS += $(HDF5_HOME)/lib/libhdf5_fortran.a
LIBS += $(HDF5_HOME)/lib/libhdf5_f90cstub.a
LIBS += $(HDF5_HOME)/lib/libhdf5.a
LIBS += $(shell brew --prefix zlib)/lib/libz.a
LIBS += $(shell brew --prefix libaec)/lib/libsz.a
ifneq ($(USE_COSMA),)
USE_COSMA := $(strip $(USE_COSMA))
COSMA_INC := $(INSTALL_PATH)/COSMA-$(USE_COSMA)/include
COSMA_LIB := $(INSTALL_PATH)/COSMA-$(USE_COSMA)/lib
CFLAGS += -I$(COSMA_INC)
DFLAGS += -D__COSMA
LIBS += $(COSMA_LIB)/libcosma_prefixed_pxgemm.a
LIBS += $(COSMA_LIB)/libcosma.a
LIBS += $(COSMA_LIB)/libcosta.a
endif
FFTW_HOME := $(shell brew --prefix fftw)
CFLAGS += -I$(FFTW_HOME)/include
DFLAGS += -D__FFTW3
LIBS += $(FFTW_HOME)/lib/libfftw3_mpi.a
LIBS += $(FFTW_HOME)/lib/libfftw3_omp.a
LIBS += $(FFTW_HOME)/lib/libfftw3.a
USE_SCALAPACK := $(strip $(USE_SCALAPACK))
LIBS += $(INSTALL_PATH)/scalapack-$(USE_SCALAPACK)/lib/libscalapack.a
GSL_HOME := $(shell brew --prefix gsl)
CFLAGS += -I$(GSL_HOME)/include
DFLAGS += -D__GSL
LIBS += $(GSL_HOME)/lib/libgsl.a
ifneq ($(USE_TBLITE),)
USE_TBLITE := $(strip $(USE_TBLITE))
TBLITE_INC := $(INSTALL_PATH)/tblite-$(USE_TBLITE)/include
TBLITE_LIB := $(INSTALL_PATH)/tblite-$(USE_TBLITE)/lib
CFLAGS += -I$(TBLITE_INC)/toml-f/modules
CFLAGS += -I$(TBLITE_INC)/mctc-lib/modules
CFLAGS += -I$(TBLITE_INC)/s-dftd3/GNU-$(GNU_VER)
CFLAGS += -I$(TBLITE_INC)/dftd4/GNU-$(GNU_VER)
CFLAGS += -I$(TBLITE_INC)/tblite/GNU-$(GNU_VER)
DFLAGS += -D__TBLITE
DFLAGS += -D__DFTD4
LIBS += $(TBLITE_LIB)/libtblite.a
LIBS += $(TBLITE_LIB)/libdftd4.a
LIBS += $(TBLITE_LIB)/libs-dftd3.a
LIBS += $(TBLITE_LIB)/libmulticharge.a
LIBS += $(TBLITE_LIB)/libmctc-lib.a
LIBS += $(TBLITE_LIB)/libtoml-f.a
endif
ifneq ($(USE_OPENBLAS),)
OPENBLAS_HOME := $(shell brew --prefix openblas)
CFLAGS += -I$(OPENBLAS_HOME)/include
LIBS += $(OPENBLAS_HOME)/lib/libopenblas.a
else
# Linking to the Accelerate framework instead of OpenBLAS is not the default
# because of failing tests
DFLAGS += -D__ACCELERATE
LIBS += -framework Accelerate
endif
ifneq ($(USE_TREXIO),)
USE_TREXIO := $(strip $(USE_TREXIO))
TREXIO_INC := $(INSTALL_PATH)/trexio-$(USE_TREXIO)/include
TREXIO_LIB := $(INSTALL_PATH)/trexio-$(USE_TREXIO)/lib
CFLAGS += -I$(TREXIO_INC)
DFLAGS += -D__TREXIO
LIBS += $(TREXIO_LIB)/libtrexio.a
endif
CFLAGS += $(DFLAGS)
CXXFLAGS := $(CFLAGS)
FCFLAGS := $(CFLAGS) $(FCFLAGS_DEBUG) $(WFLAGS)
FCFLAGS += -fallow-argument-mismatch
FCFLAGS += -fbacktrace
FCFLAGS += -ffree-form
FCFLAGS += -ffree-line-length-none
FCFLAGS += -fno-omit-frame-pointer
FCFLAGS += -std=f2008
CFLAGS += -std=c17
CXXFLAGS += -std=c++17
LDFLAGS += $(FCFLAGS)
LIBS += -ldl -lstdc++
# End

View file

@ -1,256 +0,0 @@
#!/bin/bash
#
# CP2K Darwin arch file for a serial arm64 binary
# (https://www.cp2k.org/howto:compile_on_macos)
#
# Tested with: GNU 14.3.0 on an Apple M1 (macOS 15.5 Sequoia)
#
# Usage: Source this arch file and then run make as instructed.
# Ensure the links in /opt/homebrew/bin to the gcc version.
#
# Last update: 12.06.2025
#
# \
if [[ "${0}" == "${BASH_SOURCE}" ]]; then \
echo "ERROR: Script ${0##*/} must be sourced"; \
echo "Usage: source ${0##*/}"; \
exit 1; \
fi; \
this_file=${BASH_SOURCE##*/}; \
cd tools/toolchain; \
rm -rf build; \
[[ -z "${target_cpu}" ]] && target_cpu="native"; \
if $(command -v brew >/dev/null 2>&1); then \
brew install cmake; \
brew install coreutils; \
brew install fftw; \
brew install gawk; \
brew install gcc@14; \
brew install hdf5; \
brew install libaec; \
brew install libxc; \
brew install ninja; \
brew install openblas; \
brew install pkg-config; \
brew install wget; \
brew install zlib; \
else \
echo "ERROR: Homebrew installation not found"; \
echo ' Run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"'; \
cd ../..; \
return 1; \
fi; \
./install_cp2k_toolchain.sh -j${maxtasks} --mpi-mode=no --no-arch-files --target-cpu=${target_cpu} \
--with-cmake=$(brew --prefix cmake) --with-dftd4 --with-fftw=$(brew --prefix fftw) --with-gcc=system \
--with-hdf5=$(brew --prefix hdf5) --with-libxc=$(brew --prefix libxc) --with-ninja=$(brew --prefix ninja) \
--with-openblas=$(brew --prefix openblas) --with-trexio --with-libtorch=no --with-deepmd=no; \
source ./install/setup; \
cd ../..; \
echo; \
echo "Check the output above for error messages and consistency!"; \
echo; \
echo "If everything is OK, you can build a CP2K production binary with"; \
echo " make -j ARCH=${this_file%.*} VERSION=${this_file##*.} TARGET_CPU=${target_cpu}"; \
echo; \
echo "The Accelerate framework is used instead of OpenBLAS with"; \
echo " make -j ARCH=${this_file%.*} VERSION=${this_file##*.} TARGET_CPU=${target_cpu} USE_OPENBLAS="; \
echo; \
echo "Run always the following command before using the CP2K binary"; \
echo " source ${PWD}/tools/toolchain/install/setup"; \
echo; \
return
# Set options
DO_CHECKS := no
TARGET_CPU := native
# Retrieve package versions
GNU_VER := $(shell gcc -dumpfullversion)
USE_DFTD4 := $(DFTD4_VER)
USE_LIBGRPP := $(LIBGRPP_VER)
USE_LIBINT := $(LIBINT_VER)
USE_LIBVORI := $(LIBVORI_VER)
USE_LIBXSMM := $(LIBXSMM_VER)
USE_OPENBLAS := $(OPENBLAS_VER)
USE_SPGLIB := $(SPGLIB_VER)
USE_TBLITE := $(TBLITE_VER)
USE_TREXIO := $(TREXIO_VER)
LMAX := 5
MAX_CONTR := 4
CC := gcc
CXX := g++
FC := gfortran
LD := gfortran
AR := ar -r -s
CFLAGS := -O2 -fopenmp -fopenmp-simd -ftree-vectorize -funroll-loops -g -mtune=$(TARGET_CPU)
DFLAGS += -D__MAX_CONTR=$(strip $(MAX_CONTR))
DFLAGS += -D__NO_STATM_ACCESS
INSTALL_PATH := $(PWD)/tools/toolchain/install
# Settings for regression testing
ifeq ($(DO_CHECKS), yes)
DFLAGS += -D__CHECK_DIAG
FCFLAGS_DEBUG := -fcheck=bounds,do,recursion,pointer
FCFLAGS_DEBUG += -fcheck=all,no-array-temps
# FCFLAGS_DEBUG += -ffpe-trap=invalid,overflow,zero
FCFLAGS_DEBUG += -fimplicit-none
FCFLAGS_DEBUG += -finit-derived
FCFLAGS_DEBUG += -finit-real=snan
FCFLAGS_DEBUG += -finit-integer=-42
FCFLAGS_DEBUG += -finline-matmul-limit=0
WFLAGS := -Werror=aliasing
WFLAGS += -Werror=ampersand
WFLAGS += -Werror=c-binding-type
WFLAGS += -Werror=conversion
WFLAGS += -Werror=intrinsic-shadow
WFLAGS += -Werror=intrinsics-std
WFLAGS += -Werror=line-truncation
WFLAGS += -Wrealloc-lhs
WFLAGS += -Werror=tabs
WFLAGS += -Werror=target-lifetime
WFLAGS += -Werror=underflow
WFLAGS += -Werror=unused-but-set-variable
WFLAGS += -Werror=unused-dummy-argument
WFLAGS += -Werror=unused-variable
endif
ifneq ($(USE_LIBVORI),)
USE_LIBVORI := $(strip $(USE_LIBVORI))
LIBVORI_LIB := $(INSTALL_PATH)/libvori-$(USE_LIBVORI)/lib
DFLAGS += -D__LIBVORI
LIBS += $(LIBVORI_LIB)/libvori.a
endif
LIBXC_HOME := $(shell brew --prefix libxc)
CFLAGS += -I$(LIBXC_HOME)/include
DFLAGS += -D__LIBXC
LIBS += -L$(LIBXC_HOME)/lib -lxcf03 -lxc
ifeq ($(USE_TBLITE),)
ifneq ($(USE_DFTD4),)
USE_DFTD4 := $(strip $(USE_DFTD4))
DFTD4_INC := $(INSTALL_PATH)/dftd4-$(USE_DFTD4)/include
DFTD4_LIB := $(INSTALL_PATH)/dftd4-$(USE_DFTD4)/lib
CFLAGS += -I$(DFTD4_INC)/dftd4/GNU-$(GNU_VER)
DFLAGS += -D__DFTD4
LIBS += $(DFTD4_LIB)/libdftd4.a
LIBS += $(DFTD4_LIB)/libmstore.a
LIBS += $(DFTD4_LIB)/libmulticharge.a
LIBS += $(DFTD4_LIB)/libmctc-lib.a
endif
endif
ifneq ($(USE_LIBGRPP),)
USE_LIBGRPP := $(strip $(USE_LIBGRPP))
DFLAGS += -D__LIBGRPP
endif
ifneq ($(USE_LIBINT),)
USE_LIBINT := $(strip $(USE_LIBINT))
LMAX := $(strip $(LMAX))
LIBINT_INC := $(INSTALL_PATH)/libint-v$(USE_LIBINT)-cp2k-lmax-$(LMAX)/include
LIBINT_LIB := $(INSTALL_PATH)/libint-v$(USE_LIBINT)-cp2k-lmax-$(LMAX)/lib
CFLAGS += -I$(LIBINT_INC)
DFLAGS += -D__LIBINT
LIBS += $(LIBINT_LIB)/libint2.a
endif
ifneq ($(USE_SPGLIB),)
USE_SPGLIB := $(strip $(USE_SPGLIB))
SPGLIB_INC := $(INSTALL_PATH)/spglib-$(USE_SPGLIB)/include
SPGLIB_LIB := $(INSTALL_PATH)/spglib-$(USE_SPGLIB)/lib
CFLAGS += -I$(SPGLIB_INC)
DFLAGS += -D__SPGLIB
LIBS += $(SPGLIB_LIB)/libsymspg.a
endif
ifneq ($(USE_LIBXSMM),)
USE_LIBXSMM := $(strip $(USE_LIBXSMM))
LIBXSMM_INC := $(INSTALL_PATH)/libxsmm-$(USE_LIBXSMM)/include
LIBXSMM_LIB := $(INSTALL_PATH)/libxsmm-$(USE_LIBXSMM)/lib
CFLAGS += -I$(LIBXSMM_INC)
DFLAGS += -D__LIBXSMM
LIBS += $(LIBXSMM_LIB)/libxsmmf.a
LIBS += $(LIBXSMM_LIB)/libxsmmext.a
LIBS += $(LIBXSMM_LIB)/libxsmm.a
endif
FFTW_HOME := $(shell brew --prefix fftw)
CFLAGS += -I$(FFTW_HOME)/include
DFLAGS += -D__FFTW3
LIBS += $(FFTW_HOME)/lib/libfftw3_omp.a
LIBS += $(FFTW_HOME)/lib/libfftw3.a
HDF5_HOME := $(shell brew --prefix hdf5)
CFLAGS += -I$(HDF5_HOME)/include
DFLAGS += -D__HDF5
LIBS += $(HDF5_HOME)/lib/libhdf5_fortran.a
LIBS += $(HDF5_HOME)/lib/libhdf5_f90cstub.a
LIBS += $(HDF5_HOME)/lib/libhdf5.a
LIBS += $(shell brew --prefix zlib)/lib/libz.a
LIBS += $(shell brew --prefix libaec)/lib/libsz.a
ifneq ($(USE_TBLITE),)
USE_TBLITE := $(strip $(USE_TBLITE))
TBLITE_INC := $(INSTALL_PATH)/tblite-$(USE_TBLITE)/include
TBLITE_LIB := $(INSTALL_PATH)/tblite-$(USE_TBLITE)/lib
CFLAGS += -I$(TBLITE_INC)/toml-f/modules
CFLAGS += -I$(TBLITE_INC)/mctc-lib/modules
CFLAGS += -I$(TBLITE_INC)/s-dftd3/GNU-$(GNU_VER)
CFLAGS += -I$(TBLITE_INC)/dftd4/GNU-$(GNU_VER)
CFLAGS += -I$(TBLITE_INC)/tblite/GNU-$(GNU_VER)
DFLAGS += -D__TBLITE
DFLAGS += -D__DFTD4
LIBS += $(TBLITE_LIB)/libtblite.a
LIBS += $(TBLITE_LIB)/libdftd4.a
LIBS += $(TBLITE_LIB)/libs-dftd3.a
LIBS += $(TBLITE_LIB)/libmulticharge.a
LIBS += $(TBLITE_LIB)/libmctc-lib.a
LIBS += $(TBLITE_LIB)/libtoml-f.a
endif
ifneq ($(USE_OPENBLAS),)
OPENBLAS_HOME := $(shell brew --prefix openblas)
CFLAGS += -I$(OPENBLAS_HOME)/include
LIBS += $(OPENBLAS_HOME)/lib/libopenblas.a
else
# Linking to the Accelerate framework instead of OpenBLAS is not the default
# because of failing tests
DFLAGS += -D__ACCELERATE
LIBS += -framework Accelerate
endif
ifneq ($(USE_TREXIO),)
USE_TREXIO := $(strip $(USE_TREXIO))
TREXIO_INC := $(INSTALL_PATH)/trexio-$(USE_TREXIO)/include
TREXIO_LIB := $(INSTALL_PATH)/trexio-$(USE_TREXIO)/lib
CFLAGS += -I$(TREXIO_INC)
DFLAGS += -D__TREXIO
LIBS += $(TREXIO_LIB)/libtrexio.a
endif
CFLAGS += $(DFLAGS)
CXXFLAGS := $(CFLAGS)
FCFLAGS := $(CFLAGS) $(FCFLAGS_DEBUG) $(WFLAGS)
FCFLAGS += -fallow-argument-mismatch
FCFLAGS += -fbacktrace
FCFLAGS += -ffree-form
FCFLAGS += -ffree-line-length-none
FCFLAGS += -fno-omit-frame-pointer
FCFLAGS += -std=f2008
CFLAGS += -std=c17
CXXFLAGS += -std=c++17
LDFLAGS := $(FCFLAGS)
LIBS += -ldl -lstdc++
# End

View file

@ -1,137 +0,0 @@
# === For the CSCS HPE Cray EX System Alps (Eiger) ====
# Uses only libraries provided by CSCS in the cpeGNU environment.
#
# USAGE:
# 1. source this arch file to load the required modules:
# source arch/Eiger-gfortran.psmp
# 2. follow the printed instructions
# 3. Optionally: use some of the options below to tune the installation
# 4. To run a calculation: no module has to be loaded
#
# \
module load cray/21.12 ; \
module load cpeGNU/21.12 ; \
module load \
cray-fftw \
ELPA/2021.11.001 \
libxsmm/1.17 \
libxc/5.1.7 \
Libint-CP2K/2.6.0 \
SIRIUS/7.3.1 \
spglib/1.16.3 \
libvori/210412 \
PLUMED/2.7.3 \
cray-mpich/8.1.12 \
; \
module list ; \
module save cp2k_gfortran_psmp ; \
echo "Please check the output above for error messages!" ; \
echo "If everything is OK, build CP2K with:" ; \
echo " make -j ARCH=Eiger-gfortran VERSION=psmp" ; \
echo "" ; \
echo "To load the required modules in your sbatch script, use:" ; \
echo " module restore cp2k_gfortran_psmp" ; \
/usr/bin/test _`echo is_csh 2>/dev/null` != _is_csh && exit ; \
return
# === OPTIONS ===
# To disable/enable them add them to the make call:
# ex.: make -j ARCH=Eiger-gfortran VERSION=psmp USE_ELPA=0
# NOTES:
# Current versions of ELPA, SIRIUS, LIBVORI and PLUMED provided by CSCS on Eiger are too old to run
# with the current development version of CP2K. The user should install these via the toolchain,
# in case they should need these libraries.
WITH_MKL=0
USE_ELPA=0
USE_LIBINT=1
USE_SIRIUS=0
USE_SPGLIB=1
USE_LIBVORI=0
USE_PLUMED=0
CHECKS=0
# === PRE-PROCESSOR FLAGS (base) ===
DFLAGS = -D__parallel \
-D__FFTW3 \
-D__LIBXSMM \
-D__LIBXC
# === LIBRARIES and MODULES ===
LIBS += -lfftw3 -lfftw3_omp
LIBS += -lxcf03 -lxc
INCS += -I$(EBROOTLIBXC)/include
LIBS += -lxsmmf -lxsmm -ldl
INCS += -I$(EBROOTLIBXSMM)/include
ifeq ($(USE_ELPA),1)
DFLAGS += -D__ELPA
LIBS += -lelpa_openmp
INCS += -I$(ELPA_INCLUDE_DIR)/modules
endif
ifeq ($(USE_LIBINT),1)
DFLAGS += -D__LIBINT -D__MAX_CONTR=4
LIBS += -lint2 -lstdc++
INCS += -I$(EBROOTLIBINTMINCP2K)/include
endif
ifeq ($(USE_SIRIUS),1)
DFLAGS += -D__SIRIUS
LIBS += -lsirius
INCS += -I$(EBROOTSIRIUS)/include/sirius
endif
ifeq ($(USE_SPGLIB),1)
DFLAGS += -D__SPGLIB
LIBS += -lsymspg
INCS += -I$(EBROOTSPGLIB)/include
endif
ifeq ($(USE_LIBVORI),1)
DFLAGS += -D__LIBVORI
LIBS += $(EBROOTLIBVORI)/lib/libvori.a
endif
ifeq ($(USE_PLUMED),1)
DFLAGS += -D__PLUMED2
LIBS += -lplumed
endif
ifeq ($(WITH_MKL),1)
LIBS += -L/opt/intel/mkl/lib/intel64 -Wl,-rpath=/opt/intel/mkl/lib/intel64 \
-lmkl_scalapack_lp64 \
-Wl,--start-group \
-lmkl_gf_lp64 \
-lmkl_sequential \
-lmkl_core \
-lmkl_blacs_intelmpi_lp64 \
-Wl,--end-group
INCS += -I/opt/intel/mkl/include
endif
# === BINARIES (COMPILER, LINKER, ...) ===
CC = cc
CXX = CC
FC = ftn
LD = ftn
AR = ar -r
# === COMPILER FLAGS ===
AFLAGS = $(DFLAGS) $(INCS) -g1 -fopenmp -O3 -funroll-loops
FCFLAGS = $(AFLAGS) -ffree-form -ffree-line-length-512 -fallow-argument-mismatch
CFLAGS = $(AFLAGS)
CXXFLAGS = $(AFLAGS)
LDFLAGS = $(FCFLAGS)
# -fallow-argument-mismatch: needed for (Cray-)MPICH and tightened interface requirements introduced in GCC-10
ifeq ($(CHECKS),1)
FCFLAGS += -g -fcheck=bounds,do,recursion,pointer -Wconversion -fbacktrace
endif

View file

@ -1,338 +0,0 @@
#!/bin/bash
#
# CP2K (GNU x86_64) arch file for the Alps/Eiger (AMD Zen 2) multi-core (mc) cluster at CSCS
#
# Tested with: GNU 12.3.0, Cray-MPICH 8.1.28 and Cray-libsci 23.12.5 on the Alps/Eiger (CSCS)
#
# Usage: Source this arch file and then run make as instructed.
# Replace or adapt the "module load" commands below if needed.
#
# Last update: 21.02.2024
#
# \
if [[ "${0}" == "${BASH_SOURCE}" ]]; then \
echo "ERROR: Script ${0##*/} must be sourced"; \
echo "Usage: source ${0##*/}"; \
exit 1; \
fi; \
this_file=${BASH_SOURCE##*/}; \
cd tools/toolchain; \
rm -rf build; \
module purge; \
module load cray; \
module swap PrgEnv-cray PrgEnv-gnu; \
module load cray-fftw; \
module load cray-python; \
module list; \
export CRAY_LIBSCI_PREFIX_DIR=${CRAY_PE_LIBSCI_PREFIX_DIR}; \
export CPATH=${CPATH}:${CRAY_PE_LIBSCI_PREFIX_DIR}/include; \
export COSMA_SCALAPACK_LINK_LIBRARIES=${CRAY_PE_LIBSCI_PREFIX_DIR}; \
[[ -z "${TARGET_CPU}" ]] && export TARGET_CPU="native"; \
./install_cp2k_toolchain.sh -j32 --enable-cray --no-arch-files --target-cpu=${TARGET_CPU} --with-dftd4 --with-fftw --with-libtorch=no --with-libvdwxc --with-libxsmm --with-plumed; \
source ./install/setup; \
cd ../..; \
echo; \
echo "Check the output above for error messages and consistency!"; \
echo; \
echo "If everything is OK, you can build a CP2K production binary with"; \
echo " make -j32 ARCH=${this_file%.*} VERSION=${this_file##*.} TARGET_CPU=${TARGET_CPU}"; \
echo; \
echo "Alternatively, you can add further checks, e.g. for regression testing, with"; \
echo " make -j32 ARCH=${this_file%.*} VERSION=${this_file##*.} TARGET_CPU=${TARGET_CPU} DO_CHECKS=yes"; \
echo; \
return
# Set options
DO_CHECKS := no
SHARED := no
TARGET_CPU := native
# Retrieve package versions
GNU_VER := $(shell $(CC) -dumpfullversion)
USE_COSMA := $(COSMA_VER)
USE_DFTD4 := $(DFTD4_VER)
USE_ELPA := $(ELPA_VER)
USE_HDF5 := $(HDF5_VER)
USE_LIBGRPP := $(LIBGRPP_VER)
USE_LIBINT := $(LIBINT_VER)
USE_LIBVORI := $(LIBVORI_VER)
USE_LIBXC := $(LIBXC_VER)
USE_LIBXSMM := $(LIBXSMM_VER)
USE_PLUMED := $(PLUMED_VER)
USE_SIRIUS := $(SIRIUS_VER)
USE_SPFFT := $(SPFFT_VER)
USE_SPGLIB := $(SPGLIB_VER)
USE_SPLA := $(SPLA_VER)
CC := cc
CXX := CC
FC := ftn
LD := ftn
AR := ar -r
LMAX := 5
MAX_CONTR := 4
ifeq ($(TARGET_CPU), generic)
CFLAGS := -O3 -fopenmp -g -mtune=$(TARGET_CPU)
else
CFLAGS := -O3 -fopenmp -g -march=$(TARGET_CPU) -mtune=$(TARGET_CPU)
endif
DFLAGS := -D__parallel
DFLAGS += -D__FFTW3
DFLAGS += -D__HAS_IEEE_EXCEPTIONS
DFLAGS += -D__MAX_CONTR=$(strip $(MAX_CONTR))
INSTALL_PATH := $(PWD)/tools/toolchain/install
ifeq ($(SHARED), yes)
LD_SHARED := $(FC) -shared
CFLAGS += -fPIC
LDFLAGS := -Wl,--enable-new-dtags
CP2K_LIB := $(PWD)/lib/$(ARCH)/$(ONEVERSION)
LDFLAGS += -Wl,-rpath=$(CP2K_LIB)
LDFLAGS += -Wl,-rpath=$(CP2K_LIB)/exts/dbcsr
endif
# Settings for regression testing
ifeq ($(DO_CHECKS), yes)
DFLAGS += -D__CHECK_DIAG
endif
ifneq ($(USE_PLUMED),)
USE_PLUMED := $(strip $(USE_PLUMED))
USE_GSL := $(GSL_VER)
PLUMED_LIB := $(INSTALL_PATH)/plumed-$(USE_PLUMED)/lib
DFLAGS += -D__PLUMED2
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(PLUMED_LIB) -L$(PLUMED_LIB) -lplumed -lplumedKernel
else
LIBS += $(PLUMED_LIB)/libplumed.a
endif
endif
ifneq ($(USE_ELPA),)
USE_ELPA := $(strip $(USE_ELPA))
ELPA_INC := $(INSTALL_PATH)/elpa-$(USE_ELPA)/cpu/include/elpa_openmp-$(USE_ELPA)
ELPA_LIB := $(INSTALL_PATH)/elpa-$(USE_ELPA)/cpu/lib
CFLAGS += -I$(ELPA_INC)/elpa -I$(ELPA_INC)/modules
DFLAGS += -D__ELPA
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(ELPA_LIB) -L$(ELPA_LIB) -lelpa_openmp
else
LIBS += $(ELPA_LIB)/libelpa_openmp.a
endif
endif
ifneq ($(USE_LIBVORI),)
USE_LIBVORI := $(strip $(USE_LIBVORI))
LIBVORI_LIB := $(INSTALL_PATH)/libvori-$(USE_LIBVORI)/lib
DFLAGS += -D__LIBVORI
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(LIBVORI_LIB) -L$(LIBVORI_LIB) -lvori
else
LIBS += $(LIBVORI_LIB)/libvori.a
endif
endif
ifneq ($(USE_LIBXC),)
USE_LIBXC := $(strip $(USE_LIBXC))
LIBXC_INC := $(INSTALL_PATH)/libxc-$(USE_LIBXC)/include
LIBXC_LIB := $(INSTALL_PATH)/libxc-$(USE_LIBXC)/lib
CFLAGS += -I$(LIBXC_INC)
DFLAGS += -D__LIBXC
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(LIBXC_LIB) -L$(LIBXC_LIB) -lxcf03 -lxc
else
LIBS += $(LIBXC_LIB)/libxcf03.a
LIBS += $(LIBXC_LIB)/libxc.a
endif
endif
ifneq ($(USE_DFTD4),)
USE_DFTD4 := $(strip $(USE_DFTD4))
DFTD4_INC := $(INSTALL_PATH)/dftd4-$(USE_DFTD4)/include
DFTD4_LIB := $(INSTALL_PATH)/dftd4-$(USE_DFTD4)/lib
CFLAGS += -I$(DFTD4_INC)/dftd4/GNU-$(GNU_VER)
DFLAGS += -D__DFTD4
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(DFTD4_LIB) -L$(DFTD4_LIB) -ldftd4 -lmstore -lmulticharge -lmctc-lib
else
LIBS += $(DFTD4_LIB)/libdftd4.a
LIBS += $(DFTD4_LIB)/libmstore.a
LIBS += $(DFTD4_LIB)/libmulticharge.a
LIBS += $(DFTD4_LIB)/libmctc-lib.a
endif
endif
ifneq ($(USE_LIBGRPP),)
USE_LIBGRPP := $(strip $(USE_LIBGRPP))
DFLAGS += -D__LIBGRPP
endif
ifneq ($(USE_LIBINT),)
USE_LIBINT := $(strip $(USE_LIBINT))
LMAX := $(strip $(LMAX))
LIBINT_INC := $(INSTALL_PATH)/libint-v$(USE_LIBINT)-cp2k-lmax-$(LMAX)/include
LIBINT_LIB := $(INSTALL_PATH)/libint-v$(USE_LIBINT)-cp2k-lmax-$(LMAX)/lib
CFLAGS += -I$(LIBINT_INC)
DFLAGS += -D__LIBINT
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(LIBINT_LIB) -L$(LIBINT_LIB) -lint2
else
LIBS += $(LIBINT_LIB)/libint2.a
endif
endif
ifneq ($(USE_SPGLIB),)
USE_SPGLIB := $(strip $(USE_SPGLIB))
SPGLIB_INC := $(INSTALL_PATH)/spglib-$(USE_SPGLIB)/include
SPGLIB_LIB := $(INSTALL_PATH)/spglib-$(USE_SPGLIB)/lib
CFLAGS += -I$(SPGLIB_INC)
DFLAGS += -D__SPGLIB
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(SPGLIB_LIB) -L$(SPGLIB_LIB) -lsymspg
else
LIBS += $(SPGLIB_LIB)/libsymspg.a
endif
endif
ifneq ($(USE_LIBXSMM),)
USE_LIBXSMM := $(strip $(USE_LIBXSMM))
LIBXSMM_INC := $(INSTALL_PATH)/libxsmm-$(USE_LIBXSMM)/include
LIBXSMM_LIB := $(INSTALL_PATH)/libxsmm-$(USE_LIBXSMM)/lib
CFLAGS += -I$(LIBXSMM_INC)
DFLAGS += -D__LIBXSMM
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(LIBXSMM_LIB) -L$(LIBXSMM_LIB) -lxsmmf -lxsmmext -lxsmm
else
LIBS += $(LIBXSMM_LIB)/libxsmmf.a
LIBS += $(LIBXSMM_LIB)/libxsmmext.a
LIBS += $(LIBXSMM_LIB)/libxsmm.a
endif
endif
ifneq ($(USE_SIRIUS),)
USE_SIRIUS := $(strip $(USE_SIRIUS))
USE_GSL := ${GSL_VER}
LIBVDWXC_INC := $(INSTALL_PATH)/libvdwxc-$(LIBVDWXC_VER)/include
LIBVDWXC_LIB := $(INSTALL_PATH)/libvdwxc-$(LIBVDWXC_VER)/lib
PUGIXML_LIB := $(INSTALL_PATH)/pugixml-$(PUGIXML_VER)/lib
SIRIUS_INC := $(INSTALL_PATH)/sirius-$(USE_SIRIUS)/include/sirius
SIRIUS_LIB := $(INSTALL_PATH)/sirius-$(USE_SIRIUS)/lib
CFLAGS += -I$(LIBVDWXC_INC)
CFLAGS += -I$(SIRIUS_INC)
DFLAGS += -D__LIBVDWXC
DFLAGS += -D__SIRIUS
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(SIRIUS_LIB) -L$(SIRIUS_LIB) -lsirius -lsirius_cxx
LIBS += -Wl,-rpath=$(PUGIXML_LIB) -L$(PUGIXML_LIB) -lpugixml
LIBS += -Wl,-rpath=$(LIBVDWXC_LIB) -L$(LIBVDWXC_LIB) -lvdwxc
else
LIBS += $(SIRIUS_LIB)/libsirius.a
LIBS += $(SIRIUS_LIB)/libsirius_cxx.a
LIBS += $(PUGIXML_LIB)/libpugixml.a
LIBS += $(LIBVDWXC_LIB)/libvdwxc.a
endif
endif
ifneq ($(USE_SPFFT),)
USE_SPFFT := $(strip $(USE_SPFFT))
SPFFT_INC := $(INSTALL_PATH)/SpFFT-$(USE_SPFFT)/include
SPFFT_LIB := $(INSTALL_PATH)/SpFFT-$(USE_SPFFT)/lib
CFLAGS += -I$(SPFFT_INC)
DFLAGS += -D__SPFFT
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(SPFFT_LIB) -L$(SPFFT_LIB) -lspfft
else
LIBS += $(SPFFT_LIB)/libspfft.a
endif
endif
ifneq ($(USE_SPLA),)
USE_SPLA := $(strip $(USE_SPLA))
SPLA_INC := $(INSTALL_PATH)/SpLA-$(USE_SPLA)/include/spla
SPLA_LIB := $(INSTALL_PATH)/SpLA-$(USE_SPLA)/lib
CFLAGS += -I$(SPLA_INC)
DFLAGS += -D__SPLA
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(SPLA_LIB) -L$(SPLA_LIB) -lspla
else
LIBS += $(SPLA_LIB)/libspla.a
endif
endif
ifneq ($(USE_HDF5),)
USE_HDF5 := $(strip $(USE_HDF5))
HDF5_INC := $(INSTALL_PATH)/hdf5-$(USE_HDF5)/include
HDF5_LIB := $(INSTALL_PATH)/hdf5-$(USE_HDF5)/lib
CFLAGS += -I$(HDF5_INC)
DFLAGS += -D__HDF5
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath,$(HDF5_LIB) -L$(HDF5_LIB) -lhdf5_fortran -lhdf5
else
LIBS += $(HDF5_LIB)/libhdf5_fortran.a
LIBS += $(HDF5_LIB)/libhdf5_f90cstub.a
LIBS += $(HDF5_LIB)/libhdf5.a
endif
endif
ifneq ($(USE_COSMA),)
USE_COSMA := $(strip $(USE_COSMA))
COSMA_INC := $(INSTALL_PATH)/COSMA-$(USE_COSMA)/include
COSMA_LIB := $(INSTALL_PATH)/COSMA-$(USE_COSMA)/lib
CFLAGS += -I$(COSMA_INC)
DFLAGS += -D__COSMA
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(COSMA_LIB) -L$(COSMA_LIB) -lcosma_prefixed_pxgemm -lcosma -lcosta
else
LIBS += $(COSMA_LIB)/libcosma_prefixed_pxgemm.a
LIBS += $(COSMA_LIB)/libcosma.a
LIBS += $(COSMA_LIB)/libcosta.a
endif
endif
ifneq ($(USE_GSL),)
USE_GSL := $(strip $(USE_GSL))
GSL_INC := $(INSTALL_PATH)/gsl-$(USE_GSL)/include
GSL_LIB := $(INSTALL_PATH)/gsl-$(USE_GSL)/lib
CFLAGS += -I$(GSL_INC)
DFLAGS += -D__GSL
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(GSL_LIB) -L$(GSL_LIB) -lgsl
else
LIBS += $(GSL_LIB)/libgsl.a
endif
endif
ifeq ($(shell [ $(shell ldd --version | head -n 1 | tr -s '.' '\n' | tail -n 1) -ge 27 ] && echo yes), yes)
ifneq ($(USE_LIBTORCH),)
USE_LIBTORCH := $(strip $(USE_LIBTORCH))
LIBTORCH_INC := $(INSTALL_PATH)/libtorch-$(USE_LIBTORCH)/include
LIBTORCH_LIB := $(INSTALL_PATH)/libtorch-$(USE_LIBTORCH)/lib
CFLAGS += -I$(LIBTORCH_INC)
DFLAGS += -D__LIBTORCH
LIBS += -Wl,-rpath=$(LIBTORCH_LIB) -L$(LIBTORCH_LIB) -lc10 -ltorch_cpu -ltorch
endif
endif
CFLAGS += $(DFLAGS)
CXXFLAGS := $(CFLAGS) --std=c++14
FCFLAGS := $(CFLAGS)
ifeq ($(shell [ $(shell $(CC) -dumpversion | cut -d. -f1) -gt 9 ] && echo yes), yes)
FCFLAGS += -fallow-argument-mismatch
endif
FCFLAGS += -fbacktrace
FCFLAGS += -ffree-form
FCFLAGS += -ffree-line-length-none
#FCFLAGS += -fno-omit-frame-pointer
FCFLAGS += -std=f2008
LDFLAGS += $(FCFLAGS)
LIBS += -lz -ldl -lstdc++
# End

View file

@ -1,364 +0,0 @@
#!/bin/bash
#
# CP2K (Intel/MKL x86_64) arch file for the Alps/Eiger (AMD Zen 2) cluster at CSCS
#
# Tested with: Intel 2021.10.0 (MPI/MKL) on the Alps/Eiger (CSCS)
#
# Usage: Source this arch file and then run make as instructed.
# Replace or adapt the "module load" commands below if needed.
#
# Last update: 21.02.2025
#
# \
if [[ "${0}" == "${BASH_SOURCE}" ]]; then \
echo "ERROR: Script ${0##*/} must be sourced"; \
echo "Usage: source ${0##*/}"; \
exit 1; \
fi; \
this_file=${BASH_SOURCE##*/}; \
cd tools/toolchain; \
rm -rf build; \
module purge; \
module load cray; \
module swap PrgEnv-cray PrgEnv-intel; \
module load cray-fftw; \
module load cray-python; \
module list; \
[[ -z "${TARGET_CPU}" ]] && export TARGET_CPU="core-avx2"; \
./install_cp2k_toolchain.sh -j32 --enable-cray --no-arch-files --target-cpu=${TARGET_CPU} --with-dftd4 --with-elpa --with-fftw --with-libtorch=no --with-libxsmm --with-intel --with-mkl --with-libtorch=no --with-libvdwxc --with-plumed; \
source ./install/setup; \
cd ../..; \
echo; \
echo "Check the output above for error messages and consistency!"; \
echo; \
echo "If everything is OK, you can build a CP2K production binary with"; \
echo " make -j32 ARCH=${this_file%.*} VERSION=${this_file##*.} TARGET_CPU=${TARGET_CPU}"; \
echo; \
echo "Alternatively, you can add further checks, e.g. for regression testing, with"; \
echo " make -j32 ARCH=${this_file%.*} VERSION=${this_file##*.} TARGET_CPU=${TARGET_CPU} DO_CHECKS=yes"; \
echo; \
return
# Set options
DO_CHECKS := no
SHARED := no
TARGET_CPU := core-avx2
# Retrieve package versions
USE_COSMA := $(COSMA_VER)
USE_DFTD4 := $(DFTD4_VER)
USE_ELPA := $(ELPA_VER)
USE_HDF5 := $(HDF5_VER)
USE_LIBGRPP := $(LIBGRPP_VER)
USE_LIBINT := $(LIBINT_VER)
#USE_LIBTORCH := $(LIBTORCH_VER)
USE_LIBVORI := $(LIBVORI_VER)
USE_LIBXC := $(LIBXC_VER)
USE_LIBXSMM := $(LIBXSMM_VER)
USE_PLUMED := $(PLUMED_VER)
USE_SIRIUS := $(SIRIUS_VER)
USE_SPFFT := $(SPFFT_VER)
USE_SPGLIB := $(SPGLIB_VER)
USE_SPLA := $(SPLA_VER)
LMAX := 5
MAX_CONTR := 4
CC := cc
FC := ftn
LD := ftn
AR := ar -r
CFLAGS := -O2 -fPIC -fp-model precise -funroll-loops -g -mtune=$(TARGET_CPU) -qopenmp -qopenmp-simd -traceback
CFLAGS += -diag-disable=10448
DFLAGS := -D__parallel
DFLAGS += -D__MKL
DFLAGS += -D__FFTW3
DFLAGS += -D__MAX_CONTR=$(strip $(MAX_CONTR))
INSTALL_PATH := $(PWD)/tools/toolchain/install
MKL_LIB := $(MKLROOT)/lib/intel64
ifeq ($(SHARED), yes)
LD_SHARED := $(FC) -shared
CFLAGS += -fPIC
LDFLAGS := -Wl,--enable-new-dtags
CP2K_LIB := $(PWD)/lib/$(ARCH)/$(ONEVERSION)
LDFLAGS += -Wl,-rpath=$(CP2K_LIB)
LDFLAGS += -Wl,-rpath=$(CP2K_LIB)/exts/dbcsr
else
LDFLAGS := -static-intel
endif
# Settings for regression testing
ifeq ($(DO_CHECKS), yes)
DFLAGS += -D__CHECK_DIAG
endif
ifneq ($(USE_PLUMED),)
USE_PLUMED := $(strip $(USE_PLUMED))
USE_GSL := $(GSL_VER)
PLUMED_LIB := $(INSTALL_PATH)/plumed-$(USE_PLUMED)/lib
DFLAGS += -D__PLUMED2
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(PLUMED_LIB) -L$(PLUMED_LIB) -lplumed -lplumedKernel
else
LIBS += $(PLUMED_LIB)/libplumed.a
endif
endif
ifneq ($(USE_ELPA),)
USE_ELPA := $(strip $(USE_ELPA))
ELPA_INC := $(INSTALL_PATH)/elpa-$(USE_ELPA)/cpu/include/elpa_openmp-$(USE_ELPA)
ELPA_LIB := $(INSTALL_PATH)/elpa-$(USE_ELPA)/cpu/lib
CFLAGS += -I$(ELPA_INC)/elpa -I$(ELPA_INC)/modules
DFLAGS += -D__ELPA
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(ELPA_LIB) -L$(ELPA_LIB) -lelpa_openmp
else
LIBS += $(ELPA_LIB)/libelpa_openmp.a
endif
endif
ifneq ($(USE_LIBVORI),)
USE_LIBVORI := $(strip $(USE_LIBVORI))
LIBVORI_LIB := $(INSTALL_PATH)/libvori-$(USE_LIBVORI)/lib
DFLAGS += -D__LIBVORI
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(LIBVORI_LIB) -L$(LIBVORI_LIB) -lvori
else
LIBS += $(LIBVORI_LIB)/libvori.a
endif
endif
ifneq ($(USE_LIBXC),)
USE_LIBXC := $(strip $(USE_LIBXC))
LIBXC_INC := $(INSTALL_PATH)/libxc-$(USE_LIBXC)/include
LIBXC_LIB := $(INSTALL_PATH)/libxc-$(USE_LIBXC)/lib
CFLAGS += -I$(LIBXC_INC)
DFLAGS += -D__LIBXC
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(LIBXC_LIB) -L$(LIBXC_LIB) -lxcf03 -lxc
else
LIBS += $(LIBXC_LIB)/libxcf03.a
LIBS += $(LIBXC_LIB)/libxc.a
endif
endif
ifneq ($(USE_DFTD4),)
USE_DFTD4 := $(strip $(USE_DFTD4))
DFTD4_INC := $(INSTALL_PATH)/dftd4-$(USE_DFTD4)/include
DFTD4_LIB := $(INSTALL_PATH)/dftd4-$(USE_DFTD4)/lib
CFLAGS += -I$(shell ls -d $(DFTD4_INC)/dftd4/Intel-*)
DFLAGS += -D__DFTD4
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(DFTD4_LIB) -L$(DFTD4_LIB) -ldftd4 -lmstore -lmulticharge -lmctc-lib
else
LIBS += $(DFTD4_LIB)/libdftd4.a
LIBS += $(DFTD4_LIB)/libmstore.a
LIBS += $(DFTD4_LIB)/libmulticharge.a
LIBS += $(DFTD4_LIB)/libmctc-lib.a
endif
endif
ifneq ($(USE_LIBGRPP),)
USE_LIBGRPP := $(strip $(USE_LIBGRPP))
DFLAGS += -D__LIBGRPP
endif
ifneq ($(USE_LIBINT),)
USE_LIBINT := $(strip $(USE_LIBINT))
LMAX := $(strip $(LMAX))
LIBINT_INC := $(INSTALL_PATH)/libint-v$(USE_LIBINT)-cp2k-lmax-$(LMAX)/include
LIBINT_LIB := $(INSTALL_PATH)/libint-v$(USE_LIBINT)-cp2k-lmax-$(LMAX)/lib
CFLAGS += -I$(LIBINT_INC)
DFLAGS += -D__LIBINT
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(LIBINT_LIB) -L$(LIBINT_LIB) -lint2
else
LIBS += $(LIBINT_LIB)/libint2.a
endif
endif
ifneq ($(USE_SPGLIB),)
USE_SPGLIB := $(strip $(USE_SPGLIB))
SPGLIB_INC := $(INSTALL_PATH)/spglib-$(USE_SPGLIB)/include
SPGLIB_LIB := $(INSTALL_PATH)/spglib-$(USE_SPGLIB)/lib
CFLAGS += -I$(SPGLIB_INC)
DFLAGS += -D__SPGLIB
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(SPGLIB_LIB) -L$(SPGLIB_LIB) -lsymspg
else
LIBS += $(SPGLIB_LIB)/libsymspg.a
endif
endif
ifneq ($(USE_LIBXSMM),)
USE_LIBXSMM := $(strip $(USE_LIBXSMM))
LIBXSMM_INC := $(INSTALL_PATH)/libxsmm-$(USE_LIBXSMM)/include
LIBXSMM_LIB := $(INSTALL_PATH)/libxsmm-$(USE_LIBXSMM)/lib
CFLAGS += -I$(LIBXSMM_INC)
DFLAGS += -D__LIBXSMM
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(LIBXSMM_LIB) -L$(LIBXSMM_LIB) -lxsmmf -lxsmmext -lxsmm
else
LIBS += $(LIBXSMM_LIB)/libxsmmf.a
LIBS += $(LIBXSMM_LIB)/libxsmmext.a
LIBS += $(LIBXSMM_LIB)/libxsmm.a
endif
endif
ifneq ($(USE_SIRIUS),)
USE_SIRIUS := $(strip $(USE_SIRIUS))
USE_GSL := ${GSL_VER}
LIBVDWXC_INC := $(INSTALL_PATH)/libvdwxc-$(LIBVDWXC_VER)/include
LIBVDWXC_LIB := $(INSTALL_PATH)/libvdwxc-$(LIBVDWXC_VER)/lib
PUGIXML_LIB := $(INSTALL_PATH)/pugixml-$(PUGIXML_VER)/lib
SIRIUS_INC := $(INSTALL_PATH)/sirius-$(USE_SIRIUS)/include/sirius
SIRIUS_LIB := $(INSTALL_PATH)/sirius-$(USE_SIRIUS)/lib
CFLAGS += -I$(LIBVDWXC_INC)
CFLAGS += -I$(SIRIUS_INC)
DFLAGS += -D__LIBVDWXC
DFLAGS += -D__SIRIUS
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(SIRIUS_LIB) -L$(SIRIUS_LIB) -lsirius -lsirius_cxx
LIBS += -Wl,-rpath=$(PUGIXML_LIB) -L$(PUGIXML_LIB) -lpugixml
LIBS += -Wl,-rpath=$(LIBVDWXC_LIB) -L$(LIBVDWXC_LIB) -lvdwxc
else
LIBS += $(SIRIUS_LIB)/libsirius.a
LIBS += $(SIRIUS_LIB)/libsirius_cxx.a
LIBS += $(PUGIXML_LIB)/libpugixml.a
LIBS += $(LIBVDWXC_LIB)/libvdwxc.a
endif
endif
ifneq ($(USE_SPFFT),)
USE_SPFFT := $(strip $(USE_SPFFT))
SPFFT_INC := $(INSTALL_PATH)/SpFFT-$(USE_SPFFT)/include
SPFFT_LIB := $(INSTALL_PATH)/SpFFT-$(USE_SPFFT)/lib
CFLAGS += -I$(SPFFT_INC)
DFLAGS += -D__SPFFT
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(SPFFT_LIB) -L$(SPFFT_LIB) -lspfft
else
LIBS += $(SPFFT_LIB)/libspfft.a
endif
endif
ifneq ($(USE_SPLA),)
USE_SPLA := $(strip $(USE_SPLA))
SPLA_INC := $(INSTALL_PATH)/SpLA-$(USE_SPLA)/include/spla
SPLA_LIB := $(INSTALL_PATH)/SpLA-$(USE_SPLA)/lib
CFLAGS += -I$(SPLA_INC)
DFLAGS += -D__SPLA
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(SPLA_LIB) -L$(SPLA_LIB) -lspla
else
LIBS += $(SPLA_LIB)/libspla.a
endif
endif
ifneq ($(USE_HDF5),)
USE_HDF5 := $(strip $(USE_HDF5))
HDF5_INC := $(INSTALL_PATH)/hdf5-$(USE_HDF5)/include
HDF5_LIB := $(INSTALL_PATH)/hdf5-$(USE_HDF5)/lib
CFLAGS += -I$(HDF5_INC)
DFLAGS += -D__HDF5
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath,$(HDF5_LIB) -L$(HDF5_LIB) -lhdf5_fortran -lhdf5
else
LIBS += $(HDF5_LIB)/libhdf5_fortran.a
LIBS += $(HDF5_LIB)/libhdf5_f90cstub.a
LIBS += $(HDF5_LIB)/libhdf5.a
endif
endif
ifneq ($(USE_COSMA),)
USE_COSMA := $(strip $(USE_COSMA))
COSMA_INC := $(INSTALL_PATH)/COSMA-$(USE_COSMA)/include
COSMA_LIB := $(INSTALL_PATH)/COSMA-$(USE_COSMA)/lib
CFLAGS += -I$(COSMA_INC)
DFLAGS += -D__COSMA
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(COSMA_LIB) -L$(COSMA_LIB) -lcosma_prefixed_pxgemm -lcosma -lcosta
else
LIBS += $(COSMA_LIB)/libcosma_prefixed_pxgemm.a
LIBS += $(COSMA_LIB)/libcosma.a
LIBS += $(COSMA_LIB)/libcosta.a
endif
endif
ifneq ($(USE_GSL),)
USE_GSL := $(strip $(USE_GSL))
GSL_INC := $(INSTALL_PATH)/gsl-$(USE_GSL)/include
GSL_LIB := $(INSTALL_PATH)/gsl-$(USE_GSL)/lib
CFLAGS += -I$(GSL_INC)
DFLAGS += -D__GSL
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(GSL_LIB) -L$(GSL_LIB) -lgsl
else
LIBS += $(GSL_LIB)/libgsl.a
endif
endif
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(MKL_LIB) -L$(MKL_LIB) -lmkl_scalapack_lp64
LIBS += -Wl,--start-group
LIBS += -lmkl_intel_lp64
LIBS += -lmkl_sequential
LIBS += -lmkl_core
LIBS += -lmkl_blacs_intelmpi_lp64
LIBS += -Wl,--end-group
else
LIBS += $(MKL_LIB)/libmkl_scalapack_lp64.a
LIBS += -Wl,--start-group
LIBS += $(MKL_LIB)/libmkl_intel_lp64.a
LIBS += $(MKL_LIB)/libmkl_sequential.a
LIBS += $(MKL_LIB)/libmkl_core.a
LIBS += $(MKL_LIB)/libmkl_blacs_intelmpi_lp64.a
LIBS += -Wl,--end-group
endif
ifeq ($(shell [ $(shell ldd --version | head -n 1 | tr -s '.' '\n' | tail -n 1) -ge 27 ] && echo yes), yes)
ifneq ($(USE_LIBTORCH),)
USE_LIBTORCH := $(strip $(USE_LIBTORCH))
LIBTORCH_INC := $(INSTALL_PATH)/libtorch-$(USE_LIBTORCH)/include
LIBTORCH_LIB := $(INSTALL_PATH)/libtorch-$(USE_LIBTORCH)/lib
CFLAGS += -I$(LIBTORCH_INC)
DFLAGS += -D__LIBTORCH
LIBS += -Wl,-rpath=$(LIBTORCH_LIB) -L$(LIBTORCH_LIB) -lc10 -ltorch_cpu -ltorch
endif
endif
CFLAGS += $(DFLAGS)
CFLAGS += -I$(MKLROOT)/include
CFLAGS += -I$(MKLROOT)/include/fftw
CXXFLAGS := $(CFLAGS) -std=c++14
FCFLAGS := $(CFLAGS)
FCFLAGS += -diag-disable=8291
FCFLAGS += -diag-disable=8293
FCFLAGS += -fpp
FCFLAGS += -fpscomp logicals
FCFLAGS += -free
#FCFLAGS += -std08
LDFLAGS += $(FCFLAGS)
LDFLAGS_C := -nofor-main
LIBS += -lz -ldl -lstdc++
# Required due to memory leak that occurs if high optimisations are used
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F
$(FC) -c $(subst O2,O0,$(FCFLAGS)) $<
# Required due to SEGFAULTS occurring for higher optimisation levels
paw_basis_types.o: paw_basis_types.F
$(FC) -c $(subst O2,O1,$(FCFLAGS)) $<
# Reduce compilation time
hfx_contraction_methods.o: hfx_contraction_methods.F
$(FC) -c $(subst -O2,-O1,$(FCFLAGS)) $<
# End

View file

@ -1,8 +0,0 @@
CC = gcc
FC = mpifort
LD = mpifort
AR = ar -r
DFLAGS = -D__FFTW3 -D__NO_STATM_ACCESS -D__parallel
FCFLAGS = -O2 -fopenmp -funroll-loops -ftree-vectorize -march=native -ffree-form $(DFLAGS)
LDFLAGS = $(FCFLAGS)
LIBS = -llapack -lblas -lscalapack -lfftw3 -lfftw3_omp -lmpich

View file

@ -1,9 +0,0 @@
CC = gcc
FC = gfortran
LD = gfortran
AR = ar -r
DFLAGS = -D__FFTW3 -D__NO_STATM_ACCESS
FCFLAGS = -O2 -fopenmp -funroll-loops -ftree-vectorize -march=native -ffree-form $(DFLAGS)
LDFLAGS = $(FCFLAGS)
LIBS = -llapack -lblas -lfftw3 -lfftw3_omp

View file

@ -1,26 +0,0 @@
# arch file for CP2K on Fugaku with the Fujitsu compiler, with minimal dependencies.
# RIKEN uses Spack to provide libraries.
# XXX: you may have to append a hash, e.g., /3q6zoxs
FFTW_DIR := $(shell spack location -i fujitsu-fftw)
CC = mpifccpx
CXX = mpiFCCpx
AR = ar -r
FC = mpifrtpx
LD = mpiFCCpx
DFLAGS = -D__parallel
DFLAGS += -D__FFTW3
FCFLAGS = -Free -X08 -Kopenmp,SVE $(DFLAGS)
FCFLAGS += -I$(FFTW_DIR)/include
CFLAGS = -Kopenmp,SVE $(DFLAGS)
CXXFLAGS = -Kopenmp,SVE $(DFLAGS)
LDFLAGS = -SCALAPACK -SSL2 $(CXXFLAGS) --linkfortran
# The libfftw.so provided by fj-fftw is missing the RPATH/RUNPATH to the compilers libfjcrt.so.1, add it explicitly to avoid a warning.
LIBS += -L$(FFTW_DIR)/lib -lfftw3 -lfftw3_omp -lfjcrt
# the compiler runs out of memory when optimizing the following:
mp2_eri.o: mp2_eri.F
$(TOOLSRC)/build_utils/fypp $(FYPPFLAGS) $< $*.F90
$(FC) -c $(FCFLAGS) -O0 -D__SHORT_FILE__="\"$(subst $(SRCDIR)/,,$<)\"" -I'$(dir $<)' $(OBJEXTSINCL) $*.F90 $(FCLOGPIPE)

View file

@ -1,30 +0,0 @@
# The following settings are intended for IBM/BlueGene Q with
# - ESSL library essl/5.1 or later
# - ESSL SMP library esslsmp/5.1 or later
# - LAPACK library lapack/3.4.2 or later
# - SCALAPACK library scalapack/1.8.0 or later
# - MASS library mass/7.3 or later
# Optional (if FFTW3 is requested)
# - FFTW3 library fftw/3.3.3 or later
# WARNING: Check your own libraries and paths !
#
CC = mpixlc
FC = mpixlf2003_r -qpreprocess
LD = mpixlf2003_r
AR = ar -r
DFLAGS = -D__AIX -D__FFTW3 -D__FFTSG -D__parallel
FCFLAGS = $(DFLAGS) -O3 -qhot -g -qsmp=omp -qstrict -qarch=qp -qtune=qp -qmaxmem=-1 \
-I/bgsys/ibm_essl/prod/opt/ibmmath/essl/5.1/include \
-I/bglocal/cn/pub/LAPACK/3.4.2/include -I/bglocal/cn/pub/FFTW/3.3.3/include
LDFLAGS = $(FCFLAGS) -Wl,--allow-multiple-definition
LIBS = -L/bglocal/cn/pub/FFTW/3.3.3/lib -lfftw3_mpi -lfftw3_omp -lfftw3 -lfftw3f_mpi -lfftw3f_omp -lfftw3f \
/bglocal/cn/pub/ScaLAPACK/1.8.0/lib/libscalapack.a /bglocal/cn/pub/BLACS/1.1/lib/libblacsF77init.a \
/bglocal/cn/pub/BLACS/1.1/lib/libblacsCinit.a /bglocal/cn/pub/BLACS/1.1/lib/libblacs.a \
/bglocal/cn/pub/LAPACK/3.4.2/lib/liblapack.a \
/bgsys/ibm_essl/prod/opt/ibmmath/essl/5.1/lib64/libesslbg.a \
/opt/ibmcmp/xlmass/bg/7.3/bglib64/libmass.a
OBJECTS_ARCHITECTURE = machine_aix.o

View file

@ -1,52 +0,0 @@
# arch file for CP2K on Isambard2 with the Fujitsu compiler, with minimal dependencies.
CC = mpifcc
CXX = mpiFCC
AR = ar -r
FC = mpifrt
LD = mpifrt
DFLAGS = -D__parallel
#DFLAGS += -D__FFTW3
FCFLAGS = -Free -X08 -Kopenmp,SVE $(DFLAGS)
CFLAGS = -Kopenmp,SVE $(DFLAGS)
CXXFLAGS = -Kopenmp,SVE $(DFLAGS)
LDFLAGS = -SCALAPACK -SSL2 $(FCFLAGS)
#LIBS += -lfftw3 -lfftw3_omp
# the compiler runs out of memory when optimizing the following:
mp2_eri.o: mp2_eri.F
$(TOOLSRC)/build_utils/fypp $(FYPPFLAGS) $< $*.F90
$(FC) -c $(FCFLAGS) -O0 -D__SHORT_FILE__="\"$(subst $(SRCDIR)/,,$<)\"" -I'$(dir $<)' $(OBJEXTSINCL) $*.F90 $(FCLOGPIPE)
# Note: the Fujitsu compiler still has a problem with some INTENT specifications in DBCSR and you may have to apply the following patch:
# diff --git a/exts/dbcsr/src/dist/dbcsr_dist_methods.F b/exts/dbcsr/src/dist/dbcsr_dist_methods.F
# index 38a5724e3..a3f242da4 100644
# --- a/exts/dbcsr/src/dist/dbcsr_dist_methods.F
# +++ b/exts/dbcsr/src/dist/dbcsr_dist_methods.F
# @@ -77,7 +77,7 @@ CONTAINS
# OPTIONAL :: template
# INTEGER, INTENT(IN), OPTIONAL :: group
# INTEGER, DIMENSION(:, :), OPTIONAL, POINTER :: pgrid
# - INTEGER, DIMENSION(:), INTENT(IN), POINTER, CONTIGUOUS :: row_dist, col_dist
# + INTEGER, DIMENSION(:), POINTER, CONTIGUOUS :: row_dist, col_dist
# LOGICAL, INTENT(IN), OPTIONAL :: reuse_arrays
#
# TYPE(dbcsr_mp_obj) :: mp_env
# @@ -116,7 +116,7 @@ CONTAINS
# !! distribution
# TYPE(dbcsr_mp_obj), INTENT(IN) :: mp_env
# !! multiprocessing environment
# - TYPE(array_i1d_obj), INTENT(IN) :: row_dist_block, col_dist_block
# + TYPE(array_i1d_obj) :: row_dist_block, col_dist_block
# TYPE(array_i1d_obj), INTENT(IN), OPTIONAL :: local_rows, local_cols
#
# INTEGER, DIMENSION(:), POINTER, CONTIGUOUS :: cont_row_dist, cont_col_dist, &
# @@ -145,7 +145,7 @@ CONTAINS
# !! distribution
# TYPE(dbcsr_mp_obj), INTENT(IN) :: mp_env
# !! multiprocessing environment
# - INTEGER, DIMENSION(:), INTENT(IN), POINTER, CONTIGUOUS :: row_dist_block, col_dist_block
# + INTEGER, DIMENSION(:), POINTER, CONTIGUOUS :: row_dist_block, col_dist_block
# INTEGER, DIMENSION(:), INTENT(IN), OPTIONAL, &
# POINTER, CONTIGUOUS :: local_rows, local_cols
# LOGICAL, OPTIONAL

View file

@ -1,171 +0,0 @@
#!/bin/bash
#
# CP2K AMD arch file for a serial x86_64 binary
#
# Tested with: AMD AOCC 5.0.0
#
# Usage: Source this arch file and then run make as instructed.
#
# Last update: 12.02.2025
#
# \
if [[ "${0}" == "${BASH_SOURCE}" ]]; then \
echo "ERROR: Script ${0##*/} must be sourced"; \
echo "Usage: source ${0##*/}"; \
exit 1; \
fi; \
this_file=${BASH_SOURCE##*/}; \
cd tools/toolchain; \
rm -rf build; \
[[ -z "${target_cpu}" ]] && target_cpu="native"; \
./install_cp2k_toolchain.sh -j${maxtasks} --mpi-mode=no --no-arch-files --target-cpu=${target_cpu} --with-amd --with-dftd4=no --with-libxsmm; \
source ./install/setup; \
cd ../..; \
echo; \
echo "Check the output above for error messages and consistency!"; \
echo; \
echo "If everything is OK, you can build a CP2K production binary with"; \
echo " make -j ARCH=${this_file%.*} VERSION=${this_file##*.} TARGET_CPU=${target_cpu}"; \
echo "Further checks are performed, if DO_CHECKS=yes is added."; \
echo; \
return
# Set options
DO_CHECKS := no
TARGET_CPU := native
# Retrieve package versions
AMD_VER := $(shell clang -dumpversion)
#USE_DFTD4 := $(DFTD4_VER)
USE_FFTW := $(FFTW_VER)
USE_LIBGRPP := $(LIBGRPP_VER)
USE_LIBINT := $(LIBINT_VER)
USE_LIBVORI := $(LIBVORI_VER)
USE_LIBXC := $(LIBXC_VER)
#USE_LIBXSMM := $(LIBXSMM_VER)
USE_OPENBLAS := $(OPENBLAS_VER)
USE_SPGLIB := $(SPGLIB_VER)
LMAX := 5
MAX_CONTR := 4
CC := clang
CXX := clang++
FC := flang
LD := flang
AR := ar -r
ifeq ($(TARGET_CPU), generic)
CFLAGS := -O2 -fPIC -fopenmp -g -mtune=$(TARGET_CPU)
else
CFLAGS := -O2 -fPIC -fopenmp -g -march=$(TARGET_CPU) -mtune=$(TARGET_CPU)
endif
CFLAGS += -mllvm -enable-newgvn=true
DFLAGS += -D__MAX_CONTR=$(strip $(MAX_CONTR))
INSTALL_PATH := $(PWD)/tools/toolchain/install
# Settings for regression testing
ifeq ($(DO_CHECKS), yes)
DFLAGS += -D__CHECK_DIAG
endif
ifneq ($(USE_LIBVORI),)
USE_LIBVORI := $(strip $(USE_LIBVORI))
LIBVORI_LIB := $(INSTALL_PATH)/libvori-$(USE_LIBVORI)/lib
DFLAGS += -D__LIBVORI
LIBS += $(LIBVORI_LIB)/libvori.a
endif
ifneq ($(USE_LIBXC),)
USE_LIBXC := $(strip $(USE_LIBXC))
LIBXC_INC := $(INSTALL_PATH)/libxc-$(USE_LIBXC)/include
LIBXC_LIB := $(INSTALL_PATH)/libxc-$(USE_LIBXC)/lib
CFLAGS += -I$(LIBXC_INC)
DFLAGS += -D__LIBXC
LIBS += $(LIBXC_LIB)/libxcf03.a
LIBS += $(LIBXC_LIB)/libxc.a
endif
ifneq ($(USE_DFTD4),)
USE_DFTD4 := $(strip $(USE_DFTD4))
DFTD4_INC := $(INSTALL_PATH)/dftd4-$(USE_DFTD4)/include
DFTD4_LIB := $(INSTALL_PATH)/dftd4-$(USE_DFTD4)/lib
CFLAGS += -I$(DFTD4_INC)/dftd4/AMD-$(AMD_VER)
DFLAGS += -D__DFTD4
LIBS += $(DFTD4_LIB)/libdftd4.a
LIBS += $(DFTD4_LIB)/libmstore.a
LIBS += $(DFTD4_LIB)/libmulticharge.a
LIBS += $(DFTD4_LIB)/libmctc-lib.a
endif
ifneq ($(USE_LIBGRPP),)
USE_LIBGRPP := $(strip $(USE_LIBGRPP))
DFLAGS += -D__LIBGRPP
endif
ifneq ($(USE_LIBINT),)
USE_LIBINT := $(strip $(USE_LIBINT))
LMAX := $(strip $(LMAX))
LIBINT_INC := $(INSTALL_PATH)/libint-v$(USE_LIBINT)-cp2k-lmax-$(LMAX)/include
LIBINT_LIB := $(INSTALL_PATH)/libint-v$(USE_LIBINT)-cp2k-lmax-$(LMAX)/lib
CFLAGS += -I$(LIBINT_INC)
DFLAGS += -D__LIBINT
LIBS += $(LIBINT_LIB)/libint2.a
endif
ifneq ($(USE_SPGLIB),)
USE_SPGLIB := $(strip $(USE_SPGLIB))
SPGLIB_INC := $(INSTALL_PATH)/spglib-$(USE_SPGLIB)/include
SPGLIB_LIB := $(INSTALL_PATH)/spglib-$(USE_SPGLIB)/lib
CFLAGS += -I$(SPGLIB_INC)
DFLAGS += -D__SPGLIB
LIBS += $(SPGLIB_LIB)/libsymspg.a
endif
ifneq ($(USE_LIBXSMM),)
USE_LIBXSMM := $(strip $(USE_LIBXSMM))
LIBXSMM_INC := $(INSTALL_PATH)/libxsmm-$(USE_LIBXSMM)/include
LIBXSMM_LIB := $(INSTALL_PATH)/libxsmm-$(USE_LIBXSMM)/lib
CFLAGS += -I$(LIBXSMM_INC)
DFLAGS += -D__LIBXSMM
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(LIBXSMM_LIB) -L$(LIBXSMM_LIB) -lxsmmf -lxsmmext -lxsmm
else
LIBS += $(LIBXSMM_LIB)/libxsmmf.a
LIBS += $(LIBXSMM_LIB)/libxsmmext.a
LIBS += $(LIBXSMM_LIB)/libxsmm.a
endif
endif
ifneq ($(USE_FFTW),)
USE_FFTW := $(strip $(USE_FFTW))
FFTW_INC := $(INSTALL_PATH)/fftw-$(USE_FFTW)/include
FFTW_LIB := $(INSTALL_PATH)/fftw-$(USE_FFTW)/lib
CFLAGS += -I$(FFTW_INC)
DFLAGS += -D__FFTW3
LIBS += $(FFTW_LIB)/libfftw3_omp.a
LIBS += $(FFTW_LIB)/libfftw3.a
endif
ifneq ($(USE_OPENBLAS),)
USE_OPENBLAS := $(strip $(USE_OPENBLAS))
OPENBLAS_INC := $(INSTALL_PATH)/openblas-$(USE_OPENBLAS)/include
OPENBLAS_LIB := $(INSTALL_PATH)/openblas-$(USE_OPENBLAS)/lib
CFLAGS += -I$(OPENBLAS_INC)
LIBS += $(OPENBLAS_LIB)/libopenblas.a
endif
CFLAGS += $(DFLAGS) $(CFLAGS_DEBUG)
FCFLAGS := $(CFLAGS) $(FCFLAGS_DEBUG) $(WFLAGS)
FCFLAGS += -ffree-form
FCFLAGS += -Mbackslash
LDFLAGS += $(FCFLAGS)
LDFLAGS_C := -fno-fortran-main
LIBS += -Wl,--whole-archive -lpthread -ldl -Wl,--no-whole-archive -lstdc++
# End

View file

@ -1,201 +0,0 @@
#!/bin/bash
#
# CP2K (GNU aarch64) arch file for a serial static ARM64 binary
#
# Tested with: GNU 14.2.0
#
# Usage: Source this arch file and then run make as instructed.
#
# Last update: 12.02.2025
#
# \
if [[ "${0}" == "${BASH_SOURCE}" ]]; then \
echo "ERROR: Script ${0##*/} must be sourced"; \
echo "Usage: source ${0##*/}"; \
exit 1; \
fi; \
this_file=${BASH_SOURCE##*/}; \
cd tools/toolchain; \
rm -rf build; \
[[ -z "${target_cpu}" ]] && target_cpu="native"; \
./install_cp2k_toolchain.sh -j${maxtasks} --mpi-mode=no --no-arch-files --target-cpu=${target_cpu} --with-gcc --with-dftd4; \
source ./install/setup; \
cd ../..; \
echo; \
echo "Check the output above for error messages and consistency!"; \
echo; \
echo "If everything is OK, you can build a CP2K production binary with"; \
echo " make -j ARCH=${this_file%.*} VERSION=${this_file##*.} TARGET_CPU=${target_cpu}"; \
echo "Further checks are performed, if DO_CHECKS=yes is added."; \
echo; \
return
# Set options
DO_CHECKS := no
TARGET_CPU := native
# Retrieve package versions
GNU_VER := $(shell gcc -dumpfullversion)
USE_DFTD4 := $(DFTD4_VER)
USE_FFTW := $(FFTW_VER)
USE_LIBGRPP := $(LIBGRPP_VER)
USE_LIBINT := $(LIBINT_VER)
USE_LIBVORI := $(LIBVORI_VER)
USE_LIBXC := $(LIBXC_VER)
USE_LIBXSMM := $(LIBXSMM_VER)
USE_OPENBLAS := $(OPENBLAS_VER)
USE_SPGLIB := $(SPGLIB_VER)
LMAX := 5
MAX_CONTR := 4
CC := gcc
CXX := g++
FC := gfortran
LD := gfortran
AR := ar -r
CFLAGS := -O2 -fopenmp -fopenmp-simd -ftree-vectorize -funroll-loops -g -mtune=$(TARGET_CPU)
DFLAGS += -D__MAX_CONTR=$(strip $(MAX_CONTR))
INSTALL_PATH := $(PWD)/tools/toolchain/install
# Settings for regression testing
ifeq ($(DO_CHECKS), yes)
DFLAGS += -D__CHECK_DIAG
# CFLAGS_DEBUG := -fsanitize=address
CFLAGS_DEBUG := -fsanitize=leak
FCFLAGS_DEBUG := -fcheck=bounds,do,recursion,pointer
FCFLAGS_DEBUG += -fcheck=all,no-array-temps
FCFLAGS_DEBUG += -ffpe-trap=invalid,overflow,zero
FCFLAGS_DEBUG += -fimplicit-none
FCFLAGS_DEBUG += -finit-derived
FCFLAGS_DEBUG += -finit-real=snan
FCFLAGS_DEBUG += -finit-integer=-42
FCFLAGS_DEBUG += -finline-matmul-limit=0
WFLAGS := -Werror=aliasing
WFLAGS += -Werror=ampersand
WFLAGS += -Werror=c-binding-type
WFLAGS += -Werror=conversion
WFLAGS += -Werror=intrinsic-shadow
WFLAGS += -Werror=intrinsics-std
WFLAGS += -Werror=line-truncation
WFLAGS += -Wrealloc-lhs
WFLAGS += -Werror=tabs
WFLAGS += -Werror=target-lifetime
WFLAGS += -Werror=underflow
WFLAGS += -Werror=unused-but-set-variable
WFLAGS += -Werror=unused-dummy-argument
WFLAGS += -Werror=unused-variable
endif
ifneq ($(USE_LIBVORI),)
USE_LIBVORI := $(strip $(USE_LIBVORI))
LIBVORI_LIB := $(INSTALL_PATH)/libvori-$(USE_LIBVORI)/lib
DFLAGS += -D__LIBVORI
LIBS += $(LIBVORI_LIB)/libvori.a
endif
ifneq ($(USE_LIBXC),)
USE_LIBXC := $(strip $(USE_LIBXC))
LIBXC_INC := $(INSTALL_PATH)/libxc-$(USE_LIBXC)/include
LIBXC_LIB := $(INSTALL_PATH)/libxc-$(USE_LIBXC)/lib
CFLAGS += -I$(LIBXC_INC)
DFLAGS += -D__LIBXC
LIBS += $(LIBXC_LIB)/libxcf03.a
LIBS += $(LIBXC_LIB)/libxc.a
endif
ifneq ($(USE_DFTD4),)
USE_DFTD4 := $(strip $(USE_DFTD4))
DFTD4_INC := $(INSTALL_PATH)/dftd4-$(USE_DFTD4)/include
DFTD4_LIB := $(INSTALL_PATH)/dftd4-$(USE_DFTD4)/lib
CFLAGS += -I$(DFTD4_INC)/dftd4/GNU-$(GNU_VER)
DFLAGS += -D__DFTD4
LIBS += $(DFTD4_LIB)/libdftd4.a
LIBS += $(DFTD4_LIB)/libmstore.a
LIBS += $(DFTD4_LIB)/libmulticharge.a
LIBS += $(DFTD4_LIB)/libmctc-lib.a
endif
ifneq ($(USE_LIBGRPP),)
USE_LIBGRPP := $(strip $(USE_LIBGRPP))
DFLAGS += -D__LIBGRPP
endif
ifneq ($(USE_LIBINT),)
USE_LIBINT := $(strip $(USE_LIBINT))
LMAX := $(strip $(LMAX))
LIBINT_INC := $(INSTALL_PATH)/libint-v$(USE_LIBINT)-cp2k-lmax-$(LMAX)/include
LIBINT_LIB := $(INSTALL_PATH)/libint-v$(USE_LIBINT)-cp2k-lmax-$(LMAX)/lib
CFLAGS += -I$(LIBINT_INC)
DFLAGS += -D__LIBINT
LIBS += $(LIBINT_LIB)/libint2.a
LIBS += $(LIBINT_LIB)/libint2.a
endif
ifneq ($(USE_SPGLIB),)
USE_SPGLIB := $(strip $(USE_SPGLIB))
SPGLIB_INC := $(INSTALL_PATH)/spglib-$(USE_SPGLIB)/include
SPGLIB_LIB := $(INSTALL_PATH)/spglib-$(USE_SPGLIB)/lib
CFLAGS += -I$(SPGLIB_INC)
DFLAGS += -D__SPGLIB
LIBS += $(SPGLIB_LIB)/libsymspg.a
endif
ifneq ($(USE_LIBXSMM),)
USE_LIBXSMM := $(strip $(USE_LIBXSMM))
LIBXSMM_INC := $(INSTALL_PATH)/libxsmm-$(USE_LIBXSMM)/include
LIBXSMM_LIB := $(INSTALL_PATH)/libxsmm-$(USE_LIBXSMM)/lib
CFLAGS += -I$(LIBXSMM_INC)
DFLAGS += -D__LIBXSMM
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(LIBXSMM_LIB) -L$(LIBXSMM_LIB) -lxsmmf -lxsmmext -lxsmm
else
LIBS += $(LIBXSMM_LIB)/libxsmmf.a
LIBS += $(LIBXSMM_LIB)/libxsmmext.a
LIBS += $(LIBXSMM_LIB)/libxsmm.a
endif
endif
ifneq ($(USE_FFTW),)
USE_FFTW := $(strip $(USE_FFTW))
FFTW_INC := $(INSTALL_PATH)/fftw-$(USE_FFTW)/include
FFTW_LIB := $(INSTALL_PATH)/fftw-$(USE_FFTW)/lib
CFLAGS += -I$(FFTW_INC)
DFLAGS += -D__FFTW3
LIBS += $(FFTW_LIB)/libfftw3_omp.a
LIBS += $(FFTW_LIB)/libfftw3.a
endif
ifneq ($(USE_OPENBLAS),)
USE_OPENBLAS := $(strip $(USE_OPENBLAS))
OPENBLAS_INC := $(INSTALL_PATH)/openblas-$(USE_OPENBLAS)/include
OPENBLAS_LIB := $(INSTALL_PATH)/openblas-$(USE_OPENBLAS)/lib
CFLAGS += -I$(OPENBLAS_INC)
LIBS += $(OPENBLAS_LIB)/libopenblas.a
endif
CFLAGS += $(DFLAGS) $(CFLAGS_DEBUG)
FCFLAGS := $(CFLAGS) $(FCFLAGS_DEBUG) $(WFLAGS)
ifeq ($(shell [ $(shell gcc -dumpversion | cut -d. -f1) -gt 9 ] && echo yes), yes)
FCFLAGS += -fallow-argument-mismatch
endif
FCFLAGS += -fbacktrace
FCFLAGS += -ffree-form
FCFLAGS += -ffree-line-length-none
FCFLAGS += -fno-omit-frame-pointer
FCFLAGS += -std=f2008
# The LeakSanitizer does not work with static linking
ifeq ($(DO_CHECKS), yes)
LDFLAGS += $(FCFLAGS)
else
LDFLAGS += $(FCFLAGS) -static
endif
LIBS += -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -ldl -lstdc++
# End

View file

@ -1,383 +0,0 @@
#!/bin/bash
#
# CP2K (GNU aarch64) arch file for Linux clusters
#
# Tested with: GNU 14.2.0 and MPICH 4.0.3
#
# Usage: Source this arch file and then run make as instructed.
# A full toolchain installation is performed as default.
#
# Last update: 14.05.2025
#
# \
if [[ "${0}" == "${BASH_SOURCE}" ]]; then \
echo "ERROR: Script ${0##*/} must be sourced"; \
echo "Usage: source ${0##*/}"; \
exit 1; \
fi; \
this_file=${BASH_SOURCE##*/}; \
cd tools/toolchain; \
rm -rf build; \
[[ -z "${mpi_implementation}" ]] && mpi_implementation="mpich"; \
[[ -z "${target_cpu}" ]] && target_cpu="native"; \
./install_cp2k_toolchain.sh --install-all -j${maxtasks} --no-arch-files --target-cpu=${target_cpu} --with-gcc --with-${mpi_implementation}; \
source ./install/setup; \
cd ../..; \
echo; \
echo "Check the output above for error messages and consistency!"; \
echo; \
echo "If everything is OK, you can build a CP2K production binary with"; \
echo " make -j ARCH=${this_file%.*} VERSION=${this_file##*.} TARGET_CPU=${target_cpu}"; \
echo; \
echo "Alternatively, you can add further checks, e.g. for regression testing, with"; \
echo " make -j ARCH=${this_file%.*} VERSION=${this_file##*.} TARGET_CPU=${target_cpu} DO_CHECKS=yes"; \
echo "or build CP2K only with shared libraries using"; \
echo " make -j ARCH=${this_file%.*} VERSION=${this_file##*.} TARGET_CPU=${target_cpu} SHARED=yes"; \
echo "or build CP2K as a library with"; \
echo " make -j ARCH=${this_file%.*} VERSION=${this_file##*.} TARGET_CPU=${target_cpu} libcp2k"; \
echo; \
echo "Run always the following command before using the CP2K binary"; \
echo " source ${PWD}/tools/toolchain/install/setup"; \
echo; \
return
# Set options
DO_CHECKS := no
SHARED := no
TARGET_CPU := native
# Retrieve package versions
GNU_VER := $(shell gcc -dumpfullversion)
USE_COSMA := $(COSMA_VER)
USE_DFTD4 := $(DFTD4_VER)
USE_ELPA := $(ELPA_VER)
USE_FFTW := $(FFTW_VER)
USE_HDF5 := $(HDF5_VER)
USE_LIBGRPP := $(LIBGRPP_VER)
USE_LIBINT := $(LIBINT_VER)
USE_LIBVORI := $(LIBVORI_VER)
USE_LIBXC := $(LIBXC_VER)
USE_LIBXSMM := $(LIBXSMM_VER)
USE_OPENBLAS := $(OPENBLAS_VER)
USE_PLUMED := $(PLUMED_VER)
USE_SCALAPACK := $(SCALAPACK_VER)
USE_SIRIUS := $(SIRIUS_VER)
USE_SPFFT := $(SPFFT_VER)
USE_SPGLIB := $(SPGLIB_VER)
USE_SPLA := $(SPLA_VER)
LMAX := 5
MAX_CONTR := 4
CC := mpicc
FC := mpifort
LD := mpifort
AR := ar -r
CFLAGS := -O2 -fopenmp -fopenmp-simd -ftree-vectorize -funroll-loops -g -mtune=$(TARGET_CPU)
DFLAGS := -D__parallel
DFLAGS += -D__HAS_IEEE_EXCEPTIONS
DFLAGS += -D__MAX_CONTR=$(strip $(MAX_CONTR))
INSTALL_PATH := $(PWD)/tools/toolchain/install
ifeq ($(SHARED), yes)
LD_SHARED := $(FC) -shared
CFLAGS += -fPIC
LDFLAGS := -Wl,--enable-new-dtags
CP2K_LIB := $(PWD)/lib/$(ARCH)/$(ONEVERSION)
LDFLAGS += -Wl,-rpath=$(CP2K_LIB)
LDFLAGS += -Wl,-rpath=$(CP2K_LIB)/exts/dbcsr
endif
# Settings for regression testing
ifeq ($(DO_CHECKS), yes)
DFLAGS += -D__CHECK_DIAG
# CFLAGS_DEBUG := -fsanitize=address
CFLAGS_DEBUG := -fsanitize=leak
FCFLAGS_DEBUG := -fcheck=bounds,do,recursion,pointer
FCFLAGS_DEBUG += -fcheck=all,no-array-temps
FCFLAGS_DEBUG += -ffpe-trap=invalid,overflow,zero
FCFLAGS_DEBUG += -fimplicit-none
FCFLAGS_DEBUG += -finit-derived
FCFLAGS_DEBUG += -finit-real=snan
FCFLAGS_DEBUG += -finit-integer=-42
FCFLAGS_DEBUG += -finline-matmul-limit=0
WFLAGS := -Werror=aliasing
WFLAGS += -Werror=ampersand
WFLAGS += -Werror=c-binding-type
WFLAGS += -Werror=conversion
WFLAGS += -Werror=intrinsic-shadow
WFLAGS += -Werror=intrinsics-std
WFLAGS += -Werror=line-truncation
WFLAGS += -Wrealloc-lhs
WFLAGS += -Werror=tabs
WFLAGS += -Werror=target-lifetime
WFLAGS += -Werror=underflow
WFLAGS += -Werror=unused-but-set-variable
WFLAGS += -Werror=unused-dummy-argument
WFLAGS += -Werror=unused-variable
endif
ifneq ($(USE_PLUMED),)
USE_PLUMED := $(strip $(USE_PLUMED))
USE_GSL := $(GSL_VER)
PLUMED_LIB := $(INSTALL_PATH)/plumed-$(USE_PLUMED)/lib
DFLAGS += -D__PLUMED2
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(PLUMED_LIB) -L$(PLUMED_LIB) -lplumed -lplumedKernel
else
LIBS += $(PLUMED_LIB)/libplumed.a
endif
endif
ifneq ($(USE_ELPA),)
USE_ELPA := $(strip $(USE_ELPA))
ELPA_INC := $(INSTALL_PATH)/elpa-$(USE_ELPA)/cpu/include/elpa_openmp-$(USE_ELPA)
ELPA_LIB := $(INSTALL_PATH)/elpa-$(USE_ELPA)/cpu/lib
CFLAGS += -I$(ELPA_INC)/elpa -I$(ELPA_INC)/modules
DFLAGS += -D__ELPA
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(ELPA_LIB) -L$(ELPA_LIB) -lelpa_openmp
else
LIBS += $(ELPA_LIB)/libelpa_openmp.a
endif
endif
ifneq ($(USE_LIBVORI),)
USE_LIBVORI := $(strip $(USE_LIBVORI))
LIBVORI_LIB := $(INSTALL_PATH)/libvori-$(USE_LIBVORI)/lib
DFLAGS += -D__LIBVORI
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(LIBVORI_LIB) -L$(LIBVORI_LIB) -lvori
else
LIBS += $(LIBVORI_LIB)/libvori.a
endif
endif
ifneq ($(USE_LIBXC),)
USE_LIBXC := $(strip $(USE_LIBXC))
LIBXC_INC := $(INSTALL_PATH)/libxc-$(USE_LIBXC)/include
LIBXC_LIB := $(INSTALL_PATH)/libxc-$(USE_LIBXC)/lib
CFLAGS += -I$(LIBXC_INC)
DFLAGS += -D__LIBXC
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(LIBXC_LIB) -L$(LIBXC_LIB) -lxcf03 -lxc
else
LIBS += $(LIBXC_LIB)/libxcf03.a
LIBS += $(LIBXC_LIB)/libxc.a
endif
endif
ifneq ($(USE_DFTD4),)
USE_DFTD4 := $(strip $(USE_DFTD4))
DFTD4_INC := $(INSTALL_PATH)/dftd4-$(USE_DFTD4)/include
DFTD4_LIB := $(INSTALL_PATH)/dftd4-$(USE_DFTD4)/lib
CFLAGS += -I$(DFTD4_INC)/dftd4/GNU-$(GNU_VER)
DFLAGS += -D__DFTD4
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(DFTD4_LIB) -L$(DFTD4_LIB) -ldftd4 -lmstore -lmulticharge -lmctc-lib
else
LIBS += $(DFTD4_LIB)/libdftd4.a
LIBS += $(DFTD4_LIB)/libmstore.a
LIBS += $(DFTD4_LIB)/libmulticharge.a
LIBS += $(DFTD4_LIB)/libmctc-lib.a
endif
endif
ifneq ($(USE_LIBGRPP),)
USE_LIBGRPP := $(strip $(USE_LIBGRPP))
DFLAGS += -D__LIBGRPP
endif
ifneq ($(USE_LIBINT),)
USE_LIBINT := $(strip $(USE_LIBINT))
LMAX := $(strip $(LMAX))
LIBINT_INC := $(INSTALL_PATH)/libint-v$(USE_LIBINT)-cp2k-lmax-$(LMAX)/include
LIBINT_LIB := $(INSTALL_PATH)/libint-v$(USE_LIBINT)-cp2k-lmax-$(LMAX)/lib
CFLAGS += -I$(LIBINT_INC)
DFLAGS += -D__LIBINT
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(LIBINT_LIB) -L$(LIBINT_LIB) -lint2
else
LIBS += $(LIBINT_LIB)/libint2.a
LIBS += $(LIBINT_LIB)/libint2.a
endif
endif
ifneq ($(USE_SPGLIB),)
USE_SPGLIB := $(strip $(USE_SPGLIB))
SPGLIB_INC := $(INSTALL_PATH)/spglib-$(USE_SPGLIB)/include
SPGLIB_LIB := $(INSTALL_PATH)/spglib-$(USE_SPGLIB)/lib
CFLAGS += -I$(SPGLIB_INC)
DFLAGS += -D__SPGLIB
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(SPGLIB_LIB) -L$(SPGLIB_LIB) -lsymspg
else
LIBS += $(SPGLIB_LIB)/libsymspg.a
endif
endif
ifneq ($(USE_LIBXSMM),)
USE_LIBXSMM := $(strip $(USE_LIBXSMM))
LIBXSMM_INC := $(INSTALL_PATH)/libxsmm-$(USE_LIBXSMM)/include
LIBXSMM_LIB := $(INSTALL_PATH)/libxsmm-$(USE_LIBXSMM)/lib
CFLAGS += -I$(LIBXSMM_INC)
DFLAGS += -D__LIBXSMM
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(LIBXSMM_LIB) -L$(LIBXSMM_LIB) -lxsmmf -lxsmmext -lxsmm
else
LIBS += $(LIBXSMM_LIB)/libxsmmf.a
LIBS += $(LIBXSMM_LIB)/libxsmmext.a
LIBS += $(LIBXSMM_LIB)/libxsmm.a
endif
endif
ifneq ($(USE_SIRIUS),)
USE_SIRIUS := $(strip $(USE_SIRIUS))
USE_GSL := ${GSL_VER}
LIBVDWXC_INC := $(INSTALL_PATH)/libvdwxc-$(LIBVDWXC_VER)/include
LIBVDWXC_LIB := $(INSTALL_PATH)/libvdwxc-$(LIBVDWXC_VER)/lib
PUGIXML_LIB := $(INSTALL_PATH)/pugixml-$(PUGIXML_VER)/lib
SIRIUS_INC := $(INSTALL_PATH)/sirius-$(USE_SIRIUS)/include/sirius
SIRIUS_LIB := $(INSTALL_PATH)/sirius-$(USE_SIRIUS)/lib
CFLAGS += -I$(LIBVDWXC_INC)
CFLAGS += -I$(SIRIUS_INC)
DFLAGS += -D__LIBVDWXC
DFLAGS += -D__SIRIUS
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(SIRIUS_LIB) -L$(SIRIUS_LIB) -lsirius -lsirius_cxx
LIBS += -Wl,-rpath=$(PUGIXML_LIB) -L$(PUGIXML_LIB) -lpugixml
LIBS += -Wl,-rpath=$(LIBVDWXC_LIB) -L$(LIBVDWXC_LIB) -lvdwxc
else
LIBS += $(SIRIUS_LIB)/libsirius.a
LIBS += $(SIRIUS_LIB)/libsirius_cxx.a
LIBS += $(PUGIXML_LIB)/libpugixml.a
LIBS += $(LIBVDWXC_LIB)/libvdwxc.a
endif
endif
ifneq ($(USE_SPFFT),)
USE_SPFFT := $(strip $(USE_SPFFT))
SPFFT_INC := $(INSTALL_PATH)/SpFFT-$(USE_SPFFT)/include
SPFFT_LIB := $(INSTALL_PATH)/SpFFT-$(USE_SPFFT)/lib
CFLAGS += -I$(SPFFT_INC)
DFLAGS += -D__SPFFT
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(SPFFT_LIB) -L$(SPFFT_LIB) -lspfft
else
LIBS += $(SPFFT_LIB)/libspfft.a
endif
endif
ifneq ($(USE_SPLA),)
USE_SPLA := $(strip $(USE_SPLA))
SPLA_INC := $(INSTALL_PATH)/SpLA-$(USE_SPLA)/include/spla
SPLA_LIB := $(INSTALL_PATH)/SpLA-$(USE_SPLA)/lib
CFLAGS += -I$(SPLA_INC)
DFLAGS += -D__SPLA
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(SPLA_LIB) -L$(SPLA_LIB) -lspla
else
LIBS += $(SPLA_LIB)/libspla.a
endif
endif
ifneq ($(USE_HDF5),)
USE_HDF5 := $(strip $(USE_HDF5))
HDF5_INC := $(INSTALL_PATH)/hdf5-$(USE_HDF5)/include
HDF5_LIB := $(INSTALL_PATH)/hdf5-$(USE_HDF5)/lib
CFLAGS += -I$(HDF5_INC)
DFLAGS += -D__HDF5
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath,$(HDF5_LIB) -L$(HDF5_LIB) -lhdf5_fortran -lhdf5
else
LIBS += $(HDF5_LIB)/libhdf5_fortran.a
LIBS += $(HDF5_LIB)/libhdf5_f90cstub.a
LIBS += $(HDF5_LIB)/libhdf5.a
endif
LIBS += -lsz
endif
ifneq ($(USE_COSMA),)
USE_COSMA := $(strip $(USE_COSMA))
COSMA_INC := $(INSTALL_PATH)/COSMA-$(USE_COSMA)/include
COSMA_LIB := $(INSTALL_PATH)/COSMA-$(USE_COSMA)/lib
CFLAGS += -I$(COSMA_INC)
DFLAGS += -D__COSMA
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(COSMA_LIB) -L$(COSMA_LIB) -lcosma_prefixed_pxgemm -lcosma -lcosta
else
LIBS += $(COSMA_LIB)/libcosma_prefixed_pxgemm.a
LIBS += $(COSMA_LIB)/libcosma.a
LIBS += $(COSMA_LIB)/libcosta.a
endif
endif
ifneq ($(USE_FFTW),)
USE_FFTW := $(strip $(USE_FFTW))
FFTW_INC := $(INSTALL_PATH)/fftw-$(USE_FFTW)/include
FFTW_LIB := $(INSTALL_PATH)/fftw-$(USE_FFTW)/lib
CFLAGS += -I$(FFTW_INC)
DFLAGS += -D__FFTW3
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(FFTW_LIB) -L$(FFTW_LIB) -lfftw3_mpi -lfftw3_omp -lfftw3
else
LIBS += $(FFTW_LIB)/libfftw3_mpi.a
LIBS += $(FFTW_LIB)/libfftw3_omp.a
LIBS += $(FFTW_LIB)/libfftw3.a
endif
endif
ifneq ($(USE_SCALAPACK),)
SCALAPACK_LIB := $(INSTALL_PATH)/scalapack-$(USE_SCALAPACK)/lib
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(SCALAPACK_LIB) -L$(SCALAPACK_LIB) -lscalapack
else
LIBS += $(SCALAPACK_LIB)/libscalapack.a
endif
endif
ifneq ($(USE_GSL),)
USE_GSL := $(strip $(USE_GSL))
GSL_INC := $(INSTALL_PATH)/gsl-$(USE_GSL)/include
GSL_LIB := $(INSTALL_PATH)/gsl-$(USE_GSL)/lib
CFLAGS += -I$(GSL_INC)
DFLAGS += -D__GSL
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(GSL_LIB) -L$(GSL_LIB) -lgsl
else
LIBS += $(GSL_LIB)/libgsl.a
endif
endif
ifneq ($(USE_OPENBLAS),)
USE_OPENBLAS := $(strip $(USE_OPENBLAS))
OPENBLAS_INC := $(INSTALL_PATH)/openblas-$(USE_OPENBLAS)/include
OPENBLAS_LIB := $(INSTALL_PATH)/openblas-$(USE_OPENBLAS)/lib
CFLAGS += -I$(OPENBLAS_INC)
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(OPENBLAS_LIB) -L$(OPENBLAS_LIB) -lopenblas
else
LIBS += $(OPENBLAS_LIB)/libopenblas.a
endif
endif
CFLAGS += $(DFLAGS) $(CFLAGS_DEBUG)
FCFLAGS := $(CFLAGS) $(FCFLAGS_DEBUG) $(WFLAGS)
ifeq ($(shell [ $(shell gcc -dumpversion | cut -d. -f1) -gt 9 ] && echo yes), yes)
FCFLAGS += -fallow-argument-mismatch
endif
FCFLAGS += -fbacktrace
FCFLAGS += -ffree-form
FCFLAGS += -ffree-line-length-none
FCFLAGS += -fno-omit-frame-pointer
FCFLAGS += -std=f2008
LDFLAGS += $(FCFLAGS)
LIBS += -lz -ldl -lstdc++
# End

View file

@ -1,264 +0,0 @@
#!/bin/bash
#
# CP2K (GNU) arch file for a serial static x86_64 binary
#
# Tested with: GNU 14.2.0
#
# Usage: Source this arch file and then run make as instructed.
#
# Last update: 12.06.2025
#
# \
if [[ "${0}" == "${BASH_SOURCE}" ]]; then \
echo "ERROR: Script ${0##*/} must be sourced"; \
echo "Usage: source ${0##*/}"; \
exit 1; \
fi; \
this_file=${BASH_SOURCE##*/}; \
cd tools/toolchain; \
rm -rf build; \
[[ -z "${target_cpu}" ]] && target_cpu="native"; \
echo "Found GCC $(gcc -dumpfullversion) compiler"; \
./install_cp2k_toolchain.sh -j${maxtasks} --mpi-mode=no --no-arch-files --target-cpu=${target_cpu} --with-gcc \
--with-ace --with-dftd4 --with-hdf5 --with-tblite --with-trexio; \
source ./install/setup; \
cd ../..; \
echo; \
echo "Check the output above for error messages and consistency!"; \
echo; \
echo "If everything is OK, you can build a CP2K production binary with"; \
echo " make -j ARCH=${this_file%.*} VERSION=${this_file##*.} TARGET_CPU=${target_cpu}"; \
echo "Further checks are performed, if DO_CHECKS=yes is added, but this disables static linking."; \
echo; \
return
# Set options
DO_CHECKS := no
TARGET_CPU := native
# Retrieve package versions
GNU_VER := $(shell gcc -dumpfullversion)
USE_ACE := $(ACE_VER)
USE_DFTD4 := $(DFTD4_VER)
USE_FFTW := $(FFTW_VER)
USE_HDF5 := $(HDF5_VER)
USE_LIBGRPP := install
USE_LIBINT := $(LIBINT_VER)
USE_LIBVORI := $(LIBVORI_VER)
USE_LIBXC := $(LIBXC_VER)
USE_LIBXSMM := $(LIBXSMM_VER)
USE_OPENBLAS := $(OPENBLAS_VER)
USE_SPGLIB := $(SPGLIB_VER)
USE_TBLITE := $(TBLITE_VER)
USE_TREXIO := $(TREXIO_VER)
LMAX := 5
MAX_CONTR := 4
CC := gcc
CXX := g++
FC := gfortran
LD := gfortran
AR := ar -r
ifeq ($(TARGET_CPU), generic)
CFLAGS := -O2 -fopenmp -fopenmp-simd -ftree-vectorize -funroll-loops -g -mtune=$(TARGET_CPU)
else
CFLAGS := -O2 -fopenmp -fopenmp-simd -ftree-vectorize -funroll-loops -g -march=$(TARGET_CPU) -mtune=$(TARGET_CPU)
endif
DFLAGS += -D__MAX_CONTR=$(strip $(MAX_CONTR))
INSTALL_PATH := $(PWD)/tools/toolchain/install
# Settings for regression testing
ifeq ($(DO_CHECKS), yes)
DFLAGS += -D__CHECK_DIAG
# CFLAGS_DEBUG := -fsanitize=address
CFLAGS_DEBUG := -fsanitize=leak
FCFLAGS_DEBUG := -fcheck=bounds,do,recursion,pointer
FCFLAGS_DEBUG += -fcheck=all,no-array-temps
FCFLAGS_DEBUG += -ffpe-trap=invalid,overflow,zero
FCFLAGS_DEBUG += -fimplicit-none
FCFLAGS_DEBUG += -finit-derived
FCFLAGS_DEBUG += -finit-real=snan
FCFLAGS_DEBUG += -finit-integer=-42
FCFLAGS_DEBUG += -finline-matmul-limit=0
WFLAGS := -Werror=aliasing
WFLAGS += -Werror=ampersand
WFLAGS += -Werror=c-binding-type
WFLAGS += -Werror=conversion
WFLAGS += -Werror=intrinsic-shadow
WFLAGS += -Werror=intrinsics-std
WFLAGS += -Werror=line-truncation
WFLAGS += -Wrealloc-lhs
WFLAGS += -Werror=tabs
WFLAGS += -Werror=target-lifetime
WFLAGS += -Werror=underflow
WFLAGS += -Werror=unused-but-set-variable
WFLAGS += -Werror=unused-dummy-argument
WFLAGS += -Werror=unused-variable
endif
ifneq ($(USE_LIBVORI),)
USE_LIBVORI := $(strip $(USE_LIBVORI))
LIBVORI_LIB := $(INSTALL_PATH)/libvori-$(USE_LIBVORI)/lib
DFLAGS += -D__LIBVORI
LIBS += $(LIBVORI_LIB)/libvori.a
endif
ifneq ($(USE_LIBXC),)
USE_LIBXC := $(strip $(USE_LIBXC))
LIBXC_INC := $(INSTALL_PATH)/libxc-$(USE_LIBXC)/include
LIBXC_LIB := $(INSTALL_PATH)/libxc-$(USE_LIBXC)/lib
CFLAGS += -I$(LIBXC_INC)
DFLAGS += -D__LIBXC
LIBS += $(LIBXC_LIB)/libxcf03.a
LIBS += $(LIBXC_LIB)/libxc.a
endif
ifeq ($(USE_TBLITE),)
ifneq ($(USE_DFTD4),)
USE_DFTD4 := $(strip $(USE_DFTD4))
DFTD4_INC := $(INSTALL_PATH)/dftd4-$(USE_DFTD4)/include
DFTD4_LIB := $(INSTALL_PATH)/dftd4-$(USE_DFTD4)/lib
CFLAGS += -I$(DFTD4_INC)/dftd4/GNU-$(GNU_VER)
DFLAGS += -D__DFTD4
LIBS += $(DFTD4_LIB)/libdftd4.a
LIBS += $(DFTD4_LIB)/libmstore.a
LIBS += $(DFTD4_LIB)/libmulticharge.a
LIBS += $(DFTD4_LIB)/libmctc-lib.a
endif
endif
ifneq ($(USE_LIBGRPP),)
USE_LIBGRPP := $(strip $(USE_LIBGRPP))
DFLAGS += -D__LIBGRPP
endif
ifneq ($(USE_LIBINT),)
USE_LIBINT := $(strip $(USE_LIBINT))
LMAX := $(strip $(LMAX))
LIBINT_INC := $(INSTALL_PATH)/libint-v$(USE_LIBINT)-cp2k-lmax-$(LMAX)/include
LIBINT_LIB := $(INSTALL_PATH)/libint-v$(USE_LIBINT)-cp2k-lmax-$(LMAX)/lib
CFLAGS += -I$(LIBINT_INC)
DFLAGS += -D__LIBINT
LIBS += $(LIBINT_LIB)/libint2.a
endif
ifneq ($(USE_SPGLIB),)
USE_SPGLIB := $(strip $(USE_SPGLIB))
SPGLIB_INC := $(INSTALL_PATH)/spglib-$(USE_SPGLIB)/include
SPGLIB_LIB := $(INSTALL_PATH)/spglib-$(USE_SPGLIB)/lib
CFLAGS += -I$(SPGLIB_INC)
DFLAGS += -D__SPGLIB
LIBS += $(SPGLIB_LIB)/libsymspg.a
endif
ifneq ($(USE_LIBXSMM),)
USE_LIBXSMM := $(strip $(USE_LIBXSMM))
LIBXSMM_INC := $(INSTALL_PATH)/libxsmm-$(USE_LIBXSMM)/include
LIBXSMM_LIB := $(INSTALL_PATH)/libxsmm-$(USE_LIBXSMM)/lib
CFLAGS += -I$(LIBXSMM_INC)
DFLAGS += -D__LIBXSMM
LIBS += $(LIBXSMM_LIB)/libxsmmf.a
LIBS += $(LIBXSMM_LIB)/libxsmmext.a
LIBS += $(LIBXSMM_LIB)/libxsmm.a
endif
ifneq ($(USE_ACE),)
USE_ACE := $(strip $(USE_ACE))
ACE_INC := $(INSTALL_PATH)/lammps-user-pace-$(USE_ACE)/include
ACE_LIB := $(INSTALL_PATH)/lammps-user-pace-$(USE_ACE)/lib
CFLAGS += -I$(ACE_INC)
DFLAGS += -D__ACE
LIBS += $(ACE_LIB)/libpace.a
LIBS += $(ACE_LIB)/libyaml-cpp-pace.a
LIBS += $(ACE_LIB)/libcnpy.a
endif
ifneq ($(USE_FFTW),)
USE_FFTW := $(strip $(USE_FFTW))
FFTW_INC := $(INSTALL_PATH)/fftw-$(USE_FFTW)/include
FFTW_LIB := $(INSTALL_PATH)/fftw-$(USE_FFTW)/lib
CFLAGS += -I$(FFTW_INC)
DFLAGS += -D__FFTW3
LIBS += $(FFTW_LIB)/libfftw3_omp.a
LIBS += $(FFTW_LIB)/libfftw3.a
endif
ifneq ($(USE_OPENBLAS),)
USE_OPENBLAS := $(strip $(USE_OPENBLAS))
OPENBLAS_INC := $(INSTALL_PATH)/openblas-$(USE_OPENBLAS)/include
OPENBLAS_LIB := $(INSTALL_PATH)/openblas-$(USE_OPENBLAS)/lib
CFLAGS += -I$(OPENBLAS_INC)
LIBS += $(OPENBLAS_LIB)/libopenblas.a
endif
ifneq ($(USE_TREXIO),)
USE_TREXIO := $(strip $(USE_TREXIO))
TREXIO_INC := $(INSTALL_PATH)/trexio-$(USE_TREXIO)/include
TREXIO_LIB := $(INSTALL_PATH)/trexio-$(USE_TREXIO)/lib
CFLAGS += -I$(TREXIO_INC)
DFLAGS += -D__TREXIO
LIBS += $(TREXIO_LIB)/libtrexio.a
endif
ifneq ($(USE_TBLITE),)
USE_TBLITE := $(strip $(USE_TBLITE))
TBLITE_INC := $(INSTALL_PATH)/tblite-$(USE_TBLITE)/include
TBLITE_LIB := $(INSTALL_PATH)/tblite-$(USE_TBLITE)/lib
CFLAGS += -I$(TBLITE_INC)/toml-f/modules
CFLAGS += -I$(TBLITE_INC)/mctc-lib/modules
CFLAGS += -I$(TBLITE_INC)/s-dftd3/GNU-$(GNU_VER)
CFLAGS += -I$(TBLITE_INC)/dftd4/GNU-$(GNU_VER)
CFLAGS += -I$(TBLITE_INC)/tblite/GNU-$(GNU_VER)
DFLAGS += -D__TBLITE
DFLAGS += -D__DFTD4
LIBS += $(TBLITE_LIB)/libtblite.a
LIBS += $(TBLITE_LIB)/libdftd4.a
LIBS += $(TBLITE_LIB)/libs-dftd3.a
LIBS += $(TBLITE_LIB)/libmulticharge.a
LIBS += $(TBLITE_LIB)/libmctc-lib.a
LIBS += $(TBLITE_LIB)/libtoml-f.a
endif
ifneq ($(USE_HDF5),)
USE_HDF5 := $(strip $(USE_HDF5))
HDF5_INC := $(INSTALL_PATH)/hdf5-$(USE_HDF5)/include
HDF5_LIB := $(INSTALL_PATH)/hdf5-$(USE_HDF5)/lib
CFLAGS += -I$(HDF5_INC)
DFLAGS += -D__HDF5
LIBS += $(HDF5_LIB)/libhdf5_fortran.a
LIBS += $(HDF5_LIB)/libhdf5_f90cstub.a
LIBS += $(HDF5_LIB)/libhdf5.a
LIBS += -lz
endif
CFLAGS += $(DFLAGS) $(CFLAGS_DEBUG)
CXXFLAGS := $(CFLAGS)
FCFLAGS := $(CFLAGS) $(FCFLAGS_DEBUG) $(WFLAGS)
ifeq ($(shell [ $(shell gcc -dumpversion | cut -d. -f1) -gt 9 ] && echo yes), yes)
FCFLAGS += -fallow-argument-mismatch
endif
FCFLAGS += -fbacktrace
FCFLAGS += -ffree-form
FCFLAGS += -ffree-line-length-none
FCFLAGS += -fno-omit-frame-pointer
FCFLAGS += -std=f2008
CFLAGS += -std=c17
CXXFLAGS += -std=c++17
# The LeakSanitizer does not work with static linking
ifeq ($(DO_CHECKS), yes)
LDFLAGS += $(FCFLAGS)
else
LDFLAGS += $(FCFLAGS) -static
endif
LIBS += -Wl,--whole-archive -lpthread -ldl -Wl,--no-whole-archive -lstdc++
# End

View file

@ -1,502 +0,0 @@
#!/bin/bash
#
# CP2K (GNU x86_64) arch file for Linux clusters
#
# Tested with: GNU 14.2.0, MPICH 4.3.0 and OpenMPI 5.0.7 on the Merlin cluster (PSI)
#
# Usage: Source this arch file and then run make as instructed.
# A full toolchain installation is performed as default.
# Optionally, GNU compiler and MPI implementation can be specified as arguments.
# Replace or adapt the "module add" commands below if needed.
#
# Last update: 12.06.2025
#
# \
if [[ "${0}" == "${BASH_SOURCE}" ]]; then \
echo "ERROR: Script ${0##*/} must be sourced"; \
echo "Usage: source ${0##*/}"; \
exit 1; \
fi; \
this_file=${BASH_SOURCE##*/}; \
cd tools/toolchain; \
rm -rf build; \
[[ -z "${mpi_implementation}" ]] && mpi_implementation="mpich"; \
[[ -z "${target_cpu}" ]] && target_cpu="native"; \
echo "Found GCC $(gcc -dumpfullversion) compiler"; \
echo "Building for target CPU ${target_cpu} using ${mpi_implementation}"; \
if [[ -n "${1}" ]]; then \
module add ${1}; \
if [[ -n "${2}" ]]; then \
module add ${2}; \
module list; \
./install_cp2k_toolchain.sh --install-all -j${maxtasks} --no-arch-files --target-cpu=${target_cpu} --with-gcc=system --with-${mpi_implementation}=system; \
else \
module list; \
./install_cp2k_toolchain.sh --install-all -j${maxtasks} --no-arch-files --target-cpu=${target_cpu} --with-gcc=system --with-${mpi_implementation}; \
fi; \
else \
./install_cp2k_toolchain.sh --install-all -j${maxtasks} --no-arch-files --target-cpu=${target_cpu} --with-gcc --with-${mpi_implementation}; \
fi; \
source ./install/setup; \
cd ../..; \
echo; \
echo "Check the output above for error messages and consistency!"; \
echo; \
echo "If everything is OK, you can build a CP2K production binary with"; \
echo " make -j ARCH=${this_file%.*} VERSION=${this_file##*.} TARGET_CPU=${target_cpu}"; \
echo; \
echo "Alternatively, you can add further checks, e.g. for regression testing, with"; \
echo " make -j ARCH=${this_file%.*} VERSION=${this_file##*.} TARGET_CPU=${target_cpu} DO_CHECKS=yes"; \
echo "or build CP2K only with shared libraries using"; \
echo " make -j ARCH=${this_file%.*} VERSION=${this_file##*.} TARGET_CPU=${target_cpu} SHARED=yes"; \
echo "or build CP2K as a library with"; \
echo " make -j ARCH=${this_file%.*} VERSION=${this_file##*.} TARGET_CPU=${target_cpu} libcp2k"; \
echo; \
echo "Run always the following command before using the CP2K binary"; \
echo " source ${PWD}/tools/toolchain/install/setup"; \
echo; \
return
# Set options
DO_CHECKS := no
SHARED := no
TARGET_CPU := native
# Retrieve package versions
GNU_VER := $(shell gcc -dumpfullversion)
USE_ACE := $(ACE_VER)
USE_COSMA := $(COSMA_VER)
USE_DEEPMD := $(DEEPMD_VER)
USE_DFTD4 := $(DFTD4_VER)
USE_ELPA := $(ELPA_VER)
USE_FFTW := $(FFTW_VER)
USE_GREENX := $(GREENX_VER)
USE_HDF5 := $(HDF5_VER)
USE_LIBGRPP := install
USE_LIBINT := $(LIBINT_VER)
USE_LIBSMEAGOL := $(LIBSMEAGOL_VER)
USE_LIBTORCH := $(LIBTORCH_VER)
USE_LIBVORI := $(LIBVORI_VER)
USE_LIBXC := $(LIBXC_VER)
USE_LIBXSMM := $(LIBXSMM_VER)
USE_OPENBLAS := $(OPENBLAS_VER)
USE_PLUMED := $(PLUMED_VER)
USE_SCALAPACK := $(SCALAPACK_VER)
USE_SIRIUS := $(SIRIUS_VER)
USE_SPFFT := $(SPFFT_VER)
USE_SPGLIB := $(SPGLIB_VER)
USE_SPLA := $(SPLA_VER)
USE_TBLITE := $(TBLITE_VER)
USE_TREXIO := $(TREXIO_VER)
LMAX := 5
MAX_CONTR := 4
CC := mpicc
FC := mpifort
LD := mpifort
AR := ar -r
ifeq ($(TARGET_CPU), generic)
CFLAGS := -O2 -fopenmp -fopenmp-simd -ftree-vectorize -funroll-loops -g -mtune=$(TARGET_CPU)
else
CFLAGS := -O2 -fopenmp -fopenmp-simd -ftree-vectorize -funroll-loops -g -march=$(TARGET_CPU) -mtune=$(TARGET_CPU)
endif
DFLAGS := -D__parallel
DFLAGS += -D__MPI_F08
DFLAGS += -D__HAS_IEEE_EXCEPTIONS
DFLAGS += -D__MAX_CONTR=$(strip $(MAX_CONTR))
INSTALL_PATH := $(PWD)/tools/toolchain/install
ifeq ($(SHARED), yes)
LD_SHARED := $(FC) -shared
CFLAGS += -fPIC
LDFLAGS := -Wl,--enable-new-dtags
CP2K_LIB := $(PWD)/lib/$(ARCH)/$(ONEVERSION)
LDFLAGS += -Wl,-rpath=$(CP2K_LIB)
LDFLAGS += -Wl,-rpath=$(CP2K_LIB)/exts/dbcsr
endif
# Settings for regression testing
ifeq ($(DO_CHECKS), yes)
DFLAGS += -D__CHECK_DIAG
# CFLAGS_DEBUG := -fsanitize=address
CFLAGS_DEBUG := -fsanitize=leak
# FCFLAGS_DEBUG := -fcheck=bounds,do,recursion,pointer
FCFLAGS_DEBUG += -fcheck=all,no-array-temps
FCFLAGS_DEBUG += -ffpe-trap=invalid,overflow,zero
FCFLAGS_DEBUG += -fimplicit-none
FCFLAGS_DEBUG += -finit-derived
FCFLAGS_DEBUG += -finit-real=snan
FCFLAGS_DEBUG += -finit-integer=-42
FCFLAGS_DEBUG += -finline-matmul-limit=0
WFLAGS := -Werror=aliasing
WFLAGS += -Werror=ampersand
WFLAGS += -Werror=c-binding-type
WFLAGS += -Werror=conversion
WFLAGS += -Werror=intrinsic-shadow
WFLAGS += -Werror=intrinsics-std
WFLAGS += -Werror=line-truncation
WFLAGS += -Wrealloc-lhs
WFLAGS += -Werror=tabs
WFLAGS += -Werror=target-lifetime
WFLAGS += -Werror=underflow
WFLAGS += -Werror=unused-but-set-variable
WFLAGS += -Werror=unused-dummy-argument
WFLAGS += -Werror=unused-variable
endif
ifneq ($(USE_PLUMED),)
USE_PLUMED := $(strip $(USE_PLUMED))
USE_GSL := ${GSL_VER}
PLUMED_LIB := $(INSTALL_PATH)/plumed-$(USE_PLUMED)/lib
DFLAGS += -D__PLUMED2
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(PLUMED_LIB) -L$(PLUMED_LIB) -lplumed -lplumedKernel
else
LIBS += $(PLUMED_LIB)/libplumed.a
endif
endif
ifneq ($(USE_ELPA),)
USE_ELPA := $(strip $(USE_ELPA))
ELPA_INC := $(INSTALL_PATH)/elpa-$(USE_ELPA)/cpu/include/elpa_openmp-$(USE_ELPA)
ELPA_LIB := $(INSTALL_PATH)/elpa-$(USE_ELPA)/cpu/lib
CFLAGS += -I$(ELPA_INC)/elpa -I$(ELPA_INC)/modules
DFLAGS += -D__ELPA
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(ELPA_LIB) -L$(ELPA_LIB) -lelpa_openmp
else
LIBS += $(ELPA_LIB)/libelpa_openmp.a
endif
endif
ifneq ($(USE_LIBVORI),)
USE_LIBVORI := $(strip $(USE_LIBVORI))
LIBVORI_LIB := $(INSTALL_PATH)/libvori-$(USE_LIBVORI)/lib
DFLAGS += -D__LIBVORI
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(LIBVORI_LIB) -L$(LIBVORI_LIB) -lvori
else
LIBS += $(LIBVORI_LIB)/libvori.a
endif
endif
ifneq ($(USE_LIBXC),)
USE_LIBXC := $(strip $(USE_LIBXC))
LIBXC_INC := $(INSTALL_PATH)/libxc-$(USE_LIBXC)/include
LIBXC_LIB := $(INSTALL_PATH)/libxc-$(USE_LIBXC)/lib
CFLAGS += -I$(LIBXC_INC)
DFLAGS += -D__LIBXC
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(LIBXC_LIB) -L$(LIBXC_LIB) -lxcf03 -lxc
else
LIBS += $(LIBXC_LIB)/libxcf03.a
LIBS += $(LIBXC_LIB)/libxc.a
endif
endif
ifeq ($(USE_TBLITE),)
ifneq ($(USE_DFTD4),)
USE_DFTD4 := $(strip $(USE_DFTD4))
DFTD4_INC := $(INSTALL_PATH)/dftd4-$(USE_DFTD4)/include
DFTD4_LIB := $(INSTALL_PATH)/dftd4-$(USE_DFTD4)/lib
CFLAGS += -I$(DFTD4_INC)/dftd4/GNU-$(GNU_VER)
DFLAGS += -D__DFTD4
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(DFTD4_LIB) -L$(DFTD4_LIB) -ldftd4 -lmstore -lmulticharge -lmctc-lib
else
LIBS += $(DFTD4_LIB)/libdftd4.a
LIBS += $(DFTD4_LIB)/libmstore.a
LIBS += $(DFTD4_LIB)/libmulticharge.a
LIBS += $(DFTD4_LIB)/libmctc-lib.a
endif
endif
endif
ifneq ($(USE_LIBGRPP),)
USE_LIBGRPP := $(strip $(USE_LIBGRPP))
DFLAGS += -D__LIBGRPP
endif
ifneq ($(USE_LIBINT),)
USE_LIBINT := $(strip $(USE_LIBINT))
LMAX := $(strip $(LMAX))
LIBINT_INC := $(INSTALL_PATH)/libint-v$(USE_LIBINT)-cp2k-lmax-$(LMAX)/include
LIBINT_LIB := $(INSTALL_PATH)/libint-v$(USE_LIBINT)-cp2k-lmax-$(LMAX)/lib
CFLAGS += -I$(LIBINT_INC)
DFLAGS += -D__LIBINT
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(LIBINT_LIB) -L$(LIBINT_LIB) -lint2
else
LIBS += $(LIBINT_LIB)/libint2.a
endif
endif
ifneq ($(USE_SPGLIB),)
USE_SPGLIB := $(strip $(USE_SPGLIB))
SPGLIB_INC := $(INSTALL_PATH)/spglib-$(USE_SPGLIB)/include
SPGLIB_LIB := $(INSTALL_PATH)/spglib-$(USE_SPGLIB)/lib
CFLAGS += -I$(SPGLIB_INC)
DFLAGS += -D__SPGLIB
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(SPGLIB_LIB) -L$(SPGLIB_LIB) -lsymspg
else
LIBS += $(SPGLIB_LIB)/libsymspg.a
endif
endif
ifneq ($(USE_LIBXSMM),)
USE_LIBXSMM := $(strip $(USE_LIBXSMM))
LIBXSMM_INC := $(INSTALL_PATH)/libxsmm-$(USE_LIBXSMM)/include
LIBXSMM_LIB := $(INSTALL_PATH)/libxsmm-$(USE_LIBXSMM)/lib
CFLAGS += -I$(LIBXSMM_INC)
DFLAGS += -D__LIBXSMM
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(LIBXSMM_LIB) -L$(LIBXSMM_LIB) -lxsmmf -lxsmmext -lxsmm
else
LIBS += $(LIBXSMM_LIB)/libxsmmf.a
LIBS += $(LIBXSMM_LIB)/libxsmmext.a
LIBS += $(LIBXSMM_LIB)/libxsmm.a
endif
endif
ifneq ($(USE_ACE),)
USE_ACE := $(strip $(USE_ACE))
ACE_INC := $(INSTALL_PATH)/lammps-user-pace-$(USE_ACE)/include
ACE_LIB := $(INSTALL_PATH)/lammps-user-pace-$(USE_ACE)/lib
CFLAGS += -I$(ACE_INC)
DFLAGS += -D__ACE
LIBS += $(ACE_LIB)/libpace.a
LIBS += $(ACE_LIB)/libyaml-cpp-pace.a
LIBS += $(ACE_LIB)/libcnpy.a
endif
ifneq ($(USE_GREENX),)
USE_GREENX := $(strip $(USE_GREENX))
GREENX_INC := $(INSTALL_PATH)/greenX-$(USE_GREENX)/include/modules
GREENX_LIB := $(INSTALL_PATH)/greenX-$(USE_GREENX)/lib
CFLAGS += -I$(GREENX_INC)
DFLAGS += -D__GREENX
LIBS += -Wl,-rpath,$(GREENX_LIB) -L$(GREENX_LIB) -lGXCommon -lgx_ac -lgx_minimax
endif
ifneq ($(USE_SIRIUS),)
USE_SIRIUS := $(strip $(USE_SIRIUS))
USE_GSL := ${GSL_VER}
LIBVDWXC_INC := $(INSTALL_PATH)/libvdwxc-$(LIBVDWXC_VER)/include
LIBVDWXC_LIB := $(INSTALL_PATH)/libvdwxc-$(LIBVDWXC_VER)/lib
PUGIXML_LIB := $(INSTALL_PATH)/pugixml-$(PUGIXML_VER)/lib
SIRIUS_INC := $(INSTALL_PATH)/sirius-$(USE_SIRIUS)/include/sirius
SIRIUS_LIB := $(INSTALL_PATH)/sirius-$(USE_SIRIUS)/lib
CFLAGS += -I$(LIBVDWXC_INC)
CFLAGS += -I$(SIRIUS_INC)
DFLAGS += -D__LIBVDWXC
DFLAGS += -D__SIRIUS
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(SIRIUS_LIB) -L$(SIRIUS_LIB) -lsirius -lsirius_cxx
LIBS += -Wl,-rpath=$(PUGIXML_LIB) -L$(PUGIXML_LIB) -lpugixml
LIBS += -Wl,-rpath=$(LIBVDWXC_LIB) -L$(LIBVDWXC_LIB) -lvdwxc
else
LIBS += $(SIRIUS_LIB)/libsirius.a
LIBS += $(SIRIUS_LIB)/libsirius_cxx.a
LIBS += $(PUGIXML_LIB)/libpugixml.a
LIBS += $(LIBVDWXC_LIB)/libvdwxc.a
endif
endif
ifneq ($(USE_SPFFT),)
USE_SPFFT := $(strip $(USE_SPFFT))
SPFFT_INC := $(INSTALL_PATH)/SpFFT-$(USE_SPFFT)/include
SPFFT_LIB := $(INSTALL_PATH)/SpFFT-$(USE_SPFFT)/lib
CFLAGS += -I$(SPFFT_INC)
DFLAGS += -D__SPFFT
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(SPFFT_LIB) -L$(SPFFT_LIB) -lspfft
else
LIBS += $(SPFFT_LIB)/libspfft.a
endif
endif
ifneq ($(USE_SPLA),)
USE_SPLA := $(strip $(USE_SPLA))
SPLA_INC := $(INSTALL_PATH)/SpLA-$(USE_SPLA)/include/spla
SPLA_LIB := $(INSTALL_PATH)/SpLA-$(USE_SPLA)/lib
CFLAGS += -I$(SPLA_INC)
DFLAGS += -D__SPLA
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(SPLA_LIB) -L$(SPLA_LIB) -lspla
else
LIBS += $(SPLA_LIB)/libspla.a
endif
endif
ifneq ($(USE_LIBSMEAGOL),)
USE_LIBSMEAGOL := $(strip $(USE_LIBSMEAGOL))
LIBSMEAGOL_LIB := $(INSTALL_PATH)/libsmeagol-$(USE_LIBSMEAGOL)/lib
LIBSMEAGOL_INC := $(INSTALL_PATH)/libsmeagol-$(USE_LIBSMEAGOL)/include
CFLAGS += -I$(LIBSMEAGOL_INC)
DFLAGS += -D__SMEAGOL
LIBS += $(LIBSMEAGOL_LIB)/libsmeagol.a
endif
ifneq ($(USE_TREXIO),)
USE_TREXIO := $(strip $(USE_TREXIO))
TREXIO_INC := $(INSTALL_PATH)/trexio-$(USE_TREXIO)/include
TREXIO_LIB := $(INSTALL_PATH)/trexio-$(USE_TREXIO)/lib
CFLAGS += -I$(TREXIO_INC)
DFLAGS += -D__TREXIO
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(TREXIO_LIB) -L$(TREXIO_LIB) -ltrexio
else
LIBS += $(TREXIO_LIB)/libtrexio.a
endif
endif
ifneq ($(USE_TBLITE),)
USE_TBLITE := $(strip $(USE_TBLITE))
TBLITE_INC := $(INSTALL_PATH)/tblite-$(USE_TBLITE)/include
TBLITE_LIB := $(INSTALL_PATH)/tblite-$(USE_TBLITE)/lib
CFLAGS += -I$(TBLITE_INC)/toml-f/modules
CFLAGS += -I$(TBLITE_INC)/mctc-lib/modules
CFLAGS += -I$(TBLITE_INC)/s-dftd3/GNU-$(GNU_VER)
CFLAGS += -I$(TBLITE_INC)/dftd4/GNU-$(GNU_VER)
CFLAGS += -I$(TBLITE_INC)/tblite/GNU-$(GNU_VER)
DFLAGS += -D__TBLITE
DFLAGS += -D__DFTD4
LIBS += $(TBLITE_LIB)/libtblite.a
LIBS += $(TBLITE_LIB)/libdftd4.a
LIBS += $(TBLITE_LIB)/libs-dftd3.a
LIBS += $(TBLITE_LIB)/libmulticharge.a
LIBS += $(TBLITE_LIB)/libmctc-lib.a
LIBS += $(TBLITE_LIB)/libtoml-f.a
endif
ifneq ($(USE_DEEPMD),)
USE_DEEPMD := $(strip $(USE_DEEPMD))
DEEPMD_INC := $(INSTALL_PATH)/deepmd-kit-$(USE_DEEPMD)/include
DEEPMD_LIB := $(INSTALL_PATH)/deepmd-kit-$(USE_DEEPMD)/lib
CFLAGS += -I$(DEEPMD_INC)
DFLAGS += -D__DEEPMD
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(DEEPMD_LIB) -L$(DEEPMD_LIB) -ldeepmd_c
else
#LIBS += $(DEEPMD_LIB)/libdeepmd_c.a
LIBS += -Wl,-rpath=$(DEEPMD_LIB) -L$(DEEPMD_LIB) -ldeepmd_c
endif
endif
ifneq ($(USE_HDF5),)
USE_HDF5 := $(strip $(USE_HDF5))
HDF5_INC := $(INSTALL_PATH)/hdf5-$(USE_HDF5)/include
HDF5_LIB := $(INSTALL_PATH)/hdf5-$(USE_HDF5)/lib
CFLAGS += -I$(HDF5_INC)
DFLAGS += -D__HDF5
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath,$(HDF5_LIB) -L$(HDF5_LIB) -lhdf5_fortran -lhdf5
else
LIBS += $(HDF5_LIB)/libhdf5_fortran.a
LIBS += $(HDF5_LIB)/libhdf5_f90cstub.a
LIBS += $(HDF5_LIB)/libhdf5.a
endif
endif
ifneq ($(USE_COSMA),)
USE_COSMA := $(strip $(USE_COSMA))
COSMA_INC := $(INSTALL_PATH)/COSMA-$(USE_COSMA)/include
COSMA_LIB := $(INSTALL_PATH)/COSMA-$(USE_COSMA)/lib
CFLAGS += -I$(COSMA_INC)
DFLAGS += -D__COSMA
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(COSMA_LIB) -L$(COSMA_LIB) -lcosma_prefixed_pxgemm -lcosma -lcosta
else
LIBS += $(COSMA_LIB)/libcosma_prefixed_pxgemm.a
LIBS += $(COSMA_LIB)/libcosma.a
LIBS += $(COSMA_LIB)/libcosta.a
endif
endif
ifneq ($(USE_FFTW),)
USE_FFTW := $(strip $(USE_FFTW))
FFTW_INC := $(INSTALL_PATH)/fftw-$(USE_FFTW)/include
FFTW_LIB := $(INSTALL_PATH)/fftw-$(USE_FFTW)/lib
CFLAGS += -I$(FFTW_INC)
DFLAGS += -D__FFTW3
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(FFTW_LIB) -L$(FFTW_LIB) -lfftw3_mpi -lfftw3_omp -lfftw3
else
LIBS += $(FFTW_LIB)/libfftw3_mpi.a
LIBS += $(FFTW_LIB)/libfftw3_omp.a
LIBS += $(FFTW_LIB)/libfftw3.a
endif
endif
ifneq ($(USE_SCALAPACK),)
SCALAPACK_LIB := $(INSTALL_PATH)/scalapack-$(USE_SCALAPACK)/lib
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(SCALAPACK_LIB) -L$(SCALAPACK_LIB) -lscalapack
else
LIBS += $(SCALAPACK_LIB)/libscalapack.a
endif
endif
ifneq ($(USE_GSL),)
USE_GSL := $(strip $(USE_GSL))
GSL_INC := $(INSTALL_PATH)/gsl-$(USE_GSL)/include
GSL_LIB := $(INSTALL_PATH)/gsl-$(USE_GSL)/lib
CFLAGS += -I$(GSL_INC)
DFLAGS += -D__GSL
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(GSL_LIB) -L$(GSL_LIB) -lgsl
else
LIBS += $(GSL_LIB)/libgsl.a
endif
endif
ifneq ($(USE_OPENBLAS),)
USE_OPENBLAS := $(strip $(USE_OPENBLAS))
OPENBLAS_INC := $(INSTALL_PATH)/openblas-$(USE_OPENBLAS)/include
OPENBLAS_LIB := $(INSTALL_PATH)/openblas-$(USE_OPENBLAS)/lib
CFLAGS += -I$(OPENBLAS_INC)
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(OPENBLAS_LIB) -L$(OPENBLAS_LIB) -lopenblas
else
LIBS += $(OPENBLAS_LIB)/libopenblas.a
endif
endif
ifeq ($(shell [ $(shell ldd --version | head -n 1 | tr -s '.' '\n' | tail -n 1) -ge 27 ] && echo yes), yes)
ifneq ($(USE_LIBTORCH),)
USE_LIBTORCH := $(strip $(USE_LIBTORCH))
LIBTORCH_INC := $(INSTALL_PATH)/libtorch-$(USE_LIBTORCH)/include
LIBTORCH_LIB := $(INSTALL_PATH)/libtorch-$(USE_LIBTORCH)/lib
CFLAGS += -I$(LIBTORCH_INC)
DFLAGS += -D__LIBTORCH
LIBS += -Wl,-rpath=$(LIBTORCH_LIB) -L$(LIBTORCH_LIB) -lc10 -ltorch_cpu -ltorch
endif
endif
CFLAGS += $(DFLAGS) $(CFLAGS_DEBUG)
CXXFLAGS := $(CFLAGS)
FCFLAGS := $(CFLAGS) $(FCFLAGS_DEBUG) $(WFLAGS)
ifeq ($(shell [ $(shell gcc -dumpversion | cut -d. -f1) -gt 9 ] && echo yes), yes)
FCFLAGS += -fallow-argument-mismatch
endif
FCFLAGS += -fbacktrace
FCFLAGS += -ffree-form
FCFLAGS += -ffree-line-length-none
FCFLAGS += -fno-omit-frame-pointer
FCFLAGS += -std=f2008
CFLAGS += -std=c17
CXXFLAGS += -std=c++17
LDFLAGS += $(FCFLAGS)
LIBS += -lz -ldl -lstdc++
# End

View file

@ -1,57 +0,0 @@
#!/bin/bash
#
# CP2K (Intel/MKL x86_64) minimal arch file for Linux clusters
#
# Tested with: Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.5.0
# Usage: Source this arch file after the module for Intel/MKL has been loaded if needed.
#
# Last update: 08.08.2022
#
# \
if [[ "${0}" == "${BASH_SOURCE}" ]]; then \
echo "ERROR: Script ${0##*/} must be sourced"; \
echo "Usage: source ${0##*/}"; \
exit 1; \
fi; \
this_file=${BASH_SOURCE##*/}; \
make -j ARCH=${this_file%.*} VERSION=${this_file##*.} realclean; \
make -j ARCH=${this_file%.*} VERSION=${this_file##*.}; \
return
CC = mpiicc
FC = mpiifort
LD = mpiifort
AR = ar -r
CFLAGS = -O2 -qopenmp -fp-model precise -funroll-loops -g -qopenmp-simd -traceback -xHost
DFLAGS = -D__FFTW3
DFLAGS += -D__MAX_CONTR=4
DFLAGS += -D__MKL
DFLAGS += -D__parallel
FCFLAGS = $(CFLAGS) $(DFLAGS)
FCFLAGS += -diag-disable=8291
FCFLAGS += -diag-disable=8293
FCFLAGS += -fpp
FCFLAGS += -free
FCFLAGS += -I$(MKLROOT)/include
FCFLAGS += -I$(MKLROOT)/include/fftw
LDFLAGS = $(FCFLAGS) -static-intel -static_mpi
LDFLAGS_C = -nofor-main
MKL_LIB = $(MKLROOT)/lib/intel64
LIBS = $(MKL_LIB)/libmkl_scalapack_lp64.a
LIBS += -Wl,--start-group
LIBS += $(MKL_LIB)/libmkl_intel_lp64.a
LIBS += $(MKL_LIB)/libmkl_sequential.a
LIBS += $(MKL_LIB)/libmkl_core.a
LIBS += $(MKL_LIB)/libmkl_blacs_intelmpi_lp64.a
LIBS += -Wl,--end-group
# Required due to memory leak that occurs if high optimisations are used
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F
$(FC) -c $(subst O2,O0,$(FCFLAGS)) $<

View file

@ -1,385 +0,0 @@
#!/bin/bash
#
# CP2K (Intel/MKL x86_64) arch file for Linux clusters
#
# Tested with: Intel oneAPI Toolkit 2024.2.1 (MPI, MKL)
#
# Usage: Source this arch file and then run make as instructed.
# A full toolchain installation is performed as default.
# Optionally, the Intel compiler version can be specified as argument.
# Replace or adapt the "module add" commands below if needed.
#
# Last update: 14.05.2025
#
# \
if [[ "${0}" == "${BASH_SOURCE}" ]]; then \
echo "ERROR: Script ${0##*/} must be sourced"; \
echo "Usage: source ${0##*/}"; \
exit 1; \
fi; \
this_file=${BASH_SOURCE##*/}; \
cd tools/toolchain; \
rm -rf build; \
[[ -z "${target_cpu}" ]] && target_cpu="native"; \
[[ -z "${with_ifx}" ]] && with_ifx="no"; \
if [[ -n "${1}" ]]; then \
module add ${1}; \
module list; \
fi; \
./install_cp2k_toolchain.sh --install-all -j${maxtasks} --no-arch-files --target-cpu=${target_cpu} --with-ifx=${with_ifx} --with-intelmpi --with-mkl --with-libtorch=no; \
source ./install/setup; \
cd ../..; \
echo; \
echo "Check the output above for error messages and consistency!"; \
echo; \
echo "If everything is OK, you can build a CP2K production binary with"; \
echo " make -j ARCH=${this_file%.*} VERSION=${this_file##*.} TARGET_CPU=${target_cpu}" WITH_IFX=${with_ifx}; \
echo; \
echo "Alternatively, you can add further checks, e.g. for regression testing, with"; \
echo " make -j ARCH=${this_file%.*} VERSION=${this_file##*.} TARGET_CPU=${target_cpu} WITH_IFX=${with_ifx} DO_CHECKS=yes"; \
echo "or build CP2K only with shared libraries using"; \
echo " make -j ARCH=${this_file%.*} VERSION=${this_file##*.} TARGET_CPU=${target_cpu} WITH_IFX=${with_ifx} SHARED=yes"; \
echo "or build CP2K as a library with"; \
echo " make -j ARCH=${this_file%.*} VERSION=${this_file##*.} TARGET_CPU=${target_cpu} WITH_IFX=${with_ifx} libcp2k"; \
echo; \
echo "Run always the following command before using the CP2K binary"; \
echo " source ${PWD}/tools/toolchain/install/setup"; \
echo; \
return
# Set options
DO_CHECKS := no
SHARED := no
TARGET_CPU := native
WITH_IFX := no
# Retrieve package versions
USE_COSMA := $(COSMA_VER)
USE_DFTD4 := $(DFTD4_VER)
USE_ELPA := $(ELPA_VER)
USE_HDF5 := $(HDF5_VER)
USE_LIBGRPP := $(LIBGRPP_VER)
USE_LIBINT := $(LIBINT_VER)
USE_LIBTORCH := $(LIBTORCH_VER)
USE_LIBVORI := $(LIBVORI_VER)
USE_LIBXC := $(LIBXC_VER)
USE_LIBXSMM := $(LIBXSMM_VER)
USE_PLUMED := $(PLUMED_VER)
USE_SIRIUS := $(SIRIUS_VER)
USE_SPFFT := $(SPFFT_VER)
USE_SPGLIB := $(SPGLIB_VER)
USE_SPLA := $(SPLA_VER)
LMAX := 5
MAX_CONTR := 4
CC := mpiicx
ifeq ($(strip $(WITH_IFX)), yes)
FC := mpiifx
LD := mpiifx
else
FC := mpiifort -diag-disable=10448
LD := mpiifort
endif
AR := ar -r
ifeq ($(strip $(TARGET_CPU)), native)
CFLAGS := -O2 -fPIC -fp-model precise -funroll-loops -g -qopenmp -qopenmp-simd -traceback -xHost
else
CFLAGS := -O2 -fPIC -fp-model precise -funroll-loops -g -mtune=$(TARGET_CPU) -qopenmp -qopenmp-simd -traceback
endif
DFLAGS := -D__parallel
DFLAGS += -D__MKL
DFLAGS += -D__FFTW3
DFLAGS += -D__MAX_CONTR=$(strip $(MAX_CONTR))
INSTALL_PATH := $(PWD)/tools/toolchain/install
MKL_LIB := $(MKLROOT)/lib/intel64
ifeq ($(SHARED), yes)
LD_SHARED := $(FC) -shared
CFLAGS += -fPIC
LDFLAGS := -Wl,--enable-new-dtags
CP2K_LIB := $(PWD)/lib/$(ARCH)/$(ONEVERSION)
LDFLAGS += -Wl,-rpath=$(CP2K_LIB)
LDFLAGS += -Wl,-rpath=$(CP2K_LIB)/exts/dbcsr
else
LDFLAGS := -static-intel
endif
# Settings for regression testing
ifeq ($(DO_CHECKS), yes)
DFLAGS += -D__CHECK_DIAG
endif
ifneq ($(USE_PLUMED),)
USE_PLUMED := $(strip $(USE_PLUMED))
PLUMED_LIB := $(INSTALL_PATH)/plumed-$(USE_PLUMED)/lib
DFLAGS += -D__PLUMED2
USE_GSL := $(GSL_VER)
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(PLUMED_LIB) -L$(PLUMED_LIB) -lplumed -lplumedKernel
else
LIBS += $(PLUMED_LIB)/libplumed.a
endif
endif
ifneq ($(USE_ELPA),)
USE_ELPA := $(strip $(USE_ELPA))
ELPA_INC := $(INSTALL_PATH)/elpa-$(USE_ELPA)/cpu/include/elpa_openmp-$(USE_ELPA)
ELPA_LIB := $(INSTALL_PATH)/elpa-$(USE_ELPA)/cpu/lib
CFLAGS += -I$(ELPA_INC)/elpa -I$(ELPA_INC)/modules
DFLAGS += -D__ELPA
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(ELPA_LIB) -L$(ELPA_LIB) -lelpa_openmp
else
LIBS += $(ELPA_LIB)/libelpa_openmp.a
endif
endif
ifneq ($(USE_LIBVORI),)
USE_LIBVORI := $(strip $(USE_LIBVORI))
LIBVORI_LIB := $(INSTALL_PATH)/libvori-$(USE_LIBVORI)/lib
DFLAGS += -D__LIBVORI
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(LIBVORI_LIB) -L$(LIBVORI_LIB) -lvori
else
LIBS += $(LIBVORI_LIB)/libvori.a
endif
endif
ifneq ($(USE_LIBXC),)
USE_LIBXC := $(strip $(USE_LIBXC))
LIBXC_INC := $(INSTALL_PATH)/libxc-$(USE_LIBXC)/include
LIBXC_LIB := $(INSTALL_PATH)/libxc-$(USE_LIBXC)/lib
CFLAGS += -I$(LIBXC_INC)
DFLAGS += -D__LIBXC
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(LIBXC_LIB) -L$(LIBXC_LIB) -lxcf03 -lxc
else
LIBS += $(LIBXC_LIB)/libxcf03.a
LIBS += $(LIBXC_LIB)/libxc.a
endif
endif
ifneq ($(USE_DFTD4),)
USE_DFTD4 := $(strip $(USE_DFTD4))
DFTD4_INC := $(INSTALL_PATH)/dftd4-$(USE_DFTD4)/include
DFTD4_LIB := $(INSTALL_PATH)/dftd4-$(USE_DFTD4)/lib
CFLAGS += -I$(shell ls -d $(DFTD4_INC)/dftd4/Intel*)
DFLAGS += -D__DFTD4
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(DFTD4_LIB) -L$(DFTD4_LIB) -ldftd4 -lmstore -lmulticharge -lmctc-lib
else
LIBS += $(DFTD4_LIB)/libdftd4.a
LIBS += $(DFTD4_LIB)/libmstore.a
LIBS += $(DFTD4_LIB)/libmulticharge.a
LIBS += $(DFTD4_LIB)/libmctc-lib.a
endif
endif
ifneq ($(USE_LIBGRPP),)
USE_LIBGRPP := $(strip $(USE_LIBGRPP))
DFLAGS += -D__LIBGRPP
endif
ifneq ($(USE_LIBINT),)
USE_LIBINT := $(strip $(USE_LIBINT))
LMAX := $(strip $(LMAX))
LIBINT_INC := $(INSTALL_PATH)/libint-v$(USE_LIBINT)-cp2k-lmax-$(LMAX)/include
LIBINT_LIB := $(INSTALL_PATH)/libint-v$(USE_LIBINT)-cp2k-lmax-$(LMAX)/lib
CFLAGS += -I$(LIBINT_INC)
DFLAGS += -D__LIBINT
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(LIBINT_LIB) -L$(LIBINT_LIB) -lint2
else
LIBS += $(LIBINT_LIB)/libint2.a
endif
endif
ifneq ($(USE_SPGLIB),)
USE_SPGLIB := $(strip $(USE_SPGLIB))
SPGLIB_INC := $(INSTALL_PATH)/spglib-$(USE_SPGLIB)/include
SPGLIB_LIB := $(INSTALL_PATH)/spglib-$(USE_SPGLIB)/lib
CFLAGS += -I$(SPGLIB_INC)
DFLAGS += -D__SPGLIB
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(SPGLIB_LIB) -L$(SPGLIB_LIB) -lsymspg
else
LIBS += $(SPGLIB_LIB)/libsymspg.a
endif
endif
ifneq ($(USE_LIBXSMM),)
USE_LIBXSMM := $(strip $(USE_LIBXSMM))
LIBXSMM_INC := $(INSTALL_PATH)/libxsmm-$(USE_LIBXSMM)/include
LIBXSMM_LIB := $(INSTALL_PATH)/libxsmm-$(USE_LIBXSMM)/lib
CFLAGS += -I$(LIBXSMM_INC)
DFLAGS += -D__LIBXSMM
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(LIBXSMM_LIB) -L$(LIBXSMM_LIB) -lxsmmf -lxsmmext -lxsmm
else
LIBS += $(LIBXSMM_LIB)/libxsmmf.a
LIBS += $(LIBXSMM_LIB)/libxsmmext.a
LIBS += $(LIBXSMM_LIB)/libxsmm.a
endif
endif
ifneq ($(USE_SIRIUS),)
USE_SIRIUS := $(strip $(USE_SIRIUS))
USE_GSL := ${GSL_VER}
LIBVDWXC_INC := $(INSTALL_PATH)/libvdwxc-$(LIBVDWXC_VER)/include
LIBVDWXC_LIB := $(INSTALL_PATH)/libvdwxc-$(LIBVDWXC_VER)/lib
PUGIXML_LIB := $(INSTALL_PATH)/pugixml-$(PUGIXML_VER)/lib
SIRIUS_INC := $(INSTALL_PATH)/sirius-$(USE_SIRIUS)/include/sirius
SIRIUS_LIB := $(INSTALL_PATH)/sirius-$(USE_SIRIUS)/lib
CFLAGS += -I$(LIBVDWXC_INC)
CFLAGS += -I$(SIRIUS_INC)
DFLAGS += -D__LIBVDWXC
DFLAGS += -D__SIRIUS
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(SIRIUS_LIB) -L$(SIRIUS_LIB) -lsirius -lsirius_cxx
LIBS += -Wl,-rpath=$(PUGIXML_LIB) -L$(PUGIXML_LIB) -lpugixml
LIBS += -Wl,-rpath=$(LIBVDWXC_LIB) -L$(LIBVDWXC_LIB) -lvdwxc
else
LIBS += $(SIRIUS_LIB)/libsirius.a
LIBS += $(SIRIUS_LIB)/libsirius_cxx.a
LIBS += $(PUGIXML_LIB)/libpugixml.a
LIBS += $(LIBVDWXC_LIB)/libvdwxc.a
endif
endif
ifneq ($(USE_SPFFT),)
USE_SPFFT := $(strip $(USE_SPFFT))
SPFFT_INC := $(INSTALL_PATH)/SpFFT-$(USE_SPFFT)/include
SPFFT_LIB := $(INSTALL_PATH)/SpFFT-$(USE_SPFFT)/lib
CFLAGS += -I$(SPFFT_INC)
DFLAGS += -D__SPFFT
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(SPFFT_LIB) -L$(SPFFT_LIB) -lspfft
else
LIBS += $(SPFFT_LIB)/libspfft.a
endif
endif
ifneq ($(USE_SPLA),)
USE_SPLA := $(strip $(USE_SPLA))
SPLA_INC := $(INSTALL_PATH)/SpLA-$(USE_SPLA)/include/spla
SPLA_LIB := $(INSTALL_PATH)/SpLA-$(USE_SPLA)/lib
CFLAGS += -I$(SPLA_INC)
DFLAGS += -D__SPLA
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(SPLA_LIB) -L$(SPLA_LIB) -lspla
else
LIBS += $(SPLA_LIB)/libspla.a
endif
endif
ifneq ($(USE_HDF5),)
USE_HDF5 := $(strip $(USE_HDF5))
HDF5_INC := $(INSTALL_PATH)/hdf5-$(USE_HDF5)/include
HDF5_LIB := $(INSTALL_PATH)/hdf5-$(USE_HDF5)/lib
CFLAGS += -I$(HDF5_INC)
DFLAGS += -D__HDF5
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath,$(HDF5_LIB) -L$(HDF5_LIB) -lhdf5_fortran -lhdf5
else
LIBS += $(HDF5_LIB)/libhdf5_fortran.a
LIBS += $(HDF5_LIB)/libhdf5_f90cstub.a
LIBS += $(HDF5_LIB)/libhdf5.a
endif
endif
ifneq ($(USE_COSMA),)
USE_COSMA := $(strip $(USE_COSMA))
COSMA_INC := $(INSTALL_PATH)/COSMA-$(USE_COSMA)/include
COSMA_LIB := $(INSTALL_PATH)/COSMA-$(USE_COSMA)/lib
CFLAGS += -I$(COSMA_INC)
DFLAGS += -D__COSMA
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(COSMA_LIB) -L$(COSMA_LIB) -lcosma_prefixed_pxgemm -lcosma -lcosta
else
LIBS += $(COSMA_LIB)/libcosma_prefixed_pxgemm.a
LIBS += $(COSMA_LIB)/libcosma.a
LIBS += $(COSMA_LIB)/libcosta.a
endif
endif
ifneq ($(USE_GSL),)
USE_GSL := $(strip $(USE_GSL))
GSL_INC := $(INSTALL_PATH)/gsl-$(USE_GSL)/include
GSL_LIB := $(INSTALL_PATH)/gsl-$(USE_GSL)/lib
CFLAGS += -I$(GSL_INC)
DFLAGS += -D__GSL
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(GSL_LIB) -L$(GSL_LIB) -lgsl
else
LIBS += $(GSL_LIB)/libgsl.a
endif
endif
ifeq ($(SHARED), yes)
LIBS += -Wl,-rpath=$(MKL_LIB) -L$(MKL_LIB) -lmkl_scalapack_lp64
LIBS += -Wl,--start-group
LIBS += -lmkl_intel_lp64
LIBS += -lmkl_sequential
LIBS += -lmkl_core
LIBS += -lmkl_blacs_intelmpi_lp64
LIBS += -Wl,--end-group
else
LIBS += $(MKL_LIB)/libmkl_scalapack_lp64.a
LIBS += -Wl,--start-group
LIBS += $(MKL_LIB)/libmkl_intel_lp64.a
LIBS += $(MKL_LIB)/libmkl_sequential.a
LIBS += $(MKL_LIB)/libmkl_core.a
LIBS += $(MKL_LIB)/libmkl_blacs_intelmpi_lp64.a
LIBS += -Wl,--end-group
endif
ifeq ($(shell [ $(shell ldd --version | head -n 1 | tr -s '.' '\n' | tail -n 1) -ge 27 ] && echo yes), yes)
ifneq ($(USE_LIBTORCH),)
USE_LIBTORCH := $(strip $(USE_LIBTORCH))
LIBTORCH_INC := $(INSTALL_PATH)/libtorch-$(USE_LIBTORCH)/include
LIBTORCH_LIB := $(INSTALL_PATH)/libtorch-$(USE_LIBTORCH)/lib
CFLAGS += -I$(LIBTORCH_INC)
DFLAGS += -D__LIBTORCH
LIBS += -Wl,-rpath=$(LIBTORCH_LIB) -L$(LIBTORCH_LIB) -lc10 -ltorch_cpu -ltorch
endif
endif
CFLAGS += $(DFLAGS)
CFLAGS += -I$(MKLROOT)/include
CFLAGS += -I$(MKLROOT)/include/fftw
CXXFLAGS := $(CFLAGS) -std=c++14
FCFLAGS := $(CFLAGS)
FCFLAGS += -diag-disable=8291
FCFLAGS += -diag-disable=8293
FCFLAGS += -fpp
FCFLAGS += -fpscomp logicals
FCFLAGS += -free
#FCFLAGS += -std08
LDFLAGS += $(FCFLAGS)
LDFLAGS_C := -nofor-main
LIBS += -lz -lstdc++
# Required due to memory leak that occurs if high optimisations are used
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F
$(FC) -c $(subst -O2,-O0,$(FCFLAGS)) $<
# Required due to SEGFAULTS occurring for higher optimisation levels
paw_basis_types.o: paw_basis_types.F
$(FC) -c $(subst -O2,-O1,$(FCFLAGS)) $<
# Reduce compilation time
mp2_ri_gpw.o: mp2_ri_gpw.F
$(FC) -c $(subst -O2,-O1,$(FCFLAGS)) $<
hfx_contraction_methods.o: hfx_contraction_methods.F
$(FC) -c $(subst -O2,-O1,$(FCFLAGS)) $<
commutator_rpnl.o: commutator_rpnl.F
$(FC) -c $(subst -O2,-O1,$(FCFLAGS)) $<
# End

View file

@ -1,88 +0,0 @@
# Tested with: GFortran 9.4.0, Intel MPI, Intel MKL,
# LIBINT 2.6.0, LIBXC 5.1.6, ELPA 2021.05.002,
# PLUMED 2.7.2, LIBXSMM
CC = mpicc
FC = mpifort
LD = mpifort
AR = gcc-ar -r
GPUVER = P100
OFFLOAD_TARGET = opencl
GNU_PATH ?= $(HOME)
MPI_PATH ?= $(GNU_PATH)
include $(MPI_PATH)/plumed2/gnu/lib/plumed/src/lib/Plumed.inc.static
BLAS_INC = $(MKLROOT)/include
BLAS_LIB = -Wl,--start-group \
$(MKLROOT)/lib/intel64/libmkl_scalapack_lp64.a \
$(MKLROOT)/lib/intel64/libmkl_gf_lp64.a \
$(MKLROOT)/lib/intel64/libmkl_core.a \
$(MKLROOT)/lib/intel64/libmkl_gnu_thread.a \
$(MKLROOT)/lib/intel64/libmkl_blacs_intelmpi_lp64.a \
-Wl,--end-group
# ELPA 2021.05.002
ELPA_INC = $(MPI_PATH)/elpa/gnu/include/elpa
ELPA_LIB = $(MPI_PATH)/elpa/gnu/lib
LIBINT_INC = $(GNU_PATH)/libint/gnu/include
LIBINT_LIB = $(GNU_PATH)/libint/gnu/lib
LIBXC_INC = $(GNU_PATH)/libxc/gnu/include
LIBXC_LIB = $(GNU_PATH)/libxc/gnu/lib
LIBXSMM_INC = $(GNU_PATH)/libxsmm/include
LIBXSMM_LIB = $(GNU_PATH)/libxsmm/lib
CFLAGS = -O2 -fopenmp -fopenmp-simd -ftree-vectorize -funroll-loops -g -march=native -mtune=native
DFLAGS += -D__DBCSR_ACC
DFLAGS += -D__ELPA
DFLAGS += -D__MKL -D__FFTW3
DFLAGS += -D__LIBINT -D__MAX_CONTR=4
DFLAGS += -D__LIBXC
DFLAGS += -D__LIBXSMM
DFLAGS += -D__PLUMED2
DFLAGS += -D__parallel
#DFLAGS += -D__CHECK_DIAG
FCFLAGS = $(CFLAGS) $(DFLAGS)
FCFLAGS += -fbacktrace
FCFLAGS += -ffree-form
FCFLAGS += -ffree-line-length-none
FCFLAGS += -fno-omit-frame-pointer
FCFLAGS += -std=f2008
FCFLAGS += -I$(BLAS_INC) -I$(BLAS_INC)/fftw
FCFLAGS += -I$(ELPA_INC)/elpa -I$(ELPA_INC)/modules
FCFLAGS += -I$(LIBINT_INC)
FCFLAGS += -I$(LIBXC_INC)
FCFLAGS += -I$(LIBXSMM_INC)
LDFLAGS = $(CFLAGS) -static-libgfortran
LIBS = $(PLUMED_DEPENDENCIES) -lz
LIBS += $(ELPA_LIB)/libelpa.a
LIBS += $(LIBXC_LIB)/libxcf03.a
LIBS += $(LIBXC_LIB)/libxc.a
LIBS += $(LIBINT_LIB)/libint2.a
LIBS += $(LIBXSMM_LIB)/libxsmmf.a
LIBS += $(LIBXSMM_LIB)/libxsmm.a
LIBS += $(BLAS_LIB)
LIBS += -ldl -lstdc++
# collect header and/or library from non-default location
ifeq (,$(CUDATOOLKIT_HOME))
CUDATOOLKIT_HOME := $(NVSDKCOMPUTE_ROOT)
endif
ifeq (,$(CUDATOOLKIT_HOME))
NVCC := $(call which,nvcc)
CUDATOOLKIT_HOME := $(if $(NVCC),$(abspath $(dir $(NVCC))/..))
endif
ifneq (,$(CUDATOOLKIT_HOME))
LDFLAGS += -L$(CUDATOOLKIT_HOME)/lib64
LDFLAGS += -Wl,-rpath=$(CUDATOOLKIT_HOME)/lib64
endif
LIBS += -lOpenCL

View file

@ -1,20 +0,0 @@
#
# gfortran arch file, recommended to use gfortran >= 4.6
# building libraries (fftw3, libint, libxc, scalapack, smm) is needed to use this arch file
# sdbg is intended for serial code development, not production
#
CC = cc
FC = gfortran
LD = gfortran
AR = ar -r
DFLAGS =
FCFLAGS = -O0 -fstrict-aliasing -fbacktrace -g -fbounds-check -ffree-form -fdump-fortran-original -fopenmp $(DFLAGS)
CFLAGS = -fopenmp $(DFLAGS)
LDFLAGS = $(FCFLAGS)
LIBS = -lopenblas
FCLOGPIPE = > $(notdir $<).ast
export LC_ALL=C
#EOF

View file

@ -1,22 +0,0 @@
# This configuration was tested on a Centos 7 with the EPEL repository configured
# and a Fedora 29 Docker image with the following packages installed:
# mingw64-gcc-gfortran mingw64-gcc-c++ mingw64-winpthreads-static
# OpenBLAS was built with the following command:
# make BINARY=64 CC=x86_64-w64-mingw32-gcc FC=x86_64-w64-mingw32-gfortran HOSTCC=gcc TARGET=CORE2
# The result is a minimal standalone binary running on Windows when built with
# make OPENBLAS_LIBPATH=<path to OpenBLAS> ARCH=Linux-x86-64-mingw64-minimal VERSION=sopt
# If you do not have a Fedora or Centos yet but have Docker, you can use the following two commands
# to build CP2K via a Fedora Docker container:
# docker build -f tools/docker/Dockerfile.build_mingw64 -t cp2k/mingw64:latest tools/docker
# docker run --rm -v $(pwd):/cp2k --user $(id -u):$(id -g) cp2k/mingw64
CC = x86_64-w64-mingw32-gcc
CXX = x86_64-w64-mingw32-g++
FC = x86_64-w64-mingw32-gfortran
LD = x86_64-w64-mingw32-gfortran
AR = x86_64-w64-mingw32-ar -r
DFLAGS = -D__NO_STATM_ACCESS -D__NO_SOCKETS -D__MINGW
CFLAGS = $(DFLAGS) -O2
FCFLAGS = $(DFLAGS) -O2 -ffree-form -ffree-line-length-none \
-ftree-vectorize -funroll-loops -std=f2008
LDFLAGS = $(FCFLAGS) -static
LIBS = $(OPENBLAS_LIBPATH)/libopenblas.a

View file

@ -1,11 +0,0 @@
CC = nvc
CXX = nvc++
AR = ar -r
FC = nvfortran
LD = nvfortran
CFLAGS = -mp --diag_suppress=const_var_in_C_const_expr,unrecognized_gcc_pragma,code_is_unreachable
FCFLAGS = -mp -Mbackslash -silent
CXXFLAGS = -mp
LDFLAGS = -mp
LIBS = -lopenblas -fortranlibs -c++libs

View file

@ -1,12 +0,0 @@
# Minimal arch file for CP2K, with minimal dependencies.
# With this setup, all of CP2K can be pasted together in a single .f90 file:
# https://www.dropbox.com/s/18oi02srbot3h9p/cp2k_single_file.f90.gz
CC = gcc -g
CXX = g++ -g
AR = ar -r
FC = gfortran -g
LD = gfortran
CFLAGS = -fopenmp
FCFLAGS = -fopenmp -ffree-form
LDFLAGS = -fopenmp
LIBS = -lopenblas

View file

@ -0,0 +1,457 @@
&GLOBAL
PREFERRED_DIAG_LIBRARY ELPA
PRINT_LEVEL low
PROJECT H2O-128_md
RUN_TYPE MD
&END GLOBAL
&MOTION
&MD
ENSEMBLE NVE
STEPS 4
TEMPERATURE 300.0
TIMESTEP 0.5
&END MD
&END MOTION
&FORCE_EVAL
METHOD Quickstep
&DFT
BASIS_SET_FILE_NAME GTH_BASIS_SETS
POTENTIAL_FILE_NAME POTENTIAL
&MGRID
CUTOFF 480
REL_CUTOFF 60
&END MGRID
&PRINT
&HIRSHFELD off
&END HIRSHFELD
&MULLIKEN off
&END MULLIKEN
&END PRINT
&QS
EPS_DEFAULT 1.0E-14
&END QS
&SCF
EPS_SCF 1.0E-7
MAX_SCF 20
SCF_GUESS atomic
&OT on
MINIMIZER CG
PRECONDITIONER FULL_SINGLE_INVERSE
&END OT
&OUTER_SCF on
EPS_SCF 1.0E-7
MAX_SCF 3
&END OUTER_SCF
&PRINT
&RESTART off
&END RESTART
&END PRINT
&END SCF
&XC
&XC_FUNCTIONAL PBE
&END XC_FUNCTIONAL
&END XC
&END DFT
&SUBSYS
&CELL
ABC 15.6404 15.6404 15.6404
&END CELL
# 128 H2O (TIP5P,1bar,300K) a = 15.6404
&COORD
O 4.963362 8.433745 6.522726
O 8.071195 10.247451 13.276063
O 13.850862 12.652854 15.313528
O 10.628770 14.045936 13.059901
O 6.325463 12.328145 3.498946
O 3.583600 12.446390 8.539707
O 14.871126 15.358423 8.766155
O 13.901523 10.863702 1.750201
O 14.067166 0.862917 3.662820
O 10.133858 15.114355 5.659292
O 12.335899 11.027651 13.245276
O 11.020881 3.916524 5.030404
O 9.394684 6.531654 5.826834
O 11.080390 7.885268 7.198950
O 8.896688 8.249600 3.615318
O 7.353156 1.137779 5.346406
O 14.726780 7.918215 10.773641
O 1.861458 11.989979 2.208095
O 5.043121 6.543380 9.229162
O 8.759694 11.116925 3.548469
O 6.997656 8.373444 9.806165
O 6.063005 12.809828 7.806901
O 10.366591 5.779853 2.712706
O 1.542969 4.767262 12.213947
O 10.685570 14.507915 8.519941
O 12.849421 13.198702 9.038657
O 0.963120 14.402597 12.834647
O 7.797670 4.829150 12.447033
O 3.835427 3.788119 12.965881
O 3.376860 4.479186 1.446663
O 2.947460 1.489874 9.046559
O 3.108796 14.723769 5.201095
O 15.204514 8.599951 0.959433
O 15.219684 4.238425 15.684030
O 4.100649 1.057601 2.040112
O 11.001052 2.229682 10.064311
O 0.478278 0.949105 2.102755
O 13.497545 5.548164 10.181923
O 7.506276 1.277199 9.722916
O 7.428299 4.380540 1.411980
O 7.928952 14.363028 9.316256
O 0.355839 11.996260 13.602596
O 10.664734 7.760921 14.011072
O 2.130951 6.397562 4.547882
O 6.997688 7.117398 14.170903
O 9.843852 1.807540 1.906473
O 4.765738 9.146359 2.409067
O 4.102297 1.274905 6.068037
O 15.014340 11.743955 4.053518
O 12.695114 13.021970 5.787211
O 13.858302 3.507332 4.146316
O 7.022070 10.109293 7.424303
O 5.539291 5.159365 2.927469
O 9.768643 11.517745 11.838411
O 10.503632 1.060928 12.343495
O 5.637836 14.137294 5.298814
O 13.230577 15.494257 12.417538
O 10.087712 12.367132 5.676113
O 3.823444 11.248314 3.611973
O 2.764628 9.932668 12.219621
O 6.337327 1.214539 14.384465
O 9.932541 13.322345 2.141626
O 8.026468 1.856250 12.446566
O 12.678267 4.212245 7.543967
O 13.171058 4.494997 1.771265
O 1.270597 13.402991 7.043142
O 2.561666 15.503539 15.004783
O 9.418846 5.882450 0.091388
O 13.279532 8.467153 13.191095
O 14.784685 10.103797 9.128104
O 5.420783 3.626432 15.485019
O 5.484596 2.586023 3.716333
O 13.407464 7.649770 5.701169
O 14.491627 2.828827 13.502603
O 6.975558 5.474364 6.932584
O 3.311237 6.301528 6.829047
O 0.998842 3.600800 9.862514
O 9.866483 10.306933 7.180898
O 2.074137 10.679976 15.509320
O 11.018416 9.906723 0.630304
O 1.183950 1.843702 7.098684
O 14.873704 5.527544 6.848733
O 2.173299 7.943131 2.110457
O 4.449383 11.930616 11.079086
O 1.710425 14.756574 10.096897
O 6.694784 0.922595 1.239003
O 4.564438 11.918442 15.363533
O 5.477639 4.707670 11.065326
O 11.342444 0.223097 3.577043
O 7.426077 12.972512 11.521810
O 11.491853 1.563182 7.107076
O 4.794353 4.113581 6.561312
O 11.305735 3.619278 0.282229
O 1.481140 5.957409 8.624482
O 0.119546 10.931817 6.783795
O 2.484663 6.791214 15.186771
O 13.950657 12.916459 11.346835
O 6.051702 14.320089 13.213208
O 2.417817 14.602343 2.749723
O 3.040699 10.496700 6.149311
O 8.648120 3.218837 3.744312
O 5.305757 2.668899 9.163911
O 6.031135 7.542813 4.011356
O 15.264572 0.530244 15.103544
O 1.202379 11.443873 10.338401
O 14.305770 2.092612 10.350492
O 7.239758 12.387106 14.813865
O 7.341353 9.684340 0.723854
O 5.857541 9.676357 11.912006
O 15.332365 7.094962 14.318822
O 10.447327 8.207812 9.585339
O 9.866363 4.445989 10.955351
O 13.658983 0.219428 6.214705
O 7.322356 13.965677 1.578063
O 0.644540 4.039583 5.338294
O 11.742745 10.899134 8.906616
O 0.863237 3.520934 2.306355
O 12.841333 10.018102 4.330247
O 8.609050 2.288503 7.430427
O 11.067694 12.559978 15.366360
O 11.923672 3.212040 13.107757
O 11.306237 6.632227 11.461951
O 12.437417 7.860470 2.936097
O 1.645609 7.437039 11.743266
O 10.045665 4.639989 7.951130
O 3.297915 13.397525 13.230354
O 2.464454 1.557718 12.716823
O 4.302185 8.124888 13.787389
H 4.581468 7.718593 7.031593
H 5.435252 7.997984 5.813033
H 8.381737 9.538324 13.839031
H 7.875012 10.964336 13.879239
H 14.014609 12.142905 16.106856
H 14.391871 12.234836 14.643601
H 10.739569 13.533892 13.861004
H 10.132364 13.472919 12.475551
H 5.425531 12.003488 3.468104
H 6.310811 13.012792 4.167733
H 2.831114 13.037692 8.558619
H 3.397989 11.844750 7.818728
H 14.215688 14.710076 8.508709
H 14.915685 15.962115 8.024669
H 14.442896 10.979475 2.531061
H 13.131333 10.387571 2.060586
H 13.235552 0.480036 3.383444
H 14.167503 0.581424 4.572175
H 9.268459 15.423495 5.391430
H 10.724909 15.435978 4.978521
H 12.682383 11.900242 13.058822
H 11.530377 10.974348 12.730956
H 10.862047 3.493530 5.874252
H 11.866334 3.570906 4.744068
H 10.010906 6.860110 6.481524
H 9.772826 5.701645 5.536446
H 10.713257 8.747058 7.002065
H 10.930529 7.769221 8.137196
H 9.008071 7.846692 4.476416
H 9.404635 7.694874 3.023287
H 7.885169 1.417698 6.091281
H 6.462912 1.407047 5.572662
H 14.465524 8.122806 11.671483
H 14.387942 7.036249 10.620165
H 1.079976 11.549099 2.541476
H 1.854266 11.812527 1.267515
H 5.627954 7.254025 9.492195
H 5.358566 6.280575 8.364489
H 8.728012 10.160756 3.517346
H 7.843327 11.389131 3.499416
H 7.064983 9.034969 9.117627
H 6.681536 8.854422 10.570991
H 6.096247 13.255760 6.960573
H 5.135401 12.812072 8.043075
H 10.251809 4.879805 3.017615
H 11.247569 6.019998 2.999828
H 2.425379 4.423632 12.353605
H 1.622138 5.706596 12.380127
H 10.435334 14.464737 7.597038
H 9.863861 14.392213 8.997057
H 12.151749 13.846631 8.940295
H 12.401656 12.354243 8.987406
H 1.041376 14.716046 11.933616
H 0.431193 15.065997 13.274178
H 7.657165 5.609226 12.983662
H 7.113550 4.871097 11.778862
H 4.492907 4.226503 12.425723
H 4.197120 3.813194 13.851760
H 3.028991 5.174958 0.888880
H 2.608925 4.123752 1.894070
H 2.354380 1.561214 8.298628
H 2.601814 2.111564 9.687076
H 2.496453 14.284442 5.791230
H 2.669671 14.716265 4.350599
H 14.931000 9.483201 0.711861
H 14.543448 8.311558 1.588759
H 14.806603 3.662787 15.040418
H 15.806913 4.791820 15.169104
H 3.487941 1.365078 1.372072
H 3.735668 0.223182 2.334673
H 10.930358 1.492019 10.670189
H 11.783438 2.701109 10.350422
H 0.373431 0.943162 1.151333
H -0.331325 0.562024 2.435836
H 13.328483 5.602953 9.241365
H 13.904987 4.690509 10.302961
H 7.979807 1.447145 10.537237
H 7.699278 0.361971 9.519594
H 7.879980 3.677583 1.878957
H 6.921010 4.830270 2.087726
H 7.276262 13.850239 8.839522
H 7.900170 14.017994 10.208643
H 0.566590 12.917379 13.449771
H 0.097504 11.663383 12.743127
H 10.275806 6.980124 14.405182
H 10.496386 7.665796 13.073607
H 2.563595 6.556361 3.708934
H 1.500251 7.112689 4.631806
H 7.206023 7.863029 13.607998
H 6.088301 7.261122 14.432801
H 9.059286 1.416705 1.521847
H 9.511490 2.498088 2.479979
H 5.181015 8.567468 3.048333
H 3.954045 8.698238 2.171213
H 3.323672 1.528105 6.563885
H 3.866094 0.442374 5.658975
H 14.146610 12.079728 4.278314
H 15.272574 11.219653 4.811577
H 12.716562 12.455880 6.558777
H 11.770411 13.059590 5.542791
H 14.153945 2.652228 3.833869
H 13.419264 3.899892 3.391747
H 6.656515 10.977596 7.255036
H 6.361994 9.501768 7.090470
H 4.712486 5.080316 2.451678
H 5.521694 4.441294 3.560158
H 9.189146 10.923676 12.315377
H 9.179345 12.154039 11.433330
H 10.671879 0.186135 12.693725
H 9.549978 1.142946 12.350583
H 4.689829 14.268322 5.317390
H 5.985844 14.953053 4.938731
H 12.546401 14.844149 12.257863
H 12.876821 16.308055 12.058620
H 9.756019 13.254250 5.814793
H 9.607961 12.048315 4.911635
H 3.064895 11.422889 3.054873
H 4.291140 10.542078 3.166190
H 2.001271 10.248909 12.702851
H 2.907174 10.590416 11.538974
H 5.648267 1.877288 14.431286
H 6.585421 1.061461 15.296193
H 9.740490 12.519628 2.626387
H 10.584255 13.059982 1.491498
H 7.455032 1.571433 13.159709
H 7.941730 2.809647 12.437319
H 13.106722 3.411333 7.241976
H 13.240150 4.919265 7.226727
H 12.368225 4.300614 1.287626
H 13.862495 4.466405 1.109956
H 0.601526 14.024395 7.330255
H 0.816229 12.561332 7.005843
H 2.606189 15.728879 14.075552
H 1.751050 15.909700 15.311648
H 8.495514 5.631109 0.068638
H 9.589849 6.084955 1.011160
H 13.316729 9.402787 13.389684
H 12.379524 8.213880 13.396205
H 13.918259 10.505485 9.192801
H 14.676156 9.235384 9.515806
H 6.242915 3.976825 15.827883
H 4.811725 3.679161 16.221565
H 5.094286 2.686336 4.584564
H 4.898319 1.984198 3.257728
H 13.959261 6.906132 5.943560
H 12.760208 7.707487 6.403991
H 14.969381 3.387665 12.889672
H 13.602198 2.792224 13.150740
H 7.679644 4.993292 7.367401
H 7.415258 5.972883 6.243836
H 3.810284 5.488758 6.747876
H 2.838344 6.376576 6.000209
H 1.201385 4.317435 9.261147
H 1.095921 3.984260 10.734160
H 8.983144 9.978931 7.349300
H 9.731317 11.166458 6.781926
H 2.882211 11.167225 15.348581
H 1.472398 10.982022 14.828945
H 10.205799 9.598641 1.031516
H 11.290942 9.189004 0.058604
H 0.558492 1.215423 6.737713
H 1.132569 2.597863 6.511459
H 15.392637 5.068030 6.188591
H 15.494223 5.717274 7.552430
H 1.359386 8.375518 1.851964
H 2.491619 7.530928 1.307342
H 3.930723 12.466553 11.679082
H 4.127627 12.165120 10.208619
H 1.031873 14.870889 9.431517
H 2.312758 15.486507 9.953288
H 6.898133 0.021480 1.489743
H 5.806915 1.068076 1.565740
H 4.879440 12.531428 16.027803
H 5.343283 11.696347 14.853331
H 5.304646 5.468144 10.510363
H 5.487486 3.966167 10.460093
H 10.682669 0.812386 3.211437
H 11.375385 -0.510655 2.963240
H 6.968873 13.462683 12.205132
H 6.748898 12.423743 11.126193
H 11.398639 1.428458 8.050152
H 10.636236 1.331547 6.745834
H 5.559402 4.680155 6.660940
H 4.741233 3.634449 7.388260
H 10.965383 2.838195 0.718466
H 10.526206 4.126248 0.055186
H 2.151544 6.183022 7.979588
H 1.693196 6.493418 9.388654
H -0.065205 10.491692 7.613487
H 0.934641 10.534254 6.477533
H 1.612127 6.933760 14.819901
H 3.084290 7.085600 14.501194
H 14.370852 13.670525 11.760422
H 13.655238 13.242663 10.496806
H 5.117003 14.119782 13.262678
H 6.094269 15.275850 13.243879
H 1.684983 15.055245 2.332511
H 2.318871 13.688619 2.482233
H 3.301587 10.821578 5.287555
H 3.569324 9.709332 6.279080
H 9.402765 3.485324 4.269409
H 8.068278 2.776805 4.364491
H 5.849660 1.904585 9.354240
H 4.458877 2.303173 8.908431
H 5.856290 6.650150 3.713341
H 6.956707 7.685055 3.813075
H 14.578215 -0.136917 15.110099
H 15.036706 1.101780 14.370293
H 0.862260 12.331047 10.222329
H 0.576388 10.884751 9.878239
H 15.013369 2.687846 10.597944
H 14.749248 1.349716 9.941024
H 7.635604 12.750784 15.605874
H 7.063281 13.149121 14.262122
H 6.630981 10.323694 0.777061
H 6.910682 8.837082 0.837471
H 6.518696 10.163169 12.404063
H 5.158628 10.311483 11.755901
H 14.513415 7.228639 13.841660
H 15.188680 7.517995 15.165361
H 10.884896 7.694003 10.264136
H 9.537008 8.263555 9.875929
H 10.169920 3.541428 11.031858
H 9.058984 4.472429 11.468839
H 12.939998 0.748518 6.560183
H 13.359162 -0.684568 6.310259
H 6.806079 13.363518 2.113876
H 8.230720 13.707514 1.734455
H 1.376337 4.428271 4.859101
H 0.026246 3.773603 4.657706
H 11.202848 10.713245 9.674853
H 11.207901 10.618858 8.163906
H 0.837038 2.574495 2.447059
H 0.139223 3.694244 1.704691
H 13.344499 9.479144 4.940640
H 12.047898 10.250105 4.812811
H 8.179005 2.196707 8.280643
H 8.921781 3.193061 7.416086
H 11.996578 12.747212 15.501818
H 11.029996 11.611989 15.239368
H 11.753251 3.258077 14.048538
H 11.376661 2.489403 12.799853
H 10.727878 5.872638 11.392980
H 12.187517 6.272930 11.359562
H 12.694899 7.220715 3.599910
H 12.399226 8.692890 3.407107
H 1.995254 8.322850 11.839802
H 0.706423 7.563149 11.608147
H 10.003095 4.632780 8.907355
H 10.980630 4.590207 7.752146
H 3.257893 13.092363 14.136724
H 2.487394 13.891684 13.107495
H 2.594800 2.360087 13.222239
H 3.067392 1.638961 11.977840
H 4.204283 7.807066 12.889816
H 4.120864 9.063058 13.730900
&END COORD
&KIND H
BASIS_SET TZV2P-GTH
POTENTIAL GTH-PBE-q1
&END KIND
&KIND O
BASIS_SET TZV2P-GTH
POTENTIAL GTH-PBE-q6
&END KIND
&END SUBSYS
&END FORCE_EVAL

View file

@ -0,0 +1,169 @@
&GLOBAL
PREFERRED_DIAG_LIBRARY ELPA
PRINT_LEVEL low
PROJECT H2O-32_md
RUN_TYPE MD
&END GLOBAL
&MOTION
&MD
ENSEMBLE NVE
STEPS 4
TEMPERATURE 300.0
TIMESTEP 0.5
&END MD
&END MOTION
&FORCE_EVAL
METHOD Quickstep
&DFT
BASIS_SET_FILE_NAME GTH_BASIS_SETS
POTENTIAL_FILE_NAME POTENTIAL
&MGRID
CUTOFF 480
REL_CUTOFF 60
&END MGRID
&PRINT
&HIRSHFELD off
&END HIRSHFELD
&MULLIKEN off
&END MULLIKEN
&END PRINT
&QS
EPS_DEFAULT 1.0E-14
&END QS
&SCF
EPS_SCF 1.0E-7
MAX_SCF 20
SCF_GUESS atomic
&OT on
MINIMIZER CG
PRECONDITIONER FULL_SINGLE_INVERSE
&END OT
&OUTER_SCF on
EPS_SCF 1.0E-7
MAX_SCF 3
&END OUTER_SCF
&PRINT
&RESTART off
&END RESTART
&END PRINT
&END SCF
&XC
&XC_FUNCTIONAL PBE
&END XC_FUNCTIONAL
&END XC
&END DFT
&SUBSYS
&CELL
ABC 9.8528 9.8528 9.8528
&END CELL
# 32 H2O (TIP5P,1bar,300K) a = 9.8528
&COORD
O 2.280398 9.146539 5.088696
O 1.251703 2.406261 7.769908
O 1.596302 6.920128 0.656695
O 2.957518 3.771868 1.877387
O 0.228972 5.884026 6.532308
O 9.023431 6.119654 0.092451
O 7.256289 8.493641 5.772041
O 5.090422 9.467016 0.743177
O 6.330888 7.363471 3.747750
O 7.763819 8.349367 9.279457
O 8.280798 3.837153 5.799282
O 8.878250 2.025797 1.664102
O 9.160372 0.285100 6.871004
O 4.962043 4.134437 0.173376
O 2.802896 8.690383 2.435952
O 9.123223 3.549232 8.876721
O 1.453702 1.402538 2.358278
O 6.536550 1.146790 7.609732
O 2.766709 0.881503 9.544263
O 0.856426 2.075964 5.010625
O 6.386036 1.918950 0.242690
O 2.733023 4.452756 5.850203
O 4.600039 9.254314 6.575944
O 3.665373 6.210561 3.158420
O 3.371648 6.925594 7.476036
O 5.287920 3.270653 6.155080
O 5.225237 6.959594 9.582991
O 0.846293 5.595877 3.820630
O 9.785620 8.164617 3.657879
O 8.509982 4.430362 2.679946
O 1.337625 8.580920 8.272484
O 8.054437 9.221335 1.991376
H 1.762019 9.820429 5.528454
H 3.095987 9.107088 5.588186
H 0.554129 2.982634 8.082024
H 1.771257 2.954779 7.182181
H 2.112148 6.126321 0.798136
H 1.776389 7.463264 1.424030
H 3.754249 3.824017 1.349436
H 3.010580 4.524142 2.466878
H 0.939475 5.243834 6.571945
H 0.515723 6.520548 5.877445
H 9.852960 6.490366 0.393593
H 8.556008 6.860063 -0.294256
H 7.886607 7.941321 6.234506
H 7.793855 9.141028 5.315813
H 4.467366 9.971162 0.219851
H 5.758685 10.102795 0.998994
H 6.652693 7.917443 3.036562
H 6.711966 7.743594 4.539279
H 7.751955 8.745180 10.150905
H 7.829208 9.092212 8.679343
H 8.312540 3.218330 6.528858
H 8.508855 4.680699 6.189990
H 9.742249 1.704975 1.922581
H 8.799060 2.876412 2.095861
H 9.505360 1.161677 6.701213
H 9.920117 -0.219794 7.161006
H 4.749903 4.186003 -0.758595
H 5.248010 5.018415 0.403676
H 3.576065 9.078451 2.026264
H 2.720238 9.146974 3.273164
H 9.085561 4.493058 9.031660
H 9.215391 3.166305 9.749133
H 1.999705 2.060411 1.927796
H 1.824184 0.564565 2.081195
H 7.430334 0.849764 7.438978
H 6.576029 1.537017 8.482885
H 2.415851 1.576460 8.987338
H 2.276957 0.099537 9.289499
H 1.160987 1.818023 4.140602
H 0.350256 2.874437 4.860741
H 5.768804 2.638450 0.375264
H 7.221823 2.257514 0.563730
H 3.260797 5.243390 5.962382
H 3.347848 3.732214 5.988196
H 5.328688 9.073059 5.982269
H 5.007063 9.672150 7.334875
H 4.566850 6.413356 3.408312
H 3.273115 7.061666 2.963521
H 3.878372 7.435003 6.843607
H 3.884673 6.966316 8.283117
H 5.918240 3.116802 5.451335
H 5.355924 2.495093 6.711958
H 5.071858 7.687254 10.185667
H 6.106394 7.112302 9.241707
H 1.637363 5.184910 4.169264
H 0.427645 4.908936 3.301903
H 9.971698 7.227076 3.709104
H 10.647901 8.579244 3.629806
H 8.046808 5.126383 2.213838
H 7.995317 4.290074 3.474723
H 1.872601 7.864672 7.930401
H 0.837635 8.186808 8.987268
H 8.314696 10.115534 2.212519
H 8.687134 8.667252 2.448452
&END COORD
&KIND H
BASIS_SET TZV2P-GTH
POTENTIAL GTH-PBE-q1
&END KIND
&KIND O
BASIS_SET TZV2P-GTH
POTENTIAL GTH-PBE-q6
&END KIND
&END SUBSYS
&END FORCE_EVAL

File diff suppressed because it is too large Load diff

265
benchmarks/CI/H2O-64_md.inp Normal file
View file

@ -0,0 +1,265 @@
&GLOBAL
PREFERRED_DIAG_LIBRARY ScaLAPACK
PRINT_LEVEL low
PROJECT H2O-64_md
RUN_TYPE MD
&END GLOBAL
&MOTION
&MD
ENSEMBLE NVE
STEPS 4
TEMPERATURE 300.0
TIMESTEP 0.5
&END MD
&END MOTION
&FORCE_EVAL
METHOD Quickstep
&DFT
BASIS_SET_FILE_NAME GTH_BASIS_SETS
POTENTIAL_FILE_NAME POTENTIAL
&MGRID
CUTOFF 480
REL_CUTOFF 60
&END MGRID
&PRINT
&HIRSHFELD off
&END HIRSHFELD
&MULLIKEN off
&END MULLIKEN
&END PRINT
&QS
EPS_DEFAULT 1.0E-14
&END QS
&SCF
EPS_SCF 1.0E-7
MAX_SCF 20
SCF_GUESS atomic
&OT on
MINIMIZER CG
PRECONDITIONER FULL_SINGLE_INVERSE
&END OT
&OUTER_SCF on
EPS_SCF 1.0E-7
MAX_SCF 3
&END OUTER_SCF
&PRINT
&RESTART off
&END RESTART
&END PRINT
&END SCF
&XC
&XC_FUNCTIONAL PBE
&END XC_FUNCTIONAL
&END XC
&END DFT
&SUBSYS
&CELL
ABC 12.4138 12.4138 12.4138
&END CELL
# 64 H2O (TIP5P,1bar,300K) a = 12.4138
&COORD
O 12.235322 1.376642 10.869880
O 6.445390 3.706940 8.650794
O 0.085977 2.181322 8.276663
O 12.052554 2.671366 2.147199
O 12.250036 4.190930 12.092014
O 7.187422 0.959062 4.733469
O 8.346457 7.210040 4.667644
O 12.361546 11.527875 8.106887
O 3.299984 4.440816 9.193275
O 2.855829 3.759909 6.552815
O 1.392494 6.362753 0.586172
O 1.858645 8.694013 2.068738
O 3.770231 12.094519 8.652183
O 6.432508 3.669828 2.772418
O 1.998724 1.820217 4.876440
O 8.248581 2.404730 6.931303
O 5.753814 3.360029 12.461534
O 11.322212 5.649239 2.236798
O 4.277318 2.113956 10.590808
O 5.405015 3.349247 5.484702
O 6.493278 11.869958 0.684912
O 3.275250 2.346576 2.425241
O 7.981003 6.352512 7.507970
O 5.985990 6.512854 12.194648
O 10.636714 11.856872 12.209540
O 9.312283 3.670384 3.508594
O 1.106885 5.830301 6.638695
O 8.008007 3.326363 10.869818
O 12.403000 9.687405 11.761901
O 4.219782 7.085315 8.153470
O 3.781557 8.203821 11.563272
O 11.088898 4.532081 7.809475
O 10.387548 8.408890 1.017882
O 1.979016 6.418091 10.374159
O 4.660547 0.549666 5.617403
O 8.745880 12.256257 8.089383
O 2.662041 10.489890 0.092980
O 7.241661 10.471815 4.226946
O 2.276827 0.276647 10.810417
O 8.887733 0.946877 1.333885
O 1.943554 8.088552 7.567650
O 9.667942 8.056759 9.868847
O 10.905491 8.339638 6.484782
O 3.507733 4.862402 1.557439
O 8.010457 8.642846 12.055969
O 8.374446 10.035932 6.690309
O 5.635247 6.076875 5.563993
O 11.728434 1.601906 5.079475
O 9.771134 9.814114 3.548703
O 3.944355 10.563450 4.687536
O 0.890357 6.382287 4.065806
O 6.862447 6.425182 2.488202
O 3.813963 6.595122 3.762649
O 6.562448 8.295463 8.807182
O 9.809455 0.143325 3.886553
O 4.117074 11.661225 2.221679
O 5.295317 8.735561 2.763183
O 9.971999 5.379339 5.340378
O 12.254708 8.643874 3.957116
O 2.344274 10.761274 6.829162
O 7.013416 0.643488 10.518797
O 5.152349 10.233624 10.359388
O 11.184278 5.884064 10.298279
O 12.252335 8.974142 9.070831
H 12.415139 2.233125 11.257611
H 11.922476 1.573799 9.986994
H 5.608192 3.371543 8.971482
H 6.731226 3.060851 8.004962
H -0.169205 1.565594 7.589645
H -0.455440 2.954771 8.118939
H 12.125168 2.826463 1.205443
H 12.888828 2.969761 2.504745
H 11.553255 4.386613 11.465566
H 12.818281 4.960808 12.067151
H 7.049495 1.772344 4.247898
H 6.353019 0.798145 5.174047
H 7.781850 7.384852 5.420566
H 9.103203 6.754017 5.035898
H 12.771232 11.788645 8.931744
H 12.018035 10.650652 8.276334
H 3.557245 3.792529 9.848846
H 2.543844 4.884102 9.577958
H 2.320235 4.521250 6.329813
H 2.872128 3.749963 7.509824
H 1.209685 7.121391 1.140501
H 2.238885 6.038801 0.894245
H 2.763109 8.856353 2.336735
H 1.329379 9.047369 2.783755
H 4.315639 11.533388 9.203449
H 3.098742 12.433043 9.244412
H 5.987369 3.448974 3.590530
H 5.813096 3.419344 2.086985
H 1.057126 1.675344 4.969379
H 2.248496 2.292119 5.670892
H 8.508264 1.653337 7.464411
H 8.066015 2.034597 6.067646
H 5.197835 2.915542 11.821572
H 6.630900 3.329981 12.079371
H 10.788986 6.436672 2.127933
H 11.657923 5.463602 1.359832
H 3.544476 1.634958 10.977765
H 4.755770 1.455054 10.087655
H 4.465371 3.375459 5.665294
H 5.682663 4.264430 5.524498
H 6.174815 11.778676 1.582954
H 5.713640 12.089924 0.174999
H 3.476076 1.498708 2.028983
H 2.730229 2.134295 3.182949
H 7.119624 5.936450 7.474030
H 8.536492 5.799405 6.958665
H 5.909499 5.717477 11.667621
H 6.125402 6.196758 13.087330
H 11.203499 12.513536 11.804844
H 10.260930 12.300153 12.970145
H 9.985036 3.927685 2.878172
H 8.545584 3.468329 2.972331
H 1.399882 6.620092 7.093246
H 0.963561 6.112523 5.735345
H 8.067363 3.674002 9.979955
H 8.000737 2.375959 10.756190
H 11.821629 10.402510 12.020482
H 12.206854 8.983242 12.379892
H 3.461473 7.606485 7.889688
H 3.844478 6.304711 8.560946
H 3.179884 7.585614 11.148494
H 4.401957 7.652030 12.039573
H 11.573777 5.053211 7.169515
H 10.342076 4.186083 7.320831
H 10.065640 8.919194 1.760981
H 9.629585 8.322499 0.439729
H 1.396302 6.546079 9.625630
H 1.405516 6.479759 11.138049
H 4.024008 1.232518 5.405828
H 4.736858 0.579881 6.571077
H 9.452293 12.313381 8.732772
H 8.976559 11.502788 7.545965
H 1.834701 10.012311 0.153462
H 3.295197 9.836403 -0.204175
H 7.056724 11.401702 4.095264
H 6.499038 10.020287 3.825865
H 1.365541 0.487338 11.013887
H 2.501591 -0.428131 11.417871
H 8.644279 1.812362 1.005409
H 8.142674 0.388030 1.112955
H 1.272659 8.365063 8.191888
H 2.142485 8.877768 7.063867
H 8.961493 7.826192 9.265523
H 9.227102 8.487654 10.601118
H 10.150144 7.758934 6.392768
H 10.596082 9.187988 6.167290
H 3.463106 4.096188 2.129414
H 3.919461 4.539801 0.755791
H 7.418998 9.394959 12.028876
H 7.430413 7.883095 12.106546
H 7.972905 10.220334 5.841196
H 7.675111 9.631498 7.203725
H 5.332446 6.381336 6.419473
H 5.000025 6.434186 4.943466
H 11.575078 2.271167 4.412540
H 11.219802 0.847030 4.783357
H 8.865342 9.721516 3.843998
H 10.000732 10.719285 3.758898
H 3.186196 10.476397 5.265333
H 4.407331 11.335128 5.013723
H 0.558187 7.255936 3.859331
H 0.341672 5.789383 3.552346
H 7.459933 6.526049 3.229193
H 6.696228 5.483739 2.440372
H 3.864872 6.313007 2.849385
H 2.876419 6.621201 3.953862
H 5.631529 8.079145 8.753997
H 7.003296 7.568245 8.367822
H 9.615413 0.527902 3.031755
H 8.962985 0.109366 4.332162
H 3.825854 11.139182 1.474087
H 4.063988 11.063232 2.967211
H 5.784391 7.914558 2.708486
H 4.780461 8.655167 3.566110
H 10.880659 5.444664 5.046607
H 9.593331 4.687991 4.797350
H 11.562317 8.960134 3.376765
H 11.926084 8.816948 4.839320
H 2.856874 11.297981 7.433660
H 1.492332 11.195517 6.786033
H 7.145820 0.090200 9.749009
H 7.227275 0.077690 11.260665
H 4.662021 9.538430 10.798155
H 5.994537 9.833472 10.142985
H 10.544299 6.595857 10.301445
H 11.281750 5.653082 9.374494
H 12.103020 8.841164 10.006916
H 11.491592 8.576221 8.647557
&END COORD
&KIND H
BASIS_SET TZV2P-GTH
POTENTIAL GTH-PBE-q1
&END KIND
&KIND O
BASIS_SET TZV2P-GTH
POTENTIAL GTH-PBE-q6
&END KIND
&END SUBSYS
&END FORCE_EVAL

View file

@ -0,0 +1,265 @@
&GLOBAL
PREFERRED_DIAG_LIBRARY ELPA
PRINT_LEVEL low
PROJECT H2O-64_md
RUN_TYPE MD
&END GLOBAL
&MOTION
&MD
ENSEMBLE NVE
STEPS 4
TEMPERATURE 300.0
TIMESTEP 0.5
&END MD
&END MOTION
&FORCE_EVAL
METHOD Quickstep
&DFT
BASIS_SET_FILE_NAME GTH_BASIS_SETS
POTENTIAL_FILE_NAME POTENTIAL
&MGRID
CUTOFF 480
REL_CUTOFF 60
&END MGRID
&PRINT
&HIRSHFELD off
&END HIRSHFELD
&MULLIKEN off
&END MULLIKEN
&END PRINT
&QS
EPS_DEFAULT 1.0E-14
&END QS
&SCF
EPS_SCF 1.0E-7
MAX_SCF 20
SCF_GUESS atomic
&OT on
MINIMIZER CG
PRECONDITIONER FULL_SINGLE_INVERSE
&END OT
&OUTER_SCF on
EPS_SCF 1.0E-7
MAX_SCF 3
&END OUTER_SCF
&PRINT
&RESTART off
&END RESTART
&END PRINT
&END SCF
&XC
&XC_FUNCTIONAL PBE
&END XC_FUNCTIONAL
&END XC
&END DFT
&SUBSYS
&CELL
ABC 12.4138 12.4138 12.4138
&END CELL
# 64 H2O (TIP5P,1bar,300K) a = 12.4138
&COORD
O 12.235322 1.376642 10.869880
O 6.445390 3.706940 8.650794
O 0.085977 2.181322 8.276663
O 12.052554 2.671366 2.147199
O 12.250036 4.190930 12.092014
O 7.187422 0.959062 4.733469
O 8.346457 7.210040 4.667644
O 12.361546 11.527875 8.106887
O 3.299984 4.440816 9.193275
O 2.855829 3.759909 6.552815
O 1.392494 6.362753 0.586172
O 1.858645 8.694013 2.068738
O 3.770231 12.094519 8.652183
O 6.432508 3.669828 2.772418
O 1.998724 1.820217 4.876440
O 8.248581 2.404730 6.931303
O 5.753814 3.360029 12.461534
O 11.322212 5.649239 2.236798
O 4.277318 2.113956 10.590808
O 5.405015 3.349247 5.484702
O 6.493278 11.869958 0.684912
O 3.275250 2.346576 2.425241
O 7.981003 6.352512 7.507970
O 5.985990 6.512854 12.194648
O 10.636714 11.856872 12.209540
O 9.312283 3.670384 3.508594
O 1.106885 5.830301 6.638695
O 8.008007 3.326363 10.869818
O 12.403000 9.687405 11.761901
O 4.219782 7.085315 8.153470
O 3.781557 8.203821 11.563272
O 11.088898 4.532081 7.809475
O 10.387548 8.408890 1.017882
O 1.979016 6.418091 10.374159
O 4.660547 0.549666 5.617403
O 8.745880 12.256257 8.089383
O 2.662041 10.489890 0.092980
O 7.241661 10.471815 4.226946
O 2.276827 0.276647 10.810417
O 8.887733 0.946877 1.333885
O 1.943554 8.088552 7.567650
O 9.667942 8.056759 9.868847
O 10.905491 8.339638 6.484782
O 3.507733 4.862402 1.557439
O 8.010457 8.642846 12.055969
O 8.374446 10.035932 6.690309
O 5.635247 6.076875 5.563993
O 11.728434 1.601906 5.079475
O 9.771134 9.814114 3.548703
O 3.944355 10.563450 4.687536
O 0.890357 6.382287 4.065806
O 6.862447 6.425182 2.488202
O 3.813963 6.595122 3.762649
O 6.562448 8.295463 8.807182
O 9.809455 0.143325 3.886553
O 4.117074 11.661225 2.221679
O 5.295317 8.735561 2.763183
O 9.971999 5.379339 5.340378
O 12.254708 8.643874 3.957116
O 2.344274 10.761274 6.829162
O 7.013416 0.643488 10.518797
O 5.152349 10.233624 10.359388
O 11.184278 5.884064 10.298279
O 12.252335 8.974142 9.070831
H 12.415139 2.233125 11.257611
H 11.922476 1.573799 9.986994
H 5.608192 3.371543 8.971482
H 6.731226 3.060851 8.004962
H -0.169205 1.565594 7.589645
H -0.455440 2.954771 8.118939
H 12.125168 2.826463 1.205443
H 12.888828 2.969761 2.504745
H 11.553255 4.386613 11.465566
H 12.818281 4.960808 12.067151
H 7.049495 1.772344 4.247898
H 6.353019 0.798145 5.174047
H 7.781850 7.384852 5.420566
H 9.103203 6.754017 5.035898
H 12.771232 11.788645 8.931744
H 12.018035 10.650652 8.276334
H 3.557245 3.792529 9.848846
H 2.543844 4.884102 9.577958
H 2.320235 4.521250 6.329813
H 2.872128 3.749963 7.509824
H 1.209685 7.121391 1.140501
H 2.238885 6.038801 0.894245
H 2.763109 8.856353 2.336735
H 1.329379 9.047369 2.783755
H 4.315639 11.533388 9.203449
H 3.098742 12.433043 9.244412
H 5.987369 3.448974 3.590530
H 5.813096 3.419344 2.086985
H 1.057126 1.675344 4.969379
H 2.248496 2.292119 5.670892
H 8.508264 1.653337 7.464411
H 8.066015 2.034597 6.067646
H 5.197835 2.915542 11.821572
H 6.630900 3.329981 12.079371
H 10.788986 6.436672 2.127933
H 11.657923 5.463602 1.359832
H 3.544476 1.634958 10.977765
H 4.755770 1.455054 10.087655
H 4.465371 3.375459 5.665294
H 5.682663 4.264430 5.524498
H 6.174815 11.778676 1.582954
H 5.713640 12.089924 0.174999
H 3.476076 1.498708 2.028983
H 2.730229 2.134295 3.182949
H 7.119624 5.936450 7.474030
H 8.536492 5.799405 6.958665
H 5.909499 5.717477 11.667621
H 6.125402 6.196758 13.087330
H 11.203499 12.513536 11.804844
H 10.260930 12.300153 12.970145
H 9.985036 3.927685 2.878172
H 8.545584 3.468329 2.972331
H 1.399882 6.620092 7.093246
H 0.963561 6.112523 5.735345
H 8.067363 3.674002 9.979955
H 8.000737 2.375959 10.756190
H 11.821629 10.402510 12.020482
H 12.206854 8.983242 12.379892
H 3.461473 7.606485 7.889688
H 3.844478 6.304711 8.560946
H 3.179884 7.585614 11.148494
H 4.401957 7.652030 12.039573
H 11.573777 5.053211 7.169515
H 10.342076 4.186083 7.320831
H 10.065640 8.919194 1.760981
H 9.629585 8.322499 0.439729
H 1.396302 6.546079 9.625630
H 1.405516 6.479759 11.138049
H 4.024008 1.232518 5.405828
H 4.736858 0.579881 6.571077
H 9.452293 12.313381 8.732772
H 8.976559 11.502788 7.545965
H 1.834701 10.012311 0.153462
H 3.295197 9.836403 -0.204175
H 7.056724 11.401702 4.095264
H 6.499038 10.020287 3.825865
H 1.365541 0.487338 11.013887
H 2.501591 -0.428131 11.417871
H 8.644279 1.812362 1.005409
H 8.142674 0.388030 1.112955
H 1.272659 8.365063 8.191888
H 2.142485 8.877768 7.063867
H 8.961493 7.826192 9.265523
H 9.227102 8.487654 10.601118
H 10.150144 7.758934 6.392768
H 10.596082 9.187988 6.167290
H 3.463106 4.096188 2.129414
H 3.919461 4.539801 0.755791
H 7.418998 9.394959 12.028876
H 7.430413 7.883095 12.106546
H 7.972905 10.220334 5.841196
H 7.675111 9.631498 7.203725
H 5.332446 6.381336 6.419473
H 5.000025 6.434186 4.943466
H 11.575078 2.271167 4.412540
H 11.219802 0.847030 4.783357
H 8.865342 9.721516 3.843998
H 10.000732 10.719285 3.758898
H 3.186196 10.476397 5.265333
H 4.407331 11.335128 5.013723
H 0.558187 7.255936 3.859331
H 0.341672 5.789383 3.552346
H 7.459933 6.526049 3.229193
H 6.696228 5.483739 2.440372
H 3.864872 6.313007 2.849385
H 2.876419 6.621201 3.953862
H 5.631529 8.079145 8.753997
H 7.003296 7.568245 8.367822
H 9.615413 0.527902 3.031755
H 8.962985 0.109366 4.332162
H 3.825854 11.139182 1.474087
H 4.063988 11.063232 2.967211
H 5.784391 7.914558 2.708486
H 4.780461 8.655167 3.566110
H 10.880659 5.444664 5.046607
H 9.593331 4.687991 4.797350
H 11.562317 8.960134 3.376765
H 11.926084 8.816948 4.839320
H 2.856874 11.297981 7.433660
H 1.492332 11.195517 6.786033
H 7.145820 0.090200 9.749009
H 7.227275 0.077690 11.260665
H 4.662021 9.538430 10.798155
H 5.994537 9.833472 10.142985
H 10.544299 6.595857 10.301445
H 11.281750 5.653082 9.374494
H 12.103020 8.841164 10.006916
H 11.491592 8.576221 8.647557
&END COORD
&KIND H
BASIS_SET TZV2P-GTH
POTENTIAL GTH-PBE-q1
&END KIND
&KIND O
BASIS_SET TZV2P-GTH
POTENTIAL GTH-PBE-q6
&END KIND
&END SUBSYS
&END FORCE_EVAL

View file

@ -92,11 +92,9 @@ def run_benchmark(cp2k_exe_dir, input_file, mpi_wrapper="mpiexec -np {mpi_ranks}
allok = True
print(
"""
print("""
CP2K | # Threads | # Ranks | Energy
-----+-----------+---------+------------------------"""
)
-----+-----------+---------+------------------------""")
for (omp_num_threads, mpi_ranks), energy in zip(TEST_COMBINATIONS, energies):
version = cp2k_version(omp_num_threads, mpi_ranks)
@ -109,11 +107,9 @@ CP2K | # Threads | # Ranks | Energy
f"{version} | {omp_num_threads:9d} | {mpi_ranks:7d} | {energy:20.14f} {mark}"
)
print(
f"""\
print(f"""\
----------------------------------------------------
mean: {mean:20.14f} +/- {var:16.12e}"""
)
mean: {mean:20.14f} +/- {var:16.12e}""")
return allok

View file

@ -119,12 +119,12 @@ with later ones.
Running on ORNL's Cray XT5 (Jaguar) the following runtime has been obtained in a setup using 8 OMP
threads per node (8 cores per node / 16 Gb per node).
| Cores | Full CP2K\[s\] | HFX\[s\] | local HFX\[s\] | Mem/node\[Mb\] |
| ----: | -------------: | -------: | -------------: | -------------: |
| 1024 | 6569.07 | 6488.24 | 6406.99 | 14845.00 |
| 2048 | 1369.92 | 1314.86 | 1259.82 | 13468.00 |
| 4096 | 722.24 | 670.18 | 631.11 | 7293.00 |
| 8192 | 402.18 | 352.21 | 317.59 | 4306.00 |
| 16384 | 274.41 | 213.88 | 172.88 | 2801.00 |
| 32768 | 201.71 | 135.47 | 85.29 | 2046.00 |
| 65536 | 255.97 | 117.33 | 41.43 | 1673.00 |
| Cores | Full CP2K[s] | HFX[s] | local HFX[s] | Mem/node[Mb] |
| ----: | -----------: | ------: | -----------: | -----------: |
| 1024 | 6569.07 | 6488.24 | 6406.99 | 14845.00 |
| 2048 | 1369.92 | 1314.86 | 1259.82 | 13468.00 |
| 4096 | 722.24 | 670.18 | 631.11 | 7293.00 |
| 8192 | 402.18 | 352.21 | 317.59 | 4306.00 |
| 16384 | 274.41 | 213.88 | 172.88 | 2801.00 |
| 32768 | 201.71 | 135.47 | 85.29 | 2046.00 |
| 65536 | 255.97 | 117.33 | 41.43 | 1673.00 |

View file

@ -18,8 +18,8 @@ To run the benchmark, CP2K needs to be compiled with libint support (`-D__LIBINT
## Results on Piz Dora, CSCS
| Input File | Configuration | Total Number of Cores | Runtime \[s\] |
| ---------- | ------------------------: | --------------------: | ------------: |
| GW.inp | 16 nodes x 36 MPI x 1 OMP | 576 | 305 |
| Input File | Configuration | Total Number of Cores | Runtime [s] |
| ---------- | ------------------------: | --------------------: | ----------: |
| GW.inp | 16 nodes x 36 MPI x 1 OMP | 576 | 305 |
The timings have been obtained on CRAY-XC40 (PizDora@CSCS)

View file

@ -28,9 +28,9 @@ the additional files [`t_c_g.dat`](../../../data/t_c_g.dat) and
### Results on Piz Dora, CSCS
| Input File | Configuration | Total Number of Cores | Runtime \[s\] |
| ---------- | ------------------------: | --------------------: | ------------: |
| RI-MP2.inp | 16 nodes x 16 MPI x 1 OMP | 256 | 392 |
| RI-RPA.inp | 16 nodes x 16 MPI x 1 OMP | 256 | 221 |
| Input File | Configuration | Total Number of Cores | Runtime [s] |
| ---------- | ------------------------: | --------------------: | ----------: |
| RI-MP2.inp | 16 nodes x 16 MPI x 1 OMP | 256 | 392 |
| RI-RPA.inp | 16 nodes x 16 MPI x 1 OMP | 256 | 221 |
\*) The timings have been obtained on CRAY-XC40 (PizDora@CSCS)

View file

@ -13,5 +13,6 @@ PBE/GAPW/AE 30.2 845
SCAN 14.2 249
PBE0/ADMM 16.8 1306
DC-SCAN 20.2 3525
ccGRB-Q/SCAN 33.2 479

View file

@ -0,0 +1,75 @@
&GLOBAL
PRINT_LEVEL LOW
PROJECT H2O-64
RUN_TYPE MD
&TIMINGS
THRESHOLD 0.001
&END TIMINGS
&END GLOBAL
&MOTION
&MD
ENSEMBLE NVE
STEPS 10
TEMPERATURE 300.0
TIMESTEP 0.5
&END MD
&END MOTION
&FORCE_EVAL
METHOD QS
&DFT
BASIS_SET_FILE_NAME BASIS_ccGRB_UZH
POTENTIAL_FILE_NAME POTENTIAL_UZH
&MGRID
CUTOFF 800
REL_CUTOFF 60
&END MGRID
&QS
EPS_DEFAULT 1.0E-12
METHOD GPW
&END QS
&SCF
EPS_SCF 1.E-7
MAX_SCF 10
SCF_GUESS ATOMIC
&OT ON
MINIMIZER DIIS
PRECONDITIONER FULL_SINGLE_INVERSE
&END OT
&OUTER_SCF
EPS_SCF 1.E-7
MAX_SCF 10
&END OUTER_SCF
&PRINT
&RESTART OFF
&END RESTART
&END PRINT
&END SCF
&XC
&XC_FUNCTIONAL
&MGGA_C_R2SCAN
&END MGGA_C_R2SCAN
&MGGA_X_R2SCAN
&END MGGA_X_R2SCAN
&END XC_FUNCTIONAL
&END XC
&END DFT
&SUBSYS
&CELL
ABC 12.4138 12.4138 12.4138
&END CELL
&KIND H
BASIS_SET ORB ccGRB-Q-q1
POTENTIAL GTH-MGGA-q1
&END KIND
&KIND O
BASIS_SET ORB ccGRB-Q-q6
POTENTIAL GTH-MGGA-q6
&END KIND
&TOPOLOGY
COORD_FILE_FORMAT xyz
COORD_FILE_NAME geom.xyz
&END TOPOLOGY
&END SUBSYS
&END FORCE_EVAL

View file

@ -0,0 +1,189 @@
CP2K| version string: CP2K version 2026.1 (Development Version)
CP2K| source code revision number: 39a6033793
CP2K| cp2kflags: omp libint fftw3 libxc elpa parallel scalapack mpi_f08 cosma a
CP2K| ce deepmd xsmm plumed2 spglib libdftd4 mctc-lib tblite sirius
CP2K| libvori libbqb libtorch mimic libvdwxc hdf5 trexio libsmeagol
CP2K| l greenx
GLOBAL| Total number of message passing processes 48
GLOBAL| Number of threads for this process 2
GLOBAL| CPU model name AMD EPYC 7401 24-Core Processor
MD| ***************************************************************************
MD| Step number 10
MD| Time [fs] 5.000000
MD| Conserved quantity [hartree] -0.110131201702E+04
MD| ---------------------------------------------------------------------------
MD| Instantaneous Averages
MD| CPU time per MD step [s] 35.218158 47.869443
MD| Energy drift per atom [K] -0.131390165988E+01 -0.698963310316E+00
MD| Potential energy [hartree] -0.110158135777E+04 -0.110156769201E+04
MD| Kinetic energy [hartree] 0.269340752994E+00 0.256042491407E+00
MD| Temperature [K] 296.862064 282.204983
MD| ***************************************************************************
MD| Estimated peak process memory after this step [MiB] 692
-------------------------------------------------------------------------------
- -
- T I M I N G -
- -
-------------------------------------------------------------------------------
SUBROUTINE CALLS ASD SELF TIME TOTAL TIME
MAXIMUM AVERAGE MAXIMUM AVERAGE MAXIMUM
CP2K 1 1.0 0.019 0.023 479.099 479.111
qs_mol_dyn_low 1 2.0 0.020 0.020 478.890 478.902
qs_forces 11 3.9 0.002 0.002 478.816 478.828
qs_energies 11 4.9 0.002 0.003 442.333 442.396
scf_env_do_scf 11 5.9 0.001 0.002 413.851 413.872
velocity_verlet 10 3.0 0.002 0.002 372.446 372.457
scf_env_do_scf_inner_loop 99 6.8 0.005 0.014 359.191 359.203
rebuild_ks_matrix 110 8.5 0.001 0.001 227.840 228.878
qs_ks_build_kohn_sham_matrix 110 9.5 0.030 0.039 227.839 228.877
qs_ks_update_qs_env 112 7.8 0.002 0.002 197.044 197.946
sum_up_and_integrate 110 10.5 0.008 0.011 169.438 169.692
integrate_v_rspace 220 11.5 0.015 0.018 169.282 169.526
qs_rho_update_rho_low 110 7.9 0.002 0.002 156.297 156.689
calculate_rho_elec 220 8.9 0.210 0.232 156.295 156.687
grid_integrate_task_list 220 12.5 140.219 147.201 140.219 147.201
grid_collocate_task_list 220 9.9 123.134 131.477 123.134 131.477
dbcsr_multiply_generic 1975 12.5 0.135 0.160 71.642 73.450
multiply_cannon 1975 13.5 0.258 0.349 55.160 58.975
multiply_cannon_loop 1975 14.5 0.279 0.348 52.039 57.039
init_scf_loop 13 6.8 0.001 0.001 54.630 54.638
multiply_cannon_multrec 23700 15.5 30.767 51.243 30.787 51.262
mp_waitall_1 182288 16.5 20.746 51.062 20.746 51.062
qs_scf_new_mos 99 7.8 0.001 0.003 47.097 48.519
qs_scf_loop_do_ot 99 8.8 0.001 0.002 47.096 48.517
multiply_cannon_metrocomm3 23700 15.5 0.074 0.081 15.797 46.330
ot_scf_mini 99 9.8 0.003 0.003 42.776 44.032
fft_wrap_pw1pw2 2871 12.6 0.122 0.152 41.986 43.782
fft_wrap_pw1pw2_400 1551 13.9 1.712 1.887 36.891 38.622
qs_vxc_create 110 10.5 0.004 0.005 37.743 37.950
xc_vxc_pw_create 110 11.5 0.199 0.252 37.740 37.947
density_rs2pw 220 9.9 0.017 0.019 28.646 35.958
fft3d_ps 2871 14.6 14.807 15.986 31.881 33.324
qs_ks_update_qs_env_forces 11 4.9 0.000 0.000 31.335 31.467
ot_mini 99 10.8 0.001 0.001 25.690 27.038
prepare_preconditioner 13 7.8 0.000 0.000 26.319 26.529
make_preconditioner 13 8.8 0.000 0.001 26.319 26.529
xc_rho_set_and_dset_create 110 12.5 0.263 0.323 24.080 25.772
init_scf_run 11 5.9 0.000 0.000 23.815 23.825
scf_env_initial_rho_setup 11 6.9 0.000 0.001 23.815 23.824
transfer_rs2pw 891 10.8 0.024 0.033 16.101 23.518
mp_waitany 19844 14.1 15.159 23.172 15.159 23.172
wfi_extrapolate 11 7.9 0.002 0.002 21.786 21.787
xc_pw_derive 660 13.5 0.018 0.021 19.453 21.364
potential_pw2rs 220 12.5 0.028 0.031 19.402 19.753
transfer_rs2pw_400 231 11.8 1.350 1.798 11.391 18.677
make_full_inverse_cholesky 13 9.8 0.000 0.001 17.807 17.993
mp_alltoall_d11v 2283 13.5 11.289 16.957 11.289 16.957
apply_preconditioner_dbcsr 112 12.8 0.000 0.000 15.272 16.451
apply_single 112 13.8 0.001 0.001 15.272 16.451
xc_functional_eval 220 13.5 0.004 0.005 14.164 15.815
libxc_lda_eval 220 14.5 14.148 15.801 14.160 15.812
ot_diis_step 99 11.8 0.005 0.006 15.161 15.161
rs_gather_matrices 220 12.5 1.066 1.291 9.280 15.066
mp_alltoall_z22v 2871 16.6 12.407 14.961 12.407 14.961
xc_pw_divergence 110 12.5 0.009 0.011 13.089 14.726
multiply_cannon_metrocomm4 21725 15.5 0.092 0.117 4.602 12.389
mp_irecv_dv 62105 16.0 4.643 12.385 4.643 12.385
transfer_pw2rs 891 13.4 0.028 0.038 11.855 11.896
qs_ot_get_derivative 99 11.8 0.001 0.002 10.443 11.717
cp_fm_cholesky_invert 13 10.8 11.168 11.211 11.168 11.211
yz_to_x 1221 15.3 1.975 2.374 8.688 10.837
make_m2s 3950 13.5 0.072 0.081 9.953 10.273
mp_sum_l 9279 13.6 5.067 9.274 5.067 9.274
make_images 3950 14.5 0.734 1.143 8.571 8.930
make_full_single_inverse 13 9.8 0.002 0.003 7.885 8.086
x_to_yz 1210 16.0 1.789 2.030 7.361 7.672
transfer_pw2rs_400 231 14.3 3.143 3.414 6.507 6.754
cp_dbcsr_sm_fm_multiply 45 9.4 0.002 0.002 6.539 6.554
qs_ot_get_derivative_taylor 81 12.9 0.003 0.004 5.114 6.150
cp_dbcsr_sm_fm_multiply_core 45 10.4 0.000 0.000 5.638 6.015
mp_sum_d 3837 11.5 3.298 5.774 3.298 5.774
qs_ot_get_p 112 10.5 0.001 0.002 3.745 5.453
cp_fm_cholesky_decompose 26 10.6 5.275 5.362 5.275 5.362
calculate_dm_sparse 110 9.7 0.001 0.002 4.805 5.290
build_core_hamiltonian_matrix_ 11 4.9 0.001 0.002 4.564 4.829
rs_scatter_matrices 242 9.9 1.481 1.780 4.123 4.647
dbcsr_dot 1040 12.2 0.447 0.495 2.215 4.289
make_images_data 3950 15.5 0.057 0.070 3.529 4.119
pw_gather_p 1441 14.1 3.490 3.731 3.490 3.731
hybrid_alltoall_any 4089 16.4 0.289 1.555 3.073 3.593
transfer_pw2rs_140 220 14.5 1.238 1.324 3.288 3.395
pw_scatter_p 1430 15.1 2.982 3.382 2.982 3.382
qs_energies_init_hamiltonians 11 5.9 0.000 0.001 3.361 3.361
transfer_rs2pw_140 220 11.9 1.136 1.370 3.147 3.298
make_images_sizes 3950 15.5 0.005 0.006 2.536 3.183
mp_alltoall_i44 3950 16.5 2.531 3.179 2.531 3.179
pw_derive 990 13.8 2.904 3.176 2.904 3.176
arnoldi_generalized_ev 13 10.8 0.001 0.001 3.044 3.087
mp_alltoall_i22 607 13.6 1.709 2.928 1.709 2.928
dbcsr_sym_matrix_vector_mult 1266 12.5 0.029 0.041 2.855 2.888
fft_wrap_pw1pw2_140 440 13.2 0.084 0.111 2.543 2.785
build_core_ppl_forces 11 5.9 2.474 2.781 2.474 2.781
pw_poisson_solve 110 10.5 0.005 0.008 2.707 2.765
gev_build_subspace 23 11.4 0.012 0.026 2.613 2.623
copy_dbcsr_to_fm 139 10.8 0.004 0.005 1.657 2.436
dbcsr_complete_redistribute 314 11.8 0.461 0.527 1.884 2.349
pw_copy 2090 13.1 2.122 2.316 2.122 2.316
make_basis_sm 13 9.4 0.001 0.001 2.302 2.310
make_images_pack 3950 15.5 1.533 2.280 1.555 2.299
build_core_hamiltonian_matrix 11 6.9 0.002 0.002 2.091 2.225
ot_scf_init 13 7.8 0.002 0.002 2.116 2.131
buffer_matrices_ensure_size 3950 14.5 1.359 1.995 1.359 1.995
dbcsr_sym_matrix_vector_mult_l 1266 13.5 1.598 1.837 1.605 1.843
reorthogonalize_vectors 10 9.0 0.000 0.000 1.809 1.816
pw_poisson_set 111 11.4 0.009 0.012 1.702 1.760
parallel_gemm_fm_cosma 95 8.9 1.694 1.752 1.694 1.752
transfer_pw2rs_50 220 14.5 0.385 0.442 1.576 1.751
copy_fm_to_dbcsr 175 10.8 0.001 0.002 1.303 1.723
mp_allgather_i34 1975 14.5 1.319 1.670 1.319 1.670
dbcsr_desymmetrize_deep 139 11.8 0.083 0.112 0.881 1.625
fft_wrap_pw1pw2_50 440 13.2 0.016 0.018 1.451 1.553
dbcsr_make_dense_low 8068 15.8 0.045 0.048 1.262 1.524
rs_grid_zero 462 15.2 1.445 1.515 1.445 1.515
qs_ot_get_orbitals 99 10.8 0.001 0.001 1.444 1.500
make_dense_data 8068 16.8 1.139 1.368 1.193 1.453
dbcsr_make_images_dense 3286 14.9 0.037 0.040 1.244 1.449
build_core_ppl 11 7.9 1.313 1.443 1.313 1.443
pw_axpy 1540 11.6 1.365 1.430 1.365 1.430
qs_ot_get_derivative_diag 18 12.0 0.001 0.001 1.091 1.394
mp_sendrecv_dv 20680 12.9 1.209 1.343 1.209 1.343
qs_env_update_s_mstruct 11 6.9 0.000 0.000 1.186 1.319
cp_dbcsr_plus_fm_fm_t 22 8.9 0.001 0.001 1.211 1.306
transfer_rs2pw_50 220 11.9 0.243 0.261 1.170 1.283
compute_matrix_w 11 5.9 0.000 0.000 1.178 1.246
calculate_w_matrix_ot 11 6.9 0.001 0.002 1.178 1.246
build_core_ppnl_forces 11 5.9 1.143 1.240 1.143 1.240
pw_copy_to_array 1441 14.1 1.048 1.231 1.048 1.231
mp_sum_dv 7212 14.3 0.931 1.130 0.931 1.130
fft_wrap_pw1pw2_20 440 13.2 0.005 0.006 0.979 1.049
mp_irecv_dm3 5412 14.1 0.461 0.959 0.461 0.959
transfer_fm_to_dbcsr 13 9.8 0.000 0.000 0.627 0.915
transfer_dbcsr_to_fm 13 10.8 0.001 0.002 0.806 0.868
pw_copy_from_array 1430 15.1 0.647 0.835 0.647 0.835
mp_alltoall_z11v 440 16.2 0.771 0.816 0.771 0.816
calculate_rho_core 11 7.9 0.051 0.058 0.671 0.812
dbcsr_rep_row_to_rep_col_vec 1266 13.5 0.036 0.070 0.635 0.810
cp_fm_uplo_to_full 46 13.0 0.578 0.800 0.578 0.800
multiply_cannon_metrocomm1 23700 15.5 0.037 0.046 0.342 0.750
build_kinetic_matrix_low 22 6.9 0.668 0.711 0.689 0.734
calculate_ecore_overlap 22 5.9 0.000 0.001 0.437 0.728
build_overlap_matrix_low 22 6.9 0.645 0.687 0.675 0.716
external_control 109 7.3 0.001 0.002 0.180 0.702
mp_bcast_b_src 129 8.9 0.179 0.702 0.179 0.702
dbcsr_finalize 4461 13.7 0.031 0.059 0.531 0.685
dbcsr_copy 4672 12.8 0.486 0.546 0.562 0.672
dbcsr_merge_all 3948 15.0 0.077 0.143 0.477 0.618
dbcsr_col_vec_to_rep_row 1800 14.0 0.023 0.032 0.411 0.602
mp_isendrecv_dv 20680 15.5 0.199 0.596 0.199 0.596
calculate_first_density_matrix 1 7.0 0.000 0.000 0.585 0.592
qs_ot_p2m_diag 20 11.0 0.002 0.004 0.550 0.553
evaluate_core_matrix_traces 110 8.5 0.001 0.001 0.537 0.539
calculate_ptrace_kp 220 9.5 0.001 0.001 0.536 0.538
qs_create_task_list 11 7.9 0.000 0.000 0.493 0.517
generate_qs_task_list 11 8.9 0.221 0.255 0.493 0.517
transfer_pw2rs_20 220 14.5 0.083 0.097 0.456 0.510
dbcsr_add_wm_from_matrix 418 13.0 0.036 0.108 0.388 0.485
-------------------------------------------------------------------------------

View file

@ -1,5 +1,5 @@
# Quickstep Single Node Regression Tests
The purpose of these tests is to give a quick idea of the performance of a system, when only a
single node is available. The tests should run in \< 5 minutes on a modern node, and require less
single node is available. The tests should run in < 5 minutes on a modern node, and require less
than 16Gb of memory.

View file

@ -2,8 +2,6 @@
PROJECT diag_cu72_broy
! Do not compute forces to avoid performance cliff of grid_integrate_task_list on GPU.
RUN_TYPE ENERGY
&PRINT_ELPA ON
&END PRINT_ELPA
&END GLOBAL
&FORCE_EVAL

View file

@ -2,8 +2,6 @@
PROJECT diag_cu72_broy
! Do not compute forces to avoid performance cliff of grid_integrate_task_list on GPU.
RUN_TYPE ENERGY
&PRINT_ELPA ON
&END PRINT_ELPA
&END GLOBAL
&FORCE_EVAL

View file

@ -9,7 +9,7 @@ postfix=""
# used ranks, can be any value, by default the number of physical cores on the node
ranks=$(lscpu | awk '/^Core\(s\) per socket:/ {cores=$NF}; /^Socket\(s\):/ {sockets=$NF}; END{print cores*sockets}')
# adjust command for testing as needed
command="mpirun -np $ranks ../../../exe/local/cp2k.popt"
command="mpirun -np $ranks ../../../install/bin/cp2k.popt"
# iterations used for testing (best value retained for benchmark result)
maxiter=3

View file

@ -12,16 +12,16 @@ variables:
BUILDER: spack
VERSION: psmp
TAG: "${BUILDER}_${VERSION}"
UBUNTU_IMAGE_NAME: "ubuntu:24.04"
UBUNTU_IMAGE_NAME: "ubuntu:26.04"
CSCS_IMAGE_NAME: "${CSCS_REGISTRY_PATH}/${REPOSITORY}:${TAG}_${CI_COMMIT_SHORT_SHA}"
DOCKERHUB_IMAGE_NAME: "docker.io/${DOCKERHUB_USERNAME}/${REPOSITORY}:${TAG}"
build deps daint:
extends: .container-builder-cscs-gh200
stage: deps
timeout: 1h
timeout: 6h
before_script:
- DEPS_IMAGE_TAG=`cat ci/cscs_daint_${TAG}.yaml ci/docker/build_${CI_JOB_STAGE}_${BUILDER}.Dockerfile $(find tools/spack -type f) $(find cmake -type f) | sha256sum - | head -c 16`
- DEPS_IMAGE_TAG=$(cat make_cp2k.sh ci/cscs_daint_${TAG}.yaml ci/docker/build_deps_spack.Dockerfile $(find tools/spack -type f | sort) | sha256sum | head -c 16)
- export PERSIST_IMAGE_NAME=${CSCS_REGISTRY_PATH}/base/${REPOSITORY}:${TAG}_${DEPS_IMAGE_TAG}
- echo "DEPS_IMAGE_NAME=${PERSIST_IMAGE_NAME}" | tee build.env
artifacts:
@ -30,21 +30,25 @@ build deps daint:
variables:
DOCKER_BUILD_ARGS: '[
"BASE_IMAGE",
"CP2K_BUILD_TYPE",
"CP2K_VERSION",
"LOG_LINES"
"FEATURE_FLAGS",
"NUM_PROCS"
]'
DOCKERFILE: ci/docker/build_${CI_JOB_STAGE}_${BUILDER}.Dockerfile
BASE_IMAGE: ${UBUNTU_IMAGE_NAME}
CP2K_BUILD_TYPE: all
CP2K_VERSION: ${VERSION}
LOG_LINES: 200
FEATURE_FLAGS: "-ef openpmd -np 4"
NUM_PROCS: 64
KUBERNETES_CPU_REQUEST: 64
KUBERNETES_CPU_LIMIT: 64
KUBERNETES_MEMORY_REQUEST: 128Gi
KUBERNETES_MEMORY_LIMIT: 128Gi
build cp2k daint:
extends: .container-builder-cscs-gh200
stage: cp2k
needs: ["build deps daint"]
timeout: 1h
timeout: 6h
before_script:
- echo ${DOCKERHUB_TOKEN} | podman login docker.io --username ${DOCKERHUB_USERNAME} --password-stdin
after_script:
@ -53,20 +57,27 @@ build cp2k daint:
variables:
DOCKER_BUILD_ARGS: '[
"BASE_IMAGE",
"DEPS_IMAGE"
"DEPS_IMAGE",
"FEATURE_FLAGS",
"NUM_PROCS"
]'
DOCKERFILE: ci/docker/build_${CI_JOB_STAGE}_${BUILDER}.Dockerfile
BASE_IMAGE: ${UBUNTU_IMAGE_NAME}
DEPS_IMAGE: ${DEPS_IMAGE_NAME}
FEATURE_FLAGS: "-ef openpmd"
NUM_PROCS: 32
KUBERNETES_CPU_REQUEST: 32
KUBERNETES_CPU_LIMIT: 32
PERSIST_IMAGE_NAME: ${CSCS_IMAGE_NAME}
test cp2k daint:
extends: .baremetal-runner-daint-gh200
stage: test
needs: ["build cp2k daint"]
timeout: 1h
timeout: 6h
script:
- podman run --shm-size=1g -v ${PWD}:/mnt ${DOCKERHUB_IMAGE_NAME} mpiexec -bind-to socket -genv OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK} -n ${SLURM_NTASKS} cp2k /opt/cp2k/benchmarks/CI/H2O-32_md.inp
- podman run --shm-size=1g -v ${PWD}:/mnt ${DOCKERHUB_IMAGE_NAME} mpiexec -bind-to socket -genv OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK} -n ${SLURM_NTASKS} cp2k /opt/cp2k/benchmarks/CI/H2O-32_md_elpa.inp
variables:
SLURM_CPUS_PER_TASK: 4
SLURM_DEBUG: 1
@ -74,45 +85,67 @@ test cp2k daint:
SLURM_JOB_NUM_NODES: 1
SLURM_NTASKS: 8
SLURM_NTASKS_PER_NODE: 8
SLURM_TIMELIMIT: 10
SLURM_TIMELIMIT: 15
USE_MPI: YES
regression test cp2k daint:
extends: .baremetal-runner-daint-gh200
stage: test
needs: ["build cp2k daint","test cp2k daint"]
timeout: 1h
timeout: 6h
script:
- git --no-pager log -1 --pretty="%nCommitSHA:%x20%H%nCommitTime:%x20%ci%nCommitAuthor:%x20%an%nCommitSubject:%x20%s%n"
- podman run --shm-size=1g -v ${PWD}:/mnt ${DOCKERHUB_IMAGE_NAME} /opt/cp2k/tests/do_regtest.py --maxtasks ${SLURM_NTASKS} --mpiexec "mpiexec -bind-to none" --keepalive /opt/cp2k/bin ${VERSION} 2>&1 || true
- podman run --shm-size=1g -v ${PWD}:/mnt ${DOCKERHUB_IMAGE_NAME} /opt/cp2k/tests/do_regtest.py --cp2kdatadir /opt/cp2k/install/share/cp2k/data --maxtasks ${SLURM_NTASKS} --mpiexec "mpiexec -bind-to none" --keepalive /opt/cp2k/install/bin ${VERSION} 2>&1 || true
variables:
SLURM_DEBUG: 1
SLURM_HINT: nomultithread
SLURM_JOB_NUM_NODES: 1
SLURM_NTASKS: 288
SLURM_TIMELIMIT: 20
SLURM_TIMELIMIT: 60
USE_MPI: YES
benchmark cp2k 1 daint node:
extends: .container-runner-daint-gh200
stage: benchmark
needs: ["build cp2k daint","test cp2k daint","regression test cp2k daint"]
timeout: 1h
needs: ["build cp2k daint","test cp2k daint"]
timeout: 6h
image: ${CSCS_IMAGE_NAME}
before_script:
- export CP2K_DATA_DIR=/opt/cp2k/share/cp2k/data
- export CP2K_DATA_DIR=/opt/cp2k/install/share/cp2k/data
- export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}
script:
- cp2k /opt/cp2k/benchmarks/CI/H2O-512_md.inp
variables:
SLURM_CPU_BIND: cores
SLURM_CPUS_PER_TASK: 1
SLURM_CPUS_PER_TASK: 3
SLURM_DEBUG: 1
SLURM_HINT: nomultithread
SLURM_JOB_NUM_NODES: 1
SLURM_MPI_TYPE: pmi2
SLURM_NTASKS: 288
SLURM_NTASKS_PER_NODE: 288
SLURM_NTASKS: 72
SLURM_NTASKS_PER_NODE: 72
SLURM_TIMELIMIT: 30
USE_MPI: YES
# EOF
benchmark cp2k 1 daint node elpa:
extends: .container-runner-daint-gh200
stage: benchmark
needs: ["build cp2k daint","test cp2k daint","benchmark cp2k 1 daint node"]
timeout: 6h
image: ${CSCS_IMAGE_NAME}
before_script:
- export CP2K_DATA_DIR=/opt/cp2k/install/share/cp2k/data
- export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}
script:
- cp2k /opt/cp2k/benchmarks/CI/H2O-512_md_elpa.inp
variables:
SLURM_CPU_BIND: cores
SLURM_CPUS_PER_TASK: 3
SLURM_DEBUG: 1
SLURM_HINT: nomultithread
SLURM_JOB_NUM_NODES: 1
SLURM_MPI_TYPE: pmi2
SLURM_NTASKS: 72
SLURM_NTASKS_PER_NODE: 72
SLURM_TIMELIMIT: 30
USE_MPI: YES

View file

@ -0,0 +1,151 @@
include:
- remote: 'https://gitlab.com/cscs-ci/recipes/-/raw/master/templates/v2/.ci-ext.yml'
stages:
- deps
- cp2k
- test
- benchmark
variables:
REPOSITORY: cp2k_daint
BUILDER: spack
VERSION: psmp
TAG: "${BUILDER}_${VERSION}_h100"
UBUNTU_IMAGE_NAME: "docker.io/nvidia/cuda:12.9.2-devel-ubuntu24.04"
CSCS_IMAGE_NAME: "${CSCS_REGISTRY_PATH}/${REPOSITORY}:${TAG}_${CI_COMMIT_SHORT_SHA}"
DOCKERHUB_IMAGE_NAME: "docker.io/${DOCKERHUB_USERNAME}/${REPOSITORY}:${TAG}"
build deps daint:
extends: .container-builder-cscs-gh200
stage: deps
timeout: 6h
before_script:
- DEPS_IMAGE_TAG=$(cat make_cp2k.sh ci/cscs_daint_${TAG}.yaml ci/docker/build_deps_spack.Dockerfile $(find tools/spack -type f | sort) | sha256sum | head -c 16)
- export PERSIST_IMAGE_NAME=${CSCS_REGISTRY_PATH}/base/${REPOSITORY}:${TAG}_${DEPS_IMAGE_TAG}
- echo "DEPS_IMAGE_NAME=${PERSIST_IMAGE_NAME}" | tee build.env
artifacts:
reports:
dotenv: build.env
variables:
DOCKER_BUILD_ARGS: '[
"BASE_IMAGE",
"CP2K_VERSION",
"FEATURE_FLAGS",
"NUM_PROCS"
]'
DOCKERFILE: ci/docker/build_${CI_JOB_STAGE}_${BUILDER}.Dockerfile
BASE_IMAGE: ${UBUNTU_IMAGE_NAME}
CP2K_VERSION: ${VERSION}
FEATURE_FLAGS: "-ef openpmd -gpu GH200 -np 4"
NUM_PROCS: 64
KUBERNETES_CPU_REQUEST: 64
KUBERNETES_CPU_LIMIT: 64
KUBERNETES_MEMORY_REQUEST: 256Gi
KUBERNETES_MEMORY_LIMIT: 256Gi
build cp2k daint:
extends: .container-builder-cscs-gh200
stage: cp2k
needs: ["build deps daint"]
timeout: 6h
before_script:
- echo ${DOCKERHUB_TOKEN} | podman login docker.io --username ${DOCKERHUB_USERNAME} --password-stdin
after_script:
- podman images
- podman push ${PERSIST_IMAGE_NAME} ${DOCKERHUB_IMAGE_NAME}
variables:
DOCKER_BUILD_ARGS: '[
"BASE_IMAGE",
"DEPS_IMAGE",
"FEATURE_FLAGS",
"NUM_PROCS"
]'
DOCKERFILE: ci/docker/build_${CI_JOB_STAGE}_${BUILDER}.Dockerfile
BASE_IMAGE: ${UBUNTU_IMAGE_NAME}
DEPS_IMAGE: ${DEPS_IMAGE_NAME}
FEATURE_FLAGS: "-ef openpmd -gpu GH200"
NUM_PROCS: 32
KUBERNETES_CPU_REQUEST: 32
KUBERNETES_CPU_LIMIT: 32
PERSIST_IMAGE_NAME: ${CSCS_IMAGE_NAME}
test cp2k daint:
extends: .baremetal-runner-daint-gh200
stage: test
needs: ["build cp2k daint"]
timeout: 6h
script:
- podman run --device nvidia.com/gpu=0 --shm-size=1g -v ${PWD}:/mnt ${DOCKERHUB_IMAGE_NAME} mpiexec -bind-to socket -genv OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK} -n ${SLURM_NTASKS} cp2k /opt/cp2k/benchmarks/CI/H2O-32_md.inp
- podman run --device nvidia.com/gpu=0 --shm-size=1g -v ${PWD}:/mnt ${DOCKERHUB_IMAGE_NAME} mpiexec -bind-to socket -genv OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK} -n ${SLURM_NTASKS} cp2k /opt/cp2k/benchmarks/CI/H2O-32_md_elpa.inp
variables:
SLURM_CPUS_PER_TASK: 4
SLURM_DEBUG: 1
SLURM_HINT: nomultithread
SLURM_JOB_NUM_NODES: 1
SLURM_NTASKS: 8
SLURM_NTASKS_PER_NODE: 8
SLURM_TIMELIMIT: 15
USE_MPI: YES
regression test cp2k daint:
extends: .baremetal-runner-daint-gh200
stage: test
needs: ["build cp2k daint"]
timeout: 6h
script:
- git --no-pager log -1 --pretty="%nCommitSHA:%x20%H%nCommitTime:%x20%ci%nCommitAuthor:%x20%an%nCommitSubject:%x20%s%n"
- podman run --device nvidia.com/gpu=all --shm-size=1g -v ${PWD}:/mnt ${DOCKERHUB_IMAGE_NAME} /opt/cp2k/tests/do_regtest.py --cp2kdatadir /opt/cp2k/install/share/cp2k/data --maxtasks ${SLURM_NTASKS} --mpiexec "mpiexec -bind-to none" --keepalive /opt/cp2k/install/bin ${VERSION} 2>&1 || true
variables:
SLURM_DEBUG: 1
SLURM_HINT: nomultithread
SLURM_JOB_NUM_NODES: 1
SLURM_NTASKS: 224
SLURM_TIMELIMIT: 60
USE_MPI: YES
benchmark cp2k 1 daint node:
extends: .container-runner-daint-gh200
stage: benchmark
needs: ["build cp2k daint","test cp2k daint"]
timeout: 6h
image: ${CSCS_IMAGE_NAME}
before_script:
- export CP2K_DATA_DIR=/opt/cp2k/install/share/cp2k/data
- export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}
script:
- cp2k /opt/cp2k/benchmarks/CI/H2O-512_md.inp
variables:
SLURM_CPU_BIND: cores
SLURM_CPUS_PER_TASK: 3
SLURM_DEBUG: 1
SLURM_HINT: nomultithread
SLURM_JOB_NUM_NODES: 1
SLURM_MPI_TYPE: pmi2
SLURM_NTASKS: 72
SLURM_NTASKS_PER_NODE: 72
SLURM_TIMELIMIT: 30
USE_MPI: YES
benchmark cp2k 1 daint node elpa:
extends: .container-runner-daint-gh200
stage: benchmark
needs: ["build cp2k daint","test cp2k daint","benchmark cp2k 1 daint node"]
timeout: 6h
image: ${CSCS_IMAGE_NAME}
before_script:
- export CP2K_DATA_DIR=/opt/cp2k/install/share/cp2k/data
- export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}
script:
- cp2k /opt/cp2k/benchmarks/CI/H2O-512_md_elpa.inp
variables:
SLURM_CPU_BIND: cores
SLURM_CPUS_PER_TASK: 3
SLURM_DEBUG: 1
SLURM_HINT: nomultithread
SLURM_JOB_NUM_NODES: 1
SLURM_MPI_TYPE: pmi2
SLURM_NTASKS: 72
SLURM_NTASKS_PER_NODE: 72
SLURM_TIMELIMIT: 30
USE_MPI: YES

View file

@ -12,16 +12,16 @@ variables:
BUILDER: spack
VERSION: psmp
TAG: "${BUILDER}_${VERSION}"
UBUNTU_IMAGE_NAME: "ubuntu:24.04"
UBUNTU_IMAGE_NAME: "ubuntu:26.04"
CSCS_IMAGE_NAME: "${CSCS_REGISTRY_PATH}/${REPOSITORY}:${TAG}_${CI_COMMIT_SHORT_SHA}"
DOCKERHUB_IMAGE_NAME: "docker.io/${DOCKERHUB_USERNAME}/${REPOSITORY}:${TAG}"
build deps eiger:
extends: .container-builder-cscs-zen2
stage: deps
timeout: 1h
timeout: 6h
before_script:
- DEPS_IMAGE_TAG=`cat ci/cscs_eiger_${TAG}.yaml ci/docker/build_${CI_JOB_STAGE}_${BUILDER}.Dockerfile $(find tools/spack -type f) $(find cmake -type f) | sha256sum - | head -c 16`
- DEPS_IMAGE_TAG=$(cat make_cp2k.sh ci/cscs_eiger_${TAG}.yaml ci/docker/build_deps_spack.Dockerfile $(find tools/spack -type f | sort) | sha256sum | head -c 16)
- export PERSIST_IMAGE_NAME=${CSCS_REGISTRY_PATH}/base/${REPOSITORY}:${TAG}_${DEPS_IMAGE_TAG}
- echo "DEPS_IMAGE_NAME=${PERSIST_IMAGE_NAME}" | tee build.env
artifacts:
@ -30,21 +30,25 @@ build deps eiger:
variables:
DOCKER_BUILD_ARGS: '[
"BASE_IMAGE",
"CP2K_BUILD_TYPE",
"CP2K_VERSION",
"LOG_LINES"
"FEATURE_FLAGS",
"NUM_PROCS"
]'
DOCKERFILE: ci/docker/build_${CI_JOB_STAGE}_${BUILDER}.Dockerfile
BASE_IMAGE: ${UBUNTU_IMAGE_NAME}
CP2K_BUILD_TYPE: all
CP2K_VERSION: ${VERSION}
LOG_LINES: 200
FEATURE_FLAGS: "-ef openpmd -np 4"
NUM_PROCS: 64
KUBERNETES_CPU_REQUEST: 64
KUBERNETES_CPU_LIMIT: 64
KUBERNETES_MEMORY_REQUEST: 128Gi
KUBERNETES_MEMORY_LIMIT: 128Gi
build cp2k eiger:
extends: .container-builder-cscs-zen2
stage: cp2k
needs: ["build deps eiger"]
timeout: 1h
timeout: 6h
before_script:
- echo ${DOCKERHUB_TOKEN} | podman login docker.io --username ${DOCKERHUB_USERNAME} --password-stdin
after_script:
@ -53,20 +57,27 @@ build cp2k eiger:
variables:
DOCKER_BUILD_ARGS: '[
"BASE_IMAGE",
"DEPS_IMAGE"
"DEPS_IMAGE",
"FEATURE_FLAGS",
"NUM_PROCS"
]'
DOCKERFILE: ci/docker/build_${CI_JOB_STAGE}_${BUILDER}.Dockerfile
BASE_IMAGE: ${UBUNTU_IMAGE_NAME}
DEPS_IMAGE: ${DEPS_IMAGE_NAME}
FEATURE_FLAGS: "-ef openpmd"
NUM_PROCS: 32
KUBERNETES_CPU_REQUEST: 32
KUBERNETES_CPU_LIMIT: 32
PERSIST_IMAGE_NAME: ${CSCS_IMAGE_NAME}
test cp2k eiger:
extends: .baremetal-runner-eiger-zen2
stage: test
needs: ["build cp2k eiger"]
timeout: 1h
timeout: 6h
script:
- podman run --shm-size=1g -v ${PWD}:/mnt ${DOCKERHUB_IMAGE_NAME} mpiexec -genv OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK} -n ${SLURM_NTASKS} cp2k /opt/cp2k/benchmarks/CI/H2O-32_md.inp
- podman run --shm-size=1g -v ${PWD}:/mnt ${DOCKERHUB_IMAGE_NAME} mpiexec -genv OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK} -n ${SLURM_NTASKS} cp2k /opt/cp2k/benchmarks/CI/H2O-32_md_elpa.inp
variables:
SLURM_CONSTRAINT: mc
SLURM_CPUS_PER_TASK: 4
@ -75,36 +86,58 @@ test cp2k eiger:
SLURM_JOB_NUM_NODES: 1
SLURM_NTASKS: 8
SLURM_NTASKS_PER_NODE: 8
SLURM_TIMELIMIT: 10
SLURM_TIMELIMIT: 15
USE_MPI: YES
regression test cp2k eiger:
extends: .baremetal-runner-eiger-zen2
stage: test
needs: ["build cp2k eiger","test cp2k eiger"]
timeout: 1h
timeout: 6h
script:
- git --no-pager log -1 --pretty="%nCommitSHA:%x20%H%nCommitTime:%x20%ci%nCommitAuthor:%x20%an%nCommitSubject:%x20%s%n"
- podman run --shm-size=1g -v ${PWD}:/mnt ${DOCKERHUB_IMAGE_NAME} /opt/cp2k/tests/do_regtest.py --maxtasks ${SLURM_NTASKS} --mpiexec "mpiexec -bind-to none" --keepalive /opt/cp2k/bin ${VERSION} 2>&1 || true
- podman run --shm-size=1g -v ${PWD}:/mnt ${DOCKERHUB_IMAGE_NAME} /opt/cp2k/tests/do_regtest.py --cp2kdatadir /opt/cp2k/install/share/cp2k/data --maxtasks ${SLURM_NTASKS} --mpiexec "mpiexec -bind-to none" --keepalive /opt/cp2k/install/bin ${VERSION} 2>&1 || true
variables:
SLURM_CONSTRAINT: mc
SLURM_DEBUG: 1
SLURM_HINT: nomultithread
SLURM_JOB_NUM_NODES: 1
SLURM_NTASKS: 128
SLURM_TIMELIMIT: 30
SLURM_TIMELIMIT: 60
USE_MPI: YES
benchmark cp2k 1 eiger node:
extends: .container-runner-eiger-zen2
stage: benchmark
needs: ["build cp2k eiger","test cp2k eiger","regression test cp2k eiger"]
timeout: 1h
timeout: 6h
image: ${CSCS_IMAGE_NAME}
before_script:
- export CP2K_DATA_DIR=/opt/cp2k/share/cp2k/data
- export CP2K_DATA_DIR=/opt/cp2k/install/share/cp2k/data
script:
- cp2k /opt/cp2k/benchmarks/CI/H2O-128_md.inp
- cp2k.popt /opt/cp2k/benchmarks/CI/H2O-128_md.inp
variables:
SLURM_CONSTRAINT: mc
SLURM_CPUS_PER_TASK: 1
SLURM_DEBUG: 1
SLURM_HINT: nomultithread
SLURM_JOB_NUM_NODES: 1
SLURM_MPI_TYPE: pmi2
SLURM_NTASKS: 128
SLURM_NTASKS_PER_NODE: 128
SLURM_TIMELIMIT: 30
USE_MPI: YES
benchmark cp2k 1 eiger node elpa:
extends: .container-runner-eiger-zen2
stage: benchmark
needs: ["build cp2k eiger","test cp2k eiger","regression test cp2k eiger","benchmark cp2k 1 eiger node"]
timeout: 6h
image: ${CSCS_IMAGE_NAME}
before_script:
- export CP2K_DATA_DIR=/opt/cp2k/install/share/cp2k/data
script:
- cp2k.popt /opt/cp2k/benchmarks/CI/H2O-128_md_elpa.inp
variables:
SLURM_CONSTRAINT: mc
SLURM_CPUS_PER_TASK: 1
@ -121,10 +154,11 @@ benchmark cp2k 2 eiger nodes:
extends: .container-runner-eiger-zen2
stage: benchmark
needs: ["build cp2k eiger","test cp2k eiger","regression test cp2k eiger"]
timeout: 1h
timeout: 6h
image: ${CSCS_IMAGE_NAME}
before_script:
- export CP2K_DATA_DIR=/opt/cp2k/share/cp2k/data
- export CP2K_DATA_DIR=/opt/cp2k/install/share/cp2k/data
- export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}
script:
- cp2k /opt/cp2k/benchmarks/CI/H2O-512_md.inp
variables:
@ -139,4 +173,25 @@ benchmark cp2k 2 eiger nodes:
SLURM_TIMELIMIT: 30
USE_MPI: YES
# EOF
benchmark cp2k 2 eiger nodes elpa:
extends: .container-runner-eiger-zen2
stage: benchmark
needs: ["build cp2k eiger","test cp2k eiger","regression test cp2k eiger","benchmark cp2k 2 eiger nodes"]
timeout: 6h
image: ${CSCS_IMAGE_NAME}
before_script:
- export CP2K_DATA_DIR=/opt/cp2k/install/share/cp2k/data
- export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}
script:
- cp2k /opt/cp2k/benchmarks/CI/H2O-512_md_elpa.inp
variables:
SLURM_CONSTRAINT: mc
SLURM_CPUS_PER_TASK: 1
SLURM_DEBUG: 1
SLURM_HINT: nomultithread
SLURM_JOB_NUM_NODES: 2
SLURM_MPI_TYPE: pmi2
SLURM_NTASKS: 256
SLURM_NTASKS_PER_NODE: 128
SLURM_TIMELIMIT: 30
USE_MPI: YES

View file

@ -11,16 +11,16 @@ variables:
BUILDER: spack
VERSION: ssmp
TAG: "${BUILDER}_${VERSION}"
UBUNTU_IMAGE_NAME: "ubuntu:24.04"
UBUNTU_IMAGE_NAME: "ubuntu:26.04"
CSCS_IMAGE_NAME: "${CSCS_REGISTRY_PATH}/${REPOSITORY}:${TAG}_${CI_COMMIT_SHORT_SHA}"
DOCKERHUB_IMAGE_NAME: "docker.io/${DOCKERHUB_USERNAME}/${REPOSITORY}:${TAG}"
build deps eiger:
extends: .container-builder-cscs-zen2
stage: deps
timeout: 1h
timeout: 6h
before_script:
- DEPS_IMAGE_TAG=`cat ci/cscs_eiger_${TAG}.yaml ci/docker/build_${CI_JOB_STAGE}_${BUILDER}.Dockerfile $(find tools/spack -type f) $(find cmake -type f) | sha256sum - | head -c 16`
- DEPS_IMAGE_TAG=$(cat make_cp2k.sh ci/cscs_eiger_${TAG}.yaml ci/docker/build_deps_spack.Dockerfile $(find tools/spack -type f | sort) | sha256sum | head -c 16)
- export PERSIST_IMAGE_NAME=${CSCS_REGISTRY_PATH}/base/${REPOSITORY}:${TAG}_${DEPS_IMAGE_TAG}
- echo "DEPS_IMAGE_NAME=${PERSIST_IMAGE_NAME}" | tee build.env
artifacts:
@ -29,21 +29,25 @@ build deps eiger:
variables:
DOCKER_BUILD_ARGS: '[
"BASE_IMAGE",
"CP2K_BUILD_TYPE",
"CP2K_VERSION",
"LOG_LINES"
"FEATURE_FLAGS",
"NUM_PROCS"
]'
DOCKERFILE: ci/docker/build_${CI_JOB_STAGE}_${BUILDER}.Dockerfile
BASE_IMAGE: ${UBUNTU_IMAGE_NAME}
CP2K_BUILD_TYPE: all
CP2K_VERSION: ${VERSION}
LOG_LINES: 200
FEATURE_FLAGS: "-np 4"
NUM_PROCS: 64
KUBERNETES_CPU_REQUEST: 64
KUBERNETES_CPU_LIMIT: 64
KUBERNETES_MEMORY_REQUEST: 64Gi
KUBERNETES_MEMORY_LIMIT: 64Gi
build cp2k eiger:
extends: .container-builder-cscs-zen2
stage: cp2k
needs: ["build deps eiger"]
timeout: 1h
timeout: 6h
before_script:
- echo ${DOCKERHUB_TOKEN} | podman login docker.io --username ${DOCKERHUB_USERNAME} --password-stdin
after_script:
@ -52,18 +56,24 @@ build cp2k eiger:
variables:
DOCKER_BUILD_ARGS: '[
"BASE_IMAGE",
"DEPS_IMAGE"
"DEPS_IMAGE",
"FEATURE_FLAGS",
"NUM_PROCS"
]'
DOCKERFILE: ci/docker/build_${CI_JOB_STAGE}_${BUILDER}.Dockerfile
BASE_IMAGE: ${UBUNTU_IMAGE_NAME}
DEPS_IMAGE: ${DEPS_IMAGE_NAME}
FEATURE_FLAGS: ""
NUM_PROCS: 32
KUBERNETES_CPU_REQUEST: 32
KUBERNETES_CPU_LIMIT: 32
PERSIST_IMAGE_NAME: ${CSCS_IMAGE_NAME}
test cp2k eiger:
extends: .baremetal-runner-eiger-zen2
stage: test
needs: ["build cp2k eiger"]
timeout: 1h
timeout: 6h
script:
- podman run --env OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK} --shm-size=1g -v ${PWD}:/mnt ${DOCKERHUB_IMAGE_NAME} cp2k /opt/cp2k/benchmarks/CI/H2O-32_md.inp
variables:
@ -74,22 +84,20 @@ test cp2k eiger:
SLURM_JOB_NUM_NODES: 1
SLURM_NTASKS: 1
SLURM_NTASKS_PER_NODE: 1
SLURM_TIMELIMIT: 10
SLURM_TIMELIMIT: 15
regression test cp2k eiger:
extends: .baremetal-runner-eiger-zen2
stage: test
needs: ["build cp2k eiger","test cp2k eiger"]
timeout: 1h
timeout: 6h
script:
- git --no-pager log -1 --pretty="%nCommitSHA:%x20%H%nCommitTime:%x20%ci%nCommitAuthor:%x20%an%nCommitSubject:%x20%s%n"
- podman run --shm-size=1g -v ${PWD}:/mnt ${DOCKERHUB_IMAGE_NAME} /opt/cp2k/tests/do_regtest.py --maxtasks ${SLURM_NTASKS} --mpiexec "mpiexec -bind-to none" --keepalive /opt/cp2k/bin ${VERSION} 2>&1 || true
- podman run --shm-size=1g -v ${PWD}:/mnt ${DOCKERHUB_IMAGE_NAME} /opt/cp2k/tests/do_regtest.py --cp2kdatadir /opt/cp2k/install/share/cp2k/data --maxtasks ${SLURM_NTASKS} --mpiexec "mpiexec -bind-to none" --keepalive /opt/cp2k/install/bin ${VERSION} 2>&1 || true
variables:
SLURM_CONSTRAINT: mc
SLURM_DEBUG: 1
SLURM_HINT: nomultithread
SLURM_JOB_NUM_NODES: 1
SLURM_NTASKS: 128
SLURM_TIMELIMIT: 30
# EOF
SLURM_TIMELIMIT: 60

View file

@ -3,118 +3,63 @@
# A stand-alone build in this folder can be performed with:
# podman build --build-arg DEPS_IMAGE=<image id> --shm-size=1g -f build_cp2k_spack.Dockerfile ../../
#
# Author: Matthias Krack
#
# Stage 2a: Build CP2K
# Stage 2: Build CP2K
ARG BASE_IMAGE="ubuntu:24.04"
ARG DEPS_IMAGE=""
ARG BASE_IMAGE=${BASE_IMAGE:-ubuntu:26.04}
ARG DEPS_IMAGE=${DEPS_IMAGE:-}
FROM ${DEPS_IMAGE} AS build_cp2k
FROM "${DEPS_IMAGE}" AS build_cp2k
# Store build arguments from base image needed in next stage
RUN echo "${CP2K_VERSION}" >/CP2K_VERSION
# Setup CUDA environment
ENV CUDA_HOME=/usr/local/cuda
ENV LD_LIBRARY_PATH="${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}"
# Build CP2K with CMake
# Retrieve the number of available CPU cores
ARG NUM_PROCS
ENV NUM_PROCS=${NUM_PROCS:-32}
ARG FEATURE_FLAGS
ENV FEATURE_FLAGS=${FEATURE_FLAGS:-}
# Build CP2K
WORKDIR /opt/cp2k
COPY ./CMakeLists.txt ./
COPY ./benchmarks/CI ./benchmarks/CI
COPY ./cmake ./cmake
COPY ./data ./data
COPY ./src ./src
COPY ./tests ./tests
COPY ./data ./data
COPY ./tools/build_utils ./tools/build_utils
COPY ./cmake ./cmake
COPY ./CMakeLists.txt .
# Run CMake
RUN /bin/bash -c -o pipefail "source ./cmake/cmake_cp2k.sh spack_${CP2K_BUILD_TYPE} ${CP2K_VERSION}"
RUN ./make_cp2k.sh -cray -cv ${CP2K_VERSION} -uc no -j${NUM_PROCS} ${FEATURE_FLAGS}
# Compile CP2K
ARG LOG_LINES
ENV LOG_LINES=${LOG_LINES:-200}
WORKDIR /opt/cp2k/build
RUN /bin/bash -c -o pipefail " \
echo -e '\nCompiling CP2K ... \c'; \
if ninja --verbose &>ninja.log; then \
echo -e 'done\n'; \
echo -e 'Installing CP2K ... \c'; \
if ninja --verbose install &>install.log; then \
echo -e 'done\n'; \
else \
echo -e 'failed\n'; \
tail -n ${LOG_LINES} install.log; \
fi; \
cat cmake.log ninja.log install.log | gzip >build_cp2k.log.gz; \
else \
echo -e 'failed\n'; \
tail -n ${LOG_LINES} ninja.log; \
cat cmake.log ninja.log | gzip >build_cp2k.log.gz; \
fi"
# Stage 3: Install CP2K
# Stage 2b: Install CP2K
FROM ${BASE_IMAGE} AS install_cp2k
FROM "${BASE_IMAGE}" AS install_cp2k
# Install required packages
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
g++ \
gcc \
gfortran \
hwloc \
libhwloc-dev \
python3 && rm -rf /var/lib/apt/lists/*
g++ gcc gfortran \
python3 \
&& rm -rf /var/lib/apt/lists/*
# Import build arguments from base image
COPY --from=build_cp2k /CP2K_VERSION /
# Install CP2K dependencies built with Spack
WORKDIR /opt
COPY --from=build_cp2k /opt/spack ./spack
# Install CP2K binaries
WORKDIR /opt/cp2k
COPY --from=build_cp2k /opt/cp2k/bin ./bin
# Install CP2K libraries
COPY --from=build_cp2k /opt/cp2k/lib ./lib
# Install CP2K dependencies built with spack
COPY --from=build_cp2k /opt/cp2k/spack/spack/opt/spack ./spack/spack/opt/spack
# Install CP2K database files
COPY --from=build_cp2k /opt/cp2k/share ./share
# Install CP2K
COPY --from=build_cp2k /opt/cp2k/install ./install
# Install CP2K regression tests
COPY --from=build_cp2k /opt/cp2k/tests ./tests
COPY ./tests ./tests
COPY --from=build_cp2k /opt/cp2k/src/grid/sample_tasks ./src/grid/sample_tasks
# Install CP2K/Quickstep CI benchmarks
COPY --from=build_cp2k /opt/cp2k/benchmarks/CI ./benchmarks/CI
COPY ./benchmarks/CI ./benchmarks/CI
# Import compressed build log file
COPY --from=build_cp2k /opt/cp2k/build/build_cp2k.log.gz /opt/cp2k/build/build_cp2k.log.gz
# Do not rely only on LD_LIBRARY_PATH because it is fragile
COPY --from=build_cp2k /etc/ld.so.conf.d/cp2k.conf /etc/ld.so.conf.d/cp2k.conf
RUN ldconfig
# Create links to CP2K binaries
WORKDIR /opt/cp2k/bin
RUN CP2K_VERSION=$(cat /CP2K_VERSION) && \
ln -sf cp2k.${CP2K_VERSION} cp2k && \
ln -sf cp2k.${CP2K_VERSION} cp2k.$(echo ${CP2K_VERSION} | sed "s/smp/opt/") && \
ln -sf cp2k.${CP2K_VERSION} cp2k_shell
# Update library search path
RUN echo "/opt/cp2k/lib\n/opt/spack/lib\n$(dirname $(find /opt/spack/lib -name libtorch.so 2>/dev/null || true) 2>/dev/null || true)" >/etc/ld.so.conf.d/cp2k.conf && ldconfig
# Create entrypoint script file
RUN printf "#!/bin/bash\n\
ulimit -c 0 -s unlimited\n\
\
export OMP_STACKSIZE=64M\n\
export PATH=/opt/cp2k/bin:/opt/spack/bin:\${PATH}\n\
exec \"\$@\"" \
>/opt/cp2k/bin/entrypoint.sh && chmod 755 /opt/cp2k/bin/entrypoint.sh
# Create shortcut for regression test
RUN printf "/opt/cp2k/tests/do_regtest.py \$* /opt/cp2k/bin $(cat /CP2K_VERSION)" \
>/opt/cp2k/bin/run_tests && chmod 755 /opt/cp2k/bin/run_tests
# Define entrypoint
# Create entrypoint and finalise container build
WORKDIR /mnt
ENTRYPOINT ["/opt/cp2k/bin/entrypoint.sh"]
CMD ["cp2k", "--help"]
# EOF
ENTRYPOINT ["/opt/cp2k/install/bin/launch"]
CMD ["cp2k", "--help", "--version"]

View file

@ -3,105 +3,57 @@
# A stand-alone build in this folder can be performed with:
# podman build --shm-size=1g -f build_deps_spack.Dockerfile ../../
#
# Author: Matthias Krack
#
# Stage 1: Create a base image providing the dependencies for building a CP2K binary
ARG BASE_IMAGE="ubuntu:24.04"
ARG BASE_IMAGE=${BASE_IMAGE:-ubuntu:26.04}
FROM ${BASE_IMAGE} AS build_deps
FROM "${BASE_IMAGE}" AS build_deps
# Install packages required to build the CP2K dependencies with Spack
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
bzip2 \
ca-certificates \
cmake \
g++ \
gcc \
gfortran \
g++ gcc gfortran \
git \
gnupg \
hwloc \
libhwloc-dev \
libssh-dev \
libssl-dev \
libtool \
libtool-bin \
lsb-release \
make \
ninja-build \
patch \
pkgconf \
python3 \
python3-dev \
python3-pip \
python3-venv \
unzip \
wget \
xxd \
xz-utils \
zstd && rm -rf /var/lib/apt/lists/*
zstd \
&& rm -rf /var/lib/apt/lists/*
# Create dummy xpmem library for the MPICH build. At runtime the
# container engine will inject the xpmem library from the host system
RUN git clone https://github.com/hpc/xpmem \
&& cd xpmem/lib \
&& gcc -I../include -shared -o libxpmem.so.1 libxpmem.c \
&& ln -s libxpmem.so.1 libxpmem.so \
&& mkdir -p /opt/spack/lib /opt/spack/include \
&& mv libxpmem.so* /opt/spack/lib \
&& cp ../include/xpmem.h /opt/spack/include/ \
&& ldconfig /opt/spack/lib \
&& cd ../../ \
&& rm -rf xpmem
# Setup CUDA environment
ENV CUDA_HOME=/usr/local/cuda
ENV LD_LIBRARY_PATH="${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}"
# Retrieve the number of available CPU cores
ARG NUM_PROCS
ENV NUM_PROCS=${NUM_PROCS:-32}
# Install Spack and Spack packages
WORKDIR /root/spack
ARG SPACK_VERSION
ENV SPACK_VERSION=${SPACK_VERSION:-1.0.0}
ARG SPACK_PACKAGES_VERSION
ENV SPACK_PACKAGES_VERSION=${SPACK_PACKAGES_VERSION:-2025.07.0}
ARG SPACK_REPO=https://github.com/spack/spack
ENV SPACK_ROOT=/opt/spack-${SPACK_VERSION}
ARG SPACK_PACKAGES_REPO=https://github.com/spack/spack-packages
ENV SPACK_PACKAGES_ROOT=/opt/spack-packages-${SPACK_PACKAGES_VERSION}
RUN mkdir -p ${SPACK_ROOT} \
&& wget -q ${SPACK_REPO}/archive/v${SPACK_VERSION}.tar.gz \
&& tar -xzf v${SPACK_VERSION}.tar.gz -C /opt && rm -f v${SPACK_VERSION}.tar.gz \
&& mkdir -p ${SPACK_PACKAGES_ROOT} \
&& wget -q ${SPACK_PACKAGES_REPO}/archive/v${SPACK_PACKAGES_VERSION}.tar.gz \
&& tar -xzf v${SPACK_PACKAGES_VERSION}.tar.gz -C /opt && rm -f v${SPACK_PACKAGES_VERSION}.tar.gz
ENV PATH="${SPACK_ROOT}/bin:${PATH}"
# Add Spack packages builtin repository
RUN spack repo add --scope site ${SPACK_PACKAGES_ROOT}/repos/spack_repo/builtin
# Find all compilers
RUN spack compiler find
# Find all external packages
RUN spack external find --all --not-buildable
# Copy Spack configuration and build recipes
ARG CP2K_VERSION
ENV CP2K_VERSION=${CP2K_VERSION:-psmp}
ARG CP2K_BUILD_TYPE
ENV CP2K_BUILD_TYPE=${CP2K_BUILD_TYPE:-all}
COPY ./tools/spack/cp2k_deps_${CP2K_BUILD_TYPE}_${CP2K_VERSION}.yaml ./
RUN sed -e "s/~xpmem/+xpmem/" cp2k_deps_${CP2K_BUILD_TYPE}_${CP2K_VERSION}.yaml
COPY ./tools/spack/cp2k_dev_repo ${SPACK_PACKAGES_ROOT}/repos/spack_repo/cp2k_dev_repo/
RUN spack repo add --scope site ${SPACK_PACKAGES_ROOT}/repos/spack_repo/cp2k_dev_repo/
RUN spack env create myenv cp2k_deps_${CP2K_BUILD_TYPE}_${CP2K_VERSION}.yaml && \
spack -e myenv repo list
# Install CP2K dependencies via Spack
RUN spack -e myenv concretize -f
ENV SPACK_ENV_VIEW="${SPACK_ROOT}/var/spack/environments/myenv/spack-env/view"
RUN spack -e myenv env depfile -o spack_makefile && \
make -j${NUM_PROCS} --file=spack_makefile SPACK_COLOR=never --output-sync=recurse && \
cp -ar ${SPACK_ENV_VIEW}/bin ${SPACK_ENV_VIEW}/include ${SPACK_ENV_VIEW}/lib /opt/spack
ARG FEATURE_FLAGS
ENV FEATURE_FLAGS=${FEATURE_FLAGS:-}
# EOF
# Build CP2K dependencies
WORKDIR /opt/cp2k
COPY ./tools/spack ./tools/spack
COPY ./tools/docker ./tools/docker
COPY ./make_cp2k.sh .
RUN ./make_cp2k.sh -bd_only -cray -cv ${CP2K_VERSION} -uc no -ue -j${NUM_PROCS} ${FEATURE_FLAGS}

View file

@ -1,6 +1,6 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!

View file

@ -1,12 +1,13 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
set(CP2K_C_COMPILER_LIST "GNU;Intel;IntelLLVM;NAG;Cray;PGI;Clang;AppleClang")
set(CP2K_Fortran_COMPILER_LIST "GNU;Intel;IntelLLVM;NAG;Cray;PGI")
set(CP2K_C_COMPILER_LIST
"GNU;Intel;IntelLLVM;NAG;Cray;PGI;NVHPC;Clang;AppleClang")
set(CP2K_Fortran_COMPILER_LIST "GNU;Intel;IntelLLVM;NAG;Cray;PGI;NVHPC")
if(NOT CMAKE_C_COMPILER_ID IN_LIST CP2K_C_COMPILER_LIST)
message(
@ -35,27 +36,42 @@ endif()
# Baseline
add_compile_options(
"$<$<COMPILE_LANG_AND_ID:Fortran,GNU>:-std=f2008;-ffree-form;-ffree-line-length-none;-fimplicit-none>"
"$<$<COMPILE_LANG_AND_ID:Fortran,GNU>:-std=f2008;-ffree-form;-fimplicit-none>"
"$<$<COMPILE_LANG_AND_ID:Fortran,GNU>:-g;-fno-omit-frame-pointer;-fbacktrace>"
"$<$<COMPILE_LANG_AND_ID:Fortran,GNU>:$<$<VERSION_GREATER_EQUAL:${CMAKE_Fortran_COMPILER_VERSION},11>:-fallow-argument-mismatch>>"
"$<$<COMPILE_LANG_AND_ID:Fortran,GNU>:$<$<VERSION_GREATER:$<Fortran_COMPILER_VERSION>,10>:-fallow-argument-mismatch>>"
"$<$<COMPILE_LANG_AND_ID:Fortran,GNU>:-Wno-deprecated-declarations;-Wno-maybe-uninitialized;-Wuninitialized;-Wuse-without-only>"
)
add_compile_options(
"$<$<COMPILE_LANG_AND_ID:CXX,GNU>:--std=c++17>"
"$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-g;-fno-omit-frame-pointer>"
"$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wno-deprecated-declarations;-Wno-vla-parameter>"
)
add_compile_options(
"$<$<COMPILE_LANG_AND_ID:C,GNU>:-std=c11>"
"$<$<COMPILE_LANG_AND_ID:C,GNU>:-g;-fno-omit-frame-pointer>"
"$<$<COMPILE_LANG_AND_ID:C,GNU>:-Wno-deprecated-declarations;-Wno-vla-parameter>"
)
# -- Apple Silicon + GCC: -march=native expands internally to -march=apple-m1
# (invalid). Use -mcpu=native instead.
set(_CP2K_GNU_NATIVE_TUNE "-march=native;-mtune=native")
if(APPLE
AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64"
AND (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU"
OR CMAKE_C_COMPILER_ID STREQUAL "GNU"
OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU"))
set(_CP2K_GNU_NATIVE_TUNE "-mcpu=native")
endif()
if(APPLE)
add_definitions(-D__MACOSX)
endif()
if(APPLE OR BSD)
add_definitions(-D__NO_STATM_ACCESS)
endif()
# Release
add_compile_options(
"$<$<AND:$<CONFIG:RELEASE>,$<COMPILE_LANG_AND_ID:Fortran,GNU>>:-O3;-march=native;-mtune=native;-funroll-loops>"
"$<$<AND:$<CONFIG:RELEASE>,$<COMPILE_LANG_AND_ID:CXX,GNU>>:-O3;-march=native;-mtune=native;-funroll-loops>"
"$<$<AND:$<CONFIG:RELEASE>,$<COMPILE_LANG_AND_ID:C,GNU>>:-O3;-march=native;-mtune=native;-funroll-loops>"
"$<$<AND:$<CONFIG:RELEASE>,$<COMPILE_LANG_AND_ID:Fortran,GNU>>:-O3;${_CP2K_GNU_NATIVE_TUNE};-funroll-loops>"
"$<$<AND:$<CONFIG:RELEASE>,$<COMPILE_LANG_AND_ID:CXX,GNU>>:-O3;${_CP2K_GNU_NATIVE_TUNE};-funroll-loops>"
"$<$<AND:$<CONFIG:RELEASE>,$<COMPILE_LANG_AND_ID:C,GNU>>:-O3;${_CP2K_GNU_NATIVE_TUNE};-funroll-loops>"
)
# Generic
@ -66,18 +82,27 @@ add_compile_options(
)
# Debug
# TODO: Replace deprecated MASTER constructs with MASKED (only available since
# GCC 12) and remove "-Wno-error=deprecated-openmp" once GCC 11 support is
# dropped.
add_compile_options(
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:Fortran,GNU>>:-O1;-march=native;-mtune=native>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:CXX,GNU>>:-O1;-march=native;-mtune=native>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:C,GNU>>:-O1;-march=native;-mtune=native>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:Fortran,GNU>>:-O1;${_CP2K_GNU_NATIVE_TUNE}>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:CXX,GNU>>:-O1;${_CP2K_GNU_NATIVE_TUNE}>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:C,GNU>>:-O1;${_CP2K_GNU_NATIVE_TUNE};-Wall;-Wextra;-Werror>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:C,GNU>,$<VERSION_GREATER_EQUAL:$<C_COMPILER_VERSION>,16>>:-Wno-error=deprecated-openmp>"
)
# FIXME: GCC 16 diagnoses legacy character-length mismatches that were not
# reported by earlier GCC versions. Restore "-Werror=character-truncation" after
# auditing and resolving them.
add_compile_options(
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:Fortran,GNU>>:-fsanitize=leak;-Werror=realloc-lhs>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:Fortran,GNU>>:-fcheck=all,no-array-temps;-finline-matmul-limit=0>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:Fortran,GNU>>:-ffpe-trap=invalid,zero,overflow>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:Fortran,GNU>>:-finit-derived;-finit-real=snan;-finit-integer=-42>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:Fortran,GNU>>:-Werror=aliasing;-Werror=ampersand;-Werror=c-binding-type;-Werror=intrinsic-shadow>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:Fortran,GNU>>:-Werror=intrinsics-std;-Werror=line-truncation;-Werror=tabs;-Werror=target-lifetime>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:Fortran,GNU>>:-Werror=aliasing;-Werror=ampersand;-Werror=c-binding-type>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:Fortran,GNU>>:-Werror=intrinsics-std;-Werror=intrinsic-shadow>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:Fortran,GNU>>:-Werror=line-truncation;-Werror=tabs;-Werror=target-lifetime>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:Fortran,GNU>>:-Werror=underflow;-Werror=unused-but-set-variable;-Werror=unused-variable>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:Fortran,GNU>>:-Werror=unused-dummy-argument;-Werror=unused-parameter>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:Fortran,GNU>>:-Werror=unused-label;-Werror=conversion;-Werror=zerotrip>"
@ -88,29 +113,60 @@ add_link_options(
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:CXX,GNU>>:-fsanitize=leak>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:C,GNU>>:-fsanitize=leak>")
# TODO Prevent CMake from wrongly adding -fbacktrace and
# -fallow-argument-mismatch to CFLAGS. add_compile_options(
# "$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:CXX,GNU>>:-Wall;-Wextra;-Werror>"
# "$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:C,GNU>>:-Wall;-Wextra;-Werror>"
# )
# Conventions
add_compile_options(
"$<$<CONFIG:CONVENTIONS>:-O1;${_CP2K_GNU_NATIVE_TUNE}>"
"$<$<AND:$<CONFIG:CONVENTIONS>,$<COMPILE_LANG_AND_ID:Fortran,GNU>>:-Wno-pedantic;-Wall;-Wextra;-Wsurprising>"
"$<$<AND:$<CONFIG:CONVENTIONS>,$<COMPILE_LANG_AND_ID:Fortran,GNU>>:-Warray-temporaries;-Wconversion-extra;-Wimplicit-interface>"
"$<$<AND:$<CONFIG:CONVENTIONS>,$<COMPILE_LANG_AND_ID:Fortran,GNU>>:-Wimplicit-procedure;-Wreal-q-constant;-Walign-commons>"
"$<$<AND:$<CONFIG:CONVENTIONS>,$<COMPILE_LANG_AND_ID:Fortran,GNU>>:-Wfunction-elimination;-Wrealloc-lhs;-Wcompare-reals;-Wzerotrip>"
# Writes a lot of output. Make sure to use:
# -DCMAKE_Fortran_COMPILER_LAUNCHER="redirect_gfortran_output.py"
"$<$<AND:$<CONFIG:CONVENTIONS>,$<COMPILE_LANG_AND_ID:Fortran,GNU>>:-fdump-fortran-original>"
)
# Coverage
add_compile_options(
"$<$<CONFIG:COVERAGE>:-coverage;-fkeep-static-functions;-D__NO_ABORT>")
"$<$<CONFIG:COVERAGE>:-coverage;-fkeep-static-functions;-O1;${_CP2K_GNU_NATIVE_TUNE}>"
)
add_compile_definitions("$<$<CONFIG:COVERAGE>:__NO_ABORT>")
# Address Sanitizer
add_compile_options(
"$<$<CONFIG:ASAN>:-fsanitize=address;-no-pie;-O3;-march=native;-mtune=native;-funroll-loops>"
"$<$<CONFIG:ASAN>:-fsanitize=address;-no-pie;-O3;${_CP2K_GNU_NATIVE_TUNE};-funroll-loops>"
)
add_link_options("$<$<CONFIG:ASAN>:-fsanitize=address>")
# =========================== Intel oneAPI Compilers ===========================
# Baseline
add_compile_options(
"$<$<COMPILE_LANG_AND_ID:Fortran,Intel,IntelLLVM>:-g;-traceback>"
"$<$<COMPILE_LANG_AND_ID:Fortran,Intel>:-free;-stand;f08;-fpp;-qopenmp;-heap-arrays;-D__MAX_CONTR=4>"
"$<$<COMPILE_LANG_AND_ID:Fortran,Intel>:-fp-model;consistent;-fpscomp;logicals>"
"$<$<COMPILE_LANG_AND_ID:Fortran,IntelLLVM>:-free;-stand;f08;-fpp;-qopenmp;-D__MAX_CONTR=4>"
"$<$<COMPILE_LANG_AND_ID:Fortran,IntelLLVM>:-fp-model;consistent;-fpscomp;logicals>"
)
# Release
add_compile_options(
"$<$<AND:$<CONFIG:RELEASE>,$<COMPILE_LANG_AND_ID:Fortran,IntelLLVM>>:-O3;-xHOST;-D__HAS_IEEE_EXCEPTIONS>"
"$<$<AND:$<CONFIG:RELEASE>,$<COMPILE_LANG_AND_ID:Fortran,Intel>>:-O2;-xHOST;-D__HAS_IEEE_EXCEPTIONS>"
"$<$<AND:$<CONFIG:RELEASE>,$<COMPILE_LANG_AND_ID:CXX,IntelLLVM>>:-O3;-xHOST>"
"$<$<AND:$<CONFIG:RELEASE>,$<COMPILE_LANG_AND_ID:C,IntelLLVM>>:-O3;-xHOST>")
# Debug
add_compile_options(
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:Fortran,IntelLLVM>>:-O0;-debug>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:Fortran,Intel>>:-O0;-debug>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:CXX,IntelLLVM>>:-O0;-g>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:C,IntelLLVM>>:-O0;-g>")
# =============================== Other Compilers ==============================
# Baseline
add_compile_options(
"$<$<COMPILE_LANG_AND_ID:Fortran,Intel>:-free;-stand f18;-fpp;-qopenmp;-heap-arrays;-D__MAX_CONTR=4>"
"$<$<COMPILE_LANG_AND_ID:Fortran,IntelLLVM>:-free;-fpp;-qopenmp;-D__MAX_CONTR=4>"
"$<$<COMPILE_LANG_AND_ID:Fortran,PGI>:-Mfreeform;-Mextend;-Mallocatable=03>"
"$<$<COMPILE_LANG_AND_ID:Fortran,PGI,NVHPC>:-Mfreeform;-Mextend;-Mallocatable=03>"
"$<$<COMPILE_LANG_AND_ID:Fortran,NAG>:-f2008;-free;-Warn=reallocation;-Warn=subnormal>"
"$<$<COMPILE_LANG_AND_ID:Fortran,Cray>:-f;free;-M3105;-ME7212;-hnoacc;-M1234>"
)
@ -119,15 +175,12 @@ add_compile_options(
# Release
add_compile_options(
"$<$<AND:$<CONFIG:RELEASE>,$<COMPILE_LANG_AND_ID:Fortran,PGI>>:-fast>"
"$<$<AND:$<CONFIG:RELEASE>,$<COMPILE_LANG_AND_ID:Fortran,Intel>>:-O3;-g;-D__HAS_IEEE_EXCEPTIONS>"
"$<$<AND:$<CONFIG:RELEASE>,$<COMPILE_LANG_AND_ID:Fortran,IntelLLVM>>:-O3;-g;-D__HAS_IEEE_EXCEPTIONS>"
"$<$<AND:$<CONFIG:RELEASE>,$<COMPILE_LANG_AND_ID:Fortran,PGI,NVHPC>>:-fast>"
"$<$<AND:$<CONFIG:RELEASE>,$<COMPILE_LANG_AND_ID:Fortran,Cray>>:-O2;-G2>"
"$<$<AND:$<CONFIG:RELEASE>,$<COMPILE_LANG_AND_ID:Fortran,NAG>>:-gline>")
add_compile_options(
"$<$<AND:$<CONFIG:RELEASE>,$<COMPILE_LANG_AND_ID:C,PGI>>:-fast>"
"$<$<AND:$<CONFIG:RELEASE>,$<COMPILE_LANG_AND_ID:C,PGI,NVHPC>>:-fast>"
"$<$<AND:$<CONFIG:RELEASE>,$<COMPILE_LANG_AND_ID:C,Intel>>:-O3;-g>"
"$<$<AND:$<CONFIG:RELEASE>,$<COMPILE_LANG_AND_ID:C,IntelLLVM>>:-O3;-g>"
"$<$<AND:$<CONFIG:RELEASE>,$<COMPILE_LANG_AND_ID:C,Cray>>:-O3>"
"$<$<AND:$<CONFIG:RELEASE>,$<COMPILE_LANG_AND_ID:C,NAG>>:-gline>"
"$<$<AND:$<CONFIG:RELEASE>,$<COMPILE_LANG_AND_ID:C,Clang>>:-O3;-funroll-loops>"
@ -137,21 +190,27 @@ add_compile_options(
# Debug
add_compile_options(
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:Fortran,PGI>>:-g>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:Fortran,Intel>>:-O2;-debug>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:Fortran,IntelLLVM>>:-O2;-debug>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:Fortran,PGI,NVHPC>>:-g>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:Fortran,Cray>>:-G2>")
add_compile_options(
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:C,PGI>>:-fast>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:C,PGI,NVHPC>>:-fast>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:C,Intel>>:-O2;-g>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:C,IntelLLVM>>:-O2;-g>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:C,Cray>>:-G2>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:C,NAG>>:-g;-C>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:C,Clang>>:-O1;-g;-fno-omit-frame-pointer>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:C,AppleClang>>:-O0;-g>"
"$<$<AND:$<CONFIG:DEBUG>,$<COMPILE_LANG_AND_ID:Fortran,NAG>>:-C=all>")
# Tweaks
# =================================== Tweaks ===================================
# Workaround https://gitlab.kitware.com/cmake/cmake/-/issues/27231
if(TARGET MPI::MPI_Fortran)
get_target_property(opts MPI::MPI_Fortran INTERFACE_COMPILE_OPTIONS)
set_target_properties(
MPI::MPI_Fortran PROPERTIES INTERFACE_COMPILE_OPTIONS
"$<$<COMPILE_LANGUAGE:Fortran>:${opts}>")
unset(opts)
endif()
if(CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
set(CMAKE_Fortran_MODOUT_FLAG "-ef") # override to get lower-case module file
# names
@ -173,3 +232,10 @@ if(CMAKE_C_COMPILER_ID STREQUAL "Cray" AND CMAKE_C_COMPILER_VERSION
list(FILTER CMAKE_C_IMPLICIT_LINK_LIBRARIES EXCLUDE REGEX "tcmalloc")
list(FILTER CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES EXCLUDE REGEX "tcmalloc")
endif()
# Suppress GFortran runtime warnings when LIBXS provides the wrapper
if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU"
AND CP2K_USE_LIBXS
AND NOT APPLE)
add_link_options("-Wl,--wrap=_gfortran_runtime_warning_at")
endif()

View file

@ -1,6 +1,6 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!

View file

@ -0,0 +1,44 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
if(NOT DEFINED OUTPUT_FILE)
message(FATAL_ERROR "OUTPUT_FILE is not defined")
endif()
if(NOT DEFINED SOURCE_DIR)
set(SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/..")
endif()
string(TIMESTAMP CP2K_BUILD_TIMESTAMP "%Y-%m-%d %H:%M:%S")
# Get the latest abbreviated commit hash of the working branch. As a fall back,
# e.g. in a container without a .git directory, try reading a file named
# "REVISION". Running this here (rather than once at configure time) means a new
# commit is picked up on the next build, without having to re-run cmake.
execute_process(
COMMAND bash -c "git log -1 --format=%h || cat REVISION"
WORKING_DIRECTORY "${SOURCE_DIR}"
ERROR_QUIET
OUTPUT_VARIABLE CP2K_GIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT CP2K_GIT_HASH)
set(CP2K_GIT_HASH "unknown")
endif()
set(CP2K_BUILD_INFO_CONTENT
"#define __COMPILE_DATE \"${CP2K_BUILD_TIMESTAMP}\"\n#define __COMPILE_REVISION \"${CP2K_GIT_HASH}\"\n"
)
if(EXISTS "${OUTPUT_FILE}")
file(READ "${OUTPUT_FILE}" CP2K_OLD_BUILD_INFO_CONTENT)
else()
set(CP2K_OLD_BUILD_INFO_CONTENT "")
endif()
if(NOT CP2K_BUILD_INFO_CONTENT STREQUAL CP2K_OLD_BUILD_INFO_CONTENT)
file(WRITE "${OUTPUT_FILE}" "${CP2K_BUILD_INFO_CONTENT}")
endif()

View file

@ -1,30 +0,0 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
# Call to ensure that the git submodule in location `path` is loaded. If the
# submodule is not loaded, an error message that describes how to update the
# submodules is printed. Sets the variable name_avail to `ON` if the submodule
# is available, or `OFF` otherwise. copyright github.com/arbor-sim
function(check_git_submodule name path)
set(success_var "${name}_avail")
set(${success_var}
ON
PARENT_SCOPE)
get_filename_component(dotgit "${path}/.git" ABSOLUTE)
if(NOT EXISTS ${dotgit})
message(
FATAL_ERROR
"\nThe git submodule for ${name} is not available.\n"
"To check out all submodules use the following commands:\n"
" git submodule init\n"
" git submodule update\n"
"Or download submodules recursively when checking out:\n"
" git clone --recursive https://github.com/cp2k/cp2k.git\n")
endif()
endfunction()

View file

@ -1,11 +1,14 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
cmake_minimum_required(VERSION 3.22)
if(CMAKE_VERSION VERSION_LESS "3.24")
message(FATAL_ERROR "CP2K requires CMake 3.24 or newer.")
endif()
include(CMakeFindDependencyMacro)
if(NOT TARGET cp2k::cp2k)
@ -14,10 +17,11 @@ if(NOT TARGET cp2k::cp2k)
# Store CXX compiler id used in MKL package
set(CP2K_CXX_COMPILER_ID @CMAKE_CXX_COMPILER_ID@)
if(NOT ${CMAKE_CXX_COMPILER_ID})
if(NOT CMAKE_CXX_COMPILER_ID)
set(CMAKE_CXX_COMPILER_ID ${CP2K_CXX_COMPILER_ID})
endif()
# Define LAPACK and BLAS TARGETS
set(CP2K_BLAS_VENDOR @CP2K_BLAS_VENDOR@)
set(CP2K_SCALAPACK_VENDOR @CP2K_SCALAPACK_VENDOR@)
set(CP2K_BLAS_LINK_LIBRARIES @CP2K_BLAS_LINK_LIBRARIES@)
@ -26,9 +30,9 @@ if(NOT TARGET cp2k::cp2k)
set(CP2K_CONFIG_PACKAGE ON)
find_dependency(Lapack REQUIRED)
# Define LAPACK and BLAS TARGETS
if(@CP2K_USE_MPI@)
set(CP2K_USE_MPI @CP2K_USE_MPI@)
if(CP2K_USE_MPI)
find_dependency(MPI REQUIRED)
find_dependency(SCALAPACK REQUIRED)
endif()
unset(CP2K_CONFIG_PACKAGE)
@ -37,97 +41,172 @@ if(NOT TARGET cp2k::cp2k)
find_dependency(DBCSR 2.8 REQUIRED)
if(@CP2K_USE_LIBXSMM@)
find_dependency(LibXSMM REQUIRED)
set(CP2K_USE_LIBXS @CP2K_USE_LIBXS@)
set(CP2K_USE_LIBXSMM @CP2K_USE_LIBXSMM@)
if(CP2K_USE_LIBXS)
find_dependency(libxs REQUIRED)
if(CP2K_USE_LIBXSMM)
find_dependency(libxsmm REQUIRED)
endif()
endif()
if(@CP2K_USE_HIP@)
set(CP2K_USE_OPENCL @CP2K_USE_OPENCL@)
if(CP2K_USE_OPENCL)
find_dependency(OpenCL REQUIRED)
find_dependency(libxstream REQUIRED)
endif()
set(CP2K_USE_HIP @CP2K_USE_HIP@)
if(CP2K_USE_HIP)
# Find HIP
find_dependency(hipfft REQUIRED IMPORTED CONFIG)
find_dependency(hipblas REQUIRED IMPORTED CONFIG)
endif()
if(@CP2K_USE_CUDA@)
set(CP2K_USE_CUDA @CP2K_USE_CUDA@)
if(CP2K_USE_CUDA)
find_dependency(CUDAToolkit REQUIRED)
endif()
if(@CP2K_USE_ELPA@)
set(CP2K_USE_ELPA @CP2K_USE_ELPA@)
if(CP2K_USE_ELPA)
find_dependency(Elpa REQUIRED)
endif()
if(@CP2K_USE_DLAF@)
find_dependency(DLAF REQUIRED)
set(CP2K_USE_DLAF @CP2K_USE_DLAF@)
if(CP2K_USE_DLAF)
find_dependency(DLAFFortran 0.4.0 REQUIRED)
endif()
if(@CP2K_USE_LIBXC@)
find_dependency(LibXC 7 REQUIRED CONFIG)
set(CP2K_USE_LIBXC @CP2K_USE_LIBXC@)
if(CP2K_USE_LIBXC)
find_dependency(Libxc 7 REQUIRED CONFIG)
endif()
if(@CP2K_USE_COSMA@)
set(CP2K_USE_GAUXC @CP2K_USE_GAUXC@)
if(CP2K_USE_GAUXC)
find_dependency(gauxc REQUIRED CONFIG)
endif()
set(CP2K_USE_COSMA @CP2K_USE_COSMA@)
if(CP2K_USE_COSMA)
find_dependency(cosma REQUIRED)
if(NOT TARGET cp2k::cosma)
add_library(cp2k::cosma INTERFACE IMPORTED)
target_link_libraries(cp2k::cosma INTERFACE cosma::cosma_prefixed_pxgemm
cosma::cosma)
endif()
endif()
if(@CP2K_USE_MPI@)
find_dependency(MPI REQUIRED)
endif()
if(@CP2K_USE_FFTW3@)
set(CP2K_USE_FFTW3 @CP2K_USE_FFTW3@)
if(CP2K_USE_FFTW3)
find_dependency(Fftw REQUIRED)
endif()
if(@CP2K_USE_LIBINT2@)
set(CP2K_USE_LIBINT2 @CP2K_USE_LIBINT2@)
if(CP2K_USE_LIBINT2)
find_dependency(Libint2 REQUIRED)
endif()
if(@CP2K_USE_SPGLIB@)
find_dependency(LibSPG REQUIRED)
set(CP2K_USE_LIBFCI @CP2K_USE_LIBFCI@)
if(CP2K_USE_LIBFCI)
find_dependency(libfci REQUIRED)
endif()
if(@CP2K_USE_SPLA@)
find_dependency(SPLA REQUIRED)
set(CP2K_USE_SPGLIB @CP2K_USE_SPGLIB@)
if(CP2K_USE_SPGLIB)
find_dependency(Spglib REQUIRED CONFIG)
endif()
if(@CP2K_USE_SIRIUS@)
find_dependency(sirius REQUIRED)
set(CP2K_USE_SPLA @CP2K_USE_SPLA@)
if(CP2K_USE_SPLA)
find_dependency(SPLA REQUIRED CONFIG)
endif()
if(@CP2K_USE_PLUMED@)
set(CP2K_USE_SIRIUS @CP2K_USE_SIRIUS@)
if(CP2K_USE_SIRIUS)
find_dependency(sirius 7.7.0 REQUIRED)
endif()
set(CP2K_USE_PLUMED @CP2K_USE_PLUMED@)
if(CP2K_USE_PLUMED)
find_dependency(Plumed REQUIRED)
endif()
if(@CP2K_USE_LIBTORCH@)
set(CP2K_USE_LIBTORCH @CP2K_USE_LIBTORCH@)
if(CP2K_USE_LIBTORCH)
find_dependency(Torch REQUIRED)
endif()
if(@CP2K_USE_HDF5@)
set(CP2K_USE_HDF5 @CP2K_USE_HDF5@)
if(CP2K_USE_HDF5)
find_dependency(HDF5 REQUIRED COMPONENTS C Fortran)
endif()
if(@CP2K_USE_DFTD4@)
set(CP2K_USE_DFTD4 @CP2K_USE_DFTD4@)
if(CP2K_USE_DFTD4)
find_dependency(dftd4 REQUIRED)
endif()
if(@CP2K_USE_DEEPMD@)
find_dependency(DeepMD REQUIRED)
set(CP2K_USE_DEEPMD @CP2K_USE_DEEPMD@)
if(CP2K_USE_DEEPMD)
find_dependency(DeePMD REQUIRED CONFIG)
endif()
if(@CP2K_USE_PEXSI@)
find_dependency(PEXSI REQUIRED)
set(CP2K_USE_PEXSI @CP2K_USE_PEXSI@)
if(CP2K_USE_PEXSI)
find_dependency(PEXSI REQUIRED CONFIG)
endif()
if(@CP2K_USE_ACE@)
find_dependency(ACE REQUIRED)
set(CP2K_USE_ACE @CP2K_USE_ACE@)
if(CP2K_USE_ACE)
find_dependency(pace REQUIRED)
endif()
if(@CP2K_USE_LIBSMEAGOL@)
set(CP2K_USE_LIBSMEAGOL @CP2K_USE_LIBSMEAGOL@)
if(CP2K_USE_LIBSMEAGOL)
find_dependency(libsmeagol REQUIRED)
endif()
if(@CP2K_USE_VORI@)
set(CP2K_USE_MIMIC @CP2K_USE_MIMIC@)
if(CP2K_USE_MIMIC)
find_dependency(MiMiC REQUIRED)
endif()
set(CP2K_USE_OPENPMD @CP2K_USE_OPENPMD@)
if(CP2K_USE_OPENPMD)
find_dependency(openPMD 0.16.1 REQUIRED)
endif()
set(CP2K_USE_VORI @CP2K_USE_VORI@)
if(CP2K_USE_VORI)
find_dependency(LibVORI REQUIRED)
endif()
if(@CP2K_USE_GREENX@)
find_dependency(greenX REQUIRED)
set(CP2K_USE_GREENX @CP2K_USE_GREENX@)
if(CP2K_USE_GREENX)
find_dependency(greenX REQUIRED CONFIG)
if(NOT TARGET cp2k::greenx)
add_library(cp2k::greenx INTERFACE IMPORTED)
target_link_libraries(cp2k::greenx INTERFACE greenX::GXCommon
greenX::LibGXAC
greenX::LibGXMiniMax)
endif()
endif()
set(CP2K_USE_TBLITE @CP2K_USE_TBLITE@)
if(CP2K_USE_TBLITE)
find_dependency(tblite REQUIRED)
if(NOT TARGET cp2k::tblite)
add_library(cp2k::tblite INTERFACE IMPORTED)
target_link_libraries(
cp2k::tblite INTERFACE tblite::tblite mctc-lib::mctc-lib dftd4::dftd4
toml-f::toml-f s-dftd3::s-dftd3)
endif()
endif()
set(CP2K_USE_TREXIO @CP2K_USE_TREXIO@)
if(CP2K_USE_TREXIO)
find_dependency(TrexIO REQUIRED)
endif()
include("${CMAKE_CURRENT_LIST_DIR}/cp2kTargets.cmake")

View file

@ -1,6 +1,6 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
@ -20,25 +20,10 @@ else()
message(STATUS "FYPP preprocessor found.")
endif()
if((CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
AND (CMAKE_GENERATOR STREQUAL "Ninja")
AND (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16))
# https://gitlab.kitware.com/cmake/cmake/issues/18188
if((CMAKE_Fortran_COMPILER_ID STREQUAL "GNU") AND (CMAKE_VERSION
VERSION_GREATER_EQUAL 3.16))
set(fypp_flags --line-numbering --line-marker-format=gfortran5)
elseif(CMAKE_BUILD_TYPE MATCHES COVERAGE)
message(
WARNING
"Coverage build requested but your environment does not support Line Control directives in Fypp"
)
message(
WARNING
"You need CMake 3.16+, Ninja (CMake-patched) and gfortran 5+ for this to work!"
)
# otherwise the referenced lines in the Coverage report point to either the
# original (unexpanded files) or to the Fypped sources which may then not be
# picked up by the postprocessing tools. CMake 3.16+ and Ninja are needed
# since older CMake (or CMake with make) are unable to parse Line Control
# directives within line-continued USE stmts, see
# https://gitlab.kitware.com/cmake/cmake/issues/18188
endif()
function(ADD_FYPP_SOURCES OUTVAR)

View file

@ -1,54 +0,0 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
include(FindPackageHandleStandardArgs)
include(cp2k_utils)
cp2k_set_default_paths(ACE "ace")
cp2k_include_dirs(
ACE "ace/ace_couplings.h;ace-evaluator/ace_types.h;yaml-cpp/yaml.h")
find_package_handle_standard_args(ACE DEFAULT_MSG CP2K_ACE_INCLUDE_DIRS)
cp2k_find_libraries(ACE "pace")
find_package_handle_standard_args(ACE DEFAULT_MSG CP2K_ACE_LINK_LIBRARIES)
cp2k_find_libraries(ACE_YAML "yaml-cpp-pace")
find_package_handle_standard_args(ACE DEFAULT_MSG CP2K_ACE_YAML_LINK_LIBRARIES)
cp2k_find_libraries(ACE_CNPY "cnpy")
find_package_handle_standard_args(ACE DEFAULT_MSG CP2K_ACE_CNPY_LINK_LIBRARIES)
if(CP2K_ACE_FOUND)
if(NOT TARGET ACE::pace)
add_library(ACE::pace INTERFACE IMPORTED)
endif()
set_target_properties(
ACE::pace
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CP2K_ACE_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${CP2K_ACE_LINK_LIBRARIES}")
endif()
if(CP2K_ACE_YAML_FOUND)
if(NOT TARGET ACE::yaml-cpp-pace)
add_library(ACE::yaml-cpp-pace INTERFACE IMPORTED)
endif()
set_target_properties(
ACE::yaml-cpp-pace PROPERTIES INTERFACE_LINK_LIBRARIES
"${CP2K_ACE_YAML_LINK_LIBRARIES}")
endif()
if(CP2K_ACE_CNPY_FOUND)
if(NOT TARGET ACE::cnpy)
add_library(ACE::cnpy INTERFACE IMPORTED)
endif()
set_target_properties(ACE::cnpy PROPERTIES INTERFACE_LINK_LIBRARIES
"${CP2K_ACE_CNPY_LINK_LIBRARIES}")
endif()
mark_as_advanced(CP2K_ACE_FOUND CP2K_ACE_INCLUDE_DIRS CP2K_ACE_LINK_LIBRARIES
CP2K_ACE_YAML_LINK_LIBRARIES CP2K_ACE_CNPY_LINK_LIBRARIES)

View file

@ -1,6 +1,6 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
@ -53,7 +53,7 @@ find_package_handle_standard_args(
CP2K_ARMPL_ILP64_MP_LINK_LIBRARIES)
# add target to link against
if(NOT TARGET Armpl::armpl)
if(NOT TARGET cp2k::BLAS::Armpl::armpl)
add_library(cp2k::BLAS::Armpl::armpl INTERFACE IMPORTED)
# now define an alias to the target library
add_library(cp2k::BLAS::Armpl::blas ALIAS cp2k::BLAS::Armpl::armpl)

View file

@ -1,6 +1,6 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
@ -15,13 +15,13 @@ include(cp2k_utils)
cp2k_set_default_paths(ATLAS "Atlas")
cp2k_find_libraries(ATLAS "atlas")
cp2k_include_dirs(FFTW3 "cblas.h atlas/cblas.h")
cp2k_include_dirs(ATLAS "cblas.h atlas/cblas.h")
# check if found
find_package_handle_standard_args(Atlas REQUIRED_VARS CP2K_ATLAS_INCLUDE_DIRS
CP2K_ATLAS_LINK_LIBRARIES)
# add target to link against
if(CP2K_ATLAS_FOUND AND NOT TARGET CP2K_ATLAS::atlas)
if(CP2K_ATLAS_FOUND)
if(NOT TARGET cp2k::BLAS::ATLAS::atlas)
add_library(cp2k::BLAS::ATLAS::atlas INTERFACE IMPORTED)
endif()

View file

@ -1,6 +1,6 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
@ -9,13 +9,6 @@
#
# authors : Mathieu Taillefumier
if(NOT
(CMAKE_C_COMPILER_LOADED
OR CMAKE_CXX_COMPILER_LOADED
OR CMAKE_Fortran_COMPILER_LOADED))
message(FATAL_ERROR "FindBLAS requires Fortran, C, or C++ to be enabled.")
endif()
if(NOT CP2K_CONFIG_PACKAGE)
set(CP2K_BLAS_VENDOR_LIST
# cmake-format: sortable
@ -34,8 +27,6 @@ if(NOT CP2K_CONFIG_PACKAGE)
list(REMOVE_ITEM __BLAS_VENDOR_LIST "auto")
list(REMOVE_ITEM __BLAS_VENDOR_LIST "CUSTOM")
# set(CP2K_BLAS_VENDOR "auto" CACHE STRING "Blas library for computations on
# host")
set_property(CACHE CP2K_BLAS_VENDOR PROPERTY STRINGS ${CP2K_BLAS_VENDOR_LIST})
if(NOT ${CP2K_BLAS_VENDOR} IN_LIST CP2K_BLAS_VENDOR_LIST)
@ -46,8 +37,16 @@ if(NOT CP2K_CONFIG_PACKAGE)
# cmake-format: sortable
"sequential" "thread" "gnu-thread" "intel-thread" "tbb-thread" "openmp")
if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL
"GNU")
set(_cp2k_blas_threading_default "gnu-thread")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "Intel|IntelLLVM")
set(_cp2k_blas_threading_default "intel-thread")
else()
set(_cp2k_blas_threading_default "openmp")
endif()
set(CP2K_BLAS_THREADING
"sequential"
"${_cp2k_blas_threading_default}"
CACHE STRING "threaded blas library")
set_property(CACHE CP2K_BLAS_THREADING PROPERTY STRINGS
${CP2K_BLAS_THREAD_LIST})
@ -133,7 +132,8 @@ list(FILTER CP2K_BLAS_LINK_LIBRARIES EXCLUDE REGEX "^$")
# might require this information though
find_package_handle_standard_args(
Blas REQUIRED_VARS CP2K_BLAS_LINK_LIBRARIES CP2K_BLAS_VENDOR CP2K_BLAS_FOUND)
${CMAKE_FIND_PACKAGE_NAME} REQUIRED_VARS CP2K_BLAS_LINK_LIBRARIES
CP2K_BLAS_VENDOR CP2K_BLAS_FOUND)
if(NOT TARGET cp2k::BLAS::blas)
add_library(cp2k::BLAS::blas INTERFACE IMPORTED)
@ -142,6 +142,17 @@ endif()
set_target_properties(cp2k::BLAS::blas PROPERTIES INTERFACE_LINK_LIBRARIES
"${CP2K_BLAS_LINK_LIBRARIES}")
# Compatibility: many external packages expect BLAS::BLAS
if(NOT TARGET BLAS::BLAS)
add_library(BLAS::BLAS INTERFACE IMPORTED)
set_property(TARGET BLAS::BLAS PROPERTY INTERFACE_LINK_LIBRARIES
"${CP2K_BLAS_LINK_LIBRARIES}")
if(CP2K_BLAS_INCLUDE_DIRS)
set_property(TARGET BLAS::BLAS PROPERTY INTERFACE_INCLUDE_DIRECTORIES
"${CP2K_BLAS_INCLUDE_DIRS}")
endif()
endif()
if(CP2K_BLAS_INCLUDE_DIRS)
set_target_properties(
cp2k::BLAS::blas PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
@ -152,3 +163,4 @@ mark_as_advanced(CP2K_BLAS_INCLUDE_DIRS)
mark_as_advanced(CP2K_BLAS_LINK_LIBRARIES)
mark_as_advanced(CP2K_BLAS_VENDOR)
mark_as_advanced(CP2K_BLAS_FOUND)
mark_as_advanced(CP2K_BLAS_VENDOR_LIST)

View file

@ -1,6 +1,6 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
@ -16,7 +16,7 @@ include(cp2k_utils)
cp2k_set_default_paths(BLIS "BLIS")
if(DEFINED AOCL_ROOT)
list(CP2K_BLIS_ROOT "${AOCL_ROOT}" "$ENV{AOCL_ROOT}")
list(APPEND CP2K_BLIS_ROOT "${AOCL_ROOT}" "$ENV{AOCL_ROOT}")
endif()
# one day blis will have a pkg-config file
@ -46,7 +46,7 @@ endif()
if(CP2K_BLIS_FOUND)
if(NOT TARGET cp2k::BLAS::Blis::blis)
add_library(cp2k::BLAS::Blis::blis INTERFACE IMPORTED)
add_library(cp2k::BLAS::Blis::blas alias cp2k::BLAS::Blis::blis)
add_library(cp2k::BLAS::Blis::blas ALIAS cp2k::BLAS::Blis::blis)
endif()
set_property(TARGET cp2k::BLAS::Blis::blis

View file

@ -1,6 +1,6 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
@ -20,14 +20,16 @@ cp2k_include_dirs(CAL "cal.h")
find_package_handle_standard_args(Cal DEFAULT_MSG CP2K_CAL_LINK_LIBRARIES
CP2K_CAL_INCLUDE_DIRS)
if(CP2K_CAL_FOUND AND NOT TARGET cp2k::CAL::cal)
if(NOT CP2K_CAL_FOUND)
message(FATAL_ERROR "Cal required by CuSolverMP")
endif()
if(NOT TARGET cp2k::CAL::cal)
add_library(cp2k::CAL::cal INTERFACE IMPORTED)
set_target_properties(cp2k::CAL::cal PROPERTIES INTERFACE_LINK_LIBRARIES
"${CP2K_CAL_LINK_LIBRARIES}")
set_target_properties(cp2k::CAL::cal PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${CP2K_CAL_INCLUDE_DIRS}")
else()
message(FATAL_ERROR "Cal required by CuSolverMP")
endif()
mark_as_advanced(CP2K_CAL_LINK_LIBRARIES)

View file

@ -1,6 +1,6 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
@ -13,29 +13,67 @@ include(FindPackageHandleStandardArgs)
include(cp2k_utils)
find_package(ucc REQUIRED)
find_package(Cal REQUIRED)
# First, find CuSolverMP library and headers
cp2k_set_default_paths(CUSOLVER_MP "CUSOLVER_MP")
cp2k_find_libraries(CUSOLVER_MP "cusolverMp")
cp2k_include_dirs(CUSOLVER_MP "cusolverMp.h")
# CuSolverMP 0.7+ uses NCCL for communication, older versions use Cal. We need
# to detect the version to require the correct communication library.
if(CP2K_CUSOLVER_MP_INCLUDE_DIRS)
file(STRINGS "${CP2K_CUSOLVER_MP_INCLUDE_DIRS}/cusolverMp.h" _ver_major_line
REGEX "^#define CUSOLVERMP_VER_MAJOR")
file(STRINGS "${CP2K_CUSOLVER_MP_INCLUDE_DIRS}/cusolverMp.h" _ver_minor_line
REGEX "^#define CUSOLVERMP_VER_MINOR")
string(REGEX MATCH "[0-9]+" _ver_major "${_ver_major_line}")
string(REGEX MATCH "[0-9]+" _ver_minor "${_ver_minor_line}")
if(_ver_major STREQUAL "" OR _ver_minor STREQUAL "")
message(FATAL_ERROR "Could not determine CuSolverMP version from header")
endif()
message(STATUS "Found CuSolverMP version: ${_ver_major}.${_ver_minor}")
# CuSolverMP 0.7+ uses NCCL, older versions use Cal
if(_ver_major GREATER 0 OR _ver_minor GREATER_EQUAL 7)
find_package(Nccl REQUIRED)
set(CP2K_CUSOLVERMP_USE_NCCL
ON
CACHE BOOL "CuSolverMP uses NCCL for communication")
else()
find_package(Cal REQUIRED)
set(CP2K_CUSOLVERMP_USE_NCCL
OFF
CACHE BOOL "CuSolverMP uses Cal for communication")
endif()
endif()
find_package_handle_standard_args(
CuSolverMP DEFAULT_MSG CP2K_CUSOLVER_MP_LINK_LIBRARIES
CP2K_CUSOLVER_MP_INCLUDE_DIRS)
if(CP2K_CUSOLVER_MP_FOUND AND NOT TARGET cp2k::CUSOLVER_MP::cusolver_mp)
if(NOT CP2K_CUSOLVER_MP_FOUND)
message(FATAL_ERROR "CuSolverMP requested, but not found")
endif()
if(NOT TARGET cp2k::CUSOLVER_MP::cusolver_mp)
add_library(cp2k::CUSOLVER_MP::cusolver_mp INTERFACE IMPORTED)
if(CP2K_CUSOLVERMP_USE_NCCL)
set(_comm_lib "cp2k::NCCL::nccl")
else()
set(_comm_lib "cp2k::CAL::cal")
endif()
set_target_properties(
cp2k::CUSOLVER_MP::cusolver_mp
PROPERTIES
INTERFACE_LINK_LIBRARIES
"${CP2K_CUSOLVER_MP_LINK_LIBRARIES};cp2k::CAL::cal;cp2k::UCC::ucc")
PROPERTIES INTERFACE_LINK_LIBRARIES
"${CP2K_CUSOLVER_MP_LINK_LIBRARIES};${_comm_lib};cp2k::UCC::ucc")
set_target_properties(
cp2k::CUSOLVER_MP::cusolver_mp
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CP2K_CUSOLVER_MP_INCLUDE_DIRS}")
else()
message(FATAL_ERROR "CuSolverMP requested, but not found")
endif()
mark_as_advanced(CP2K_CUSOLVER_MP_LINK_LIBRARIES)

View file

@ -1,6 +1,6 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!

View file

@ -1,6 +1,6 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
@ -91,7 +91,7 @@ foreach(lib_name "fftw3" "fftw3l" "fftw3q" "fftw3f")
endif()
endforeach()
set(CP2K_FFTW3_FOUND ON)
set(CP2K_FFTW3_FOUND ${Fftw_FOUND})
mark_as_advanced(
CP2K_FFTW3_FOUND
CP2K_FFTW3_ROOT

View file

@ -1,6 +1,6 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
@ -35,10 +35,6 @@ find_package_handle_standard_args(
FlexiBLAS DEFAULT_MSG CP2K_FLEXIBLAS_INCLUDE_DIRS
CP2K_FLEXIBLAS_LINK_LIBRARIES)
if(NOT CP2K_FLEXIBLAS_FOUND)
set(CP2K_BLAS_VENDOR "FlexiBLAS")
endif()
if(CP2K_FLEXIBLAS_FOUND)
if(NOT TARGET cp2k::BLAS::FlexiBLAS::flexiblas)
add_library(cp2k::BLAS::FlexiBLAS::flexiblas INTERFACE IMPORTED)

View file

@ -1,6 +1,6 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!

View file

@ -1,6 +1,6 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
@ -42,20 +42,25 @@ if(NOT CP2K_CONFIG_PACKAGE)
CP2K_LAPACK_LINK_LIBRARIES
NAMES "lapack" "lapack64"
PATH_SUFFIXES "openblas" "openblas64" "openblas-pthread"
"openblas-openmp" "lib" "lib64"
NO_DEFAULT_PATH)
"openblas-openmp" "lib" "lib64")
endif()
endif()
endif()
endif()
# check if found
find_package_handle_standard_args(Lapack
find_package_handle_standard_args(${CMAKE_FIND_PACKAGE_NAME}
REQUIRED_VARS CP2K_LAPACK_LINK_LIBRARIES)
if(NOT TARGET cp2k::LAPACK::lapack)
add_library(cp2k::LAPACK::lapack INTERFACE IMPORTED)
add_library(cp2k::LAPACK::LAPACK ALIAS cp2k::LAPACK::lapack)
endif()
# Compatibility: some external packages (e.g. tblite/multicharge) expect
# LAPACK::LAPACK
if(NOT TARGET LAPACK::LAPACK)
add_library(LAPACK::LAPACK ALIAS cp2k::LAPACK::lapack)
endif()
set_property(TARGET cp2k::LAPACK::lapack PROPERTY INTERFACE_LINK_LIBRARIES
${CP2K_LAPACK_LINK_LIBRARIES})

View file

@ -0,0 +1,37 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
include(FindPackageHandleStandardArgs)
include(cp2k_utils)
cp2k_set_default_paths(LIBFCI "LibFCI")
cp2k_find_libraries(LIBFCI "fci")
if(CP2K_LIBFCI_INCLUDE_DIRS)
find_package_handle_standard_args(
LibFCI DEFAULT_MSG CP2K_LIBFCI_LINK_LIBRARIES CP2K_LIBFCI_INCLUDE_DIRS)
else()
find_package_handle_standard_args(LibFCI DEFAULT_MSG
CP2K_LIBFCI_LINK_LIBRARIES)
endif()
if(LibFCI_FOUND)
if(NOT TARGET libfci::fci)
add_library(libfci::fci INTERFACE IMPORTED)
set_target_properties(
libfci::fci PROPERTIES INTERFACE_LINK_LIBRARIES
"${CP2K_LIBFCI_LINK_LIBRARIES}")
if(CP2K_LIBFCI_INCLUDE_DIRS)
set_target_properties(
libfci::fci PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${CP2K_LIBFCI_INCLUDE_DIRS}")
endif()
endif()
endif()
mark_as_advanced(CP2K_LIBFCI_ROOT CP2K_LIBFCI_INCLUDE_DIRS
CP2K_LIBFCI_LINK_LIBRARIES CP2K_LIBFCI_LIBRARIES)

View file

@ -0,0 +1,39 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
# Copyright (c) 2025- ETH Zurich
#
# author: Marcello Puligheddu, Sergey Chulkov
include(FindPackageHandleStandardArgs)
include(cp2k_utils)
cp2k_find_libraries(LIBGINT "cp2kGint")
cp2k_include_dirs(LIBGINT "libgint.mod")
if(CP2K_LIBGINT_INCLUDE_DIRS)
find_package_handle_standard_args(
LibGint DEFAULT_MSG CP2K_LIBGINT_LINK_LIBRARIES CP2K_LIBGINT_INCLUDE_DIRS)
else()
find_package_handle_standard_args(LibGint DEFAULT_MSG
CP2K_LIBGINT_LINK_LIBRARIES)
endif()
if(NOT TARGET cp2k::LibGint::libGint)
add_library(cp2k::LibGint::libGint INTERFACE IMPORTED)
set_target_properties(
cp2k::LibGint::libGint PROPERTIES INTERFACE_LINK_LIBRARIES
"${CP2K_LIBGINT_LINK_LIBRARIES}")
if(CP2K_LIBGINT_INCLUDE_DIRS)
set_target_properties(
cp2k::LibGint::libGint PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${CP2K_LIBGINT_INCLUDE_DIRS}")
endif()
endif()
mark_as_advanced(CP2K_LIBGINT_ROOT CP2K_LIBGINT_INCLUDE_DIRS
CP2K_LIBGINT_LINK_LIBRARIES CP2K_LIBGINT_LIBRARIES)

View file

@ -1,6 +1,6 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!

View file

@ -1,6 +1,6 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
@ -23,15 +23,17 @@ else()
CP2K_LIBVORI_LINK_LIBRARIES)
endif()
if(NOT TARGET cp2k::VORI::vori)
add_library(cp2k::VORI::vori INTERFACE IMPORTED)
set_target_properties(
cp2k::VORI::vori PROPERTIES INTERFACE_LINK_LIBRARIES
"${CP2K_LIBVORI_LINK_LIBRARIES}")
if(CP2K_LIBVORI_INCLUDE_DIRS)
if(CP2K_LIBVORI_FOUND)
if(NOT TARGET cp2k::VORI::vori)
add_library(cp2k::VORI::vori INTERFACE IMPORTED)
set_target_properties(
cp2k::VORI::vori PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${CP2K_LIBVORI_INCLUDE_DIRS}")
cp2k::VORI::vori PROPERTIES INTERFACE_LINK_LIBRARIES
"${CP2K_LIBVORI_LINK_LIBRARIES}")
if(CP2K_LIBVORI_INCLUDE_DIRS)
set_target_properties(
cp2k::VORI::vori PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${CP2K_LIBVORI_INCLUDE_DIRS}")
endif()
endif()
endif()

View file

@ -1,83 +0,0 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
include(FindPackageHandleStandardArgs)
include(cp2k_utils)
find_package(PkgConfig REQUIRED)
cp2k_set_default_paths(LIBXSMM "LibXSMM")
set(CP2K_LIBXSMMEXT_ROOT "${CP2K_LIBXSMM_PREFIX}")
set(CP2K_LIBXSMMF_ROOT "${CP2K_LIBXSMM_PREFIX}")
set(CP2K_LIBXSMMNOBLAS_ROOT "${CP2K_LIBXSMM_PREFIX}")
if(PKG_CONFIG_FOUND)
foreach(__lib libxsmm libxsmmf libxsmmext libxsmmnoblas)
string(TOUPPER "${__lib}" __lib_search_up)
pkg_check_modules(CP2K_${__lib_search_up} IMPORTED_TARGET GLOBAL ${__lib})
# need to do it twice because of dbcsr build option
pkg_check_modules(${__lib_search_up} QUIET IMPORTED_TARGET GLOBAL ${__lib})
endforeach()
endif()
if(NOT CP2K_LIBXSMM_FOUND)
# Reset after pkg_check_modules side effects
foreach(__lib xsmm xsmmf xsmmext xsmmnoblas)
string(TOUPPER "LIB${__lib}" __lib_search_up)
if(NOT CP2K_${__lib_search_up}_FOUND)
cp2k_find_libraries(${__lib_search_up} ${__lib})
endif()
endforeach()
endif()
if(NOT CP2K_LIBXSMM_INCLUDE_DIRS)
cp2k_include_dirs(LIBXSMM "libxsmm.h;include/libxsmm.h")
endif()
if(CP2K_LIBXSMM_INCLUDE_DIRS)
find_package_handle_standard_args(
LibXSMM
DEFAULT_MSG
CP2K_LIBXSMM_INCLUDE_DIRS
CP2K_LIBXSMMNOBLAS_LINK_LIBRARIES
CP2K_LIBXSMMEXT_LINK_LIBRARIES
CP2K_LIBXSMMF_LINK_LIBRARIES
CP2K_LIBXSMM_LINK_LIBRARIES)
else()
find_package_handle_standard_args(
LibXSMM DEFAULT_MSG CP2K_LIBXSMMNOBLAS_LINK_LIBRARIES
CP2K_LIBXSMMEXT_LINK_LIBRARIES CP2K_LIBXSMMF_LINK_LIBRARIES
CP2K_LIBXSMM_LINK_LIBRARIES)
endif()
if(NOT TARGET cp2k::LibXSMM::libxsmm)
foreach(__lib libxsmm libxsmmf libxsmmext libxsmmnoblas)
string(TOUPPER "CP2K_${__lib}" __lib_search_up)
if(${__lib_search_up}_FOUND AND NOT TARGET cp2k::LibXSMM::${__lib})
add_library(cp2k::LibXSMM::${__lib} INTERFACE IMPORTED)
target_link_directories(cp2k::LibXSMM::${__lib} INTERFACE
${${__lib_search_up}_LIBRARY_DIRS})
endif()
set_target_properties(
cp2k::LibXSMM::${__lib} PROPERTIES INTERFACE_LINK_LIBRARIES
"${${__lib_search_up}_LINK_LIBRARIES}")
if(CP2K_LIBXSMM_INCLUDE_DIRS)
set_target_properties(
cp2k::LibXSMM::${__lib}
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${CP2K_LIBXSMM_INCLUDE_DIRS};${CP2K_LIBXSMM_PREFIX}/include"
)
endif()
endforeach()
endif()
mark_as_advanced(
CP2K_LIBXSMM_INCLUDE_DIRS CP2K_LIBXSMM_LIBRARY_DIRS
CP2K_LIBXSMMNOBLAS_LINK_LIBRARIES CP2K_LIBXSMMEXT_LINK_LIBRARIES
CP2K_LIBXSMMF_LINK_LIBRARIES CP2K_LIBXSMM_LINK_LIBRARIES)

View file

@ -1,61 +0,0 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
# Copyright (c) 2022- ETH Zurich
#
# authors : Mathieu Taillefumier
include(FindPackageHandleStandardArgs)
include(cp2k_utils)
cp2k_set_default_paths(LIBINT2 "Libint2")
find_package(PkgConfig REQUIRED)
if(PKG_CONFIG_FOUND)
pkg_check_modules(CP2K_LIBINT2 IMPORTED_TARGET GLOBAL libint2)
endif()
if(NOT CP2K_LIBINT2_FOUND)
cp2k_find_libraries(LIBINT2 int2)
endif()
if(NOT CP2K_LIBINT2_INCLUDE_DIRS)
cp2k_include_dirs(LIBINT2 "libint2.h;libint2/atom.h")
endif()
find_file(
CP2K_LIBINT2_MOD_FILE
NAMES "libint_f.mod"
PATHS "${CP2K_LIBINT2_ROOT}/include" "${CP2K_LIBINT2_ROOT}/include/libint2")
if(NOT CP2K_LIBINT2_MOD_FILE)
message(FATAL_ERROR "Libint2 : Fortran support is missing")
endif()
find_package_handle_standard_args(
Libint2 CP2K_LIBINT2_FOUND CP2K_LIBINT2_INCLUDE_DIRS
CP2K_LIBINT2_LINK_LIBRARIES)
if(CP2K_LIBINT2_FOUND)
if(NOT TARGET cp2k::Libint2::int2)
add_library(cp2k::Libint2::int2 INTERFACE IMPORTED)
endif()
if(CP2K_LIBINT2_INCLUDE_DIRS)
set_target_properties(
cp2k::Libint2::int2 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${CP2K_LIBINT2_INCLUDE_DIRS}")
endif()
set_target_properties(
cp2k::Libint2::int2 PROPERTIES INTERFACE_LINK_LIBRARIES
${CP2K_LIBINT2_LINK_LIBRARIES})
endif()
mark_as_advanced(CP2K_LIBINT2_FOUND CP2K_LIBINT2_LINK_LIBRARIES
CP2K_LIBINT2_INCLUDE_DIRS)

View file

@ -1,6 +1,6 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
@ -321,8 +321,6 @@ foreach(_libtype "ST" "DYN")
TOLOWER "${_mpi_impl}_${_iface}_${_bits}_${_threading}_${_libtype}"
_tgt_config)
set(_scalapack_tgt cp2k::BLAS::MKL::scalapack_${_tgt_config})
if(_mkl_blacs_lib
AND TARGET ${_mkl_tgt}
AND TARGET MPI::MPI_CXX
@ -348,7 +346,10 @@ foreach(_libtype "ST" "DYN")
if(_mkl_scalapack_lib AND NOT TARGET
cp2k::BLAS::MKL::scalapack_${_tgt_config})
set(_scalapack_libs "${_mkl_scalapack_lib}" "${_blacs_tgt}")
set(_scalapack_libs "${_mkl_scalapack_lib}")
if(TARGET cp2k::BLAS::MKL::blacs_${_tgt_config})
list(APPEND _scalapack_libs cp2k::BLAS::MKL::blacs_${_tgt_config})
endif()
add_library(cp2k::BLAS::MKL::scalapack_${_tgt_config} INTERFACE
IMPORTED)
set_target_properties(
@ -375,19 +376,12 @@ if(MKL_FOUND)
set(BLAS_mkl_INTFACE "intel")
endif()
if(CP2K_BLAS_THREADING MATCHES "thread|gnu-thread")
set(BLAS_mkl_thread__ "omp")
endif()
if(CP2K_BLAS_THREADING MATCHES "sequential")
if(CP2K_BLAS_THREADING STREQUAL "sequential")
set(BLAS_mkl_thread__ "seq")
endif()
if(CP2K_BLAS_THREADING MATCHES "intel-thread")
set(BLAS_mkl_thread__ "intel")
endif()
if(CP2K_BLAS_THREADING MATCHES "tbb")
elseif(CP2K_BLAS_THREADING MATCHES
"^(thread|gnu-thread|intel-thread|openmp)$")
set(BLAS_mkl_thread__ "omp")
elseif(CP2K_BLAS_THREADING STREQUAL "tbb-thread")
set(BLAS_mkl_thread__ "tbb")
endif()

View file

@ -0,0 +1,73 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
include(FindPackageHandleStandardArgs)
include(cp2k_utils)
# ! Use PkgConfig to look for modules named mclf and mcl, LOOK for .pc files
find_package(PkgConfig REQUIRED)
if(PKG_CONFIG_FOUND)
pkg_check_modules(CP2K_MIMIC IMPORTED_TARGET GLOBAL mclf mcl)
endif()
# ! Using CP2K_UTILS
if(NOT CP2K_MIMIC_FOUND)
cp2k_set_default_paths(MIMIC "MiMiC")
cp2k_find_libraries(MIMIC mclf)
cp2k_find_libraries(MIMICc mcl)
endif()
if(NOT CP2K_MIMIC_FOUND)
find_library(CP2K_MIMIC_LIBRARIES mclf PATH_SUFFIXES MiMiC)
find_library(CP2K_MIMICc_LIBRARIES mcl PATH_SUFFIXES MiMiC)
if(CP2K_MIMIC_LIBRARIES AND CP2K_MIMICc_LIBRARIES)
set(CP2K_MIMIC_FOUND True)
endif()
endif()
if(CP2K_MIMIC_FOUND)
set(CP2K_MIMIC_LINK_LIBRARIES
"${CP2K_MIMIC_LIBRARIES};${CP2K_MIMICc_LIBRARIES}")
endif()
if(NOT CP2K_MIMIC_INCLUDE_DIRS)
cp2k_include_dirs(MIMIC "mcl.mod")
endif()
if(NOT CP2K_MIMIC_INCLUDE_DIRS)
find_path(CP2K_MIMIC_INCLUDE_DIRS "mcl.mod" PATH_SUFFIXES MiMiC)
endif()
if(CP2K_MIMIC_INCLUDE_DIRS)
find_package_handle_standard_args(
MiMiC DEFAULT_MSG CP2K_MIMIC_FOUND CP2K_MIMIC_LINK_LIBRARIES
CP2K_MIMIC_INCLUDE_DIRS)
else()
find_package_handle_standard_args(MiMiC DEFAULT_MSG CP2K_MIMIC_FOUND
CP2K_MIMIC_LINK_LIBRARIES)
endif()
if(CP2K_MIMIC_FOUND)
if(NOT TARGET CP2K::MIMIC::mclf)
add_library(CP2K::MIMIC::mclf INTERFACE IMPORTED)
add_library(CP2K::MIMIC::mcl INTERFACE IMPORTED)
endif()
if(CP2K_MIMIC_INCLUDE_DIRS)
set_target_properties(
CP2K::MIMIC::mclf CP2K::MIMIC::mcl
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CP2K_MIMIC_INCLUDE_DIRS}")
endif()
target_link_libraries(CP2K::MIMIC::mclf
INTERFACE "${CP2K_MIMIC_LINK_LIBRARIES}")
target_link_libraries(CP2K::MIMIC::mcl
INTERFACE "${CP2K_MIMIC_LINK_LIBRARIES}")
endif()
mark_as_advanced(CP2K_MIMIC_FOUND CP2K_MIMIC_LINK_LIBRARIES
CP2K_MIMIC_INCLUDE_DIRS)

View file

@ -1,6 +1,6 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
@ -12,7 +12,7 @@
include(FindPackageHandleStandardArgs)
include(cp2k_utils)
cp2k_set_default_paths(CP2K_NVHPC "NVHPC")
cp2k_set_default_paths(NVHPC "NVHPC")
find_library(
CP2K_NVHPC_BLAS_LP64
@ -55,36 +55,39 @@ find_path(
find_package_handle_standard_args(
NVHPCBlas
DEFAULT_MSG
CP2K_NVHPC_INCLUDE_DIRS_ipl64
CP2K_NVHPC_BLAS_INCLUDE_DIRS_ilp64
CP2K_NVHPC_BLAS_INCLUDE_DIRS_lp64
CP2K_NVHPC_BLAS_ILP64
CP2K_NVHPC_BLAS_LP64
CP2K_NVHPC_LAPACK_ILP64
CP2K_NVHPC_LAPACK_LP64)
set(CP2K_BLAS_VENDOR "NVHPCBlas")
set(CP2K_NVHPCBLAS_FOUND "ON")
set(CP2K_NVHPCBLAS_FOUND ${NVHPCBlas_FOUND})
if(NOT TARGET cp2k::BLAS::NVHPCBlas::nvhpcblas)
add_library(cp2k::BLAS::NVHPCBlas::nvhpcblas INTERFACE IMPORTED)
add_library(cp2k::BLAS::NVHPCBlas::blas ALIAS
cp2k::BLAS::NVHPCBlas::nvhpcblas)
if(CP2K_NVHPCBLAS_FOUND)
set(CP2K_BLAS_VENDOR "NVHPCBlas")
if(NOT TARGET cp2k::BLAS::NVHPCBlas::nvhpcblas)
add_library(cp2k::BLAS::NVHPCBlas::nvhpcblas INTERFACE IMPORTED)
add_library(cp2k::BLAS::NVHPCBlas::blas ALIAS
cp2k::BLAS::NVHPCBlas::nvhpcblas)
endif()
if(CP2K_BLAS_INTERFACE MATCHES "64bits")
set(CP2K_NVHPC_BLAS_LINK_LIBRARIES
"${CP2K_NVHPC_LAPACK_ILP64};${CP2K_NVHPC_BLAS_ILP64}")
set(CP2K_NVHPC_BLAS_INCLUDE_DIRS "${CP2K_NVHPC_BLAS_INCLUDE_DIRS_ilp64}")
else()
set(CP2K_NVHPC_BLAS_LINK_LIBRARIES
"${CP2K_NVHPC_LAPACK_LP64};${CP2K_NVHPC_BLAS_LP64}")
set(CP2K_NVHPC_BLAS_INCLUDE_DIRS "${CP2K_NVHPC_BLAS_INCLUDE_DIRS_lp64}")
endif()
set_target_properties(
cp2k::BLAS::NVHPCBlas::nvhpcblas
PROPERTIES INTERFACE_LINK_LIBRARIES "${CP2K_NVHPC_BLAS_LINK_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${CP2K_NVHPC_BLAS_INCLUDE_DIRS}")
endif()
if(CP2K_BLAS_INTERFACE MATCHES "64bits")
set(CP2K_NVHPC_BLAS_LINK_LIBRARIES
"${CP2K_NVHPC_LAPACK_ILP64} ${CP2K_NVHPC_BLAS_ILP64}")
set(CP2K_NVHPC_BLAS_INCLUDE_DIRS "${CP2K_NVHPC_INCLUDE_DIRS_ipl64}")
else()
set(CP2K_NVHPC_BLAS_LINK_LIBRARIES "${CP2K_NVHPC_LAPACK_LP64}
${CP2K_NVHPC_BLAS_LP64}")
set(CP2K_NVHPC_BLAS_INCLUDE_DIRS "${CP2K_NVHPC_INCLUDE_DIRS_pl64}")
endif()
set_target_properties(
cp2k::BLAS::NVHPCBlas::nvhpcblas
PROPERTIES INTERFACE_LINK_LIBRARIES "${CP2K_NVHPC_BLAS_LINK_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${CP2K_NVHPC_BLAS_INCLUDE_DIRS}")
mark_as_advanced(CP2K_NVHPCBLAS_FOUND CP2K_NVHPC_BLAS_INCLUDE_DIRS
CP2K_NVHPC_BLAS_LINK_LIBRARIES CP2K_BLAS_VENDOR)

View file

@ -0,0 +1,31 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
include(FindPackageHandleStandardArgs)
include(cp2k_utils)
cp2k_set_default_paths(NCCL "Nccl")
cp2k_find_libraries(NCCL "nccl")
cp2k_include_dirs(NCCL "nccl.h")
find_package_handle_standard_args(Nccl DEFAULT_MSG CP2K_NCCL_LINK_LIBRARIES
CP2K_NCCL_INCLUDE_DIRS)
if(CP2K_NCCL_FOUND AND NOT TARGET cp2k::NCCL::nccl)
add_library(cp2k::NCCL::nccl INTERFACE IMPORTED)
set_target_properties(
cp2k::NCCL::nccl PROPERTIES INTERFACE_LINK_LIBRARIES
"${CP2K_NCCL_LINK_LIBRARIES}")
set_target_properties(
cp2k::NCCL::nccl PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${CP2K_NCCL_INCLUDE_DIRS}")
endif()
mark_as_advanced(CP2K_NCCL_LINK_LIBRARIES)
mark_as_advanced(CP2K_NCCL_INCLUDE_DIRS)
mark_as_advanced(CP2K_NCCL_FOUND)

View file

@ -1,6 +1,6 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
@ -25,7 +25,7 @@ endif()
if(NOT CP2K_OPENBLAS_FOUND)
set(CP2K_OPENBLAS64_ROOT ${CP2K_OPENBLAS_ROOT})
set(CP2K_OPENBLA_THREADS_ROOT ${CP2K_OPENBLAS_ROOT})
set(CP2K_OPENBLAS_THREADS_ROOT ${CP2K_OPENBLAS_ROOT})
cp2k_find_libraries(OPENBLAS "openblas")
cp2k_find_libraries(OPENBLAS64 "openblas64")
cp2k_find_libraries(OPENBLAS_THREADS "openblas_threads;openblas_omp")

View file

@ -1,6 +1,6 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!

View file

@ -1,6 +1,6 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
@ -30,6 +30,41 @@ if(NOT CP2K_CONFIG_PACKAGE)
CP2K_SCALAPACK_LINK_LIBRARIES cp2k::BLAS::SCI::scalapack_link
INTERFACE_LINK_LIBRARIES)
set(CP2K_SCALAPACK_FOUND yes)
elseif(CP2K_SCALAPACK_VENDOR MATCHES "NVPL")
if(CP2K_BLAS_INTERFACE MATCHES "64bits")
set(_nvpl_int_type "ilp64")
else()
set(_nvpl_int_type "lp64")
endif()
set(_nvpl_mpi_type "${CP2K_NVPL_SCALAPACK_MPI}")
if(_nvpl_mpi_type STREQUAL "auto")
if(MPI_Fortran_LIBRARY_VERSION_STRING MATCHES "Open MPI[^0-9]*([0-9]+)")
set(_nvpl_mpi_type "openmpi${CMAKE_MATCH_1}")
elseif(MPI_Fortran_LIBRARY_VERSION_STRING MATCHES "MPICH|HYDRA")
set(_nvpl_mpi_type "mpich")
else()
message(
FATAL_ERROR
"Could not determine the NVPL BLACS MPI interface. Set "
"CP2K_NVPL_SCALAPACK_MPI to mpich, openmpi3, openmpi4, or openmpi5."
)
endif()
endif()
find_package(nvpl REQUIRED COMPONENTS scalapack)
set(_nvpl_scalapack_target "nvpl::scalapack_${_nvpl_int_type}")
set(_nvpl_blacs_target "nvpl::blacs_${_nvpl_int_type}_${_nvpl_mpi_type}")
if(NOT TARGET "${_nvpl_scalapack_target}")
message(
FATAL_ERROR "NVPL ScaLAPACK target ${_nvpl_scalapack_target} not found")
endif()
if(NOT TARGET "${_nvpl_blacs_target}")
message(FATAL_ERROR "NVPL BLACS target ${_nvpl_blacs_target} not found")
endif()
set(CP2K_SCALAPACK_LINK_LIBRARIES
"${_nvpl_scalapack_target};${_nvpl_blacs_target}")
set(CP2K_SCALAPACK_FOUND yes)
else() # if(CP2K_SCALAPACK_VENDOR MATCHES "GENERIC|auto")
if(TARGET cp2k::BLAS::MKL::scalapack_link)
message(

View file

@ -1,6 +1,6 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!

View file

@ -1,6 +1,6 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!

View file

@ -1,6 +1,6 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
@ -24,15 +24,17 @@ else()
CP2K_LIBSMEAGOL_LINK_LIBRARIES)
endif()
if(NOT TARGET cp2k::libsmeagol::smeagol)
add_library(cp2k::libsmeagol::smeagol INTERFACE IMPORTED)
set_target_properties(
cp2k::libsmeagol::smeagol PROPERTIES INTERFACE_LINK_LIBRARIES
"${CP2K_LIBSMEAGOL_LINK_LIBRARIES}")
if(CP2K_LIBSMEAGOL_INCLUDE_DIRS)
if(CP2K_LIBSMEAGOL_FOUND)
if(NOT TARGET cp2k::libsmeagol::smeagol)
add_library(cp2k::libsmeagol::smeagol INTERFACE IMPORTED)
set_target_properties(
cp2k::libsmeagol::smeagol PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${CP2K_LIBSMEAGOL_INCLUDE_DIRS}")
cp2k::libsmeagol::smeagol PROPERTIES INTERFACE_LINK_LIBRARIES
"${CP2K_LIBSMEAGOL_LINK_LIBRARIES}")
if(CP2K_LIBSMEAGOL_INCLUDE_DIRS)
set_target_properties(
cp2k::libsmeagol::smeagol PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${CP2K_LIBSMEAGOL_INCLUDE_DIRS}")
endif()
endif()
endif()

View file

@ -1,6 +1,6 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
@ -11,6 +11,7 @@ include(FindPackageHandleStandardArgs)
include(cp2k_utils)
cp2k_set_default_paths(UCC "ucc")
cp2k_set_default_paths(UCX "ucx")
cp2k_find_libraries(UCC "ucc")
cp2k_find_libraries(UCX "ucs")
@ -23,23 +24,27 @@ find_package_handle_standard_args(
ucc DEFAULT_MSG CP2K_UCC_INCLUDE_DIRS CP2K_UCC_LINK_LIBRARIES
CP2K_UCX_LINK_LIBRARIES)
if(CP2K_UCX_FOUND AND NOT TARGET cp2k::UCC::ucx)
add_library(cp2k::UCC::ucx INTERFACE IMPORTED)
set_target_properties(cp2k::UCC::ucx PROPERTIES INTERFACE_LINK_LIBRARIES
"${CP2K_UCX_LINK_LIBRARIES}")
else()
if(NOT CP2K_UCX_FOUND)
message(FATAL_ERROR "ucx required by CuSolverMP")
endif()
if(CP2K_UCC_FOUND AND NOT TARGET cp2k::UCC::ucc)
if(NOT TARGET cp2k::UCC::ucx)
add_library(cp2k::UCC::ucx INTERFACE IMPORTED)
set_target_properties(cp2k::UCC::ucx PROPERTIES INTERFACE_LINK_LIBRARIES
"${CP2K_UCX_LINK_LIBRARIES}")
endif()
if(NOT CP2K_UCC_FOUND)
message(FATAL_ERROR "ucc required by CuSolverMP")
endif()
if(NOT TARGET cp2k::UCC::ucc)
add_library(cp2k::UCC::ucc INTERFACE IMPORTED)
set_target_properties(
cp2k::UCC::ucc PROPERTIES INTERFACE_LINK_LIBRARIES
"${CP2K_UCC_LINK_LIBRARIES};cp2k::UCC::ucx")
set_target_properties(cp2k::UCC::ucc PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${CP2K_UCC_INCLUDE_DIRS}")
else()
message(FATAL_ERROR "ucc required by CuSolverMP")
endif()
mark_as_advanced(CP2K_UCX_LINK_LIBRARIES)

View file

@ -1,6 +1,6 @@
#!-------------------------------------------------------------------------------------------------!
#! CP2K: A general program to perform molecular dynamics simulations !
#! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
#! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
#! !
#! SPDX-License-Identifier: GPL-2.0-or-later !
#!-------------------------------------------------------------------------------------------------!
@ -13,8 +13,12 @@ function(cp2k_set_default_paths _varname _package_name)
# find_library should work when ${PACKAGE_ROOT} is given to cmake
# (-DPACKAGE_ROOT=bla) but I use only one variable syntax CP2K_PACKAGE_PREFIX
set(CP2K_${_varname}_PREFIX_TMP "")
if(DEFINED ${_package_name}_ROOT)
set(CP2K_${_varname}_PREFIX_TMP "${${_varname}_ROOT}")
set(_cp2k_root_var "CP2K_${_varname}_ROOT")
set(_package_root_var "${_package_name}_ROOT")
if(DEFINED ${_cp2k_root_var})
set(CP2K_${_varname}_PREFIX_TMP "${${_cp2k_root_var}}")
elseif(DEFINED ${_package_root_var})
set(CP2K_${_varname}_PREFIX_TMP "${${_package_root_var}}")
endif()
# search common environment variables names
@ -75,7 +79,7 @@ function(cp2k_include_dirs _package_name _library_include_file)
NAMES ${_library_include_file}
PATHS "${CP2K_${_package_name}_ROOT}"
HINTS "${CP2K_${_package_name}_ROOT}"
PATH_SUFFIXES "include" "include/${_pacakge_name}" "${_package_name}")
PATH_SUFFIXES "include" "include/${_package_name}" "${_package_name}")
set(CP2K_${_package_name}_INCLUDE_DIRS
"${CP2K_${_package_name}_INCLUDE_DIRS_TMP}"
@ -122,6 +126,7 @@ function(cp2k_compare_src_with_list _list_files _extension _exclude_list)
set(found_list_size_ 0)
endfunction()
# cmake-lint: disable=R0912,R0915
macro(cp2k_FindPackage name)
#[===[.md
# cp2k_FindPackage
@ -213,7 +218,7 @@ macro(cp2k_FindPackage name)
list(APPEND ARGS_PKG_MODULE_SPECS
"${_pkg_name}>=${${name}_FIND_VERSION_MIN}")
endforeach()
elseif({${name}_FIND_VERSION_EXACT)
elseif(${name}_FIND_VERSION_EXACT)
# Requesting exact version
foreach(_pkg_name IN LISTS ARGS_PKG_MODULE_NAMES)
list(APPEND ARGS_PKG_MODULE_SPECS

Binary file not shown.

1388
data/BASIS_AUG_MOLOPT Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,12 +1,12 @@
# Norm-Conserving Pseudopotentials and Basis Sets To Explore Lanthanide Chemistry in Complex Environments
# Jun-Bo Lu, David C. Cantu, Manh-Thuong Nguyen, Jun Li, Vassiliki-Alexandra Glezakoui, Roger Rousseau
# Jun-Bo Lu, David C. Cantu, Manh-Thuong Nguyen, Jun Li, Vassiliki-Alexandra Glezakou, Roger Rousseau
# J. Chem. Theory Comput. 2019, 15, 11, 5987-5997
# https://doi.org/10.1021/acs.jctc.9b00553
# Supporting Information
# Norm-conserving pseudopotentials and basis sets to explore
# Lanthanide chemistry in complex environments
# Jun-Bo Lu, David C. Cantub , Manh-Thuong Nguyen, Jun Lia, Vassiliki-Alexandra Glezakou, Roger Rousseau
# Jun-Bo Lu, David C. Cantu, Manh-Thuong Nguyen, Jun Li, Vassiliki-Alexandra Glezakou, Roger Rousseau
#
# Department of Chemistry and Key Laboratory of Organic Optoelectronics & Molecular Engineering
# of the Ministry of Education, Tsinghua University, Beijing 100084, China

File diff suppressed because it is too large Load diff

1
data/BASIS_MOLOPT_UZH Symbolic link
View file

@ -0,0 +1 @@
BASIS_MOLOPT_UZH_2026.2

Some files were not shown because too many files have changed in this diff Show more