Skip to content

Commit

Permalink
Merge branch 'development' into add_IPAC_3DSC_benchmarks
Browse files Browse the repository at this point in the history
cemitch99 authored Nov 22, 2023

Verified

This commit was signed with the committer’s verified signature.
2 parents 5ede71d + 07063de commit 2952204
Showing 180 changed files with 2,681 additions and 1,414 deletions.
91 changes: 85 additions & 6 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,6 +1,85 @@
# Future consideration: cppcoreguidelines-*,clang-analyzer-*,google-*,hicpp-*,llvm-*,misc-*,readability-*,-clang-diagnostic-unused-command-line-argument,-*-namespace-comment*,-*-braces-around-statements,-google-readability-todo,-readability-inconsistent-declaration-parameter-name,-readability-named-parameter
# FIXME: all performance-* reports
# FIXME: all cert-* reports
# FIXME: all bugprone-* reports
Checks: -*,bugprone-*,-bugprone-unhandled-self-assignment,-bugprone-parent-virtual-call,-bugprone-narrowing-conversions,-bugprone-exception-escape,-bugprone-string-literal-with-embedded-nul,cppcoreguidelines-slicing,mpi-*,readability-non-const-parameter,performance-for-range-copy,modernize-*,-modernize-use-trailing-return-type,-modernize-use-bool-literals,-modernize-avoid-c-arrays,-modernize-use-auto,-modernize-return-braced-init-list
HeaderFilterRegex: '((^(?!\/fetchedamrex-src\/).*)$)'
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,
performance-unnecessary-copy-initialization,
performance-unnecessary-value-param,
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: 'src[a-z_A-Z0-9\/]+\.H$'
7 changes: 4 additions & 3 deletions .github/workflows/dependencies/clang-san-openmpi.sh
Original file line number Diff line number Diff line change
@@ -26,10 +26,11 @@ sudo apt-get install -y \
python3-pip \
wget

python3 -m pip install -U pip setuptools wheel
python3 -m pip install -U pip
python3 -m pip install -U build packaging setuptools wheel
python3 -m pip install -U cmake pytest
python3 -m pip install -r requirements_mpi.txt
python3 -m pip install -r examples/requirements.txt
python3 -m pip install -U -r requirements_mpi.txt
python3 -m pip install -U -r examples/requirements.txt

# cmake-easyinstall
#
7 changes: 4 additions & 3 deletions .github/workflows/dependencies/clang-tidy.sh
Original file line number Diff line number Diff line change
@@ -25,10 +25,11 @@ sudo apt-get install -y \
python3-pip \
wget

python3 -m pip install -U pip setuptools wheel
python3 -m pip install -U pip
python3 -m pip install -U build packaging setuptools wheel
python3 -m pip install -U cmake pytest
python3 -m pip install -r requirements_mpi.txt
python3 -m pip install -r examples/requirements.txt
python3 -m pip install -U -r requirements_mpi.txt
python3 -m pip install -U -r examples/requirements.txt

# cmake-easyinstall
#
7 changes: 4 additions & 3 deletions .github/workflows/dependencies/gcc-openmpi.sh
Original file line number Diff line number Diff line change
@@ -22,9 +22,10 @@ sudo apt-get install -y \
python3-pip \
wget

python3 -m pip install -U pip setuptools wheel
python3 -m pip install -U pip
python3 -m pip install -U build packaging setuptools wheel
python3 -m pip install -U cmake pytest
python3 -m pip install -r requirements_mpi.txt
python3 -m pip install -r examples/requirements.txt
python3 -m pip install -U -r requirements_mpi.txt
python3 -m pip install -U -r examples/requirements.txt

python3 -m pip install -U openPMD-validator
5 changes: 3 additions & 2 deletions .github/workflows/dependencies/gcc.sh
Original file line number Diff line number Diff line change
@@ -21,8 +21,9 @@ sudo apt-get install -y \
python3-pip \
wget

python3 -m pip install -U pip setuptools wheel
python3 -m pip install -U pip
python3 -m pip install -U build packaging setuptools wheel
python3 -m pip install -U cmake pytest
python3 -m pip install -r examples/requirements.txt
python3 -m pip install -U -r examples/requirements.txt

