Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into feature_update_mpp
Browse files Browse the repository at this point in the history
  • Loading branch information
pcarruscag committed Aug 7, 2023
2 parents ef77c7b + 3278ea9 commit 5d282b0
Show file tree
Hide file tree
Showing 737 changed files with 64,593 additions and 204,247 deletions.
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ BasedOnStyle: Google
PointerAlignment: Left
DerivePointerAlignment: false
ColumnLimit: 120
SortIncludes: Never
5 changes: 5 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Checks: '-*,modernize-avoid-bind,modernize-deprecated-headers,modernize-deprecated-ios-base-aliases,modernize-macro-to-enum,modernize-pass-by-value,modernize-raw-string-literal,modernize-redundant-void-arg,modernize-replace-auto-ptr,modernize-replace-disallow-copy-and-assign-macro,modernize-replace-random-shuffle,modernize-return-braced-init-list,modernize-shrink-to-fit,modernize-unary-static-assert,modernize-use-auto,modernize-use-bool-literals,modernize-use-default-member-init,modernize-use-emplace,modernize-use-equals-default,modernize-use-equals-delete,modernize-use-noexcept,modernize-use-nullptr,modernize-use-override,modernize-use-transparent-functors,modernize-use-using,readability-const-return-type,readability-avoid-const-params-in-decls,readability-container-data-pointer,readability-container-size-empty,readability-delete-null-pointer,readability-duplicate-include,readability-non-const-parameter,readability-redundant-access-specifiers,readability-redundant-control-flow,readability-redundant-declaration,readability-redundant-function-ptr-dereference,readability-redundant-smartptr-get,readability-redundant-string-cstr,readability-redundant-string-init,readability-simplify-boolean-expr,readability-simplify-subscript-expr,readability-else-after-return,performance-*'
CheckOptions:
- {key: modernize-use-override.AllowOverrideAndFinal, value: 'true'}
- {key: performance-unnecessary-copy-initialization.AllowedTypes, value: 'su2double'}
- {key: performance-unnecessary-value-param.AllowedTypes, value: 'su2double'}
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ assignees: ''
- C++ compiler and version: [e.g., g++ (GCC) 4.8.5]
- MPI implementation and version: [e.g., OpenMPI 3.0.0]
- SU2 Version: [e.g., v6.2.0]

3 changes: 2 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Proposed Changes
*Give a brief overview of your contribution here in a few sentences.*



## Related Work
Expand All @@ -14,5 +14,6 @@
- [ ] I am submitting my contribution to the develop branch.
- [ ] My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
- [ ] My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
- [ ] I used the pre-commit hook to prevent dirty commits and used `pre-commit run --all` to format old commits.
- [ ] I have added a test case that demonstrates my contribution, if necessary.
- [ ] I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary.
1 change: 0 additions & 1 deletion .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ changelog:
- title: 'Other Changes'
labels:
- "*"

