forked from ECP-WarpX/WarpX
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge https://github.com/ECP-WarpX/WarpX into ferromagnetic-hysteresis
- Loading branch information
Showing
579 changed files
with
23,268 additions
and
14,875 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
Checks: '-*, | ||
bugprone-* | ||
-bugprone-easily-swappable-parameters, | ||
-bugprone-implicit-widening-of-multiplication-result, | ||
-bugprone-misplaced-widening-cast, | ||
-bugprone-unchecked-optional-access, | ||
cert-* | ||
-cert-err58-cpp, | ||
cppcoreguidelines-avoid-goto, | ||
cppcoreguidelines-interfaces-global-init, | ||
-cppcoreguidelines-avoid-non-const-global-variables, | ||
-cppcoreguidelines-init-variables, | ||
-cppcoreguidelines-macro-usage, | ||
-cppcoreguidelines-narrowing-conversions, | ||
-cppcoreguidelines-no-malloc, | ||
-cppcoreguidelines-owning-memory, | ||
misc-const-correctness, | ||
misc-misleading-bidirectional, | ||
misc-misleading-identifier, | ||
misc-misplaced-const, | ||
misc-uniqueptr-reset-release, | ||
misc-unused-alias-decls, | ||
misc-unused-parameters, | ||
misc-unused-using-decls, | ||
-misc-definitions-in-headers, | ||
modernize-avoid-bind, | ||
modernize-concat-nested-namespaces, | ||
modernize-deprecated-headers, | ||
modernize-deprecated-ios-base-aliases, | ||
modernize-loop-convert, | ||
modernize-make-shared, | ||
modernize-make-unique, | ||
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-nullptr, | ||
mpi-*, | ||
performance-faster-string-find, | ||
performance-for-range-copy, | ||
performance-implicit-conversion-in-loop, | ||
performance-inefficient-algorithm, | ||
performance-inefficient-string-concatenation, | ||
performance-inefficient-vector-operation, | ||
performance-move-const-arg, | ||
performance-move-constructor-init, | ||
performance-no-automatic-move, | ||
performance-no-int-to-ptr, | ||
readability-avoid-const-params-in-decls, | ||
readability-const-return-type, | ||
readability-container-contains, | ||
readability-container-data-pointer, | ||
readability-container-size-empty, | ||
readability-non-const-parameter, | ||
readability-redundant-control-flow, | ||
readability-redundant-declaration, | ||
readability-redundant-function-ptr-dereference, | ||
readability-redundant-member-init, | ||
readability-redundant-preprocessor, | ||
readability-redundant-smartptr-get, | ||
readability-redundant-string-cstr, | ||
readability-redundant-string-init, | ||
readability-simplify-boolean-expr, | ||
readability-simplify-subscript-expr, | ||
readability-static-accessed-through-instance, | ||
readability-static-definition-in-anonymous-namespace, | ||
readability-string-compare, | ||
readability-suspicious-call-argument, | ||
readability-uniqueptr-delete-release, | ||
readability-use-anyofallof, | ||
-readability-uppercase-literal-suffix | ||
' | ||
|
||
CheckOptions: | ||
- key: modernize-pass-by-value.ValuesOnly | ||
value: 'true' | ||
|
||
HeaderFilterRegex: 'Source[a-z_A-Z0-9\/]+\.H$' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: 🧹 clang-tidy | ||
|
||
on: [push, pull_request] | ||
|
||
concurrency: | ||
group: ${{ github.ref }}-${{ github.head_ref }}-clangtidy | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
run_clang_tidy: | ||
name: clang-tidy | ||
runs-on: ubuntu-22.04 | ||
if: github.event.pull_request.draft == false | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: install dependencies | ||
run: | | ||
.github/workflows/dependencies/clang14.sh | ||
- name: build WarpX using clang-tidy | ||
run: | | ||
export CXX=$(which clang++) | ||
export CC=$(which clang) | ||
# The following wrapper ensures that only source files | ||
# in WarpX/Source/* are actually processed by clang-tidy | ||
#_______________________________ | ||
cat > clang_tidy_wrapper << EOF | ||
#!/bin/bash | ||
REGEX="[a-z_A-Z0-9\/]*WarpX\/Source[a-z_A-Z0-9\/]+.cpp" | ||
if [[ \$4 =~ \$REGEX ]];then | ||
clang-tidy \$@ | ||
fi | ||
EOF | ||
chmod +x clang_tidy_wrapper | ||
#_____________________________________ | ||
cmake -S . -B build_clang_tidy \ | ||
-DCMAKE_CXX_CLANG_TIDY="$PWD/clang_tidy_wrapper;--system-headers=0;--config-file=$PWD/.clang-tidy" \ | ||
-DCMAKE_VERBOSE_MAKEFILE=ON \ | ||
-DWarpX_DIMS="1;2;3;RZ" \ | ||
-DWarpX_MPI=ON \ | ||
-DWarpX_COMPUTE=OMP \ | ||
-DWarpX_PSATD=ON \ | ||
-DWarpX_QED=ON \ | ||
-DWarpX_QED_TABLE_GEN=ON \ | ||
-DWarpX_OPENPMD=ON \ | ||
-DWarpX_PRECISION=SINGLE | ||
cmake --build build_clang_tidy -j 2 2> build_clang_tidy/clang-tidy.log | ||
cat build_clang_tidy/clang-tidy.log | ||
if [[ $(wc -m <build_clang_tidy/clang-tidy.log) -gt 1 ]]; then exit 1; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Copyright 2023 The WarpX Community | ||
# | ||
# License: BSD-3-Clause-LBNL | ||
# Authors: Luca Fedeli | ||
|
||
set -eu -o pipefail | ||
|
||
# `man apt.conf`: | ||
# Number of retries to perform. If this is non-zero APT will retry | ||
# failed files the given number of times. | ||
echo 'Acquire::Retries "3";' | sudo tee /etc/apt/apt.conf.d/80-retries | ||
|
||
sudo apt-get -qqq update | ||
sudo apt-get install -y \ | ||
cmake \ | ||
ccache \ | ||
clang-14 \ | ||
clang-tidy-14 \ | ||
libblas-dev \ | ||
libc++-14-dev \ | ||
libboost-math-dev \ | ||
libfftw3-dev \ | ||
libfftw3-mpi-dev \ | ||
libhdf5-openmpi-dev \ | ||
liblapack-dev \ | ||
libopenmpi-dev \ | ||
libomp-dev \ | ||
ninja-build | ||
|
||
# cmake-easyinstall | ||
# | ||
sudo curl -L -o /usr/local/bin/cmake-easyinstall https://raw.githubusercontent.com/ax3l/cmake-easyinstall/main/cmake-easyinstall | ||
sudo chmod a+x /usr/local/bin/cmake-easyinstall | ||
export CEI_SUDO="sudo" | ||
export CEI_TMP="/tmp/cei" | ||
|
||
# BLAS++ & LAPACK++ | ||
cmake-easyinstall \ | ||
--prefix=/usr/local \ | ||
git+https://github.com/icl-utk-edu/blaspp.git \ | ||
-Duse_openmp=OFF \ | ||
-Dbuild_tests=OFF \ | ||
-DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \ | ||
-DCMAKE_VERBOSE_MAKEFILE=ON | ||
|
||
cmake-easyinstall \ | ||
--prefix=/usr/local \ | ||
git+https://github.com/icl-utk-edu/lapackpp.git \ | ||
-Duse_cmake_find_lapack=ON \ | ||
-Dbuild_tests=OFF \ | ||
-DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \ | ||
-DCMAKE_VERBOSE_MAKEFILE=ON |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Copyright 2023 The WarpX Community | ||
# | ||
# License: BSD-3-Clause-LBNL | ||
# Authors: Axel Huebl, Luca Fedeli | ||
|
||
set -eu -o pipefail | ||
|
||
# `man apt.conf`: | ||
# Number of retries to perform. If this is non-zero APT will retry | ||
# failed files the given number of times. | ||
echo 'Acquire::Retries "3";' | sudo tee /etc/apt/apt.conf.d/80-retries | ||
|
||
sudo apt-get -qqq update | ||
sudo apt-get install -y \ | ||
build-essential \ | ||
ca-certificates \ | ||
ccache \ | ||
cmake \ | ||
g++-12 \ | ||
gnupg \ | ||
libboost-math-dev \ | ||
libfftw3-dev \ | ||
libfftw3-mpi-dev \ | ||
libhdf5-openmpi-dev \ | ||
libopenmpi-dev \ | ||
libblas-dev \ | ||
ninja-build \ | ||
pkg-config \ | ||
wget | ||
|
||
# cmake-easyinstall | ||
# | ||
sudo curl -L -o /usr/local/bin/cmake-easyinstall https://raw.githubusercontent.com/ax3l/cmake-easyinstall/main/cmake-easyinstall | ||
sudo chmod a+x /usr/local/bin/cmake-easyinstall | ||
export CEI_SUDO="sudo" | ||
export CEI_TMP="/tmp/cei" | ||
|
||
# BLAS++ & LAPACK++ | ||
cmake-easyinstall \ | ||
--prefix=/usr/local \ | ||
git+https://github.com/icl-utk-edu/blaspp.git \ | ||
-Duse_openmp=OFF \ | ||
-Dbuild_tests=OFF \ | ||
-DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \ | ||
-DCMAKE_VERBOSE_MAKEFILE=ON | ||
|
||
cmake-easyinstall \ | ||
--prefix=/usr/local \ | ||
git+https://github.com/icl-utk-edu/lapackpp.git \ | ||
-Duse_cmake_find_lapack=ON \ | ||
-Dbuild_tests=OFF \ | ||
-DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \ | ||
-DCMAKE_VERBOSE_MAKEFILE=ON |
Oops, something went wrong.