python3 -m pip install -U openPMD-validator
27 changes: 17 additions & 10 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -13,12 +13,7 @@ jobs:
if: github.event.pull_request.draft == false
env:
CXXFLAGS: "-Werror -Wno-error=pass-failed"
# For macOS, Ninja is slower than the default:
#CMAKE_GENERATOR: Ninja
# setuptools/mp4py work-around, see
# https://github.com/mpi4py/mpi4py/pull/159
# https://github.com/mpi4py/mpi4py/issues/157#issuecomment-1001022274
SETUPTOOLS_USE_DISTUTILS: stdlib
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: TRUE
steps:
- uses: actions/checkout@v3
- name: Brew Cache
@@ -46,14 +41,21 @@ jobs:
brew install cmake
brew install hdf5-mpi
brew install libomp
brew link --force libomp
brew link --overwrite --force libomp
brew install ninja
brew install open-mpi
brew install pkg-config
python3 -m pip install --upgrade pip setuptools wheel pytest
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade virtualenv
python3 -m venv py-venv
source py-venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade build packaging setuptools wheel pytest
python3 -m pip install --upgrade pytest
python3 -m pip install -r requirements_mpi.txt
python3 -m pip install -r examples/requirements.txt
python3 -m pip install --upgrade -r requirements_mpi.txt
python3 -m pip install --upgrade -r examples/requirements.txt
python3 -m pip install --upgrade openPMD-validator
set -e
- name: CCache Cache
@@ -68,6 +70,8 @@ jobs:
ccache-macos-appleclang-
- name: build ImpactX
run: |
source py-venv/bin/activate
cmake -S . -B build \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DImpactX_PYTHON=ON \
@@ -76,12 +80,15 @@ jobs:
- name: run tests
run: |
source py-venv/bin/activate
ctest --test-dir build --output-on-failure -E pytest.AMReX
- name: run installed python module
run: |
cmake --build build --target pip_install
source py-venv/bin/activate
python3 examples/fodo/run_fodo.py
- name: run installed app
14 changes: 8 additions & 6 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -52,9 +52,10 @@ jobs:
$env:HDF5_DIR = "C:/Program Files/HDF_Group/HDF5/1.12.2/cmake/"
$env:HDF5_USE_STATIC_LIBRARIES = "ON"
python3 -m pip install -U pip setuptools wheel pytest
python3 -m pip install -r requirements.txt
python3 -m pip install -r examples/requirements.txt
python3 -m pip install -U pip
python3 -m pip install -U build packaging setuptools wheel pytest
python3 -m pip install -U -r requirements.txt
python3 -m pip install -U -r examples/requirements.txt
python3 -m pip install -U openPMD-validator
- name: Build
run: |
@@ -137,9 +138,10 @@ jobs:
set "HDF5_DIR=C:/Program Files/HDF_Group/HDF5/1.12.2/cmake/"
set "HDF5_USE_STATIC_LIBRARIES=ON"
python3 -m pip install -U pip setuptools wheel pytest
python3 -m pip install -r requirements.txt
python3 -m pip install -r examples/requirements.txt
python3 -m pip install -U pip
python3 -m pip install -U build packaging setuptools wheel pytest
python3 -m pip install -U -r requirements.txt
python3 -m pip install -U -r examples/requirements.txt
python3 -m pip install -U openPMD-validator
- name: Build
shell: cmd
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
@@ -65,7 +65,7 @@ repos:

# Autoremoves unused Python imports
- repo: https://github.com/hadialqattan/pycln
rev: v2.2.2
rev: v2.4.0
hooks:
- id: pycln
name: pycln (python)
@@ -91,15 +91,15 @@ repos:

# Python Formatting
- repo: https://github.com/psf/black
rev: 23.7.0 # Keep in sync with blacken-docs
rev: 23.11.0 # Keep in sync with blacken-docs
hooks:
- id: black
- repo: https://github.com/asottile/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies:
- black==23.7.0 # keep in sync with black hook
- black==23.11.0 # keep in sync with black hook
# TODO: black-jupyter

# Jupyter Notebooks: clean up all cell outputs
15 changes: 13 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Preamble ####################################################################
#
cmake_minimum_required(VERSION 3.20.0)
project(ImpactX VERSION 23.08)
project(ImpactX VERSION 23.11)

include(${ImpactX_SOURCE_DIR}/cmake/ImpactXFunctions.cmake)

@@ -81,7 +81,7 @@ option(ImpactX_openpmd_internal "Download & build openPMD-api"
option(ImpactX_pyamrex_internal "Download & build pyAMReX" ON)

set(pyImpactX_VERSION_INFO "" CACHE STRING
"PEP-440 conformant version (set by distutils)")
"PEP-440 conformant version (set by setup.py)")

# change the default build type to Release (or RelWithDebInfo) instead of Debug
set_default_build_type("Release")
@@ -407,6 +407,17 @@ if(ImpactX_PYTHON)
${ImpactX_CUSTOM_TARGET_PREFIX}pip_wheel ${ImpactX_CUSTOM_TARGET_PREFIX}pip_install_requirements
${_EXTRA_INSTALL_DEPENDS}
)

# this is for package managers only
add_custom_target(${ImpactX_CUSTOM_TARGET_PREFIX}pip_install_nodeps
${CMAKE_COMMAND} -E env IMPACTX_MPI=${ImpactX_MPI}
${Python_EXECUTABLE} -m pip install --force-reinstall --no-index --no-deps ${PYINSTALLOPTIONS} --find-links=impactx-whl impactx
WORKING_DIRECTORY
${ImpactX_BINARY_DIR}
DEPENDS
pyImpactX
${ImpactX_CUSTOM_TARGET_PREFIX}pip_wheel
)
endif()


Loading

0 comments on commit 2952204

Please sign in to comment.