Skip to content

Commit

Permalink
Merge Release 1.8.0
Browse files Browse the repository at this point in the history
Release 1.8.0

The Ginkgo team is proud to announce the new Ginkgo minor release 1.8.0. This
release brings new features such as:
- A brand new file-based configuration for Ginkgo objects: you can now construct
  Ginkgo objects (solvers, preconditioners, ...) from a JSON configuration file.
  This simplifies interfacing to Ginkgo as well as exploring different settings
  to solve a problem.
- Expand the batched feature set with: the Batched CSR Matrix format, batched CG
  solver, batched (Block-)Jacobi preconditioner, usage example and other
  features such as scaling,
- New Distributed Multigrid and the PGM coarsening method,
- New CUDA and HIP kernels for Reverse Cuthill McKee (RCM) reordering
- Better Ginkgo and Kokkos interaction thanks to a mapping from simple Ginkgo
  types to native Kokkos types

and more!

If you face an issue, please first check our [known issues page](https://github.com/ginkgo-project/ginkgo/wiki/Known-Issues) and the [open issues list](https://github.com/ginkgo-project/ginkgo/issues) and if you do not find a solution, feel free to [open a new issue](https://github.com/ginkgo-project/ginkgo/issues/new/choose) or ask a question using the [github discussions](https://github.com/ginkgo-project/ginkgo/discussions).

For detailed changes, please check our [CHANGELOG.md](./CHANGELOG.md) file.

Related PR: #1622
  • Loading branch information
tcojean committed Jun 13, 2024
2 parents 49242ff + e7b0127 commit 586b175
Show file tree
Hide file tree
Showing 1,645 changed files with 42,964 additions and 46,579 deletions.
21 changes: 7 additions & 14 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@ Language: Cpp
# BasedOnStyle: Google
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignConsecutiveAssignments: None
AlignConsecutiveDeclarations: None
AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: true
AfterNamespace: false
Expand Down Expand Up @@ -58,13 +58,6 @@ ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeCategories:
- Regex: '^<.*\.h>'
Priority: 1
- Regex: '^<.*'
Priority: 2
- Regex: '.*'
Priority: 3
IncludeIsMainRegex: '([-_](test|unittest))?$'
IndentCaseLabels: false
IndentWidth: 4
Expand All @@ -88,7 +81,7 @@ PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SortIncludes: CaseInsensitive
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
Expand All @@ -101,7 +94,7 @@ SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
Standard: c++14
TabWidth: 8
UseTab: Never
...
Expand Down
3 changes: 3 additions & 0 deletions .github/_typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ extend-exclude = ["third_party/*", "*.svg"]
[default.extend-words]
dout = "dout"
nd = "nd"
ans = "ans"
tht = "tht"
thr = "thr"
iy = "iy"
automatical = "automatical"
strat = "strat"
entrie = "entrie"
Expand Down
6 changes: 5 additions & 1 deletion .github/bot-base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ API_HEADER="Accept: application/vnd.github.v3+json"
AUTH_HEADER="Authorization: token $GITHUB_TOKEN"

api_get() {
curl -X GET -s -H "${AUTH_HEADER}" -H "${API_HEADER}" "$1"
curl -X GET -s -H "${AUTH_HEADER}" -H "${API_HEADER}" "$1" > $RUNNER_TEMP/output.json
cat $RUNNER_TEMP/output.json
if [[ "$RUNNER_DEBUG" == "1" ]]; then
cat $RUNNER_TEMP/output.json 1>&2
fi
}

api_post() {
Expand Down
31 changes: 12 additions & 19 deletions .github/bot-pr-format-base.sh
Original file line number Diff line number Diff line change
@@ -1,39 +1,32 @@
#!/usr/bin/env bash

source .github/bot-pr-base.sh
cp .github/bot-pr-base.sh /tmp
source /tmp/bot-pr-base.sh

echo "Retrieving PR file list"
PR_FILES=$(bot_get_all_changed_files ${PR_URL})
NUM=$(echo "${PR_FILES}" | wc -l)
echo "PR has ${NUM} changed files"

TO_FORMAT="$(echo "$PR_FILES" | grep -E $EXTENSION_REGEX || true)"
echo "Set-up working tree"

git remote add fork "$HEAD_URL"
git fetch fork "$HEAD_BRANCH"
git fetch origin "$BASE_BRANCH"

git config user.email "[email protected]"
git config user.name "ginkgo-bot"

# save scripts from develop
pushd dev_tools/scripts
cp add_license.sh format_header.sh update_ginkgo_header.sh /tmp
popd
cp .clang-format .pre-commit-config.yaml /tmp
pushd dev_tools/scripts || exit 1
cp format_header.sh update_ginkgo_header.sh /tmp
popd || exit 1

# checkout current PR head
LOCAL_BRANCH=format-tmp-$HEAD_BRANCH
git checkout -b $LOCAL_BRANCH fork/$HEAD_BRANCH

# restore files from develop
cp /tmp/add_license.sh dev_tools/scripts/
cp /tmp/.clang-format .
cp /tmp/.pre-commit-config.yaml .
cp /tmp/format_header.sh dev_tools/scripts/
cp /tmp/update_ginkgo_header.sh dev_tools/scripts/

# format files
dev_tools/scripts/add_license.sh
dev_tools/scripts/update_ginkgo_header.sh
for f in $(echo "$TO_FORMAT" | grep -E $FORMAT_HEADER_REGEX); do dev_tools/scripts/format_header.sh "$f"; done
for f in $(echo "$TO_FORMAT" | grep -E $FORMAT_REGEX); do "$CLANG_FORMAT" -i -style=file "$f"; done

# restore formatting scripts so they don't appear in the diff
git checkout -- dev_tools/scripts/*.sh
# make base pre-commit config available
git add .pre-commit-config.yaml
13 changes: 13 additions & 0 deletions .github/check-format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,30 @@
cp .github/bot-pr-format-base.sh /tmp
source /tmp/bot-pr-format-base.sh

echo "Run Pre-Commit checks"

pipx run pre-commit run --show-diff-on-failure --color=always --from-ref "origin/$BASE_BRANCH" --to-ref HEAD || true

echo -n "Collecting information on changed files"

git restore --staged .pre-commit-config.yaml
git checkout -- dev_tools/scripts/*.sh .pre-commit-config.yaml .clang-format

# check for changed files, replace newlines by \n
LIST_FILES=$(git diff --name-only | sed '$!s/$/\\n/' | tr -d '\n')
echo -n .

git diff > /tmp/format.patch
mv /tmp/format.patch .
echo -n .

bot_delete_comments_matching "Error: The following files need to be formatted"
echo -n .

if [[ "$LIST_FILES" != "" ]]; then
MESSAGE="The following files need to be formatted:\n"'```'"\n$LIST_FILES\n"'```'
MESSAGE="$MESSAGE\nYou can find a formatting patch under **Artifacts** [here]"
MESSAGE="$MESSAGE($JOB_URL) or run "'`format!` if you have write access to Ginkgo'
bot_error "$MESSAGE"
fi
echo .
49 changes: 0 additions & 49 deletions .github/format-rebase.sh

This file was deleted.

15 changes: 13 additions & 2 deletions .github/format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,22 @@
cp .github/bot-pr-format-base.sh /tmp
source /tmp/bot-pr-format-base.sh

# format files
echo "Formatting files"

pipx run pre-commit run --from-ref "origin/$BASE_BRANCH" --to-ref HEAD || true

# restore formatting scripts so they don't appear in the diff
git restore --staged .pre-commit-config.yaml
git checkout -- dev_tools/scripts/*.sh .pre-commit-config.yaml .clang-format

# check for changed files, replace newlines by \n
LIST_FILES=$(git diff --name-only | sed '$!s/$/\\n/' | tr -d '\n')
CHANGES=$(git diff --name-only | sed '$!s/$/\\n/' | tr -d '\n')

echo "$CHANGES"

# commit changes if necessary
if [[ "$LIST_FILES" != "" ]]; then
if [[ "$CHANGES" != "" ]]; then
git commit -a -m "Format files
Co-authored-by: $USER_COMBINED"
Expand Down
2 changes: 0 additions & 2 deletions .github/mirror.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/env bash

BRANCH_NAME=${BRANCH_NAME##*/}

git remote add fork "[email protected]:${GITHUB_REPO}.git"
git remote add gitlab "[email protected]:ginkgo-project/ginkgo-public-ci.git"

Expand Down
64 changes: 9 additions & 55 deletions .github/workflows/bot-pr-comment.yml
Original file line number Diff line number Diff line change
@@ -1,86 +1,40 @@
name: OnCommentPR

on:
issue_comment:
types: [created]
name: OnCommentPR

jobs:
label:
runs-on: ubuntu-latest
if: github.event.issue.pull_request != '' && github.event.comment.body == 'label!' && (github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER')
steps:
- name: Checkout the latest code (shallow clone)
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: develop
- name: Add appropriate labels
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
run: cp --preserve .github/label.sh /tmp && /tmp/label.sh

check_format:
name: check-format
runs-on: ubuntu-22.04
if: github.event.issue.pull_request != '' && github.event.comment.body == 'check-format!' && (github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER')
steps:
- name: Checkout the latest code (shallow clone)
uses: actions/checkout@v3
with:
ref: develop
- name: Check for formatting changes
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
run: cp --preserve .github/check-format.sh /tmp && /tmp/check-format.sh
- name: Upload code formatting patch
if: failure()
uses: actions/upload-artifact@v3
with:
name: patch
path: format.patch
uses: ./.github/workflows/check-formatting.yml
secrets: inherit

format:
name: format
runs-on: ubuntu-22.04
if: github.event.issue.pull_request != '' && github.event.comment.body == 'format!' && (github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER')
steps:
- name: Checkout the latest code (shallow clone)
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: develop
persist-credentials: false
- name: Commit formatting changes
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
run: cp --preserve .github/format.sh /tmp && /tmp/format.sh
rebase:
name: rebase
if: github.event.issue.pull_request != '' && github.event.comment.body == 'rebase!' && (github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER')
runs-on: ubuntu-latest
steps:
- name: Checkout the latest code
uses: actions/checkout@v3
with:
ref: develop
fetch-depth: 0
persist-credentials: false
- name: Automatic Rebase
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
run: cp --preserve .github/rebase.sh /tmp && /tmp/rebase.sh
format-rebase:
name: format-rebase
if: github.event.issue.pull_request != '' && github.event.comment.body == 'format-rebase!' && (github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER')
runs-on: ubuntu-22.04
steps:
- name: Checkout the latest code
uses: actions/checkout@v3
with:
ref: develop
fetch-depth: 0
persist-credentials: false
- name: Automatic Formatting Rebase
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
run: cp --preserve .github/format-rebase.sh /tmp && /tmp/format-rebase.sh
- name: Upload code formatting diffs
if: success()
uses: actions/upload-artifact@v3
with:
name: patch
path: diff.patch
2 changes: 1 addition & 1 deletion .github/workflows/bot-pr-created.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
if: github.event.pull_request.author_association == 'COLLABORATOR' || github.event.pull_request.author_association == 'MEMBER' || github.event.pull_request.author_association == 'OWNER'
steps:
- name: Checkout the latest code (shallow clone)
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: develop
- name: Add appropriate labels
Expand Down
Loading

0 comments on commit 586b175

Please sign in to comment.