Skip to content

Commit 25a2239

Browse files
authored
Add the use of 'cusolvermp' or 'elpa' methods to compile ABACUS GPU-LCAO
1 parent 7f8ddce commit 25a2239

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

toolchain/README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,35 @@ cmake -B $BUILD_DIR -DCMAKE_INSTALL_PREFIX=$PREFIX \
269269

270270
Notice: You CANNOT use `icpx` compiler for GPU version of ABACUS for now, see discussion here [#2906](https://github.com/deepmodeling/abacus-develop/issues/2906) and [#4976](https://github.com/deepmodeling/abacus-develop/issues/4976)
271271

272-
If you wants to use ABACUS GPU-LCAO by `cusolvermp` or `elpa`, please contact the coresponding developer, toolchain do not fully support them now.
272+
If you wants to use ABACUS GPU-LCAO by "cusolvermp" or "elpa", please compile according to the following usage:
273+
274+
Firstly, in cmake, it is necessary to add `-DUSE_CUDA=ON`, which is necessary for compiling NVIDIA GPUs.
275+
1. For the elpa method, add
276+
```shell
277+
--enable-cuda
278+
--gpu-ver=GPU name
279+
export CUDA-PATH=/path/to/CUDA
280+
```
281+
to the `toolchain_gnu.sh`, and then follow the normal step to install the dependencies using `./toolchain_gnu.sh`.
282+
Afterwards, add the link files corresponding to
283+
```shell
284+
-DUSE_ELPA=ON \
285+
-DELPA_LINK-NLIBRARIES=/path/to/lib
286+
```
287+
in the `build_abacus_gnu.sh` file, just build the abacus executable program by compiling it with `./build_abacus_gnu.sh`.
288+
289+
2. For the cusolvermp method, toolchain_gnu.sh does not need to be changed, just follow it directly install dependencies using `./toolchain_gnu.sh`, and then add
290+
```shell
291+
-DUSE_CUSOLVERMP=ON \
292+
-D CAL_CUSOLVERMP_PATH=/path/to/math.libs/1x.x/target/x86_64-linux/lib
293+
```
294+
to the `build.abacus_gnu.sh` file. At the same time, add the following three items to the environment:
295+
```shell
296+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/comm_libs/1x.x/hpcx/hpcx-x.xx/ucc/lib
297+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/comm_libs/1x.x/hpcx/hpcx-x.xx/ucx/lib
298+
export CPATH=$CPATH:/path/to/math_libs/1x.x/targets/x86_64-linux/include
299+
```
300+
Just enough to build the abacus executable program by compiling it with `./build_abacus_gnu.sh`.
273301

274302
### Shell problem
275303

@@ -325,4 +353,4 @@ of each packages, which may let the installation more fiexible.
325353

326354
## More
327355

328-
More infomation can be read from `Details.md`.
356+
More infomation can be read from `Details.md`.

0 commit comments

Comments
 (0)