mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-21 14:35:15 -04:00
Compare commits
1229 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
11454568b3 | ||
|
|
2a9776c2cd | ||
|
|
a0df33dd6a | ||
|
|
290501bb7f | ||
|
|
3d5583cc72 | ||
|
|
a05d36a5d9 | ||
|
|
f4d43ab54f | ||
|
|
9111030217 | ||
|
|
be2d3823ac | ||
|
|
f6c0ee4712 | ||
|
|
4ca962cc2c | ||
|
|
8f16beb039 | ||
|
|
df8ab74de5 | ||
|
|
3caaa28e3b | ||
|
|
39fe4c47c6 | ||
|
|
ea663e99cf | ||
|
|
7a5c6862f4 | ||
|
|
c92cc08b45 | ||
|
|
97cfbf5b46 | ||
|
|
668b9a7f8c | ||
|
|
c823c920aa | ||
|
|
2c97d88377 | ||
|
|
d2d9c0e403 | ||
|
|
7de47fd987 | ||
|
|
d4bfb39614 | ||
|
|
c835e6b7b6 | ||
|
|
440cf4f012 | ||
|
|
113a7dbab1 | ||
|
|
b2ac3daf86 | ||
|
|
e2d766a6da | ||
|
|
29578c7298 | ||
|
|
a2edeeb2c6 | ||
|
|
ad1d558f05 | ||
|
|
3c427e6f4d | ||
|
|
867b9852cc | ||
|
|
61b9195a45 | ||
|
|
b7af1c16c0 | ||
|
|
f7216f7eed | ||
|
|
0ea840e1ab | ||
|
|
1b0cc9d292 | ||
|
|
7909f53bfa | ||
|
|
39e6d08f13 | ||
|
|
345b391c5e | ||
|
|
cccb9b4cd4 | ||
|
|
6d68f17818 | ||
|
|
e9dba43327 | ||
|
|
ffd91bc41a | ||
|
|
dd9e322d3b | ||
|
|
f6e87dc039 | ||
|
|
1ae7fa728c | ||
|
|
9ac08c90f1 | ||
|
|
b07e6de83f | ||
|
|
fe787632bd | ||
|
|
be0a27374c | ||
|
|
c7767d20a3 | ||
|
|
473752caaa | ||
|
|
0ff4726358 | ||
|
|
291bd4d74a | ||
|
|
dd16820ba1 | ||
|
|
40fb6157bf | ||
|
|
f3e23541e8 | ||
|
|
b95687185d | ||
|
|
f50e850e17 | ||
|
|
c75d734d70 | ||
|
|
c24029e761 | ||
|
|
8527535a81 | ||
|
|
6d9f5ac9a2 | ||
|
|
3c90c97729 | ||
|
|
a2d013d033 | ||
|
|
d275998fba | ||
|
|
bfcb1ea1d6 | ||
|
|
1f9fd2c165 | ||
|
|
0a0a847578 | ||
|
|
2c0c9dd7bf | ||
|
|
de7340f8be | ||
|
|
3a6a80ebfc | ||
|
|
6bd99e96c6 | ||
|
|
5976d25a45 | ||
|
|
906b8b3f0a | ||
|
|
701d1e8c46 | ||
|
|
17c8f72c4c | ||
|
|
14b73dafd1 | ||
|
|
2c8265a529 | ||
|
|
9fc3e74bfe | ||
|
|
2cf3252f98 | ||
|
|
23ff2abb53 | ||
|
|
e6548e2930 | ||
|
|
620e8b13eb | ||
|
|
eb4986017d | ||
|
|
0d88fc2a8e | ||
|
|
faf9aae912 | ||
|
|
9aade48c25 | ||
|
|
cbb202218e | ||
|
|
88e874441f | ||
|
|
5576033f5b | ||
|
|
1ee2fa6ca7 | ||
|
|
ba9180c884 | ||
|
|
9b6721164e | ||
|
|
31876b56ae | ||
|
|
ed4c696b7e | ||
|
|
392e7d2ee1 | ||
|
|
39eddeee7a | ||
|
|
871dbd59fb | ||
|
|
38657c2321 | ||
|
|
fa3fa498c3 | ||
|
|
3b4514f196 | ||
|
|
708cd67847 | ||
|
|
cf1540c906 | ||
|
|
ab143295cb | ||
|
|
b76ce4ef50 | ||
|
|
9abfe98c3b | ||
|
|
1bd8e1629d | ||
|
|
1e0ab71985 | ||
|
|
02e5e7c6ee | ||
|
|
d31e8a02de | ||
|
|
6ab90febad | ||
|
|
a0c7eec525 | ||
|
|
c04ca93c7f | ||
|
|
701334031c | ||
|
|
4af04f499e | ||
|
|
f18113f003 | ||
|
|
97c7ba5dd8 | ||
|
|
e8f5963d8d | ||
|
|
476f3006db | ||
|
|
12a514f0bd | ||
|
|
23252ab802 | ||
|
|
353aefe660 | ||
|
|
4b4ae76f9d | ||
|
|
cd1e3d7b65 | ||
|
|
f3f9c0959e | ||
|
|
16a96a07a2 | ||
|
|
af486029db | ||
|
|
9ac56287d5 | ||
|
|
5fdc47cff4 | ||
|
|
2894a3be3d | ||
|
|
60d41ebace | ||
|
|
63bb4b1a93 | ||
|
|
e32986a768 | ||
|
|
06a6a83eab | ||
|
|
3c69fd194f | ||
|
|
49a1a0f24d | ||
|
|
1efcb7b067 | ||
|
|
2f0b7ede70 | ||
|
|
1efe93f5c2 | ||
|
|
2085e8ca3a | ||
|
|
fc8b99b17a | ||
|
|
adc2cbe104 | ||
|
|
12598fa817 | ||
|
|
7fec14f9c5 | ||
|
|
fadf84a243 | ||
|
|
efe242d354 | ||
|
|
e6ecf3375d | ||
|
|
47a39399f3 | ||
|
|
561f47539b | ||
|
|
948aa9e1c1 | ||
|
|
c5e43a80a8 | ||
|
|
0c205b2296 | ||
|
|
50bd97db99 | ||
|
|
6250c82c2d | ||
|
|
204dd8f0e1 | ||
|
|
3223761494 | ||
|
|
285cf9bdaf | ||
|
|
9ca34697db | ||
|
|
c28f603b59 | ||
|
|
25eb499bcb | ||
|
|
4d701726f9 | ||
|
|
9a1f30adbb | ||
|
|
785b9d9b63 | ||
|
|
3631906f04 | ||
|
|
cf453c1872 | ||
|
|
b0342986ae | ||
|
|
f9604532c0 | ||
|
|
74766aa487 | ||
|
|
85b8a9b49c | ||
|
|
9dda3dd524 | ||
|
|
bd24f0ace7 | ||
|
|
3154efc870 | ||
|
|
1425815bee | ||
|
|
3d922ff5b6 | ||
|
|
20ea36f044 | ||
|
|
424e1d4d46 | ||
|
|
a90b72f5f7 | ||
|
|
64e569e4f4 | ||
|
|
e2123eace2 | ||
|
|
f5ef6ceffd | ||
|
|
4cf809f41f | ||
|
|
475236acc4 | ||
|
|
cb2e80cfb6 | ||
|
|
7b1171f5d6 | ||
|
|
be2ee82e43 | ||
|
|
45836a5605 | ||
|
|
aa8e65b1e0 | ||
|
|
87942b8d46 | ||
|
|
9c2e77385f | ||
|
|
c6fe882990 | ||
|
|
b4b5edf373 | ||
|
|
5f41a9ca5d | ||
|
|
4738a5a401 | ||
|
|
dccd4e42be | ||
|
|
f229b202dd | ||
|
|
2254d362dc | ||
|
|
e0f0c17926 | ||
|
|
78cce949b3 | ||
|
|
2e4a83415a | ||
|
|
446a0bc27e | ||
|
|
39800b25ec | ||
|
|
5b4bf874c7 | ||
|
|
0ad2206467 | ||
|
|
7c237e455b | ||
|
|
d41503088a | ||
|
|
06f838dc4a | ||
|
|
0d07625766 | ||
|
|
76dcc75b62 | ||
|
|
8dea62cad1 | ||
|
|
7fabd04827 | ||
|
|
78a7633e0d | ||
|
|
49523fb0eb | ||
|
|
e9e4980e05 | ||
|
|
23153d14b2 | ||
|
|
45bd6cb1d1 | ||
|
|
afa401ae9a | ||
|
|
7c86815ba8 | ||
|
|
8b3d8f24eb | ||
|
|
d5c4d393fe | ||
|
|
a64d610e39 | ||
|
|
f06fd7fe03 | ||
|
|
ec1c78fe08 | ||
|
|
d7d0232213 | ||
|
|
71c7144468 | ||
|
|
db060cbc84 | ||
|
|
2d9c73baf3 | ||
|
|
59397cdcc8 | ||
|
|
1446772304 | ||
|
|
acf1d0e357 | ||
|
|
099792108e | ||
|
|
bff9b1f227 | ||
|
|
75e331fa99 | ||
|
|
44edd53b36 | ||
|
|
c046af2178 | ||
|
|
8c4b069db3 | ||
|
|
1d38d6d94d | ||
|
|
df7755d011 | ||
|
|
8c42d232ef | ||
|
|
48c63364e3 | ||
|
|
3ba675f68a | ||
|
|
ddfed05c5a | ||
|
|
cdd8209268 | ||
|
|
0cecd9b435 | ||
|
|
d000247bb9 | ||
|
|
310d93447c | ||
|
|
18dd494853 | ||
|
|
802500c0c8 | ||
|
|
f506c3be65 | ||
|
|
032766d08b | ||
|
|
ba924cc32c | ||
|
|
7ac807a875 | ||
|
|
3274ff38b0 | ||
|
|
a7cc81a68e | ||
|
|
cd7394cb51 | ||
|
|
f51a18d89b | ||
|
|
f0dc442c7c | ||
|
|
9fc00bd92e | ||
|
|
d8760e491c | ||
|
|
ee34242743 | ||
|
|
559586193c | ||
|
|
6f4be11194 | ||
|
|
7641cd99dd | ||
|
|
2e14aebe56 | ||
|
|
37b6460902 | ||
|
|
0bf0ab0367 | ||
|
|
9de61f8478 | ||
|
|
0622d442e4 | ||
|
|
6768d83bf2 | ||
|
|
c1bf2799a1 | ||
|
|
8c09d754e0 | ||
|
|
5a6c0a78a3 | ||
|
|
92c5e5ec96 | ||
|
|
bcc6cf9f18 | ||
|
|
418b37c462 | ||
|
|
919a8b9f61 | ||
|
|
61e2520981 | ||
|
|
1581497297 | ||
|
|
b3e9e277bd | ||
|
|
56c3704036 | ||
|
|
36a0d11aaa | ||
|
|
d1631c1d3e | ||
|
|
3a68eb34aa | ||
|
|
c0b4819b30 | ||
|
|
0eb17dafdc | ||
|
|
55e05fe139 | ||
|
|
0e00971d48 | ||
|
|
b8318cf64b | ||
|
|
d16a7bc263 | ||
|
|
5f5be17510 | ||
|
|
8452982c9b | ||
|
|
e068a9b9a7 | ||
|
|
f658ef2d91 | ||
|
|
666f2d7d18 | ||
|
|
1dd88fb0fa | ||
|
|
d5322d6847 | ||
|
|
ea7c263a32 | ||
|
|
fac8184df2 | ||
|
|
4d809f8023 | ||
|
|
b70f40af56 | ||
|
|
52b5bac6eb | ||
|
|
358cae4de3 | ||
|
|
5311037518 | ||
|
|
b11aa6139c | ||
|
|
14c5ee2a57 | ||
|
|
daf821cd15 | ||
|
|
8039b896f5 | ||
|
|
ef9d0990c2 | ||
|
|
16ac5b65f8 | ||
|
|
8ba4bd1763 | ||
|
|
bb9ae24f89 | ||
|
|
52dc25883c | ||
|
|
3d3abc6804 | ||
|
|
c22e5003df | ||
|
|
bbbecc6f4e | ||
|
|
695da86d0c | ||
|
|
024a11eaca | ||
|
|
479cecb1b0 | ||
|
|
a91f8bf3b4 | ||
|
|
a58acb6329 | ||
|
|
d43dca4c75 | ||
|
|
7f57f22fd5 | ||
|
|
56b351daa3 | ||
|
|
2256cec575 | ||
|
|
0f818b0565 | ||
|
|
e2e702f92e | ||
|
|
324f9af104 | ||
|
|
41cb81381e | ||
|
|
e8cf128e24 | ||
|
|
adac3d1e08 | ||
|
|
64e7805eb9 | ||
|
|
3119073cda | ||
|
|
91e51cab28 | ||
|
|
554cbd321b | ||
|
|
7dd8ee8ff3 | ||
|
|
618e1781db | ||
|
|
11661d76ba | ||
|
|
20f179c892 | ||
|
|
12bc3b21f2 | ||
|
|
1233a2ca2a | ||
|
|
1641128544 | ||
|
|
cbf8333c87 | ||
|
|
e8712accb1 | ||
|
|
42dbd02aed | ||
|
|
02caa0904f | ||
|
|
c77770f004 | ||
|
|
c523002d91 | ||
|
|
37a23bdd17 | ||
|
|
49c4bc4af3 | ||
|
|
bec0900f94 | ||
|
|
fc8ffeed2f | ||
|
|
432ceb16cc | ||
|
|
95e0cafc31 | ||
|
|
4ce35e5f9f | ||
|
|
6aff1db465 | ||
|
|
6a4e44fd68 | ||
|
|
4104e3fc41 | ||
|
|
46d6027c6b | ||
|
|
6f9c336789 | ||
|
|
b84f141a34 | ||
|
|
cd80f14804 | ||
|
|
9781f732f4 | ||
|
|
ef37d02fde | ||
|
|
72f118eab7 | ||
|
|
59927b9229 | ||
|
|
495eafe514 | ||
|
|
f8ec882662 | ||
|
|
55d01f6722 | ||
|
|
cfc8a4eba2 | ||
|
|
223025a8ce | ||
|
|
92364bbe53 | ||
|
|
b6fed2ab57 | ||
|
|
ce370e297b | ||
|
|
c29306b3a8 | ||
|
|
2748f813de | ||
|
|
064654b83c | ||
|
|
eb5a73070c | ||
|
|
62f9a736be | ||
|
|
565e00f97f | ||
|
|
cccd2f3934 | ||
|
|
c7270bbdb5 | ||
|
|
4a77a3b84e | ||
|
|
81d4c4d8b9 | ||
|
|
4733e3f172 | ||
|
|
263a783590 | ||
|
|
1b43baddf4 | ||
|
|
9cf845759d | ||
|
|
33b928ff10 | ||
|
|
b3d087c131 | ||
|
|
d78ff4c862 | ||
|
|
b871c87cfc | ||
|
|
2d33723005 | ||
|
|
f9f50dc2f5 | ||
|
|
e704af8e31 | ||
|
|
80f306345e | ||
|
|
6f80f8717e | ||
|
|
e3f6089ae9 | ||
|
|
02a6ce975b | ||
|
|
fcf49867ac | ||
|
|
cacd179657 | ||
|
|
300cfa0c23 | ||
|
|
e7dba46940 | ||
|
|
90d8299cb6 | ||
|
|
96eb417b72 | ||
|
|
1d63da52da | ||
|
|
3a22a26910 | ||
|
|
f577188f47 | ||
|
|
c92e8381f7 | ||
|
|
e887d2c5ab | ||
|
|
7ab56ede36 | ||
|
|
35dc0ecb7d | ||
|
|
439b37ba4c | ||
|
|
7a5c285540 | ||
|
|
7838f83832 | ||
|
|
f8737fe1fe | ||
|
|
5e3f86fde9 | ||
|
|
daa1fe0eaa | ||
|
|
5ce8c4d842 | ||
|
|
317f6be72a | ||
|
|
ed52f450bb | ||
|
|
0262abc151 | ||
|
|
cb5d5fc1d4 | ||
|
|
c955a22e6e | ||
|
|
d749a202a6 | ||
|
|
d79ec3fd85 | ||
|
|
c2658d3dab | ||
|
|
48db7ef82b | ||
|
|
ff7b8ebec0 | ||
|
|
6f1ede0c7d | ||
|
|
a0e40544ba | ||
|
|
e82a6a61c8 | ||
|
|
a1d43364c5 | ||
|
|
8b341f7d8e | ||
|
|
30e889138e | ||
|
|
d5b0302fb9 | ||
|
|
c4157ab6c8 | ||
|
|
8f971e11a4 | ||
|
|
d1af2e6193 | ||
|
|
03cdb6fe7d | ||
|
|
87e20491ac | ||
|
|
af0c710417 | ||
|
|
30cea4fbde | ||
|
|
25be7e468a | ||
|
|
dbc63552ef | ||
|
|
5fb5ea801f | ||
|
|
ba1c648ec0 | ||
|
|
563e6d5d46 | ||
|
|
0e652e763d | ||
|
|
a4d6b945d4 | ||
|
|
61fc45c646 | ||
|
|
4c4babd79f | ||
|
|
7d4b1410b6 | ||
|
|
59e0b9b155 | ||
|
|
7a2a232568 | ||
|
|
c607de2d1f | ||
|
|
90719213be | ||
|
|
e51a9ede8a | ||
|
|
569f59fb3b | ||
|
|
3db43b466e | ||
|
|
7c0fd7cb22 | ||
|
|
c957a64971 | ||
|
|
3fd7cf798f | ||
|
|
e10630fd5b | ||
|
|
f664ec648c | ||
|
|
6f8ffad0f6 | ||
|
|
0f88175366 | ||
|
|
ff67897823 | ||
|
|
b60b5a3ee7 | ||
|
|
1eed5c3895 | ||
|
|
7a21789bb5 | ||
|
|
3146d13d65 | ||
|
|
ab20d2cda6 | ||
|
|
9c39c24774 | ||
|
|
13b189a51e | ||
|
|
08e545abef | ||
|
|
1814b3554d | ||
|
|
1a3cdd10ab | ||
|
|
d10c76ea8a | ||
|
|
ed08826bad | ||
|
|
b4df9bbab3 | ||
|
|
7eda62c809 | ||
|
|
d5892a0e67 | ||
|
|
1acfce1e18 | ||
|
|
0df199bbba | ||
|
|
f4bd8eca22 | ||
|
|
8a6febacc1 | ||
|
|
0498dc7f2d | ||
|
|
391a3b0a11 | ||
|
|
3642c6ec98 | ||
|
|
12618bd43f | ||
|
|
3d85b50ea0 | ||
|
|
ba189885c6 | ||
|
|
8a7c549b73 | ||
|
|
670253b6df | ||
|
|
bc1bef0758 | ||
|
|
6832432bba | ||
|
|
f361350b76 | ||
|
|
b879abb953 | ||
|
|
7b94146043 | ||
|
|
9f397624dc | ||
|
|
a78533eb1f | ||
|
|
ccd79c8d73 | ||
|
|
c6fc4eb94e | ||
|
|
cce4b85ea5 | ||
|
|
721f4afe15 | ||
|
|
74799fca7c | ||
|
|
0fa5d6463e | ||
|
|
1411fc9238 | ||
|
|
40671c9b2f | ||
|
|
201a7457b8 | ||
|
|
5a6802b4bc | ||
|
|
2ed09c55f5 | ||
|
|
d04fa31c63 | ||
|
|
0361b50231 | ||
|
|
44d4b3fceb | ||
|
|
554bc177a1 | ||
|
|
482f4e8cbe | ||
|
|
80a9227797 | ||
|
|
079df36cf9 | ||
|
|
82afa516d5 | ||
|
|
34a1bdb69b | ||
|
|
7765b1ffe2 | ||
|
|
ef7d4745b6 | ||
|
|
1155b05826 | ||
|
|
501b191426 | ||
|
|
8210a32729 | ||
|
|
a15f595c46 | ||
|
|
97815d35ec | ||
|
|
4f8101ccea | ||
|
|
afd0677457 | ||
|
|
a41965c2f4 | ||
|
|
43be45d206 | ||
|
|
64b2f279eb | ||
|
|
5557c943c6 | ||
|
|
5828a1ae1e | ||
|
|
2b3ee83444 | ||
|
|
e8d1ac1fd2 | ||
|
|
5bb96acea1 | ||
|
|
a28318810d | ||
|
|
c3e4ebb575 | ||
|
|
4f84fd8807 | ||
|
|
f8e94810a9 | ||
|
|
60bb2b342c | ||
|
|
3b19434825 | ||
|
|
eeadd9fdbb | ||
|
|
983a8784de | ||
|
|
01d6ff2c5b | ||
|
|
3b8dca457e | ||
|
|
f35d2ee3d9 | ||
|
|
5421a894f9 | ||
|
|
2f0b2b8824 | ||
|
|
84a7b2d54c | ||
|
|
212c5a64b9 | ||
|
|
039bc03734 | ||
|
|
128d32b635 | ||
|
|
12cd710753 | ||
|
|
f5b900e883 | ||
|
|
8df37ddd93 | ||
|
|
1b046fb4e9 | ||
|
|
4769eec200 | ||
|
|
da857bea87 | ||
|
|
cab4d1cd6a | ||
|
|
23d6dbe1c2 | ||
|
|
ed85b1d719 | ||
|
|
c6abaaea11 | ||
|
|
d0346f3a66 | ||
|
|
074b59337c | ||
|
|
f7bb64f48e | ||
|
|
ce05c0257a | ||
|
|
9782edaafd | ||
|
|
ff0bbe84df | ||
|
|
0ca8b53e62 | ||
|
|
9a4037812a | ||
|
|
3e9557df5d | ||
|
|
b44873c12d | ||
|
|
c7d5dbb4ca | ||
|
|
b1a093f7fe | ||
|
|
5503130f6f | ||
|
|
10a8bd2f78 | ||
|
|
d4a3af1188 | ||
|
|
253de76f08 | ||
|
|
cb252ca479 | ||
|
|
b83d40d81f | ||
|
|
dca1a64c47 | ||
|
|
db655840ef | ||
|
|
6b78964dbc | ||
|
|
d125541000 | ||
|
|
5f5464d9b4 | ||
|
|
7eec016f8b | ||
|
|
dac0cef031 | ||
|
|
aff660cba5 | ||
|
|
5064cfc14c | ||
|
|
52e9c85c0d | ||
|
|
7290937375 | ||
|
|
ab353c7fcf | ||
|
|
f66d47d961 | ||
|
|
b41a177dff | ||
|
|
277415ca78 | ||
|
|
549a88e91f | ||
|
|
223abcc058 | ||
|
|
8546d8d3c7 | ||
|
|
0ec2378a6c | ||
|
|
1d3eaad00e | ||
|
|
4d40f9cc73 | ||
|
|
4180bf53f7 | ||
|
|
70b5527ee6 | ||
|
|
da287098b2 | ||
|
|
f04c6cb9c2 | ||
|
|
aaa93fa739 | ||
|
|
07b1930b13 | ||
|
|
23351c359f | ||
|
|
e9d504f5c1 | ||
|
|
52a73339f4 | ||
|
|
738cd77190 | ||
|
|
db02cc849e | ||
|
|
d7e922a052 | ||
|
|
3f90738f87 | ||
|
|
03322a09a5 | ||
|
|
aaa5d4d1c6 | ||
|
|
0cad5cb6b1 | ||
|
|
dadd5bfba6 | ||
|
|
56c4d063ae | ||
|
|
ca0617f2ae | ||
|
|
37e9a773c6 | ||
|
|
0cc6abc953 | ||
|
|
d62da8a974 | ||
|
|
94bf4269f7 | ||
|
|
25e5760d41 | ||
|
|
06f39e1b88 | ||
|
|
428ecd7c49 | ||
|
|
116267a333 | ||
|
|
eaf4b1a8fb | ||
|
|
10ea07553d | ||
|
|
ed9ef77eae | ||
|
|
7ed86d19fa | ||
|
|
4e03334606 | ||
|
|
9079630cc5 | ||
|
|
52b94d0137 | ||
|
|
d54fdbb405 | ||
|
|
8ed64b91c2 | ||
|
|
a9a9e09f53 | ||
|
|
65c71bef51 | ||
|
|
bec65495dc | ||
|
|
993cc6f902 | ||
|
|
eeba7ca83e | ||
|
|
d21f74fb32 | ||
|
|
fe07ba5a00 | ||
|
|
5dbd8b0fb1 | ||
|
|
0ada215eeb | ||
|
|
aab5fe999c | ||
|
|
0b9d12659e | ||
|
|
b35dc3d099 | ||
|
|
e4d53b9f1c | ||
|
|
f5f4884382 | ||
|
|
08977f0e78 | ||
|
|
c44663d83f | ||
|
|
2064daf5fd | ||
|
|
45ef852182 | ||
|
|
fc91f74b85 | ||
|
|
f24c03a905 | ||
|
|
e75f387824 | ||
|
|
66befe4c16 | ||
|
|
eaadeeb9d3 | ||
|
|
4e811310d5 | ||
|
|
33018c95e6 | ||
|
|
71814aae36 | ||
|
|
6056ab6385 | ||
|
|
0acacb5a85 | ||
|
|
6f2c87018f | ||
|
|
07a43cf683 | ||
|
|
0c3f48da69 | ||
|
|
8000e662f5 | ||
|
|
9ea93394cc | ||
|
|
04652bb80a | ||
|
|
3d9e421291 | ||
|
|
d09aed86f6 | ||
|
|
3e37b7b58e | ||
|
|
a36ee8f466 | ||
|
|
0129da2b8a | ||
|
|
189bf0f600 | ||
|
|
e663abcc80 | ||
|
|
94d08d3e79 | ||
|
|
1311ce0a61 | ||
|
|
249fbc2679 | ||
|
|
c8571928d6 | ||
|
|
3d34b48a59 | ||
|
|
ed239ab163 | ||
|
|
b42935cf8e | ||
|
|
9a73445b87 | ||
|
|
b47042f53f | ||
|
|
26c4b8eb1f | ||
|
|
c6101b5ca7 | ||
|
|
474557d837 | ||
|
|
e1a350d663 | ||
|
|
3c434384a8 | ||
|
|
c6529ff58f | ||
|
|
c5ae7f89c8 | ||
|
|
06e04e9fbf | ||
|
|
a43c0409d8 | ||
|
|
dd84f02cdf | ||
|
|
058fcb96a8 | ||
|
|
de8fe47947 | ||
|
|
f83b2f40dd | ||
|
|
e0d5c8ef3d | ||
|
|
2f8dfa158c | ||
|
|
0805bbdd34 | ||
|
|
6bd5426dd7 | ||
|
|
70636b18d4 | ||
|
|
03b8f6183c | ||
|
|
7d693f415a | ||
|
|
c3c8c31c59 | ||
|
|
c4c8d7be26 | ||
|
|
026a55ffeb | ||
|
|
4c552869df | ||
|
|
8173ab3892 | ||
|
|
9767e520d0 | ||
|
|
119b1e800a | ||
|
|
48070a008c | ||
|
|
8de6fc2277 | ||
|
|
54302ca1a4 | ||
|
|
cd2fe8df35 | ||
|
|
ef5a920802 | ||
|
|
55d334afdb | ||
|
|
f02ad998b0 | ||
|
|
07cc380991 | ||
|
|
fad18cd9cc | ||
|
|
136a596132 | ||
|
|
6e2f6d2d0a | ||
|
|
7c2fd9f766 | ||
|
|
0a876ee833 | ||
|
|
991d15c049 | ||
|
|
bc61e0093c | ||
|
|
93901f99c1 | ||
|
|
2ad40c2f4b | ||
|
|
c4d211555b | ||
|
|
9654b273e8 | ||
|
|
00eebaaad3 | ||
|
|
5da81e0082 | ||
|
|
a829f3211f | ||
|
|
a1aefec7b7 | ||
|
|
45098ffe6d | ||
|
|
c8face9be8 | ||
|
|
4c0ecfe9d1 | ||
|
|
76a1fba2f3 | ||
|
|
7a8bbbd46a | ||
|
|
77f1922497 | ||
|
|
e0aa991fa9 | ||
|
|
9b8827b5d4 | ||
|
|
b06d3a975b | ||
|
|
fde685aa93 | ||
|
|
b66543e858 | ||
|
|
63b8883d67 | ||
|
|
dbde302009 | ||
|
|
3375d7e96a | ||
|
|
99201c48e0 | ||
|
|
9bec092fd1 | ||
|
|
a85da213f3 | ||
|
|
37fe518a58 | ||
|
|
d945cc3509 | ||
|
|
2b0c3cd6e0 | ||
|
|
78e4bf51c4 | ||
|
|
8b1f5daa69 | ||
|
|
a133cbe98f | ||
|
|
51fc4cdbdb | ||
|
|
57d0aac4b7 | ||
|
|
b79721a12d | ||
|
|
e7b8a776ce | ||
|
|
e84522140f | ||
|
|
e644ccc3b3 | ||
|
|
5d1292bd6a | ||
|
|
6694314201 | ||
|
|
d2b3edacdf | ||
|
|
10126dff3c | ||
|
|
e1834e69bf | ||
|
|
54614f0173 | ||
|
|
1bb5f7d1d6 | ||
|
|
cd22e438c1 | ||
|
|
a709f7f1fc | ||
|
|
9395d2b7a1 | ||
|
|
3385008a7f | ||
|
|
dabbdeb19f | ||
|
|
0329e72911 | ||
|
|
3462af1f7c | ||
|
|
e749b09f73 | ||
|
|
710be7e663 | ||
|
|
7e97e3de77 | ||
|
|
1661aba86b | ||
|
|
c55ce8db39 | ||
|
|
7f9c01eb84 | ||
|
|
5a17cb8158 | ||
|
|
8408de7462 | ||
|
|
c1d0850744 | ||
|
|
c2f2ab1e3c | ||
|
|
b330c0f5f4 | ||
|
|
77dd534c16 | ||
|
|
9dd2f63cea | ||
|
|
80da8b86e6 | ||
|
|
0a5a51bf32 | ||
|
|
d5a04416c5 | ||
|
|
e915ac4f9d | ||
|
|
88a4689002 | ||
|
|
e227b41fd7 | ||
|
|
89bea08878 | ||
|
|
c92322cfae | ||
|
|
2c68f22196 | ||
|
|
ca3340cbb5 | ||
|
|
ccfa571fc8 | ||
|
|
6d8a8e2a96 | ||
|
|
35340893dd | ||
|
|
e60cd36aed | ||
|
|
c043a46d7e | ||
|
|
6b5fb56659 | ||
|
|
7bb81b159f | ||
|
|
a062912343 | ||
|
|
d460b44812 | ||
|
|
d52ff1256a | ||
|
|
ada2ee8b55 | ||
|
|
b049e7ca4f | ||
|
|
de6826d5f0 | ||
|
|
425d944692 | ||
|
|
fe536af7c6 | ||
|
|
cb3738280a | ||
|
|
9513a73f5c | ||
|
|
fd1a950bc3 | ||
|
|
a8a95e500c | ||
|
|
70efc141fe | ||
|
|
13943525c3 | ||
|
|
ca6b8f8fc6 | ||
|
|
0d91bdb03c | ||
|
|
27b758b4a0 | ||
|
|
5671e2c755 | ||
|
|
baed3e2f42 | ||
|
|
980780834b | ||
|
|
c196de5d7f | ||
|
|
5092e67aec | ||
|
|
240ff40f90 | ||
|
|
41057b29f4 | ||
|
|
8ebf9ad0d0 | ||
|
|
d24a13c9a8 | ||
|
|
631f12d81a | ||
|
|
1faee7cb7e | ||
|
|
e68d6fd0ba | ||
|
|
1d2e12d9be | ||
|
|
e0d697471b | ||
|
|
ff02d6f2fc | ||
|
|
40083c484c | ||
|
|
ee3ed4defb | ||
|
|
e12c633724 | ||
|
|
a0e5186601 | ||
|
|
6233382a0d | ||
|
|
2dab80f166 | ||
|
|
90e4872bed | ||
|
|
7ebcc369d2 | ||
|
|
b8dc6169e0 | ||
|
|
945069766d | ||
|
|
4e96ea1a00 | ||
|
|
30099c3b2a | ||
|
|
cc4239a96c | ||
|
|
3c2ea2d94a | ||
|
|
3bf5ae02eb | ||
|
|
4cfb50dc9e | ||
|
|
abf89380ae | ||
|
|
3fbb25eb00 | ||
|
|
63e52d8d69 | ||
|
|
18470e9b20 | ||
|
|
d7d97efce9 | ||
|
|
ae49bc015b | ||
|
|
73c10110b1 | ||
|
|
d0570b1f9a | ||
|
|
831f44817e | ||
|
|
c44cda2601 | ||
|
|
b842bfb1e3 | ||
|
|
a39db778ca | ||
|
|
65915158d7 | ||
|
|
811f107262 | ||
|
|
c70ac3ac8f | ||
|
|
5b4ee1e0cd | ||
|
|
ffde6a3702 | ||
|
|
62f3f8ee30 | ||
|
|
477b1f15e7 | ||
|
|
c162b90cfe | ||
|
|
1f1a7a2a43 | ||
|
|
78931c6763 | ||
|
|
04040e4da0 | ||
|
|
166a3353c1 | ||
|
|
96ff2b3e60 | ||
|
|
391ac323bf | ||
|
|
7c648bcc1f | ||
|
|
731b0ae562 | ||
|
|
5e54ba2094 | ||
|
|
33847a9122 | ||
|
|
6ac42b5082 | ||
|
|
d26d4aaf2b | ||
|
|
71983cdebc | ||
|
|
ec136938e7 | ||
|
|
d6a688d249 | ||
|
|
86f2eaf404 | ||
|
|
59cf93c597 | ||
|
|
8fb51244e9 | ||
|
|
299f0f2030 | ||
|
|
4e4045cf90 | ||
|
|
ea09ec711c | ||
|
|
ac5e2791ec | ||
|
|
0542fe1253 | ||
|
|
fae7406ac6 | ||
|
|
ca6acaeee7 | ||
|
|
8455e73121 | ||
|
|
34d1091965 | ||
|
|
3cf2332049 | ||
|
|
1296fc9c28 | ||
|
|
339af6c9b5 | ||
|
|
12f2d868d1 | ||
|
|
ae67b7efe0 | ||
|
|
b13274d47d | ||
|
|
b7374a062a | ||
|
|
33f1a4553a | ||
|
|
ca7092adcb | ||
|
|
b48505711d | ||
|
|
7f1b8e30e7 | ||
|
|
3c12c6fa2c | ||
|
|
d60f360160 | ||
|
|
ee2a10ba22 | ||
|
|
09db961365 | ||
|
|
f4c5feac1b | ||
|
|
f0e047f783 | ||
|
|
d710185059 | ||
|
|
00026b9b8e | ||
|
|
2c79fd46c4 | ||
|
|
1971565b89 | ||
|
|
e5ce795793 | ||
|
|
c23c79bdb8 | ||
|
|
6cdbf22566 | ||
|
|
803cd0e069 | ||
|
|
3ecab328bf | ||
|
|
2fd388b732 | ||
|
|
0c2c573e9a | ||
|
|
e1f45583bb | ||
|
|
a795472a78 | ||
|
|
12e669820f | ||
|
|
5ec5ad8e02 | ||
|
|
87fe8d4523 | ||
|
|
0667fa4c56 | ||
|
|
4bfb9b15cf | ||
|
|
ab76537063 | ||
|
|
d88cc65c55 | ||
|
|
449fa423b8 | ||
|
|
759b24ff12 | ||
|
|
388ddf7259 | ||
|
|
2a23ee716d | ||
|
|
a53587514b | ||
|
|
f0e2e694aa | ||
|
|
c8cf32602f | ||
|
|
e525afefe5 | ||
|
|
633ab399f6 | ||
|
|
53d694d2f1 | ||
|
|
7bf99f7a74 | ||
|
|
8580e8378d | ||
|
|
b589562648 | ||
|
|
740ab355e2 | ||
|
|
aa463e24fc | ||
|
|
3fd08db925 | ||
|
|
9aa3fa776b | ||
|
|
7162a4879c | ||
|
|
7daec750da | ||
|
|
2bcb5bcd76 | ||
|
|
f7b30401bb | ||
|
|
6791cc05ba | ||
|
|
de43aba82f | ||
|
|
b99ca74f88 | ||
|
|
9e35fc8c04 | ||
|
|
88de2562c6 | ||
|
|
ddb311dbc9 | ||
|
|
f88b2072f0 | ||
|
|
956c35fc90 | ||
|
|
a72b713f44 | ||
|
|
07c9450e20 | ||
|
|
53a46e880a | ||
|
|
9050283254 | ||
|
|
4672866f5b | ||
|
|
860932f659 | ||
|
|
fdb532c570 | ||
|
|
cb19969af3 | ||
|
|
c2d4c13835 | ||
|
|
edd650bda2 | ||
|
|
fd1133a1d7 | ||
|
|
5b564c2081 | ||
|
|
b7551b79a1 | ||
|
|
3a1353c159 | ||
|
|
c469d76320 | ||
|
|
4b8ab3090f | ||
|
|
68fb0d9163 | ||
|
|
37bc1a4b6f | ||
|
|
e4927a8c73 | ||
|
|
30139564d8 | ||
|
|
2fa06f6b70 | ||
|
|
acd3ab155c | ||
|
|
0e6a057b38 | ||
|
|
936074a4cb | ||
|
|
4d9e313266 | ||
|
|
0c0e995813 | ||
|
|
fff89e6870 | ||
|
|
cc894c0ab4 | ||
|
|
cf6d138533 | ||
|
|
6b2ed39932 | ||
|
|
421338ca7d | ||
|
|
ccabb9a0f8 | ||
|
|
8d66ef06a2 | ||
|
|
c611db5d49 | ||
|
|
a360aa3aea | ||
|
|
c43746297c | ||
|
|
07059287c0 | ||
|
|
26c18786f4 | ||
|
|
ec11232dba | ||
|
|
c1a7aeaa91 | ||
|
|
e2508df7e6 | ||
|
|
f8a71710fb | ||
|
|
286dc69ff7 | ||
|
|
00144abe61 | ||
|
|
3867b6a0b7 | ||
|
|
c4276aa97c | ||
|
|
552e9fd4d1 | ||
|
|
83d8041689 | ||
|
|
ad11ec03f8 | ||
|
|
24b873588d | ||
|
|
815c0b86ef | ||
|
|
b42f527122 | ||
|
|
5a0e2acee9 | ||
|
|
de504671eb | ||
|
|
b0ff3e3a03 | ||
|
|
b2e41f9e62 | ||
|
|
b060210385 | ||
|
|
aaa8d4945a | ||
|
|
4fc668e809 | ||
|
|
1a833536b0 | ||
|
|
85bf778871 | ||
|
|
a0e5e5e395 | ||
|
|
fc14b13a63 | ||
|
|
807da47b7e | ||
|
|
7020464b7a | ||
|
|
f56c6e39ea | ||
|
|
c29834a4af | ||
|
|
c01e6a4e89 | ||
|
|
5ef3a49d68 | ||
|
|
fe01d36a92 | ||
|
|
33f5bf236d | ||
|
|
f4fc7e3a19 | ||
|
|
c6af51da12 | ||
|
|
44e3845b0f | ||
|
|
9e1cd629dd | ||
|
|
b08f77308b | ||
|
|
47c81db72a | ||
|
|
90fa6b80bc | ||
|
|
51bfb724f4 | ||
|
|
06728efc41 | ||
|
|
6bdde325c8 | ||
|
|
bfa23ca8e4 | ||
|
|
81d9eb2d59 | ||
|
|
0620b4537c | ||
|
|
73f2880be2 | ||
|
|
64946413c9 | ||
|
|
298f7c48fd | ||
|
|
e68414f036 | ||
|
|
09343da68f | ||
|
|
0b11ff4cc6 | ||
|
|
5f3bc36082 | ||
|
|
e4d6f4841e | ||
|
|
4a2d255c13 | ||
|
|
9c0f83189b | ||
|
|
a6dc286aa2 | ||
|
|
2a4e9c4b3c | ||
|
|
8dd14c0b2b | ||
|
|
f3d57eb2e0 | ||
|
|
0ce55f53af | ||
|
|
bb352791de | ||
|
|
e1f948e013 | ||
|
|
f5d0261ccb | ||
|
|
b31c023c7b | ||
|
|
26dec59499 | ||
|
|
2e13a6a37a | ||
|
|
8e2f697c66 | ||
|
|
5f8386580f | ||
|
|
28de6a4bd4 | ||
|
|
8f947f7b13 | ||
|
|
da6e80dad1 | ||
|
|
badb79934a | ||
|
|
ad3ce71a45 | ||
|
|
bfa518009f | ||
|
|
c09f6e5e3b | ||
|
|
0b5980dc4c | ||
|
|
d2523b8a1f | ||
|
|
5fbb6783ca | ||
|
|
b5558c7a53 | ||
|
|
c59fcdc27d | ||
|
|
e3530d45db | ||
|
|
f93931d803 | ||
|
|
ad2d693003 | ||
|
|
b25f040aad | ||
|
|
602a6f7074 | ||
|
|
65f1c93e16 | ||
|
|
08d68f4645 | ||
|
|
f702eccae6 | ||
|
|
2432d2109b | ||
|
|
cb9df732d3 | ||
|
|
76a57384b1 | ||
|
|
b7b3bfa849 | ||
|
|
18dadc1cd4 | ||
|
|
4acbff5f37 | ||
|
|
b5af9a36c8 | ||
|
|
ca6bbbe3c0 | ||
|
|
1662426979 | ||
|
|
61791e17d2 | ||
|
|
b9da3089cf | ||
|
|
b396de2029 | ||
|
|
fdff660ab3 | ||
|
|
67ae283c5d | ||
|
|
e966546746 | ||
|
|
bb70684353 | ||
|
|
8f495778c0 | ||
|
|
3375e59ad2 | ||
|
|
4b78685af9 | ||
|
|
50b0971e18 | ||
|
|
4924227403 | ||
|
|
06bd950d54 | ||
|
|
99574d054d | ||
|
|
0fcd32efd1 | ||
|
|
50a45f9ea9 | ||
|
|
ca78fc5063 | ||
|
|
b5de2754d8 | ||
|
|
df3e9bda48 | ||
|
|
e7ce2a5f4f | ||
|
|
6968ac7747 | ||
|
|
b69419fcbe | ||
|
|
916bf6ee98 | ||
|
|
0e17fcc417 | ||
|
|
b17b32804c | ||
|
|
0446f17dce | ||
|
|
8bdb955e8a | ||
|
|
8b7c40c4d4 | ||
|
|
eab93308cb | ||
|
|
86bfb12bff | ||
|
|
51092d044b | ||
|
|
c564feb569 | ||
|
|
dd06dd4b38 | ||
|
|
bd486b8e57 | ||
|
|
c08dc9e0b6 | ||
|
|
fde9df4dde | ||
|
|
76faf341a9 | ||
|
|
a92fbe4355 | ||
|
|
657c8db65a | ||
|
|
8d80afcb45 | ||
|
|
f2130a5a34 | ||
|
|
b3f27d980e | ||
|
|
7face5689e | ||
|
|
63a7c4bee4 | ||
|
|
48ec5b046c | ||
|
|
172730220f | ||
|
|
4cfe30b6ff | ||
|
|
15c1bfc0d2 | ||
|
|
59b61dd70d | ||
|
|
97501a3e34 | ||
|
|
2a42462bc8 | ||
|
|
b11b8edb9a | ||
|
|
cab4dd3a75 | ||
|
|
fb5ce05189 | ||
|
|
a3edcc8fd9 | ||
|
|
f5d0f77abf | ||
|
|
ff36ab2728 | ||
|
|
8059e59ab9 | ||
|
|
22df08cad2 | ||
|
|
e523a49c32 | ||
|
|
674956f215 | ||
|
|
5ac43f10d0 | ||
|
|
d7e378bd80 | ||
|
|
e3076134ed | ||
|
|
448620dc73 | ||
|
|
0255b04d5a | ||
|
|
4606c84223 | ||
|
|
4050fae6af | ||
|
|
851dfd464f | ||
|
|
bd63e738b4 | ||
|
|
1aa03dac43 | ||
|
|
247cf46b5a | ||
|
|
53e3e9f1a8 | ||
|
|
16f9eaee01 | ||
|
|
3006134d9a | ||
|
|
c34e3d62eb | ||
|
|
fe6e26c2fc | ||
|
|
3fb66f9101 | ||
|
|
fa5680730c | ||
|
|
f4adc7902c | ||
|
|
774192a499 | ||
|
|
e7be727c70 | ||
|
|
ee07559ffb | ||
|
|
577c707782 | ||
|
|
6b8cdea8ac | ||
|
|
24c3c22616 | ||
|
|
3c19a8c560 | ||
|
|
06a87a9398 | ||
|
|
674a0aca99 | ||
|
|
83ff6f7200 | ||
|
|
d69078cdc6 | ||
|
|
f74290cd64 | ||
|
|
8f3b900115 | ||
|
|
54f27cfddd | ||
|
|
dfe34b93d0 | ||
|
|
92dc7a32a0 | ||
|
|
d3507fb5dc | ||
|
|
d69845916c | ||
|
|
a485dec4e1 | ||
|
|
8eacfa5fd3 | ||
|
|
f51a819b6a | ||
|
|
17dfffb596 | ||
|
|
f7ddad04c1 | ||
|
|
6f51621162 | ||
|
|
afc468d7fa | ||
|
|
42dac4a844 | ||
|
|
a31768716e | ||
|
|
7a33b045ee | ||
|
|
e4c8c769b3 | ||
|
|
8e43b5cd4d | ||
|
|
fa01f37413 | ||
|
|
665dafcec4 | ||
|
|
aaa8291090 | ||
|
|
a99a1edcfd | ||
|
|
e82c618570 |
3290 changed files with 333728 additions and 106548 deletions
|
|
@ -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
5
.gitattributes
vendored
|
|
@ -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
11
.gitignore
vendored
|
|
@ -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
4
.gitmodules
vendored
|
|
@ -1,4 +0,0 @@
|
|||
[submodule "exts/dbcsr"]
|
||||
path = exts/dbcsr
|
||||
url = https://github.com/cp2k/dbcsr
|
||||
branch = master
|
||||
760
CMakeLists.txt
760
CMakeLists.txt
File diff suppressed because it is too large
Load diff
73
CODEOWNERS
Normal file
73
CODEOWNERS
Normal 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
1
CONTRIBUTING.md
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
./docs/development/onboarding.md
|
||||
672
INSTALL.md
672
INSTALL.md
|
|
@ -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
576
Makefile
|
|
@ -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
|
||||
36
README.md
36
README.md
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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++
|
||||
|
|
@ -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++
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
||||
|
|
@ -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)
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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)) $<
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
457
benchmarks/CI/H2O-128_md_elpa.inp
Normal file
457
benchmarks/CI/H2O-128_md_elpa.inp
Normal 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
|
||||
169
benchmarks/CI/H2O-32_md_elpa.inp
Normal file
169
benchmarks/CI/H2O-32_md_elpa.inp
Normal 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
|
||||
1609
benchmarks/CI/H2O-512_md_elpa.inp
Normal file
1609
benchmarks/CI/H2O-512_md_elpa.inp
Normal file
File diff suppressed because it is too large
Load diff
265
benchmarks/CI/H2O-64_md.inp
Normal file
265
benchmarks/CI/H2O-64_md.inp
Normal 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
|
||||
265
benchmarks/CI/H2O-64_md_elpa.inp
Normal file
265
benchmarks/CI/H2O-64_md_elpa.inp
Normal 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
|
||||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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 |
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
75
benchmarks/QS_reference/w64ccGRB.inp
Normal file
75
benchmarks/QS_reference/w64ccGRB.inp
Normal 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
|
||||
189
benchmarks/QS_reference/w64ccGRB.ref
Normal file
189
benchmarks/QS_reference/w64ccGRB.ref
Normal 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
|
||||
-------------------------------------------------------------------------------
|
||||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
151
ci/cscs_daint_spack_psmp_h100.yaml
Normal file
151
ci/cscs_daint_spack_psmp_h100.yaml
Normal 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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -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 !
|
||||
#!-------------------------------------------------------------------------------------------------!
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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 !
|
||||
#!-------------------------------------------------------------------------------------------------!
|
||||
|
|
|
|||
44
cmake/GenerateCp2kBuildInfo.cmake
Normal file
44
cmake/GenerateCp2kBuildInfo.cmake
Normal 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()
|
||||
|
|
@ -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()
|
||||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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 !
|
||||
#!-------------------------------------------------------------------------------------------------!
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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 !
|
||||
#!-------------------------------------------------------------------------------------------------!
|
||||
|
|
|
|||
|
|
@ -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})
|
||||
|
|
|
|||
37
cmake/modules/FindLibFCI.cmake
Normal file
37
cmake/modules/FindLibFCI.cmake
Normal 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)
|
||||
39
cmake/modules/FindLibGint.cmake
Normal file
39
cmake/modules/FindLibGint.cmake
Normal 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)
|
||||
|
|
@ -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 !
|
||||
#!-------------------------------------------------------------------------------------------------!
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
@ -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)
|
||||
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
73
cmake/modules/FindMiMiC.cmake
Normal file
73
cmake/modules/FindMiMiC.cmake
Normal 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)
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
31
cmake/modules/FindNccl.cmake
Normal file
31
cmake/modules/FindNccl.cmake
Normal 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)
|
||||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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 !
|
||||
#!-------------------------------------------------------------------------------------------------!
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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 !
|
||||
#!-------------------------------------------------------------------------------------------------!
|
||||
|
|
|
|||
|
|
@ -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 !
|
||||
#!-------------------------------------------------------------------------------------------------!
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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.
Binary file not shown.
BIN
data/Allegro/waterscan-allegro0.8.0.nequip.pth
Normal file
BIN
data/Allegro/waterscan-allegro0.8.0.nequip.pth
Normal file
Binary file not shown.
1388
data/BASIS_AUG_MOLOPT
Normal file
1388
data/BASIS_AUG_MOLOPT
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -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
|
||||
|
|
|
|||
11956
data/BASIS_MOLOPT_UZH
11956
data/BASIS_MOLOPT_UZH
File diff suppressed because it is too large
Load diff
1
data/BASIS_MOLOPT_UZH
Symbolic link
1
data/BASIS_MOLOPT_UZH
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
BASIS_MOLOPT_UZH_2026.2
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue