Skip to content

Commit b4ffdda

Browse files
committed
Merge branch 'release-2.6.0'
2 parents 2d009cd + f73994d commit b4ffdda

File tree

116 files changed

+77858
-2827
lines changed

Some content is hidden

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

116 files changed

+77858
-2827
lines changed

.ci/daint.cscs.ch/ocl.build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if [ ! -d "${HOME}/libxsmm" ]; then
2727
fi
2828
cd "${HOME}/libxsmm"
2929
git fetch
30-
git checkout 593a64cb87a0643f9b275b1081c096878b190a0e
30+
git checkout 3235b3e09c9f084abf4213748da46844254bfef9
3131
make -j
3232
cd ..
3333

.flake8

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/workflows/doc-generation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- "/etc/ssh/ssh_known_hosts:/etc/ssh/ssh_known_hosts:ro"
1818

1919
steps:
20-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v3
2121
with:
2222
fetch-depth: 0
2323
submodules: true

.github/workflows/docker-build-env.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515
jobs:
1616
docker-build-env:
1717
runs-on: ubuntu-latest
18+
if: github.repository == 'cp2k/dbcsr' # Only run from main repo
1819
strategy:
1920
matrix:
2021
include:
@@ -37,7 +38,7 @@ jobs:
3738

3839
steps:
3940
- name: Checkout Repository
40-
uses: actions/checkout@v2
41+
uses: actions/checkout@v3
4142

4243
- name: Prepare
4344
id: prep
@@ -60,17 +61,17 @@ jobs:
6061
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
6162
6263
- name: Set up Docker Buildx
63-
uses: docker/setup-buildx-action@v1
64+
uses: docker/setup-buildx-action@v2
6465

6566
- name: Login to Container registry
66-
uses: docker/login-action@v1
67+
uses: docker/login-action@v2
6768
with:
6869
registry: ${{ matrix.registry }}
6970
username: ${{ github.actor }}
7071
password: ${{ secrets.GITHUB_TOKEN }}
7172

7273
- name: Build and push container image
73-
uses: docker/build-push-action@v2
74+
uses: docker/build-push-action@v3
7475
with:
7576
context: ${{ matrix.context }}
7677
file: ${{ matrix.context }}/${{ matrix.file }}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
image: ghcr.io/cp2k/dbcsr-build-env-ubuntu-20.04:develop
1313

1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v3
1616
with:
1717
submodules: true
1818

.github/workflows/testing-gcc.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
image: ghcr.io/cp2k/dbcsr-build-env-latest-gcc:develop
1414

1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v3
1717
with:
1818
fetch-depth: 0
1919
submodules: true
@@ -27,13 +27,15 @@ jobs:
2727
-DUSE_MPI=OFF \
2828
-DUSE_OPENMP=ON \
2929
-DUSE_SMM=blas \
30+
-DUSE_MPI_F08=ON \
3031
..
3132
3233
- name: Build
3334
run: cmake --build build -- --verbose
3435

3536
- name: Test
3637
run: |
38+
export LSAN_OPTIONS=suppressions=$PWD/tools/docker/lsan.supp
3739
cd build
3840
ctest --output-on-failure
3941

.github/workflows/testing-linux.yml

Lines changed: 53 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
container:
1616
image: ghcr.io/cp2k/dbcsr-build-env-ubuntu-20.04:develop
1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v3
1919
- name: Run pre-commit
2020
run: |
2121
git config --global --add safe.directory "$GITHUB_WORKSPACE"
@@ -40,7 +40,7 @@ jobs:
4040
mpi_suffix: mpich
4141

