Skip to content

Commit

Permalink
Merge branch 'release-2.6.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
alazzaro committed Jul 10, 2023
2 parents 2d009cd + f73994d commit b4ffdda
Show file tree
Hide file tree
Showing 116 changed files with 77,858 additions and 2,827 deletions.
2 changes: 1 addition & 1 deletion .ci/daint.cscs.ch/ocl.build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if [ ! -d "${HOME}/libxsmm" ]; then
fi
cd "${HOME}/libxsmm"
git fetch
git checkout 593a64cb87a0643f9b275b1081c096878b190a0e
git checkout 3235b3e09c9f084abf4213748da46844254bfef9
make -j
cd ..

Expand Down
4 changes: 0 additions & 4 deletions .flake8

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/doc-generation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- "/etc/ssh/ssh_known_hosts:/etc/ssh/ssh_known_hosts:ro"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/docker-build-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
jobs:
docker-build-env:
runs-on: ubuntu-latest
if: github.repository == 'cp2k/dbcsr' # Only run from main repo
strategy:
matrix:
include:
Expand All @@ -37,7 +38,7 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v3

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

- name: Login to Container registry
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
registry: ${{ matrix.registry }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push container image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
context: ${{ matrix.context }}
file: ${{ matrix.context }}/${{ matrix.file }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
image: ghcr.io/cp2k/dbcsr-build-env-ubuntu-20.04:develop

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/testing-gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
image: ghcr.io/cp2k/dbcsr-build-env-latest-gcc:develop

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
Expand All @@ -27,13 +27,15 @@ jobs:
-DUSE_MPI=OFF \
-DUSE_OPENMP=ON \
-DUSE_SMM=blas \
-DUSE_MPI_F08=ON \
..
- name: Build
run: cmake --build build -- --verbose

- name: Test
run: |
export LSAN_OPTIONS=suppressions=$PWD/tools/docker/lsan.supp
cd build
ctest --output-on-failure
Expand Down
68 changes: 53 additions & 15 deletions .github/workflows/testing-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
container:
image: ghcr.io/cp2k/dbcsr-build-env-ubuntu-20.04:develop
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Run pre-commit
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
Expand All @@ -40,7 +40,7 @@ jobs:
mpi_suffix: mpich

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
Expand All @@ -56,6 +56,7 @@ jobs:
-DUSE_${{ matrix.use_smm }} \
-DMPI_EXECUTABLE_SUFFIX=.${{ matrix.mpi_suffix }} \
-DMPIEXEC_PREFLAGS="$([ "${{ matrix.mpi_suffix }}" = "openmpi" ] && echo "-mca btl ^openib --allow-run-as-root")" \
-DLCOV_ARGS="--test-name;${{ matrix.use_mpi }}-${{ matrix.use_openmp }}-${{ matrix.use_smm }}-cpu" \
..
- name: Build
Expand All @@ -69,15 +70,22 @@ jobs:
- name: Generate coverage info
run: |
cmake --build build -- cov-info
mv build/coverage.info build/coverage-Linux-${{ matrix.use_mpi }}-${{ matrix.use_openmp }}-${{ matrix.use_smm }}-cpu.info
- name: Upload coverage info to codecov
if: github.repository == 'cp2k/dbcsr'
uses: codecov/codecov-action@v1
- name: Upload coverage data
uses: actions/upload-artifact@v3
with:
file: build/coverage.info
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' }}
name: dbcsr-unittests-${{ matrix.use_mpi }}-${{ matrix.use_openmp }}-${{ matrix.use_smm }}-cpu-only
fail_ci_if_error: true
name: coverage-data
path: build/coverage-*.info

- name: Upload coverage data (generated files)
uses: actions/upload-artifact@v3
if: matrix.use_mpi == 'MPI=ON' && matrix.use_openmp == 'OPENMP=ON' && matrix.use_smm == 'SMM=blas' && matrix.mpi_suffix == 'openmpi'
with:
name: coverage-data
path: |
build/src/dbcsr.h
build/src/tensors/dbcsr_tensor.h
##################################################################################
# Build on CUDA
Expand All @@ -92,7 +100,7 @@ jobs:
use_openmp: [OPENMP=ON]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
Expand All @@ -102,11 +110,12 @@ jobs:
mkdir -p build
cd build
cmake -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=Debug \
-DUSE_${{ matrix.use_openmp }} \
-DUSE_ACCEL=cuda \
-DWITH_GPU=V100 \
-DWITH_EXAMPLES=ON \
-DWITH_CUDA_PROFILING=ON \
..
- name: Build
run: cmake --build build -- --verbose
Expand All @@ -125,7 +134,7 @@ jobs:
use_smm: [SMM=libxsmm]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
Expand All @@ -135,7 +144,7 @@ jobs:
mkdir -p build
cd build
cmake -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=Debug \
-DUSE_${{ matrix.use_openmp }} \
-DUSE_${{ matrix.use_smm }} \
-DUSE_ACCEL=opencl \
Expand All @@ -157,7 +166,7 @@ jobs:
use_openmp: [OPENMP=ON]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
Expand All @@ -167,7 +176,7 @@ jobs:
mkdir -p build
cd build
cmake -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=Debug \
-DUSE_${{ matrix.use_openmp }} \
-DUSE_ACCEL=hip \
-DWITH_GPU=Mi100 \
Expand All @@ -177,4 +186,33 @@ jobs:
- name: Build
run: cmake --build build -- --verbose

coverage:
name: Combine & check coverage.
runs-on: ubuntu-latest
needs: build-and-test
container:
image: ghcr.io/cp2k/dbcsr-build-env-ubuntu-20.04:develop

steps:
- uses: actions/checkout@v3

- name: Download coverage data
uses: actions/download-artifact@v3
with:
name: coverage-data

- name: Combine coverage
run: |
mkdir -p build/src
mv dbcsr.h tensors build/src/
echo *.info | xargs printf -- '-a %s\n' | xargs lcov -o merged.info
genhtml merged.info -o htmlcov
lcov --summary merged.info
- name: Upload merged HTML report
uses: actions/upload-artifact@v3
with:
name: html-report
path: htmlcov

# vim: set ts=2 sw=2 tw=0 :
67 changes: 67 additions & 0 deletions .github/workflows/testing-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
name: Testing on macOS
on:
push:
branches:
- 'develop'
pull_request:

# Workaround issue in Xcode 14.1/2
env:
DEVELOPER_DIR: /Applications/Xcode_14.0.1.app/Contents/Developer

jobs:
build-and-test:
runs-on: macos-latest

strategy:
matrix:
use_mpi: [MPI=ON]
use_openmp: [OPENMP=ON]
use_smm: [SMM=blas]
blas_impl: [accelerate,openblas]
mpi_suffix: [openmpi]
exclude:
- use_mpi: MPI=OFF
mpi_suffix: mpich

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true

- name: Install common dependencies
run: |
env HOMEBREW_NO_AUTO_UPDATE=1 brew install \
ninja
- name: Install ${{ matrix.mpi_suffix }}
run: |
env HOMEBREW_NO_AUTO_UPDATE=1 brew install ${{ matrix.mpi_suffix }}
- name: Configure
run: |
mkdir -p build
cd build
env \
CC=gcc-11 CXX=g++-11 FC=gfortran-11 \
cmake -G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DUSE_${{ matrix.use_mpi }} \
-DUSE_${{ matrix.use_openmp }} \
-DUSE_${{ matrix.use_smm }} \
$([ "${{ matrix.blas_impl }}" = "openblas" ] && echo '-DCMAKE_PREFIX_PATH=/usr/local/opt/openblas') \
-DMPIEXEC_PREFLAGS="$([ "${{ matrix.mpi_suffix }}" = "openmpi" ] && echo "-mca btl ^openib --allow-run-as-root")" \
-DTEST_MPI_RANKS=1 \
..
- name: Build
run: cmake --build build -- --verbose

- name: Test
run: |
cd build
ctest --output-on-failure
# vim: set ts=2 sw=2 tw=0 :
21 changes: 11 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,23 @@ default_language_version:
exclude: '^tools/(build_utils/fypp)'
fail_fast: false
repos:
- repo: https://github.com/ambv/black
rev: 22.6.0
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.276'
hooks:
- id: black
name: Reformat Python files with the black code formatter
files: '^.*(/PACKAGE)|(\.py)$'
- repo: https://github.com/pycqa/flake8
rev: 5.0.4
hooks:
- id: flake8
- id: ruff
args: [ --fix, --exit-non-zero-on-fix ]
exclude: >-
(?x)^(
.cp2k/.*|
)$
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
name: Reformat Python files with the black code formatter
files: '^.*(/PACKAGE)|(\.py)$'
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: check-ast
- id: check-yaml
Expand Down
3 changes: 3 additions & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
select = ["E", "F", "B"]
line-length = 128
ignore = ["B905"]
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ set(dbcsr_APIVERSION ${VERSION_MAJOR}.${VERSION_MINOR})
# OPTIONS
include(CMakeDependentOption)

option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
option(USE_OPENMP "Build with OpenMP support" ON)
option(USE_MPI "Build with MPI support" ON)
option(USE_MPI_F08 "Build with the mpi_f08 module support" OFF)
cmake_dependent_option(
WITH_C_API "Build the C API (ISO_C_BINDINGS)" ON "USE_MPI" OFF
)# the ISO_C_BINDINGS require MPI unconditionally
Expand Down Expand Up @@ -196,6 +198,14 @@ The listed MPI implementation does not provide the required mpi.mod interface. \
When using the GNU compiler in combination with Intel MPI, please use the \
Intel MPI compiler wrappers. Check the INSTALL.md for more information.")
endif ()
if (USE_MPI_F08)
if (NOT MPI_Fortran_HAVE_F08_MODULE)
message(
FATAL_ERROR
"The listed MPI implementation does not provide the required mpi_f08.mod interface."
)
endif ()
endif ()
if ("${MPI_Fortran_LIBRARY_VERSION_STRING}" MATCHES "Open MPI v2.1"
OR "${MPI_Fortran_LIBRARY_VERSION_STRING}" MATCHES "Open MPI v3.1")
message(
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# DBCSR: Distributed Block Compressed Sparse Row matrix library

[![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)
[![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)


[![codecov](https://codecov.io/gh/cp2k/dbcsr/branch/develop/graph/badge.svg)](https://codecov.io/gh/cp2k/dbcsr)
[![Licence](https://img.shields.io/badge/license-GPL%20v2.0-blue.svg)](./LICENSE)
[![GitHub Releases](https://img.shields.io/github/release-pre/cp2k/dbcsr.svg)](https://github.com/cp2k/dbcsr/releases)

Expand Down
4 changes: 2 additions & 2 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
MAJOR = 2
MINOR = 5
MINOR = 6
PATCH = 0
# A specific DATE (YYYY-MM-DD) fixes an official release, otherwise
# it is considered Development version.
DATE = 2022-12-27
DATE = 2023-07-10


Loading

0 comments on commit b4ffdda

Please sign in to comment.