Skip to content

Commit

Permalink
Merge branch 'development' into BenWibking/agora-galaxy
Browse files Browse the repository at this point in the history
  • Loading branch information
BenWibking authored Feb 2, 2024
2 parents 1b0fd91 + 4e15bbc commit 03e240d
Show file tree
Hide file tree
Showing 13 changed files with 174 additions and 120 deletions.
41 changes: 41 additions & 0 deletions .ci/azure-pipelines-aarch64-hwasan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml

trigger:
- development

pr:
autoCancel: true
branches:
include:
- development

jobs:
- job: BuildAndTest
timeoutInMinutes: 180 # how long to run the job before automatically cancelling
pool: oracle-cloud
steps:
- task: CMake@1
displayName: 'Configure CMake'
inputs:
cmakeArgs: '.. -DCMAKE_BUILD_TYPE=Release -DENABLE_HWASAN=ON -DCMAKE_CXX_FLAGS="-fPIC" -DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld" -DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=lld" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DAMReX_SPACEDIM=1'

- task: CMake@1
displayName: 'Build Quokka'
inputs:
cmakeArgs: '--build .'

- task: CMake@1
displayName: 'Run CTest'
inputs:
cmakeArgs: '-E chdir . ctest -j 2 -T Test --output-on-failure'

