You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: toolchain/README.md
+72-47Lines changed: 72 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# The ABACUS Toolchain
2
2
3
-
Version 2025.1
3
+
Version 2025.2
4
4
5
5
## Main Developer
6
6
@@ -33,7 +33,6 @@ and give setup files that you can use to compile ABACUS.
33
33
-[ ] Support a JSON or YAML configuration file for toolchain, which can be easily modified by users.
34
34
-[ ] A better README and Detail markdown file.
35
35
-[ ] Automatic installation of [DEEPMD](https://github.com/deepmodeling/deepmd-kit).
36
-
-[ ] Better compliation method for ABACUS-DEEPMD and ABACUS-DEEPKS.
37
36
-[ ] Modulefile generation scripts.
38
37
39
38
@@ -44,17 +43,17 @@ which will use scripts in *scripts* directory
44
43
to compile install dependencies of ABACUS.
45
44
It can be directly used, but not recommended.
46
45
47
-
There are also well-modified script to run *install_abacus_toolchain.sh* for `gnu-openblas`and `intel-mkl` toolchains dependencies.
46
+
There are also well-modified script to run *install_abacus_toolchain.sh* for `gnu` (gcc-openblas), `intel` (intel-mkl-mpi-compiler), `gcc-aocl`and `aocc-aocl` toolchains dependencies.
48
47
49
48
```shell
50
49
# for gnu-openblas
51
50
> ./toolchain_gnu.sh
52
51
# for intel-mkl
53
52
> ./toolchain_intel.sh
54
-
# for amd aocc-aocl
55
-
> ./toolchain_amd.sh
56
-
# for intel-mkl-mpich
57
-
> ./toolchain_intel-mpich.sh
53
+
# for AMD gcc-aocl
54
+
> ./toolchain_gcc-aocl.sh
55
+
# for AMD aocc-aocl
56
+
> ./toolchain_aocc-aocl.sh
58
57
```
59
58
60
59
It is recommended to run one of them first to get a fast installation of ABACUS under certain environments.
@@ -66,13 +65,16 @@ If you are using Intel environments via Intel-OneAPI: please note:
66
65
4. Users can manually specify `--with-ifx=no` in `toolchain*.sh` to use `ifort` while keep other compiler to new version.
67
66
5. More information is in the later part of this README.
68
67
69
-
**Notice: You GCC version should be no lower than 5 !!!, larger than 7.3.0 is recommended**
68
+
If you are using AMD AOCL and AOCC, please note:
70
69
71
-
**Notice: You SHOULD `source` or `module load` related environments before use toolchain method for installation, espacially for `gcc` or `intel-oneAPI` !!!! for example, `module load mkl mpi icc compiler`**
70
+
71
+
**Notice: You GCC version should be no lower than 5 !!!. The toolchain will check it, and gcc with version larger than 7.3.0 is recommended.**
72
+
73
+
**Notice: You SHOULD `source` or `module load` related environments before use toolchain method for installation, especially for `intel`, `gcc-aocl` or `aocc-aocl` toolchain! For example, `module load mkl mpi icc compiler` for loading oneapi envs.**
72
74
73
75
**Notice: You SHOULD keep your environments systematic, for example, you CANNOT load `intel-OneAPI` environments while use gcc toolchain !!!**
74
76
75
-
**Notice: If your server system already have libraries like `cmake`, `openmpi`, please change related setting in `toolchain*.sh` like `--with-cmake=system`**
77
+
**Notice: If your server system already have libraries like `cmake`, `openmpi`, please change related setting in `toolchain*.sh` like `--with-cmake=system`, note that the environments of these system package will not be added into install/setup file**
76
78
77
79
78
80
All packages will be downloaded from [cp2k-static/download](https://www.cp2k.org/static/downloads). by `wget` , and will be detailedly compiled and installed in `install` directory by toolchain scripts, despite of:
@@ -82,7 +84,7 @@ All packages will be downloaded from [cp2k-static/download](https://www.cp2k.org
82
84
-`LibRI` which will be downloaded from [LibRI](https://github.com/abacusmodeling/LibRI)
83
85
-`LibCOMM` which will be downloaded from [LibComm](https://github.com/abacusmodeling/LibComm)
84
86
-`RapidJSON` which will be downloaded from [RapidJSON](https://github.com/Tencent/rapidjson)
85
-
Notice: These packages will be downloaded by `wget` from `github.com`, which is hard to be done in Chinese Internet. You may need to use offline installation method.
87
+
Notice: These packages will be downloaded by `wget` from `codeload.github.com`, which bypass the difficulty of Chinese Internet in some extent. If any downloading problem occurs, you may need to use offline installation method.
86
88
87
89
Instead of github.com, we offer other package station, you can use it by:
88
90
```shell
@@ -98,7 +100,7 @@ The above station will be updated handly but one should notice that the version
98
100
If one want to install ABACUS by toolchain OFFLINE,
99
101
one can manually download all the packages from [cp2k-static/download](https://www.cp2k.org/static/downloads) or official website
100
102
and put them in *build* directory by formatted name
101
-
like *fftw-3.3.10.tar.gz*, or *openmpi-5.0.6.tar.bz2*,
103
+
like *fftw-3.3.10.tar.gz*, or *openmpi-5.0.7.tar.bz2*,
102
104
then run this toolchain.
103
105
All package will be detected and installed automatically.
104
106
Also, one can install parts of packages OFFLINE and parts of packages ONLINE
@@ -113,17 +115,17 @@ just by using this toolchain
113
115
114
116
The needed dependencies version default:
115
117
116
-
-`cmake` 3.31.2
118
+
-`cmake` 3.31.7
117
119
-`gcc` 13.2.0 (which will always NOT be installed, But use system)
118
-
-`OpenMPI` 5.0.6 (Version 5 OpenMPI is good but will have compability problem, user can manually downarade to Version 4 in toolchain scripts)
120
+
-`OpenMPI` 5.0.7 (Version 5 OpenMPI is good but will have compability problem, user can manually downarade to Version 4 in toolchain scripts by specify `--with-openmpi4`)
119
121
-`MPICH` 4.3.0
120
-
-`OpenBLAS` 0.3.28 (Intel toolchain need `get_vars.sh` tool from it)
121
-
-`ScaLAPACK` 2.2.1 (a developing version)
122
+
-`OpenBLAS` 0.3.29 (Intel toolchain need `get_vars.sh` tool from it)
123
+
-`ScaLAPACK` 2.2.2
122
124
-`FFTW` 3.3.10
123
125
-`LibXC` 7.0.0
124
-
-`ELPA` 2025.01.001
125
-
-`CEREAL`1.3.2
126
-
-`RapidJSON`1.1.0
126
+
-`ELPA` 2025.01.001 (may not be conpatiable for gpu-ver)
127
+
-`CEREAL`master (for oneapi compatibility)
128
+
-`RapidJSON`master (for oneapi compatibility)
127
129
And:
128
130
- Intel-oneAPI need user or server manager to manually install from Intel.
Dependencies below are optional, which is NOT installed by default:
135
-
136
137
-`LibTorch` 2.1.2
137
138
-`Libnpy` 1.0.1
138
-
-`LibRI` 0.2.0
139
-
-`LibComm`0.1.1
139
+
-`LibRI` 0.2.1.0
140
+
-`LibComm`master (for openmpi compatibility)
140
141
141
142
Users can install them by using `--with-*=install` in toolchain*.sh, which is `no` in default. Also, user can specify the absolute path of the package by `--with-*=path/to/package` in toolchain*.sh to allow toolchain to use the package.
142
143
> Notice: LibTorch always suffer from GLIBC_VERSION problem, if you encounter this, please downgrade LibTorch version to 1.12.1 in scripts/stage4/install_torch.sh
143
144
>
144
145
> Notice: LibRI, LibComm, Rapidjson and Libnpy is on actively development, you should check-out the package version when using this toolchain.
145
146
146
147
Users can easily compile and install dependencies of ABACUS
147
-
by running these scripts after loading `gcc` or `intel-mkl-mpi`
148
-
environment.
148
+
by running these scripts after loading related environment.
149
149
150
150
The toolchain installation process can be interrupted at anytime.
151
-
just re-run *toolchain_\*.sh*, toolchain itself may fix it. If you encouter some problem, you can always remove some package in the interrupted points and re-run the toolchain.
151
+
just re-run *toolchain_\*.sh*, toolchain itself may fix it. If you encouter some problem like file corrupted, you can always remove some package in the interrupted points and re-run the toolchain.
152
152
153
153
Some useful options:
154
154
-`--dry-run`: just run the main install scripts for environment setting, without any package downloading or installation.
@@ -157,22 +157,25 @@ Some useful options:
157
157
If compliation is successful, a message will be shown like this:
158
158
159
159
```shell
160
-
> Done!
161
-
> To use the installed tools and libraries and ABACUS version
162
-
> compiled with it you will first need to execute at the prompt:
163
-
>source ./install/setup
164
-
> To build ABACUS by gnu-toolchain, just use:
165
-
> ./build_abacus_gnu.sh
166
-
> To build ABACUS by intel-toolchain, just use:
167
-
> ./build_abacus_intel.sh
168
-
> To build ABACUS by amd-toolchain in gcc-aocl, just use:
169
-
> ./build_abacus_amd.sh
170
-
> or you can modify the builder scripts to suit your needs.
To use the installed tools and libraries and ABACUS version
163
+
compiled with it you will first need to execute at the prompt:
164
+
source${SETUPFILE}
165
+
To build ABACUS by gnu-toolchain, just use:
166
+
./build_abacus_gnu.sh
167
+
To build ABACUS by intel-toolchain, just use:
168
+
./build_abacus_intel.sh
169
+
To build ABACUS by amd-toolchain in gcc-aocl, just use:
170
+
./build_abacus_gnu-aocl.sh
171
+
To build ABACUS by amd-toolchain in aocc-aocl, just use:
172
+
./build_abacus_aocc-aocl.sh
173
+
or you can modify the builder scripts to suit your needs.
171
174
```
172
175
173
176
You can run *build_abacus_gnu.sh* or *build_abacus_intel.sh* to build ABACUS
174
-
by gnu-toolchain or intel-toolchain respectively, the builder scripts will
175
-
automatically locate the environment and compile ABACUS.
177
+
by gnu-toolchain or intel-toolchain respectively, same for the `gcc-aocl` and `aocc-aocl` toolchain.
178
+
Then, the builder scripts will automatically locate the environment and compile ABACUS.
176
179
You can manually change the builder scripts to suit your needs.
177
180
The builder scripts will generate `abacus_env.sh` for source
178
181
@@ -240,6 +243,28 @@ then just build the abacus executable program by compiling it with `./build_abac
240
243
241
244
The ELPA method need more parameter setting, but it doesn't seem to be affected by the CUDA toolkits version, and it is no need to manually install and package.
242
245
246
+
Note: ELPA-2025.01.001 may have problem in nvidia-GPU compilation on some V100-GPU with AMD-CPU machine, error message:
247
+
```bash
248
+
1872 | static __forceinline void CONCAT_8ARGS(hh_trafo_complex_kernel_,ROW_LENGTH,_,SIMD_SET,_,BLOCK,hv_,WORD_LENGTH) (DATA_TYPE_PTR q, DATA_TYPE_PTR hh, int nb, int ldq
249
+
| ^~~~~~~~~~~~~~~~~~~~~~~~
250
+
../src/elpa2/kernels/complex_128bit_256bit_512bit_BLOCK_template.c:51:47: note: in definition of macro 'CONCAT2_8ARGS'
251
+
51 |#define CONCAT2_8ARGS(a, b, c, d, e, f, g, h) a ## b ## c ## d ## e ## f ## g ## h
252
+
| ^
253
+
../src/elpa2/kernels/complex_128bit_256bit_512bit_BLOCK_template.c:1872:27: note: in expansion of macro 'CONCAT_8ARGS'
254
+
1872 | static __forceinline void CONCAT_8ARGS(hh_trafo_complex_kernel_,ROW_LENGTH,_,SIMD_SET,_,BLOCK,hv_,WORD_LENGTH) (DATA_TYPE_PTR q, DATA_TYPE_PTR hh, int nb, int ldq
../src/GPU/CUDA/./cudaFunctions_template.h(942): error: identifier "creal" is undefined
259
+
double alpha_real = creal(alpha);
260
+
^
261
+
262
+
../src/GPU/CUDA/./cudaFunctions_template.h(960): error: identifier "creal" is undefined
263
+
float alpha_real = creal(alpha);
264
+
```
265
+
266
+
And you may need to change ELPA version to 2024.05.001, edit `toolchain/scripts/stage3/install_elpa.sh` to do it.
267
+
243
268
2. For the cusolvermp method, toolchain_*.sh does not need to be changed, just follow it directly install dependencies using `./toolchain_*.sh`, and then add
244
269
```shell
245
270
-DUSE_CUDA=ON \
@@ -268,11 +293,8 @@ After compiling, you can specify `device GPU` in INPUT file to use GPU version o
268
293
269
294
#### OneAPI 2025.0 problem
270
295
271
-
Generally, OneAPI 2025.0 can be useful to compile basic function of ABACUS, but one will encounter compatible problem related to something. Here is the treatment
272
-
- related to rapidjson:
273
-
-- Not to use rapidjson in your toolchain
274
-
-- or use the master branch of [RapidJSON](https://github.com/Tencent/rapidjson)
275
-
- related to LibRI: not to use LibRI or downgrade your OneAPI.
296
+
Generally, OneAPI 2025.0 can be useful to compile basic functionof ABACUS, but one will encounter compatible problem related to something.
297
+
- related to LibRI: refer to [#6190](https://github.com/deepmodeling/abacus-develop/issues/6190), it is recommended not to use LibRI or downgrade your OneAPI now.
276
298
277
299
#### ELPA problem via Intel-oneAPI toolchain in AMD server
278
300
@@ -301,19 +323,22 @@ And will not occur in Intel-MPI before 2021.10.0 (Intel-oneAPI before 2023.2.0)
301
323
302
324
More problem and possible solution can be accessed via [#2928](https://github.com/deepmodeling/abacus-develop/issues/2928)
303
325
326
+
#### gcc-MKL problem
327
+
328
+
You cannot use gcc as compiler while using MKL as math library forcompile ABACUS, there will be lots of errorin the lask linking step. See [#3198](https://github.com/deepmodeling/abacus-develop/issues/3198)
329
+
304
330
### AMD AOCC-AOCL problem
305
331
306
-
You cannot use AOCC to complie abacus now, see [#5982](https://github.com/deepmodeling/abacus-develop/issues/5982).
332
+
Use AOCC-AOCL to compile dependencies is permitted and usually get boosting in ABACUS efficiency. But you need to get rid of `flang`while compiling ELPA. Toolchain itself helps you make this `flang` shade in default of `aocc-aocl` toolchain, and you can manually use `flang` by setting `--with-flang=yes`in`toolchain_aocc-aocl.sh` to have a try, while toolchain helps you to bypass the possible errors in compiling ELPA with AOCC-AOCL, but the computing efficiency will be relatively lower compared to `gnu` or `gcc-aocl` toolchain.
307
333
308
-
However, use AOCC-AOCL to compile dependencies is permitted and usually get boosting in ABACUS effciency. But you need to get rid of `flang` while compling ELPA. Toolchain itself help you make this `flang` shade in default, and you can manully use `flang` by setting `--with-flang=yes` in `toolchain_amd.sh` to have a try.
334
+
The `gcc-aocl` toolchain will have no problem above for aocc-dependent aocl. However, the gcc-dependent aocl will have some package linking problem related to OpenMPI. Take it with caution.
309
335
310
-
Notice: ABACUS via GCC-AOCL in AOCC-AOCL toolchain have no application with DeePKS, DeePMD and LibRI.
311
336
312
337
### OpenMPI problem
313
338
314
339
#### in EXX and LibRI
315
340
316
-
- GCC toolchain with OpenMPI cannot compile LibComm v0.1.1 due to the different MPI variable type from MPICH and IntelMPI, see discussion here [#5033](https://github.com/deepmodeling/abacus-develop/issues/5033), you can try use a newest branch of LibComm by
341
+
- [Fixed in Toolchain 2025-02] GCC toolchain with OpenMPI cannot compile LibComm v0.1.1 due to the different MPI variable type from MPICH and IntelMPI, see discussion here [#5033](https://github.com/deepmodeling/abacus-develop/issues/5033), you can try use a newest branch of LibComm by
0 commit comments