Skip to content

Commit 46cd092

Browse files
committed
Merge branch 'release-2.1.0'
2 parents d622ca0 + 9a47bef commit 46cd092

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+865
-359
lines changed

CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ endif ()
373373
include(CompilerConfiguration)
374374
include(CheckCompilerSupport)
375375

376+
# subdirectories
376377
add_subdirectory(src)
377378

378379
include(CTest)
@@ -384,4 +385,6 @@ if (WITH_EXAMPLES)
384385
add_subdirectory(examples)
385386
endif ()
386387

388+
add_subdirectory(docs)
389+
387390
include(CustomTargets)

DBCSR.md

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ predocmark: >
1515
media_dir: @CMAKE_SOURCE_DIR@/docs/media
1616
md_base_dir: @CMAKE_SOURCE_DIR@
1717
page_dir: @CMAKE_SOURCE_DIR@/docs/guide
18+
src_dir: ./src
19+
./tests
20+
./examples
1821
output_dir: @CMAKE_BINARY_DIR@/doc
1922
docmark_alt: #
2023
predocmark_alt: <

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ It is MPI and OpenMP parallel and can exploit Nvidia and AMD GPUs via CUDA and H
1313

1414
## How to Install
1515

16-
Follow the [installation guide](docs/guide/2-user-guide/1-installation/1-install.md).
16+
Follow the [installation guide](https://cp2k.github.io/dbcsr/develop/page/2-user-guide/1-installation/index.html).
1717

1818
## Documentation
1919

VERSION

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
MAJOR = 2
22
MINOR = 1
3-
PATCH = 0-rc19
3+
PATCH = 0
44
# A specific DATE (YYYY-MM-DD) fixes an official release, otherwise
55
# it is considered Development version.
6-
DATE =
6+
DATE = 2020-12-09
7+

cmake/CustomTargets.cmake

+4-16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# =================================================================================================
2+
# BUILD DISTRIBUTION
13
set(ARCHIVE_NAME "${CMAKE_PROJECT_NAME}-${dbcsr_VERSION}")
24
add_custom_target(
35
dist
@@ -9,22 +11,8 @@ add_custom_target(
911
"${CMAKE_BINARY_DIR}/dist/${ARCHIVE_NAME}.tar.gz"
1012
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
1113

12-
find_program(
13-
FORD_EXE ford
14-
DOC "path to the ford executable (required to generate the documentation)")
15-
16-
# Copy the FORD project-file into the build directory
17-
set(FORD_PROJECT_FILE "${CMAKE_BINARY_DIR}/DBCSR.md")
18-
configure_file(DBCSR.md "${FORD_PROJECT_FILE}")
19-
20-
add_custom_target(
21-
doc
22-
COMMENT "Generating API documentation"
23-
COMMAND "${FORD_EXE}" "${FORD_PROJECT_FILE}"
24-
VERBATIM)
25-
add_dependencies(doc fypp) # only depend on the fypp step to avoid building
26-
# everything just for the docs
27-
14+
# =================================================================================================
15+
# LCOV - COVERAGE REPORTS GENERATION
2816
find_program(
2917
LCOV_EXE lcov
3018
DOC "path to the lcov executable (required to generate coverage reports)")

docs/CMakeLists.txt

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# =================================================================================================
2+
# FORD - DOCUMENTATION GENERATION
3+
find_program(
4+
FORD_EXE ford
5+
DOC "path to the ford executable (required to generate the documentation)")
6+
7+
# Copy the FORD project-file into the build directory
8+
set(FORD_PROJECT_FILE "${CMAKE_BINARY_DIR}/DBCSR.md")
9+
configure_file(${CMAKE_SOURCE_DIR}/DBCSR.md "${FORD_PROJECT_FILE}")
10+
11+
# Copy the FORD project-file into the build directory
12+
add_custom_target(
13+
doc
14+
COMMENT "Generating API documentation and doc pages"
15+
COMMAND "${FORD_EXE}" "${FORD_PROJECT_FILE}"
16+
VERBATIM)
17+
add_dependencies(doc doc_copy_tests)
18+
if (WITH_C_API)
19+
add_dependencies(doc doc_copy_examples)
20+
endif ()
21+
add_dependencies(doc fypp) # only depend on the fypp step to avoid building
22+
# everything just for the docs

docs/guide/2-user-guide/1-installation/1-install.md

-114
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
title: Docker Images
2+
3+
{!./tools/docker/README.md!}
4+
Original file line numberDiff line numberDiff line change
@@ -1 +1,104 @@
1-
title: Installation
1+
title: Install
2+
3+
# Install
4+
5+
## Prerequisites
6+
7+
You absolutely need:
8+
9+
* [CMake](https://cmake.org/) (3.12+)
10+
* GNU make or Ninja
11+
* a Fortran compiler which supports at least Fortran 2008 (including the TS 29113 when using the C-bindings)
12+
* a BLAS+LAPACK implementation (reference, OpenBLAS and MKL have been tested. Note: DBCSR linked to OpenBLAS 0.3.6 gives wrong results on Power9 architectures.)
13+
* a Python version installed (2.7 or 3.6+ have been tested)
14+
15+
Optionally:
16+
17+
* [libxsmm](https://github.com/hfp/libxsmm) (1.10+, and `pkg-config`) for Small Matrix Multiplication acceleration
18+
* a LAPACK implementation (reference, OpenBLAS-bundled and MKL have been tested), required when building the tests
19+
20+
To build `libsmm_acc`, DBCSR's GPU backend, you further need:
21+
22+
* A GPU-capable compiler, either
23+
* CUDA Toolkit (targets NVIDIA GPUs, minimal version required: 5.5) with cuBLAS
24+
* or HIP compiler (targets NVIDIA or AMD GPUs) and hipBLAS (the tested version is ROCm 3.8)
25+
* a C++ compiler which supports at least C++11 standard
26+
27+
We test against GNU and Intel compilers on Linux systems, GNU compiler on MacOS systems. See a list of supported compilers [here](./3-supported-compilers.html).
28+
29+
## Get DBCSR
30+
31+
Download either a [release tarball](https://github.com/cp2k/dbcsr/releases) or clone the latest version from Git using:
32+
33+
```bash
34+
git clone --recursive https://github.com/cp2k/dbcsr.git
35+
```
36+
37+
## Build
38+
39+
DBCSR can be compiled in 4 main variants:
40+
* Serial, i.e. no OpenMP and MPI
41+
* OpenMP
42+
* MPI
43+
* OpenMP+MPI
44+
The 4 variants can be combined with the accelerator support.
45+
46+
Run inside the `dbcsr` directory:
47+
48+
```bash
49+
mkdir build
50+
cd build
51+
cmake ..
52+
make
53+
```
54+
55+
The configuration flags for the CMake command are (default first):
56+
57+
```
58+
-DUSE_MPI=<ON|OFF>
59+
-DUSE_OPENMP=<ON|OFF>
60+
-DUSE_SMM=<blas|libxsmm>
61+
-DUSE_CUDA=<OFF|ON>
62+
-DWITH_CUDA_PROFILING=<OFF|ON>
63+
-DUSE_HIP=<OFF|ON>
64+
-DWITH_C_API=<ON|OFF>
65+
-DWITH_EXAMPLES=<ON|OFF>
66+
-DWITH_GPU=<P100|K20X|K40|K80|V100|Mi50>
67+
-DCMAKE_BUILD_TYPE=<Release|Debug|Coverage>
68+
-DBUILD_TESTING=<ON|OFF>
69+
-DTEST_MPI_RANKS=<auto,N>
70+
-DTEST_OMP_THREADS=<2,N>
71+
```
72+
73+
When providing a custom build of `libxsmm`, make sure that its library directory is added to the `PKG_CONFIG_PATH` variable prior
74+
to running `cmake`. An example if `libxsmm` was checked out using Git to your home folder:
75+
76+
```bash
77+
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:${HOME}/libxsmm/lib"
78+
```
79+
80+
### CMake Build Recipes
81+
82+
For build recipes on different platforms, make sure to also read the [CMake Build Recipes](./1-cmake-build-recipes.html).
83+
84+
### Using Python in a virtual environment
85+
86+
If you want to use Python from a virtual environment and your CMake version is < 3.15, specify the desired python interpreter manually using:
87+
88+
```
89+
-DPython_EXECUTABLE=/path/to/python
90+
```
91+
92+
### C/C++ Interface
93+
94+
If MPI support is enabled (the default), the C API is automatically built.
95+
96+
### Workaround issue in HIP
97+
98+
HIP is a relatively new language, and some issues still need to be ironed out. As a workaround to an [issue](https://github.com/ROCm-Developer-Tools/HIP/pull/1543) in HIP's JIT infrastructure, please set the following if you've built HIP from source:
99+
100+
```bash
101+
export HIP_PATH=/opt/rocm/hip
102+
```
103+
104+
before running on an AMD GPU.

docs/guide/2-user-guide/2-examples/index.md

-3
This file was deleted.

0 commit comments

Comments
 (0)