Skip to content

Commit 330bc26

Browse files
authored
Docs: update instructions on installing abacus. (#943)
2 parents 6c8de34 + 74dd9b4 commit 330bc26

File tree

4 files changed

+37
-14
lines changed

4 files changed

+37
-14
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
########################################
22
# CMake build system
33
# This file is part of ABACUS
4-
cmake_minimum_required(VERSION 3.18)
4+
cmake_minimum_required(VERSION 3.16)
55
########################################
66

77
project(ABACUS
@@ -22,7 +22,7 @@ option(BUILD_TESTING "Build ABACUS unit tests" OFF)
2222
option(GENERATE_TEST_REPORTS "Enable test report generation" OFF)
2323

2424
set(ABACUS_BIN_NAME abacus)
25-
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/modules)
25+
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/modules)
2626
set(ABACUS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/source)
2727
set(ABACUS_TEST_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tests)
2828
set(ABACUS_BIN_PATH ${CMAKE_CURRENT_BINARY_DIR}/${ABACUS_BIN_NAME})
@@ -85,6 +85,7 @@ else() # CUDA not found
8585
endif()
8686

8787
if(USE_CUDA OR USE_CUSOLVER_LCAO)
88+
cmake_minimum_required(VERSION 3.18) # required by `CUDA_ARCHITECTURES` below
8889
set(CMAKE_CXX_STANDARD 14)
8990
set(CMAKE_CXX_EXTENSIONS ON)
9091
set(CMAKE_CXX_STANDARD_REQUIRED ON)

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# To build this docker file, run `docker build -t abacus - < Dockerfile`.
1+
# To build this Dockerfile, run `docker build -t abacus - < Dockerfile`.
2+
# Pull image with `docker pull ghcr.io/deepmodeling/abacus:latest`.
23
FROM ubuntu:latest
34
RUN apt update && apt install -y --no-install-recommends libopenblas-dev liblapack-dev libscalapack-mpi-dev libelpa-dev libfftw3-dev libcereal-dev libxc-dev g++ make cmake bc time sudo vim git
45
# If you wish to use the LLVM compiler, replace 'g++' above with 'clang libomp-dev'.

docs/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ This file provides a guideline for it.
66
## Table of Contents
77