4242
steps:
43-
- uses: actions/checkout@v2
43+
- uses: actions/checkout@v3
4444
with:
4545
fetch-depth: 0
4646
submodules: true
@@ -56,6 +56,7 @@ jobs:
5656
-DUSE_${{ matrix.use_smm }} \
5757
-DMPI_EXECUTABLE_SUFFIX=.${{ matrix.mpi_suffix }} \
5858
-DMPIEXEC_PREFLAGS="$([ "${{ matrix.mpi_suffix }}" = "openmpi" ] && echo "-mca btl ^openib --allow-run-as-root")" \
59+
-DLCOV_ARGS="--test-name;${{ matrix.use_mpi }}-${{ matrix.use_openmp }}-${{ matrix.use_smm }}-cpu" \
5960
..
6061
6162
- name: Build
@@ -69,15 +70,22 @@ jobs:
6970
- name: Generate coverage info
7071
run: |
7172
cmake --build build -- cov-info
73+
mv build/coverage.info build/coverage-Linux-${{ matrix.use_mpi }}-${{ matrix.use_openmp }}-${{ matrix.use_smm }}-cpu.info
7274
73-
- name: Upload coverage info to codecov
74-
if: github.repository == 'cp2k/dbcsr'
75-
uses: codecov/codecov-action@v1
75+
- name: Upload coverage data
76+
uses: actions/upload-artifact@v3
7677
with:
77-
file: build/coverage.info
78-
flags: unittests,${{ matrix.use_mpi == 'MPI=ON' && 'with-mpi' || 'without-mpi' }},${{ matrix.use_openmp == 'OPENMP=ON' && 'with-openmp' || 'without-openmp' }},${{ matrix.use_smm == 'SMM=blas' && 'with-blas' || 'with-libxsmm' }}
79-
name: dbcsr-unittests-${{ matrix.use_mpi }}-${{ matrix.use_openmp }}-${{ matrix.use_smm }}-cpu-only
80-
fail_ci_if_error: true
78+
name: coverage-data
79+
path: build/coverage-*.info
80+
81+
- name: Upload coverage data (generated files)
82+
uses: actions/upload-artifact@v3
83+
if: matrix.use_mpi == 'MPI=ON' && matrix.use_openmp == 'OPENMP=ON' && matrix.use_smm == 'SMM=blas' && matrix.mpi_suffix == 'openmpi'
84+
with:
85+
name: coverage-data
86+
path: |
87+
build/src/dbcsr.h
88+
build/src/tensors/dbcsr_tensor.h
8189
8290
##################################################################################
8391
# Build on CUDA
@@ -92,7 +100,7 @@ jobs:
92100
use_openmp: [OPENMP=ON]
93101

94102
steps:
95-
- uses: actions/checkout@v2
103+
- uses: actions/checkout@v3
96104
with:
97105
fetch-depth: 0
98106
submodules: true
@@ -102,11 +110,12 @@ jobs:
102110
mkdir -p build
103111
cd build
104112
cmake -G Ninja \
105-
-DCMAKE_BUILD_TYPE=Release \
113+
-DCMAKE_BUILD_TYPE=Debug \
106114
-DUSE_${{ matrix.use_openmp }} \
107115
-DUSE_ACCEL=cuda \
108116
-DWITH_GPU=V100 \
109117
-DWITH_EXAMPLES=ON \
118+
-DWITH_CUDA_PROFILING=ON \
110119
..
111120
- name: Build
112121
run: cmake --build build -- --verbose
@@ -125,7 +134,7 @@ jobs:
125134
use_smm: [SMM=libxsmm]
126135

127136
steps:
128-
- uses: actions/checkout@v2
137+
- uses: actions/checkout@v3
129138
with:
130139
fetch-depth: 0
131140
submodules: true
@@ -135,7 +144,7 @@ jobs:
135144
mkdir -p build
136145
cd build
137146
cmake -G Ninja \
138-
-DCMAKE_BUILD_TYPE=Release \
147+
-DCMAKE_BUILD_TYPE=Debug \
139148
-DUSE_${{ matrix.use_openmp }} \
140149
-DUSE_${{ matrix.use_smm }} \
141150
-DUSE_ACCEL=opencl \
@@ -157,7 +166,7 @@ jobs:
157166
use_openmp: [OPENMP=ON]
158167

159168
steps:
160-
- uses: actions/checkout@v2
169+
- uses: actions/checkout@v3
161170
with:
162171
fetch-depth: 0
163172
submodules: true
@@ -167,7 +176,7 @@ jobs:
167176
mkdir -p build
168177
cd build
169178
cmake -G Ninja \
170-
-DCMAKE_BUILD_TYPE=Release \
179+
-DCMAKE_BUILD_TYPE=Debug \
171180
-DUSE_${{ matrix.use_openmp }} \
172181
-DUSE_ACCEL=hip \
173182
-DWITH_GPU=Mi100 \
@@ -177,4 +186,33 @@ jobs:
177186
- name: Build
178187
run: cmake --build build -- --verbose
179188