- task: PublishTestResults@2
inputs:
testResultsFormat: cTest
testResultsFiles: build/Testing/*/Test.xml
testRunTitle: $(Agent.JobName)
condition: succeededOrFailed()
displayName: Publish test results
40 changes: 0 additions & 40 deletions .ci/azure-pipelines-asan.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .ci/azure-pipelines-build-llvm.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .ci/azure-pipelines-debug.yml

This file was deleted.

110 changes: 110 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: CodeQL

on:
push:
branches: [ "development" ]
pull_request:
branches: [ "development" ]
schedule:
- cron: "27 3 * * 0"

concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-codeql
cancel-in-progress: true

jobs:
analyze:
if: ${{ github.repository == 'quokka-astro/quokka' || github.event_name != 'schedule' }}
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ python, cpp ]

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Install Packages (C++)
if: ${{ matrix.language == 'cpp' }}
run: |
sudo apt-get update
sudo apt-get install --yes cmake openmpi-bin libopenmpi-dev libhdf5-openmpi-dev
.github/workflows/dependencies/dependencies_ccache.sh
sudo ln -s /usr/local/bin/ccache /usr/local/bin/g++
- name: Set Up Cache
if: ${{ matrix.language == 'cpp' }}
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
restore-keys: |
ccache-${{ github.workflow }}-${{ github.job }}-git-
- name: Configure (C++)
if: ${{ matrix.language == 'cpp' }}
run: |
cmake -S . -B build \
-DQUOKKA_PYTHON=OFF \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_CXX_COMPILER="/usr/local/bin/g++"
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-and-quality
config-file: ./.github/workflows/codeql/codeql-config.yml

- name: Build (py)
uses: github/codeql-action/autobuild@v3
if: ${{ matrix.language == 'python' }}

- name: Build (C++)
if: ${{ matrix.language == 'cpp' }}
run: |
export CCACHE_COMPRESS=1
export CCACHE_COMPRESSLEVEL=10
export CCACHE_MAXSIZE=30M
ccache -z
cmake --build build -j 4
ccache -s
du -hs ~/.cache/ccache
# Make sure CodeQL has something to do
touch src/main.cpp
export CCACHE_DISABLE=1
cd build
make -j 4
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"

save_pr_number:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Save PR number
env:
PR_NUMBER: ${{ github.event.number }}
run: |
echo $PR_NUMBER > pr_number.txt
- uses: actions/upload-artifact@v4
with:
name: pr_number
path: pr_number.txt
retention-days: 1
10 changes: 10 additions & 0 deletions .github/workflows/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
query-filters:
- exclude:
id:
- cpp/commented-out-code
- cpp/complex-condition
- cpp/equality-on-floats
- cpp/fixme-comment
- cpp/path-injection
- cpp/poorly-documented-function
- cpp/use-of-goto
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ set(AMReX_TINY_PROFILE ON CACHE BOOL "" FORCE)
option(QUOKKA_PYTHON "Compile with Python support (on/off)" ON)
option(DISABLE_FMAD "Disable fused multiply-add instructions on GPU (on/off)" ON)
option(ENABLE_ASAN "Enable AddressSanitizer and UndefinedBehaviorSanitizer" OFF)
option(ENABLE_HWASAN "Enable HWAddressSanitizer" OFF)
option(WARNINGS_AS_ERRORS "Treat compiler warnings as errors" OFF)
option(QUOKKA_OPENPMD "Enable OpenPMD output (on/off)" OFF)

Expand Down
2 changes: 1 addition & 1 deletion extern/Microphysics
Submodule Microphysics updated 126 files
2 changes: 1 addition & 1 deletion extern/amrex
Submodule amrex updated 51 files
+10 −10 .github/workflows/apps.yml
+2 −2 .github/workflows/ascent.yml
+9 −9 .github/workflows/bittree.yml
+13 −13 .github/workflows/clang.yml
+1 −1 .github/workflows/cleanup-cache-postpr.yml
+1 −1 .github/workflows/cleanup-cache.yml
+8 −8 .github/workflows/codeql.yml
+1 −1 .github/workflows/codespell.yml
+13 −13 .github/workflows/cuda.yml
+8 −9 .github/workflows/docs.yml
+55 −55 .github/workflows/gcc.yml
+13 −13 .github/workflows/hip.yml
+15 −15 .github/workflows/hypre.yml
+22 −20 .github/workflows/intel.yml
+5 −5 .github/workflows/macos.yml
+6 −6 .github/workflows/petsc.yml
+1 −1 .github/workflows/post-pr.yml
+2 −2 .github/workflows/sensei.yml
+6 −6 .github/workflows/smoke.yml
+3 −3 .github/workflows/style.yml
+10 −10 .github/workflows/sundials.yml
+6 −6 .github/workflows/windows.yml
+1 −1 Docs/sphinx_documentation/source/EB.rst
+18 −0 Src/Base/AMReX_Algorithm.H
+38 −23 Src/Base/AMReX_BaseFab.H
+12 −0 Src/Base/AMReX_Extension.H
+18 −0 Src/Base/AMReX_Functional.H
+75 −1 Src/Base/AMReX_GpuAtomic.H
+0 −1 Src/Base/AMReX_GpuContainers.H
+30 −2 Src/Base/AMReX_Reduce.H
+14 −0 Src/Base/AMReX_Tuple.H
+48 −1 Src/Base/AMReX_TypeList.H
+3 −2 Src/Particle/AMReX_DenseBins.H
+2 −2 Src/Particle/AMReX_NeighborList.H
+12 −0 Src/Particle/AMReX_Particle.H
+10 −5 Src/Particle/AMReX_ParticleCommunication.H
+0 −5 Src/Particle/AMReX_ParticleContainer.H
+0 −50 Src/Particle/AMReX_ParticleContainerI.H
+57 −18 Src/Particle/AMReX_ParticleIO.H
+2 −2 Src/Particle/AMReX_ParticleLocator.H
+6 −2 Src/Particle/AMReX_ParticleMesh.H
+3 −1 Src/Particle/AMReX_ParticleReduce.H
+10 −2 Src/Particle/AMReX_ParticleTile.H
+10 −2 Src/Particle/AMReX_ParticleTransformation.H
+0 −74 Src/Particle/AMReX_Particle_mod_K.H
+357 −153 Src/Particle/AMReX_TracerParticle_mod_K.H
+23 −10 Src/Particle/AMReX_WriteBinaryParticleData.H
+0 −4 Tests/Particles/AssignDensity/main.cpp
+0 −4 Tests/Particles/AssignMultiLevelDensity/main.cpp
+1 −1 Tests/Particles/CheckpointRestartSOA/main.cpp
+10 −9 Tools/Plotfile/fcompare.cpp
2 changes: 1 addition & 1 deletion extern/fmt
Submodule fmt updated 58 files
+1 −1 .github/workflows/cifuzz.yml
+1 −1 .github/workflows/scorecard.yml
+10 −8 CMakeLists.txt
+6 −4 ChangeLog.md
+27 −32 README.md
+3 −3 doc/_static/bootstrap.min.js
+40 −37 doc/api.rst
+4 −4 doc/build.py
+3 −2 doc/syntax.rst
+1 −1 include/fmt/args.h
+3,041 −0 include/fmt/base.h
+52 −19 include/fmt/chrono.h
+35 −56 include/fmt/color.h
+8 −5 include/fmt/compile.h
+4 −2,968 include/fmt/core.h
+232 −15 include/fmt/format-inl.h
+425 −513 include/fmt/format.h
+15 −8 include/fmt/os.h
+8 −40 include/fmt/ostream.h
+87 −93 include/fmt/printf.h
+122 −87 include/fmt/ranges.h
+23 −15 include/fmt/std.h
+94 −36 include/fmt/xchar.h
+10 −2 src/fmt.cc
+24 −29 src/os.cc
+1 −1 support/bazel/.bazelversion
+4 −16 support/bazel/BUILD.bazel
+4 −0 support/bazel/MODULE.bazel
+27 −6 support/bazel/README.md
+3 −2 support/manage.py
+2 −2 test/CMakeLists.txt
+1 −1 test/add-subdirectory-test/main.cc
+11 −9 test/args-test.cc
+1 −1 test/assert-test.cc
+134 −128 test/base-test.cc
+1 −0 test/chrono-test.cc
+3 −5 test/compile-fp-test.cc
+16 −8 test/compile-test.cc
+1 −1 test/cuda-test/cpp14.cc
+1 −1 test/cuda-test/cuda-cpp14.cu
+121 −65 test/format-test.cc
+1 −1 test/fuzzing/fuzzer-common.h
+18 −23 test/gtest-extra-test.cc
+3 −3 test/gtest-extra.cc
+1 −1 test/header-only-test.cc
+4 −1 test/mock-allocator.h
+1 −1 test/noexception-test.cc
+19 −24 test/os-test.cc
+5 −5 test/ostream-test.cc
+27 −38 test/posix-mock-test.cc
+13 −9 test/printf-test.cc
+1 −0 test/ranges-odr-test.cc
+63 −1 test/ranges-test.cc
+53 −61 test/scan-test.cc
+275 −273 test/scan.h
+18 −0 test/std-test.cc
+4 −5 test/util.cc
+32 −25 test/xchar-test.cc
7 changes: 7 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ if(ENABLE_ASAN)
add_link_options(-fsanitize=address -fsanitize=undefined)
endif(ENABLE_ASAN)

if(ENABLE_HWASAN)
# enable HWAddressSanitizer for debugging
message(STATUS "Compiling with HWAddressSanitizer *enabled*")
add_compile_options(-fsanitize=hwaddress)
add_link_options(-fsanitize=hwaddress)
endif(ENABLE_HWASAN)

if(DISABLE_FMAD)
message(STATUS "Fused multiply-add (FMAD) is disabled for device code.")
add_compile_options($<$<COMPILE_LANGUAGE:C>:-ffp-contract=off>)
Expand Down

0 comments on commit 03e240d

Please sign in to comment.