Skip to content

Commit 0f7c1fb

Browse files
committed
Merge branch 'release-2.7.0'
2 parents ba75a56 + 6e44faf commit 0f7c1fb

File tree

101 files changed

+6012
-2555
lines changed

Some content is hidden

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

101 files changed

+6012
-2555
lines changed
File renamed without changes.

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

+8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
#!/bin/bash -l
2+
####################################################################################################
3+
# Copyright (C) by the DBCSR developers group - All rights reserved #
4+
# This file is part of the DBCSR library. #
5+
# #
6+
# For information on the license, see the LICENSE file. #
7+
# For further information please visit https://dbcsr.cp2k.org #
8+
# SPDX-License-Identifier: GPL-2.0+ #
9+
####################################################################################################
210

311
#SBATCH --export=ALL
412
#SBATCH --constraint="mc"

.ci/daint.cscs.ch/cray.test.sh

+8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
#!/bin/bash -l
2+
####################################################################################################
3+
# Copyright (C) by the DBCSR developers group - All rights reserved #
4+
# This file is part of the DBCSR library. #
5+
# #
6+
# For information on the license, see the LICENSE file. #
7+
# For further information please visit https://dbcsr.cp2k.org #
8+
# SPDX-License-Identifier: GPL-2.0+ #
9+
####################################################################################################
210

311
#SBATCH --export=ALL
412
#SBATCH --constraint="gpu"

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

+8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
#!/bin/bash -l
2+
####################################################################################################
3+
# Copyright (C) by the DBCSR developers group - All rights reserved #
4+
# This file is part of the DBCSR library. #
5+
# #
6+
# For information on the license, see the LICENSE file. #
7+
# For further information please visit https://dbcsr.cp2k.org #
8+
# SPDX-License-Identifier: GPL-2.0+ #
9+
####################################################################################################
210

311
#SBATCH --export=ALL
412
#SBATCH --constraint="mc"

.ci/daint.cscs.ch/gnu.test.sh

+8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
#!/bin/bash -l
2+
####################################################################################################
3+
# Copyright (C) by the DBCSR developers group - All rights reserved #
4+
# This file is part of the DBCSR library. #
5+
# #
6+
# For information on the license, see the LICENSE file. #
7+
# For further information please visit https://dbcsr.cp2k.org #
8+
# SPDX-License-Identifier: GPL-2.0+ #
9+
####################################################################################################
210

311
#SBATCH --export=ALL
412
#SBATCH --constraint="gpu"

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

+8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
#!/bin/bash -l
2+
####################################################################################################
3+
# Copyright (C) by the DBCSR developers group - All rights reserved #
4+
# This file is part of the DBCSR library. #
5+
# #
6+
# For information on the license, see the LICENSE file. #
7+
# For further information please visit https://dbcsr.cp2k.org #
8+
# SPDX-License-Identifier: GPL-2.0+ #
9+
####################################################################################################
210

311
#SBATCH --export=ALL
412
#SBATCH --constraint="mc"

.ci/daint.cscs.ch/intel.test.sh

+8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
#!/bin/bash -l
2+
####################################################################################################
3+
# Copyright (C) by the DBCSR developers group - All rights reserved #
4+
# This file is part of the DBCSR library. #
5+
# #
6+
# For information on the license, see the LICENSE file. #
7+
# For further information please visit https://dbcsr.cp2k.org #
8+
# SPDX-License-Identifier: GPL-2.0+ #
9+
####################################################################################################
210

311
#SBATCH --export=ALL
412
#SBATCH --constraint="gpu"

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

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
#!/bin/bash -l
2+
####################################################################################################
3+
# Copyright (C) by the DBCSR developers group - All rights reserved #
4+
# This file is part of the DBCSR library. #
5+
# #
6+
# For information on the license, see the LICENSE file. #
7+
# For further information please visit https://dbcsr.cp2k.org #
8+
# SPDX-License-Identifier: GPL-2.0+ #
9+
####################################################################################################
210