189+
coverage:
190+
name: Combine & check coverage.
191+
runs-on: ubuntu-latest
192+
needs: build-and-test
193+
container:
194+
image: ghcr.io/cp2k/dbcsr-build-env-ubuntu-20.04:develop
195+
196+
steps:
197+
- uses: actions/checkout@v3
198+
199+
- name: Download coverage data
200+
uses: actions/download-artifact@v3
201+
with:
202+
name: coverage-data
203+
204+
- name: Combine coverage
205+
run: |
206+
mkdir -p build/src
207+
mv dbcsr.h tensors build/src/
208+
echo *.info | xargs printf -- '-a %s\n' | xargs lcov -o merged.info
209+
genhtml merged.info -o htmlcov
210+
lcov --summary merged.info
211+
212+
- name: Upload merged HTML report
213+
uses: actions/upload-artifact@v3
214+
with:
215+
name: html-report
216+
path: htmlcov
217+
180218
# vim: set ts=2 sw=2 tw=0 :

.github/workflows/testing-macos.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
name: Testing on macOS
3+
on:
4+
push:
5+
branches:
6+
- 'develop'
7+
pull_request:
8+
9+
# Workaround issue in Xcode 14.1/2
10+
env:
11+
DEVELOPER_DIR: /Applications/Xcode_14.0.1.app/Contents/Developer
12+
13+
jobs:
14+
build-and-test:
15+
runs-on: macos-latest
16+
17+
strategy:
18+
matrix:
19+
use_mpi: [MPI=ON]
20+
use_openmp: [OPENMP=ON]
21+
use_smm: [SMM=blas]
22+
blas_impl: [accelerate,openblas]
23+
mpi_suffix: [openmpi]
24+
exclude:
25+
- use_mpi: MPI=OFF
26+
mpi_suffix: mpich
27+
28+
steps:
29+
- uses: actions/checkout@v3
30+
with:
31+
fetch-depth: 0
32+
submodules: true
33+
34+
- name: Install common dependencies
35+
run: |
36+
env HOMEBREW_NO_AUTO_UPDATE=1 brew install \
37+
ninja
38+
39+
- name: Install ${{ matrix.mpi_suffix }}
40+
run: |
41+
env HOMEBREW_NO_AUTO_UPDATE=1 brew install ${{ matrix.mpi_suffix }}
42+
43+
- name: Configure
44+
run: |
45+
mkdir -p build
46+
cd build
47+
env \
48+
CC=gcc-11 CXX=g++-11 FC=gfortran-11 \
49+
cmake -G Ninja \
50+
-DCMAKE_BUILD_TYPE=Debug \
51+
-DUSE_${{ matrix.use_mpi }} \
52+
-DUSE_${{ matrix.use_openmp }} \
53+
-DUSE_${{ matrix.use_smm }} \
54+
$([ "${{ matrix.blas_impl }}" = "openblas" ] && echo '-DCMAKE_PREFIX_PATH=/usr/local/opt/openblas') \
55+
-DMPIEXEC_PREFLAGS="$([ "${{ matrix.mpi_suffix }}" = "openmpi" ] && echo "-mca btl ^openib --allow-run-as-root")" \
56+
-DTEST_MPI_RANKS=1 \
57+
..
58+
59+
- name: Build
60+
run: cmake --build build -- --verbose
61+
62+
- name: Test
63+
run: |
64+
cd build
65+
ctest --output-on-failure
66+
67+
# vim: set ts=2 sw=2 tw=0 :

