Skip to content

Commit

Permalink
Merge branch 'release-2.7.0-rc1'
Browse files Browse the repository at this point in the history
  • Loading branch information
alazzaro committed Mar 13, 2024
2 parents b4ffdda + 2e333e6 commit ba75a56
Show file tree
Hide file tree
Showing 94 changed files with 7,410 additions and 4,324 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 3235b3e09c9f084abf4213748da46844254bfef9
git checkout 05705477183444a82c8d9be8d7c2627efd6d67fa
make -j
cd ..

Expand Down
3 changes: 3 additions & 0 deletions .ci/daint.cscs.ch/ocl.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ export LD_LIBRARY_PATH=${HOME}/libxsmm/lib:${LD_LIBRARY_PATH}
export OMP_PROC_BIND=TRUE # set thread affinity
# OMP_NUM_THREADS is set by cmake

# use default parameters (omit loading tuned parameters)
export OPENCL_LIBSMM_SMM_PARAMS=0

# document the current environment
env |& tee -a "${STAGE_NAME}.out"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/doc-generation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
build-and-deploy:
runs-on: ubuntu-latest
container:
image: ghcr.io/cp2k/dbcsr-build-env-ubuntu-20.04:develop
image: ghcr.io/cp2k/dbcsr-build-env-ubuntu-22.04:develop
volumes:
- "/etc/ssh/ssh_known_hosts:/etc/ssh/ssh_known_hosts:ro"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/docker-build-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
matrix:
include:
- docker_image: ghcr.io/cp2k/dbcsr-build-env-ubuntu-20.04
- docker_image: ghcr.io/cp2k/dbcsr-build-env-ubuntu-22.04
context: tools/docker
file: Dockerfile.build-env-ubuntu
registry: ghcr.io
Expand All @@ -31,14 +31,14 @@ jobs:
context: tools/docker
file: Dockerfile.build-env-rocm
registry: ghcr.io
- docker_image: ghcr.io/cp2k/dbcsr-build-env-ubuntu-20.04-cuda
- docker_image: ghcr.io/cp2k/dbcsr-build-env-ubuntu-22.04-cuda
context: tools/docker
file: Dockerfile.build-env-ubuntu-cuda
registry: ghcr.io

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

- name: Prepare
id: prep
Expand All @@ -56,22 +56,22 @@ jobs:
if [ "${{ github.event_name }}" = "push" ]; then
TAGS="$TAGS,${DOCKER_IMAGE}:sha-${GITHUB_SHA::8}"
fi
echo ::set-output name=version::${VERSION}
echo ::set-output name=tags::${TAGS}
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
echo "created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

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

- name: Build and push container image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: ${{ matrix.context }}
file: ${{ matrix.context }}/${{ matrix.file }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
build-and-upload:
runs-on: ubuntu-latest
container:
image: ghcr.io/cp2k/dbcsr-build-env-ubuntu-20.04:develop
image: ghcr.io/cp2k/dbcsr-build-env-ubuntu-22.04:develop

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

Expand Down
2 changes: 1 addition & 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@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
Expand Down
30 changes: 16 additions & 14 deletions .github/workflows/testing-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
container:
image: ghcr.io/cp2k/dbcsr-build-env-ubuntu-20.04:develop
image: ghcr.io/cp2k/dbcsr-build-env-ubuntu-22.04:develop
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run pre-commit
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
Expand All @@ -27,7 +27,7 @@ jobs:
build-and-test:
runs-on: ubuntu-latest
container:
image: ghcr.io/cp2k/dbcsr-build-env-ubuntu-20.04:develop
image: ghcr.io/cp2k/dbcsr-build-env-ubuntu-22.04:develop

strategy:
matrix:
Expand All @@ -40,7 +40,7 @@ jobs:
mpi_suffix: mpich

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
Expand All @@ -55,7 +55,7 @@ jobs:
-DUSE_${{ matrix.use_openmp }} \
-DUSE_${{ matrix.use_smm }} \
-DMPI_EXECUTABLE_SUFFIX=.${{ matrix.mpi_suffix }} \
-DMPIEXEC_PREFLAGS="$([ "${{ matrix.mpi_suffix }}" = "openmpi" ] && echo "-mca btl ^openib --allow-run-as-root")" \
-DMPIEXEC_PREFLAGS="$([ "${{ matrix.mpi_suffix }}" = "openmpi" ] && echo "-mca btl ^openib --allow-run-as-root --oversubscribe")" \
-DLCOV_ARGS="--test-name;${{ matrix.use_mpi }}-${{ matrix.use_openmp }}-${{ matrix.use_smm }}-cpu" \
..
Expand Down Expand Up @@ -93,14 +93,14 @@ jobs:
build-on-cuda:
runs-on: ubuntu-latest
container:
image: ghcr.io/cp2k/dbcsr-build-env-ubuntu-20.04-cuda:develop
image: ghcr.io/cp2k/dbcsr-build-env-ubuntu-22.04-cuda:develop

strategy:
matrix:
use_openmp: [OPENMP=ON]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
Expand All @@ -126,15 +126,15 @@ jobs:
build-on-opencl:
runs-on: ubuntu-latest
container:
image: ghcr.io/cp2k/dbcsr-build-env-ubuntu-20.04-cuda:develop
image: ghcr.io/cp2k/dbcsr-build-env-ubuntu-22.04-cuda:develop

strategy:
matrix:
use_openmp: [OPENMP=ON]
use_smm: [SMM=libxsmm]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
Expand Down Expand Up @@ -164,9 +164,10 @@ jobs:
strategy:
matrix:
use_openmp: [OPENMP=ON]
use_g2g: [G2G=ON, G2G=OFF]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
Expand All @@ -176,10 +177,11 @@ jobs:
mkdir -p build
cd build
cmake -G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_${{ matrix.use_openmp }} \
-DUSE_ACCEL=hip \
-DWITH_GPU=Mi100 \
-DWITH_GPU=Mi250 \
-DWITH_${{ matrix.use_g2g }} \
-DWITH_EXAMPLES=ON \
-DCMAKE_PREFIX_PATH=/opt/rocm \
..
Expand All @@ -191,10 +193,10 @@ jobs:
runs-on: ubuntu-latest
needs: build-and-test
container:
image: ghcr.io/cp2k/dbcsr-build-env-ubuntu-20.04:develop
image: ghcr.io/cp2k/dbcsr-build-env-ubuntu-22.04:develop

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Download coverage data
uses: actions/download-artifact@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/testing-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
mpi_suffix: mpich

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
Expand All @@ -45,9 +45,9 @@ jobs:
mkdir -p build
cd build
env \
CC=gcc-11 CXX=g++-11 FC=gfortran-11 \
CC=gcc-12 CXX=g++-12 FC=gfortran-12 \
cmake -G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_${{ matrix.use_mpi }} \
-DUSE_${{ matrix.use_openmp }} \
-DUSE_${{ matrix.use_smm }} \
Expand Down
9 changes: 5 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ default_language_version:

exclude: '^tools/(build_utils/fypp)'
fail_fast: false
minimum_pre_commit_version: 3.2.0
repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.276'
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.3.2'
hooks:
- id: ruff
args: [ --fix, --exit-non-zero-on-fix ]
Expand All @@ -14,13 +15,13 @@ repos:
.cp2k/.*|
)$
- repo: https://github.com/psf/black
rev: 23.3.0
rev: 24.2.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.4.0
rev: v4.5.0
hooks:
- id: check-ast
- id: check-yaml
Expand Down
32 changes: 20 additions & 12 deletions .pre-commit/check_header.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
import re
import mmap
import sys
from os import path
import pathlib
from collections import defaultdict
from os import path, listdir
from contextlib import contextmanager