311
#SBATCH --export=ALL
412
#SBATCH --constraint="mc"
@@ -27,7 +35,7 @@ if [ ! -d "${HOME}/libxsmm" ]; then
2735
fi
2836
cd "${HOME}/libxsmm"
2937
git fetch
30-
git checkout 05705477183444a82c8d9be8d7c2627efd6d67fa
38+
git checkout d009b33e8742a93c9e1549323587fb6197451294
3139
make -j
3240
cd ..
3341

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

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
#!/bin/bash -l
2+
####################################################################################################
3+
# Copyright (C) by the DBCSR developers group - All rights reserved #
4+
# This file is part of the DBCSR library. #
5+
# #
6+
# For information on the license, see the LICENSE file. #
7+
# For further information please visit https://dbcsr.cp2k.org #
8+
# SPDX-License-Identifier: GPL-2.0+ #
9+
####################################################################################################
210

311
#SBATCH --export=ALL
412
#SBATCH --constraint="gpu"
@@ -32,7 +40,7 @@ export OMP_PROC_BIND=TRUE # set thread affinity
3240
# OMP_NUM_THREADS is set by cmake
3341

3442
# use default parameters (omit loading tuned parameters)
35-
export OPENCL_LIBSMM_SMM_PARAMS=0
43+
#export OPENCL_LIBSMM_SMM_PARAMS=0
3644

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

.github/workflows/testing-linux.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757
-DMPI_EXECUTABLE_SUFFIX=.${{ matrix.mpi_suffix }} \
5858
-DMPIEXEC_PREFLAGS="$([ "${{ matrix.mpi_suffix }}" = "openmpi" ] && echo "-mca btl ^openib --allow-run-as-root --oversubscribe")" \
5959
-DLCOV_ARGS="--test-name;${{ matrix.use_mpi }}-${{ matrix.use_openmp }}-${{ matrix.use_smm }}-cpu" \
60+
-DTEST_MPI_RANKS=auto \
6061
..
6162
6263
- name: Build
@@ -113,7 +114,7 @@ jobs:
113114
-DCMAKE_BUILD_TYPE=Debug \
114115
-DUSE_${{ matrix.use_openmp }} \
115116
-DUSE_ACCEL=cuda \
116-
-DWITH_GPU=V100 \
117+
-DWITH_GPU=H100 \
117118
-DWITH_EXAMPLES=ON \
118119
-DWITH_CUDA_PROFILING=ON \
119120
..

.github/workflows/testing-macos.yml

+2-6
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ on:
66
- 'develop'
77
pull_request:
88

9-
# Workaround issue in Xcode 14.1/2
10-
env:
11-
DEVELOPER_DIR: /Applications/Xcode_14.0.1.app/Contents/Developer
12-
139
jobs:
1410
build-and-test:
1511
runs-on: macos-latest
@@ -45,15 +41,15 @@ jobs:
4541
mkdir -p build
4642
cd build
4743
env \
48-
CC=gcc-12 CXX=g++-12 FC=gfortran-12 \
44+
CC=gcc-14 CXX=g++-14 FC=gfortran-14 \
4945
cmake -G Ninja \
5046
-DCMAKE_BUILD_TYPE=Release \
5147
-DUSE_${{ matrix.use_mpi }} \
5248
-DUSE_${{ matrix.use_openmp }} \
5349
-DUSE_${{ matrix.use_smm }} \
5450
$([ "${{ matrix.blas_impl }}" = "openblas" ] && echo '-DCMAKE_PREFIX_PATH=/usr/local/opt/openblas') \
5551
-DMPIEXEC_PREFLAGS="$([ "${{ matrix.mpi_suffix }}" = "openmpi" ] && echo "-mca btl ^openib --allow-run-as-root")" \
56-
-DTEST_MPI_RANKS=1 \
52+
-DTEST_MPI_RANKS=auto \
5753
..
5854
5955
- name: Build