88
- [Got a question?](#got-a-question)
9-
- [Before getting started](#before-getting-started)
109
- [Structure of the package](#structure-of-the-package)
1110
- [Submitting an Issue](#submitting-an-issue)
1211
- [Comment Style for documentation](#comment-style-for-documentation)
@@ -23,6 +22,7 @@ If you would like to implement a new feature, please submit an issue with a prop
2322

2423
## Structure of the package
2524

25+
Please refer to [our instructions](./install.md) on how to installing ABACUS.
2626
The source code of ABACUS is based on several modules. Under the ABACUS root directory, there are the following folders:
2727

2828
- `cmake`: relevant files for finding required packages when compiling the code with cmake;

docs/install.md

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,55 @@
1313

1414
## Installation
1515

16+
### Container Deployment
17+
18+
We've built a ready-for-use version of ABACUS with docker [here](https://github.com/deepmodeling/abacus-develop/pkgs/container/abacus). For a quick start: pull the image, prepare the data, run container. Instructions on using the image can be accessed in [Dockerfile](../Dockerfile).
19+
20+
We also offer a pre-built docker image containing all the requirements for development. Please refer to our [Package Page](https://github.com/deepmodeling/abacus-develop/pkgs/container/abacus-development-kit).
21+
22+
The project is ready for VS Code development container. Please refer to [Developing inside a Container](https://code.visualstudio.com/docs/remote/containers#_quick-start-try-a-development-container). Choose `Open a Remote Window -> Clone a Repository in Container Volume` in VS Code command palette, and put the [git address](https://github.com/deepmodeling/abacus-develop.git) of `ABACUS` when prompted.
23+
24+
We also support [gitpod](https://www.gitpod.io/) to offer an ready-to-use online development environment.
25+
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/deepmodeling/abacus-develop)
26+
1627
### Prerequisites
1728

18-
ABACUS current supports Linux. To compile ABACUS, please make sure that the following prerequisites are
19-
present:
29+
ABACUS currently supports Linux. `Dockerfile`s under the root directory of our repo will come in handy.
30+
31+
To compile ABACUS, please make sure that the following prerequisites are present:
2032

2133
- C++ compiler, supporting C++11. You can use [Intel® C++ compiler](https://software.intel.com/enus/c-compilers) or [GCC](https://gcc.gnu.org/).
2234
- MPI compiler. The recommended version are [Intel MPI](https://software.intel.com/enus/mpi-library) or [MPICH](https://www.mpich.org/).
2335
- Fortran compiler for building `BLAS`, `LAPACK` and `ScaLAPACK`. You can use[Intel® Fortran Compiler](https://www.intel.com/content/www/us/en/developer/tools/oneapi/fortran-compiler.html) [GFortran](https://gcc.gnu.org/fortran/).
2436
- [BLAS](http://www.netlib.org/blas/). You can use [OpenBLAS](https://www.openblas.net/).
2537
- [LAPACK](http://www.netlib.org/lapack/).
2638
- [ScaLAPACK](http://www.netlib.org/scalapack/).
27-
- [FFTW](http://www.fftw.org/).
28-
- [ELPA](https://elpa.mpcdf.mpg.de/).
39+
- [FFTW3](http://www.fftw.org/).
40+
- [ELPA](https://elpa.mpcdf.mpg.de/) >= 2017.
2941
- [CEREAL](https://uscilab.github.io/cereal/).
3042

43+
These packages can be installed with popular package management system, such as `apt` and `yum`:
44+
45+
```bash
46+
sudo apt update && sudo apt install -y libopenblas-dev liblapack-dev libscalapack-mpi-dev libelpa-dev libfftw3-dev libcereal-dev libxc-dev g++ make cmake bc git
47+
```
48+
49+
> Please double-check the installed version of ELPA!
50+
3151
Alternatively, you can choose [Intel® oneAPI toolkit](https://software.intel.com/content/www/us/en/develop/tools/oneapi/commercial-base-hpc.html) (former Parallel Studio) as toolchain. The [Intel® oneAPI Base Toolkit](https://software.intel.com/content/www/us/en/develop/tools/oneapi/all-toolkits.html#base-kit) contains Intel® oneAPI Math Kernel Library (aka `MKL`), including `BLAS`, `LAPACK`, `ScaLAPACK` and `FFTW3`, - this means that no Fortran compiler required anymore. The [Intel® oneAPI HPC Toolkit](https://software.intel.com/content/www/us/en/develop/tools/oneapi/all-toolkits.html#hpc-kit) contains Intel® MPI Library, and C++ compiler(including MPI compiler). Please noted that building `elpa` with a different MPI library may cause conflict between MPI libraries. Don't forget to [set environment variables](https://software.intel.com/content/www/us/en/develop/documentation/get-started-with-intel-oneapi-render-linux/top/configure-your-system.html) before you start! `cmake` will use Intel MKL if the environment variable `MKLROOT` is set.
3252

3353
If you have trouble building requirements, our Dockerfiles in root path offer a reference, or read the section below to use a pre-built container.
34-
[back to top](#download-and-install)
3554

36-
### Container Deployment
55+
And of course, a copy of ABACUS source code is required:
3756

38-
We offer a pre-built docker image containing all the requirements - you only need to clone and compile `abacus` in the container. Please refer to our [Package Page](https://github.com/deepmodeling/abacus-develop/pkgs/container/abacus-development-kit).
57+
- Clone the whole repo with git: `git clone https://github.com/deepmodeling/abacus-develop.git`
58+
- Clone the minimum required part of repo: `git clone https://github.com/deepmodeling/abacus-develop.git --depth=1`
59+
- Download the latest source code without git: `wget https://github.com/deepmodeling/abacus-develop/archive/refs/heads/develop.zip`
60+
- Get the source code of a stable version [here](https://github.com/deepmodeling/abacus-develop/releases)
61+
- If you have connection issues accessing GitHub, please try out our official [Gitee repo](https://gitee.com/deepmodeling/abacus-develop/): replacing 'github.com' with 'gitee.com' works for all the links above. e.g. `git clone https://gitee.com/deepmodeling/abacus-develop.git`
3962

40-
The project is ready for VS Code development container. Please refer to [Developing inside a Container](https://code.visualstudio.com/docs/remote/containers#_quick-start-try-a-development-container). Choose `Open a Remote Window -> Clone a Repository in Container Volume` in VS Code command palette, and put the [git address](https://github.com/deepmodeling/abacus-develop.git) of `ABACUS` when prompted.
4163

42-
We also support [gitpod](https://www.gitpod.io/) to offer an ready-to-use online development environment.
43-
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/deepmodeling/abacus-develop)
64+
[back to top](#download-and-install)
4465

4566
### Build and install ABACUS with CMake
4667

0 commit comments

Comments
 (0)