TYPES = {
Expand Down Expand Up @@ -41,14 +43,19 @@ def mmap_open(name, mode="r"):

def check_header(header_dir, files, verbose=False):
retval = 0
header_re = {}
header_len = {}

for headertype in TYPES:
with open(path.join(header_dir, headertype), "rb") as fhandle:
header_content = fhandle.read()
header_re[headertype] = re.compile(re.escape(header_content))
header_len[headertype] = len(header_content)
header_re = defaultdict(list)
header_len = defaultdict(list)

for headerfile in listdir(header_dir):
headertype = pathlib.Path(headerfile).stem
if headertype in TYPES:
with open(path.join(header_dir, headerfile), "rb") as fhandle:
header_content = fhandle.read()
header_re[headertype].append(re.compile(re.escape(header_content)))
header_len[headertype].append(len(header_content))
else:
print("no matching headerfile to file extensions")
sys.exit(1)

ext_map = {e: t for t, exts in TYPES.items() for e in exts}

Expand All @@ -62,9 +69,10 @@ def check_header(header_dir, files, verbose=False):

with mmap_open(fpath) as fmapped:
header_type = ext_map[fext]
match = header_re[header_type].search(
fmapped, 0, ALLOWED_LINES * MAX_LINE_LENGTH + header_len[header_type]
)
for h_re, h_len in zip(header_re[header_type], header_len[header_type]):
match = h_re.search(fmapped, 0, ALLOWED_LINES * MAX_LINE_LENGTH + h_len)
if match:
break

if not match:
print("✗ {} ... required header not found".format(fpath))
Expand Down
File renamed without changes.
9 changes: 9 additions & 0 deletions .pre-commit/headers/c_cpp.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*------------------------------------------------------------------------------------------------*/
/* Copyright (C) by the DBCSR developers group - All rights reserved */
/* Copyright (C) 2022 Advanced Micro Devices, Inc. - All rights reserved */
/* This file is part of the DBCSR library. */
/* */
/* For information on the license, see the LICENSE file. */
/* For further information please visit https://dbcsr.cp2k.org */
/* SPDX-License-Identifier: GPL-2.0+ */
/*------------------------------------------------------------------------------------------------*/
File renamed without changes.
9 changes: 9 additions & 0 deletions .pre-commit/headers/fortran.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
!--------------------------------------------------------------------------------------------------!
! Copyright (C) by the DBCSR developers group - All rights reserved !
! Copyright (C) 2022 Advanced Micro Devices, Inc. - All rights reserved !
! This file is part of the DBCSR library. !
! !
! For information on the license, see the LICENSE file. !
! For further information please visit https://dbcsr.cp2k.org !
! SPDX-License-Identifier: GPL-2.0+ !
!--------------------------------------------------------------------------------------------------!
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ Christian Pousa <[email protected]>
Dorothea Golze <[email protected]>
Fawzi Mohamed <[email protected]>
Florian Schiffmann <[email protected]>
Gina Sitaraman <[email protected]>
Harald Forbert <[email protected]>
H. Bani-Hashemian <[email protected]>
Iain Bethune <[email protected]>
Ilia Sivkov <[email protected]>
Jan Wilhelm <[email protected]>
Joost VandeVondele <[email protected]>
Juerg Hutter <[email protected]>
Leopold Grinberg <[email protected]>
Lianheng Tong <[email protected]>
Marcella Mauri-Iannuzzi <[email protected]>
Matthias Krack <[email protected]>
Expand Down
Loading

0 comments on commit ba75a56

Please sign in to comment.