.pre-commit-config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ fail_fast: false
66
minimum_pre_commit_version: 3.2.0
77
repos:
88
- repo: https://github.com/astral-sh/ruff-pre-commit
9-
rev: 'v0.3.2'
9+
rev: 'v0.5.4'
1010
hooks:
1111
- id: ruff
1212
args: [ --fix, --exit-non-zero-on-fix ]
@@ -15,13 +15,13 @@ repos:
1515
.cp2k/.*|
1616
)$
1717
- repo: https://github.com/psf/black
18-
rev: 24.2.0
18+
rev: 24.4.2
1919
hooks:
2020
- id: black
2121
name: Reformat Python files with the black code formatter
2222
files: '^.*(/PACKAGE)|(\.py)$'
2323
- repo: https://github.com/pre-commit/pre-commit-hooks
24-
rev: v4.5.0
24+
rev: v4.6.0
2525
hooks:
2626
- id: check-ast
2727
- id: check-yaml

.pre-commit/check_header.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020

2121
TYPES = {
2222
"c_cpp": [".c", ".h", ".cc", ".hh", ".cxx", ".hxx", ".cpp", ".hpp", ".cu", ".cl"],
23-
"python": [".py"],
24-
"fypp": [".fypp"],
2523
"fortran": [".F", ".f", ".f90", ".f03"],
24+
"script": [".py", ".sh"],
25+
"fypp": [".fypp"],
2626
}
2727

2828
# max number of lines allowed between header and top of file

.pre-commit/clang-format-fypp.sh

+8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
#!/usr/bin/env bash
2+
####################################################################################################
3+
# Copyright (C) by the DBCSR developers group - All rights reserved #
4+
# This file is part of the DBCSR library. #
5+
# #
6+
# For information on the license, see the LICENSE file. #
7+
# For further information please visit https://dbcsr.cp2k.org #
8+
# SPDX-License-Identifier: GPL-2.0+ #
9+
####################################################################################################
210

311
# clang-format change FYPP directives, need to revert the changes.
412

.pre-commit/headers/c_cpp.3

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*------------------------------------------------------------------------------------------------*/
2+
/* Copyright (C) by the DBCSR developers group - All rights reserved */
3+
/* This file is part of the DBCSR library. */
4+
/* */
5+
/* For information on the license, see the LICENSE file. */
6+
/* For further information please visit https://dbcsr.cp2k.org */
7+
/* SPDX-License-Identifier: BSD-3-Clause */
8+
/*------------------------------------------------------------------------------------------------*/
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,8 @@
1-
#!/usr/bin/env bash
21
####################################################################################################
32
# Copyright (C) by the DBCSR developers group - All rights reserved #
43
# This file is part of the DBCSR library. #
54
# #
65
# For information on the license, see the LICENSE file. #
76
# For further information please visit https://dbcsr.cp2k.org #
8-
# SPDX-License-Identifier: GPL-2.0+ #
7+
# SPDX-License-Identifier: BSD-3-Clause #
98
####################################################################################################
10-
11-
FILE=$1
12-
VAL=$2
13-
14-
if [ "${FILE}" ]; then
15-
if [ ! -e "${FILE}" ] || [ "$(cat "${FILE}")" != "${VAL}" ]; then
16-
echo "${VAL}" >"${FILE}"
17-
fi
18-
echo "${FILE}"
19-
else
20-
echo "Usage: $0 filename [value]"
21-
echo " The content of the file will be updated with the value"
22-
echo " if the value is different than the current value."
23-
echo " This suitable to form a Makefile dependency."
24-
fi
25-
26-

CMakeLists.txt

+10-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ cmake_dependent_option(WITH_EXAMPLES "Build the examples" ON "USE_MPI" OFF
8282
)# all examples require MPI
8383