.pre-commit-config.yaml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,23 @@ default_language_version:
44
exclude: '^tools/(build_utils/fypp)'
55
fail_fast: false
66
repos:
7-
- repo: https://github.com/ambv/black
8-
rev: 22.6.0
7+
- repo: https://github.com/charliermarsh/ruff-pre-commit
8+
rev: 'v0.0.276'
99
hooks:
10-
- id: black
11-
name: Reformat Python files with the black code formatter
12-
files: '^.*(/PACKAGE)|(\.py)$'
13-
- repo: https://github.com/pycqa/flake8
14-
rev: 5.0.4
15-
hooks:
16-
- id: flake8
10+
- id: ruff
11+
args: [ --fix, --exit-non-zero-on-fix ]
1712
exclude: >-
1813
(?x)^(
1914
.cp2k/.*|
2015
)$
16+
- repo: https://github.com/psf/black
17+
rev: 23.3.0
18+
hooks:
19+
- id: black
20+
name: Reformat Python files with the black code formatter
21+
files: '^.*(/PACKAGE)|(\.py)$'
2122
- repo: https://github.com/pre-commit/pre-commit-hooks
22-
rev: v4.3.0
23+
rev: v4.4.0
2324
hooks:
2425
- id: check-ast
2526
- id: check-yaml

.ruff.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
select = ["E", "F", "B"]
2+
line-length = 128
3+
ignore = ["B905"]

CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,10 @@ set(dbcsr_APIVERSION ${VERSION_MAJOR}.${VERSION_MINOR})
6969
# OPTIONS
7070
include(CMakeDependentOption)
7171

72+
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
7273
option(USE_OPENMP "Build with OpenMP support" ON)
7374
option(USE_MPI "Build with MPI support" ON)
75+
option(USE_MPI_F08 "Build with the mpi_f08 module support" OFF)
7476
cmake_dependent_option(
7577
WITH_C_API "Build the C API (ISO_C_BINDINGS)" ON "USE_MPI" OFF
7678
)# the ISO_C_BINDINGS require MPI unconditionally
@@ -196,6 +198,14 @@ The listed MPI implementation does not provide the required mpi.mod interface. \
196198
When using the GNU compiler in combination with Intel MPI, please use the \
197199
Intel MPI compiler wrappers. Check the INSTALL.md for more information.")
198200
endif ()
201+
if (USE_MPI_F08)
202+
if (NOT MPI_Fortran_HAVE_F08_MODULE)
203+
message(
204+
FATAL_ERROR
205+
"The listed MPI implementation does not provide the required mpi_f08.mod interface."
206+
)
207+
endif ()
208+
endif ()
199209
if ("${MPI_Fortran_LIBRARY_VERSION_STRING}" MATCHES "Open MPI v2.1"
200210
OR "${MPI_Fortran_LIBRARY_VERSION_STRING}" MATCHES "Open MPI v3.1")
201211
message(

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# DBCSR: Distributed Block Compressed Sparse Row matrix library
22

3-
[![Build Status](https://travis-ci.org/cp2k/dbcsr.svg?branch=develop)](https://travis-ci.org/cp2k/dbcsr) [![codecov](https://codecov.io/gh/cp2k/dbcsr/branch/develop/graph/badge.svg)](https://codecov.io/gh/cp2k/dbcsr)
3+
[![Build Status Linux](https://github.com/cp2k/dbcsr/actions/workflows/testing-linux.yml/badge.svg)](https://github.com/cp2k/dbcsr/actions/workflows/testing-linux.yml) [![Build Status MacOS](https://github.com/cp2k/dbcsr/actions/workflows/testing-macos.yml/badge.svg)](https://github.com/cp2k/dbcsr/actions/workflows/testing-macos.yml) [![Build Status Latest GCC](https://github.com/cp2k/dbcsr/actions/workflows/testing-gcc.yml/badge.svg)](https://github.com/cp2k/dbcsr/actions/workflows/testing-gcc.yml)
4+
5+
6+
[![codecov](https://codecov.io/gh/cp2k/dbcsr/branch/develop/graph/badge.svg)](https://codecov.io/gh/cp2k/dbcsr)
47
[![Licence](https://img.shields.io/badge/license-GPL%20v2.0-blue.svg)](./LICENSE)
58
[![GitHub Releases](https://img.shields.io/github/release-pre/cp2k/dbcsr.svg)](https://github.com/cp2k/dbcsr/releases)
69

VERSION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
MAJOR = 2
2-
MINOR = 5
2+
MINOR = 6
33
PATCH = 0
44
# A specific DATE (YYYY-MM-DD) fixes an official release, otherwise
55
# it is considered Development version.
6-
DATE = 2022-12-27
6+
DATE = 2023-07-10
77

88

0 commit comments

Comments
 (0)