2 changes: 1 addition & 1 deletion .github/workflows/change-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
id: extract_branch
- name: Change the version number
run: |
SU2_PY/change_version_number.py -v ${GITHUB_REF##*/release_v} -r Blackbird -y
SU2_PY/change_version_number.py -v ${GITHUB_REF##*/release_v} -r Harrier -y
- name: Commit files
run: |
git config --local user.email "[email protected]"
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Code Style
on:
pull_request:
paths:
- "**.[ch]pp"
- "**.[ch]"
- "**.cfg"
- "**.py"

jobs:
formatting:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.10'
check-latest: true
- name: Install pre-commit
run: pip install pre-commit
- name: Run checks
run: pre-commit run -a -v
- name: Git status
if: always()
run: git status
- name: Full diff
if: always()
run: git diff
115 changes: 102 additions & 13 deletions .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,23 @@ jobs:
config_set: [BaseMPI, ReverseMPI, ForwardMPI, BaseNoMPI, ReverseNoMPI, ForwardNoMPI, BaseOMP, ReverseOMP, ForwardOMP]
include:
- config_set: BaseMPI
flags: '-Denable-pywrapper=true -Denable-coolprop=true -Denable-mpp=true -Denable-tests=true --warnlevel=2'
flags: '-Denable-pywrapper=true -Denable-coolprop=true -Denable-mpp=true -Denable-mlpcpp=true -Denable-tests=true --warnlevel=2 --werror'
- config_set: ReverseMPI
flags: '-Denable-autodiff=true -Denable-normal=false -Denable-pywrapper=true -Denable-tests=true --warnlevel=3 --werror'
- config_set: ForwardMPI
flags: '-Denable-directdiff=true -Denable-normal=false -Denable-tests=true --warnlevel=3 --werror'
- config_set: BaseNoMPI
flags: '-Denable-pywrapper=true -Denable-openblas=true -Dwith-mpi=disabled -Denable-tests=true --warnlevel=3 --werror'
flags: '-Denable-pywrapper=true -Denable-openblas=true -Dwith-mpi=disabled -Denable-mlpcpp=true -Denable-tests=true --warnlevel=3 --werror'
- config_set: ReverseNoMPI
flags: '-Denable-autodiff=true -Denable-normal=false -Dwith-mpi=disabled -Denable-pywrapper=true -Denable-tests=true --warnlevel=3 --werror'
- config_set: ForwardNoMPI
flags: '-Denable-directdiff=true -Denable-normal=false -Dwith-mpi=disabled -Denable-tests=true --warnlevel=3 --werror'
- config_set: BaseOMP
flags: '-Dwith-omp=true -Denable-mixedprec=true -Denable-pywrapper=true -Denable-tecio=false --warnlevel=3 --werror'
- config_set: ReverseOMP
flags: '-Denable-autodiff=true -Denable-normal=false -Dwith-omp=true -Denable-mixedprec=true -Denable-tecio=false --warnlevel=3 --werror'
flags: '-Denable-autodiff=true -Denable-normal=false -Dwith-omp=true -Denable-mixedprec=true -Denable-pywrapper=true -Denable-tecio=false --warnlevel=3 --werror'
- config_set: ForwardOMP
flags: '-Denable-directdiff=true -Denable-normal=false -Dwith-omp=true -Denable-mixedprec=true -Denable-tecio=false --warnlevel=3 --werror'
flags: '-Denable-directdiff=true -Denable-normal=false -Dwith-omp=true -Denable-mixedprec=true -Denable-pywrapper=true -Denable-tecio=false --warnlevel=3 --werror'
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}
steps:
- name: Cache Object Files
Expand All @@ -52,12 +52,12 @@ jobs:
key: ${{ matrix.config_set }}-${{ github.sha }}
restore-keys: ${{ matrix.config_set }}
- name: Pre Cleanup
uses: docker://ghcr.io/su2code/su2/build-su2:230227-1421
uses: docker://ghcr.io/su2code/su2/build-su2:230704-1323
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
- name: Build
uses: docker://ghcr.io/su2code/su2/build-su2:230227-1421
uses: docker://ghcr.io/su2code/su2/build-su2:230704-1323
with:
args: -b ${{github.ref}} -f "${{matrix.flags}}"
- name: Compress binaries
Expand All @@ -68,7 +68,50 @@ jobs:
name: ${{ matrix.config_set }}
path: install_bin.tgz
- name: Post Cleanup
uses: docker://ghcr.io/su2code/su2/build-su2:230227-1421
uses: docker://ghcr.io/su2code/su2/build-su2:230704-1323
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
build_tsan:
name: Build SU2 (tsan)
if: inputs.runner != 'ARM64'
strategy:
fail-fast: false
matrix:
config_set: [BaseOMP-tsan, ReverseOMP-tsan] #ForwardOMP-tsan
include:
- config_set: BaseOMP-tsan
flags: '--buildtype=debugoptimized -Dwith-omp=true -Denable-mixedprec=true -Denable-tecio=false --warnlevel=3'
- config_set: ReverseOMP-tsan
flags: '--buildtype=debugoptimized -Denable-autodiff=true -Denable-normal=false -Dwith-omp=true -Denable-mixedprec=true -Denable-tecio=false --warnlevel=3'
#- config_set: ForwardOMP-tsan
# flags: '--buildtype=debug -Denable-directdiff=true -Denable-normal=false -Dwith-omp=true -Denable-mixedprec=true -Denable-pywrapper=true -Denable-tecio=false --warnlevel=3 --werror'
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}
steps:
- name: Cache Object Files
uses: actions/cache@v3
with:
path: ccache
key: ${{ matrix.config_set }}-${{ github.sha }}
restore-keys: ${{ matrix.config_set }}
- name: Pre Cleanup
uses: docker://ghcr.io/su2code/su2/build-su2-tsan:230704-1323
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
- name: Build
uses: docker://ghcr.io/su2code/su2/build-su2-tsan:230704-1323
with:
args: -b ${{github.ref}} -f "${{matrix.flags}}"
- name: Compress binaries
run: tar -zcvf install_bin.tgz install/bin
- name: Upload Binaries
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.config_set }}
path: install_bin.tgz
- name: Post Cleanup
uses: docker://ghcr.io/su2code/su2/build-su2-tsan:230704-1323
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
Expand Down Expand Up @@ -99,7 +142,7 @@ jobs:
tag: OMP
steps:
- name: Pre Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2:230227-1421
uses: docker://ghcr.io/su2code/su2/test-su2:230704-1323
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
Expand All @@ -125,12 +168,58 @@ jobs:
chmod a+x $BIN_FOLDER/*
ls -lahR $BIN_FOLDER
- name: Run Tests in Container
uses: docker://ghcr.io/su2code/su2/test-su2:230227-1421
uses: docker://ghcr.io/su2code/su2/test-su2:230704-1323
with:
# -t <Tutorials-branch> -c <Testcases-branch>
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}}
- name: Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2:230227-1421
uses: docker://ghcr.io/su2code/su2/test-su2:230704-1323
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
thread_sanitizer_tests:
if: inputs.runner != 'ARM64'
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}
name: Thread Sanitizer Tests
needs: build_tsan
strategy:
fail-fast: false
matrix:
testscript: ['hybrid_regression.py', 'hybrid_regression_AD.py']
steps:
- name: Pre Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2-tsan:230704-1323
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
- name: Download All artifacts
uses: actions/download-artifact@v3
- name: Uncompress and Move Binaries
run: |
BIN_FOLDER="$PWD/install/bin"
mkdir -p $BIN_FOLDER
ls -lah $BIN_FOLDER
for type in Base Reverse Forward; do
TYPE_FOLDER="${type}OMP-tsan"
echo "Processing '$TYPE_FOLDER' ..."
if [ -d $TYPE_FOLDER ]; then
pushd $TYPE_FOLDER
ls -lah
tar -zxvf install_bin.tgz
ls -lah install/bin/
cp -r install/bin/* $BIN_FOLDER;
popd;
fi
done
chmod a+x $BIN_FOLDER/*
ls -lahR $BIN_FOLDER
- name: Run Tests in Container
uses: docker://ghcr.io/su2code/su2/test-su2-tsan:230704-1323
with:
# -t <Tutorials-branch> -c <Testcases-branch>
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--tsan"
- name: Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2-tsan:230704-1323
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
Expand All @@ -151,7 +240,7 @@ jobs:
tag: MPI
steps:
- name: Pre Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2:230227-1421
uses: docker://ghcr.io/su2code/su2/test-su2:230704-1323
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
Expand Down Expand Up @@ -212,11 +301,11 @@ jobs:
echo $PWD
ls -lahR
- name: Run Unit Tests
uses: docker://ghcr.io/su2code/su2/test-su2:230227-1421
uses: docker://ghcr.io/su2code/su2/test-su2:230704-1323
with:
entrypoint: install/bin/${{matrix.testdriver}}
- name: Post Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2:230227-1421
uses: docker://ghcr.io/su2code/su2/test-su2:230704-1323
with:
entrypoint: /bin/rm
args: -rf install install_bin.tgz src ccache ${{ matrix.config_set }}
3 changes: 1 addition & 2 deletions .github/workflows/release-management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
key: ${{ matrix.os_bin }}-${{ github.sha }}
restore-keys: ${{ matrix.os_bin }}
- name: Build
uses: docker://ghcr.io/su2code/su2/build-su2-cross:230227-1421
uses: docker://ghcr.io/su2code/su2/build-su2-cross:230704-1323
with:
args: -b ${{ github.sha }} -f "${{matrix.flags}}"
- name: Create Archive
Expand Down Expand Up @@ -65,4 +65,3 @@ jobs:
asset_path: ${{matrix.os_bin}}.zip
asset_name: SU2-${{ steps.update_release.outputs.tagname }}-${{matrix.os_bin}}.zip
asset_content_type: application/zip

13 changes: 13 additions & 0 deletions .github/workflows/require-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Pull Request Labels
on:
pull_request:
types: [opened, labeled, unlabeled, synchronize]
jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: mheap/github-action-required-labels@v3
with:
mode: exactly
count: 1
labels: "changelog:feature, changelog:fix, changelog:chore"
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,9 @@ ninja

# Ignore vscode folder
.vscode/

# Ignore SU2 pre-configuration timestamp created by preconfigure.py
su2preconfig.timestamp

# Clangd server files
.cache
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@
[submodule "externals/mel"]
path = externals/mel
url = https://github.com/pcarruscag/MEL.git
[submodule "subprojects/MLPCpp"]
path = subprojects/MLPCpp
url = https://github.com/EvertBunschoten/MLPCpp.git
19 changes: 0 additions & 19 deletions .lgtm.yml

This file was deleted.

6 changes: 6 additions & 0 deletions .pep8
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[pycodestyle]
max_line_length = 120
ignore = E402
in-place = true
aggressive = 2
recursive = true
62 changes: 62 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
repos:
# Official repo for the clang-format hook
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: "v15.0.7"
hooks:
- id: clang-format
exclude: |
(?x)^(
^Common/include/CConfig.hpp|
^Common/include/option_structure.hpp|
^Common/src/CConfig.cpp|
^SU2_CFD|
^externals|
^subprojects|
^TestCases|
^legacy
)
types_or: [c++, c]
# black repo for python formatting
- repo: https://github.com/ambv/black
rev: 22.6.0
hooks:
- id: black
exclude: |
(?x)^(
^SU2_CFD|
^externals|
^subprojects|
^TestCases|
^legacy
)
# Official repo for default hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.4.0"
hooks:
- id: mixed-line-ending
exclude: |
(?x)^(
^SU2_CFD|
^externals|
^subprojects|
^TestCases|
^legacy
)
- id: trailing-whitespace
exclude: |
(?x)^(
^SU2_CFD|
^externals|
^subprojects|
^TestCases|
^legacy
)
- id: end-of-file-fixer
exclude: |
(?x)^(
^SU2_CFD|
^externals|
^subprojects|
^TestCases|
^legacy
)
Loading

0 comments on commit 5d282b0

Please sign in to comment.