8484
set(TEST_MPI_RANKS
85-
"auto"
85+
2
8686
CACHE STRING "Number of MPI ranks for testing")
8787
set(TEST_OMP_THREADS
8888
2
@@ -99,7 +99,14 @@ set(USE_ACCEL
9999
CACHE STRING "Build with acceleration support (default: none)")
100100
set_property(CACHE USE_ACCEL PROPERTY STRINGS "" opencl cuda hip)
101101

102-
set(SUPPORTED_CUDA_ARCHITECTURES K20X K40 K80 P100 V100 A100)
102+
set(SUPPORTED_CUDA_ARCHITECTURES
103+
K20X
104+
K40
105+
K80
106+
P100
107+
V100
108+
A100
109+
H100)
103110
set(SUPPORTED_HIP_ARCHITECTURES Mi50 Mi100 Mi250)
104111
set(WITH_GPU
105112
$<IF:$<STREQUAL:${USE_ACCEL},"opencl">,"","P100">
@@ -238,6 +245,7 @@ if (USE_ACCEL MATCHES "cuda|hip")
238245
set(GPU_ARCH_NUMBER_P100 60)
239246
set(GPU_ARCH_NUMBER_V100 70)
240247
set(GPU_ARCH_NUMBER_A100 80)
248+
set(GPU_ARCH_NUMBER_H100 90)
241249
set(GPU_ARCH_NUMBER_Mi50 gfx906)
242250
set(GPU_ARCH_NUMBER_Mi100 gfx908)
243251
set(GPU_ARCH_NUMBER_Mi250 gfx90a)

VERSION

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
MAJOR = 2
22
MINOR = 7
3-
PATCH = 0-rc1
3+
PATCH = 0
44
# A specific DATE (YYYY-MM-DD) fixes an official release, otherwise
55
# it is considered Development version.
6-
DATE = 2024-03-13
6+
DATE = 2024-07-29
77

88

cmake/CompilerConfiguration.cmake

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
2-
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-form -std=f2008ts -fimplicit-none -Werror=aliasing -Werror=ampersand -Werror=c-binding-type -Werror=intrinsic-shadow -Werror=intrinsics-std -Werror=line-truncation -Werror=tabs -Werror=target-lifetime -Werror=underflow -Werror=unused-but-set-parameter -Werror=unused-but-set-variable -Werror=unused-variable -Werror=unused-dummy-argument -Werror=conversion -Werror=zerotrip -Werror=uninitialized -Wno-maybe-uninitialized -Werror=unused-parameter")
3-
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10)
4-
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Werror=argument-mismatch") # gcc 10+ has this automatically
2+
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-form -std=f2008ts -fimplicit-none -Werror=aliasing -Werror=ampersand -Werror=c-binding-type -Werror=intrinsic-shadow -Werror=intrinsics-std -Werror=line-truncation -Werror=tabs -Werror=target-lifetime -Werror=underflow -Werror=unused-but-set-parameter -Werror=unused-but-set-variable -Werror=unused-variable -Werror=unused-dummy-argument -Werror=conversion -Werror=zerotrip -Wno-maybe-uninitialized -Werror=unused-parameter")
3+
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10) # comparison against CXX version rather than GFortran version
4+
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch") # required for 10+ (MPI wrap)
55
else ()
6-
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch") # requires for 10+ for the MPI wrap module
6+
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Werror=argument-mismatch") # gcc 10+ has this automatically
7+
endif ()
8+
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13) # comparison against CXX version rather than GFortran version
9+
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Wno-error=uninitialized") # false positive (allocatable array)
710
endif ()
811
set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -g -funroll-loops")
912
set(CMAKE_Fortran_FLAGS_COVERAGE "-O0 -g --coverage -fno-omit-frame-pointer -fcheck=all,no-array-temps -ffpe-trap=invalid,zero,overflow -fbacktrace -finit-real=snan -finit-integer=-42 -finit-derived -Werror=realloc-lhs -finline-matmul-limit=0 -Werror")
@@ -48,6 +51,9 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
4851
if ((NOT (USE_MPI)) OR (NOT ("${MPI_Fortran_LIBRARY_VERSION_STRING}" MATCHES "Open MPI")))
4952
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=leak")
5053
endif ()
54+
if (USE_ACCEL MATCHES "hip" AND hip_VERSION GREATER_EQUAL 6.0.0) # Remove deprecated function error with ROCm v6+
55+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=deprecated-declarations")
56+
endif ()
5157
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
5258
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -funroll-loops")
5359
set(CMAKE_CXX_FLAGS_COVERAGE "-O0 -g --coverage")

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ make
7676
-DWITH_GPU=<P100|K20X|K40|K80|V100|Mi50|Mi100|Mi250>
7777
-DCMAKE_BUILD_TYPE=<Release|Debug|Coverage>
7878
-DBUILD_TESTING=<ON|OFF>
79-
-DTEST_MPI_RANKS=<auto,N>
80-
-DTEST_OMP_THREADS=<2,N>
79+
-DTEST_MPI_RANKS=<2|auto|N>
80+
-DTEST_OMP_THREADS=<2|N>
8181
```
8282

8383
When providing a build of LIBXSMM, make sure the `lib` directory is added to the `PKG_CONFIG_PATH` variable prior

examples/CMakeLists.txt

+9
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ foreach (dbcsr_program_src ${DBCSR_PROGRAM_SRCS_FTN})
88
get_filename_component(dbcsr_program_name ${dbcsr_program_src} NAME_WE)
99
add_executable(${dbcsr_program_name} ${dbcsr_program_src})
1010
target_link_libraries(${dbcsr_program_name} dbcsr)
11+
if (OpenMP_FOUND)
12+
target_link_libraries(${dbcsr_program_name} OpenMP::OpenMP_Fortran)
13+
endif ()
1114

1215
# with the Intel compiler CMake 3.12 seems to forget that the source is
1316
# actually Fortran and needs to be told explicitly:
@@ -29,6 +32,12 @@ if (WITH_C_API)
2932
set(dbcsr_program_name ${dbcsr_program_name}_cpp)
3033
add_executable(${dbcsr_program_name} ${dbcsr_program_src})
3134
target_link_libraries(${dbcsr_program_name} dbcsr_c MPI::MPI_CXX)
35+
set_target_properties(${dbcsr_program_name} PROPERTIES LINKER_LANGUAGE
36+
Fortran)
37+
if (OpenMP_FOUND)
38+
target_compile_options(${dbcsr_program_name} PRIVATE ${OpenMP_CXX_FLAGS})
39+
target_link_libraries(${dbcsr_program_name} OpenMP::OpenMP_Fortran)
40+
endif ()
3241

3342
if (CMAKE_CXX_COMPILER_ID STREQUAL "Cray")
3443
# for recent Cray compiler versions CMake doesn't know

examples/dbcsr_example_3.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ int main(int argc, char* argv[]) {
5353

5454
for (int i = 0; i != mpi_size; ++i) {
5555
if (mpi_rank == i) {
56-
std::cout << "I'm processor " << mpi_rank << " over " << mpi_size << " proc" << ", (" << coord[0] << ", " << coord[1]
57-
<< ") in the 2D grid" << std::endl;
56+
std::cout << "I'm processor " << mpi_rank << " over " << mpi_size << " proc"
57+
<< ", (" << coord[0] << ", " << coord[1] << ") in the 2D grid" << std::endl;
5858
}
5959
MPI_Barrier(MPI_COMM_WORLD);
6060
}

src/acc/acc.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
/* */
55
/* For information on the license, see the LICENSE file. */
66
/* For further information please visit https://dbcsr.cp2k.org */
7-
/* SPDX-License-Identifier: GPL-2.0+ */
7+
/* SPDX-License-Identifier: BSD-3-Clause */
88
/*------------------------------------------------------------------------------------------------*/
99
#ifndef DBCSR_ACC_H
1010
#define DBCSR_ACC_H

0 commit comments

Comments
 (0)