Skip to content

Commit d63bf97

Browse files
committed
merge
2 parents 6c2ff2e + a71d40d commit d63bf97

46 files changed

Lines changed: 1580 additions & 406 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/devcontainer.json

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
// devcontainer.json
22
{
33
"name": "athenapk-dev",
4-
"image": "ghcr.io/parthenon-hpc-lab/cuda11.6-noascent",
5-
// disable Dockerfile for now
6-
//"build": {
7-
// // Path is relative to the devcontainer.json file.
8-
// "dockerfile": "Dockerfile"
9-
//},
4+
"image": "ghcr.io/parthenon-hpc-lab/cuda12.9-mpi-hdf5-opmd",
5+
// Somehow required to make GPUs work inside docker on the CI machine.
6+
// Just passing the runtime and/or --gpus=all works initially but then
7+
// the GPU disappears in the active container.
8+
"runArgs": ["--privileged"],
109
"hostRequirements": {
1110
"cpus": 4
1211
},
@@ -24,17 +23,21 @@
2423
"swyddfa.esbonio",
2524
"tomoki1207.pdf",
2625
"ms-vscode.cmake-tools",
27-
"ms-vsliveshare.vsliveshare"
26+
"ms-vsliveshare.vsliveshare",
27+
"xaver.clang-format",
28+
"ms-python.black-formatter"
2829
]
2930
}
3031
},
3132
"remoteEnv": {
32-
"PATH": "${containerEnv:PATH}:/usr/local/hdf5/parallel/bin",
33+
"PATH": "${containerEnv:PATH}:/home/ci/.local/bin:/usr/local/hdf5/parallel/bin",
3334
"OMPI_MCA_opal_warn_on_missing_libcuda": "0"
3435
},
3536
//"remoteUser": "ubuntu",
3637
// we need to manually checkout the submodules,
3738
// but VSCode may try to configure CMake before they are fully checked-out.
3839
// workaround TBD
39-
"postCreateCommand": "git submodule update --init"
40+
"postCreateCommand": {
41+
"git" : "git submodule update --init"
42+
}
4043
}

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!--Provide a general summary of your changes in the title above, for
2+
example "Add AMR unit test for cell centered fields.". Please avoid
3+
non-descriptive titles such as "Addresses issue #8576".-->
4+
5+
## PR Summary
6+
7+
<!--Please provide at least 1-2 sentences describing the pull request in
8+
detail. Why is this change required? What problem does it solve?-->
9+
10+
<!--If it fixes an open issue, please link to the issue here.-->
11+
12+
## PR Checklist
13+
14+
<!-- Note that some of these check boxes may not apply to all pull requests -->
15+
16+
- [ ] Code passes cpplint
17+
- [ ] New features are documented.
18+
- [ ] Adds a test for any bugs fixed. Adds tests for new features.
19+
- [ ] Code is formatted
20+
- [ ] Changes are summarized in CHANGELOG.md
21+
- [ ] Change is breaking (API, behavior, ...)
22+
- [ ] Change is *additionally* added to CHANGELOG.md in the breaking section
23+
- [ ] PR is marked as breaking
24+
- [ ] Short summary API changes at the top of the PR (plus optionally with an automated update/fix script)
25+
- [ ] Docs build
26+
- [ ] Any contribution that was created or modified with the assistance of generative AI is disclosed here and in code following the [guidelines](https://github.com/parthenon-hpc-lab/athenapk/blob/main/CONTRIBUTING.md#use-of-agentic-coding)

.github/workflows/apply-formatting.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ jobs:
88
runs-on: ubuntu-latest
99
if: startsWith(github.event.comment.body, '@par-hermes format')
1010
steps:
11-
- uses: pgrete/cpp-py-formatter/command@v0.3.0
11+
- uses: pgrete/cpp-py-formatter/command@v0.4.0
1212
with:
1313
botName: par-hermes
14-
clangFormatVersion: 11
14+
clangFormatVersion: 20
1515
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/check-formatting.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
name: Check Python and C++ Formatting
66
runs-on: ubuntu-latest
77
steps:
8-
- uses: pgrete/cpp-py-formatter/check@v0.3.0
8+
- uses: pgrete/cpp-py-formatter/check@v0.4.0
99
with:
10-
clangFormatVersion: 11
10+
clangFormatVersion: 20
1111
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: CI
22

3-
on: [pull_request]
3+
on:
4+
# when triggered manually
5+
workflow_dispatch:
6+
# when auto merge is enabled (hack to make sure it's run before merging)
7+
pull_request:
48

59
# Cancel "duplicated" workflows triggered by pushes to internal
610
# branches with associated PRs.
@@ -25,7 +29,7 @@ jobs:
2529
parallel: ['serial', 'mpi']
2630
runs-on: [self-hosted, A100]
2731
container:
28-
image: ghcr.io/parthenon-hpc-lab/cuda11.6-noascent
32+
image: ghcr.io/parthenon-hpc-lab/cuda12.9-mpi-hdf5-opmd
2933
# map to local user id on CI machine to allow writing to build cache
3034
options: --user 1001 --cap-add CAP_SYS_PTRACE --shm-size="8g" --ulimit memlock=134217728
3135
steps:

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
url = https://github.com/kokkos/kokkos.git
44
[submodule "external/parthenon"]
55
path = external/parthenon
6-
url = https://github.com/lanl/parthenon.git
6+
url = https://github.com/parthenon-hpc-lab/parthenon.git
77
[submodule "external/catch2"]
88
path = external/catch2
99
url = https://github.com/catchorg/Catch2.git

CHANGELOG.md

Lines changed: 84 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,88 @@
22

33
## Current develop (i.e., `main` branch)
44

5+
### General notes
6+
With the latest update of the Parthenon submodule several new features are now available, e.g.,
7+
- [OpenPMD output](https://parthenon-hpc-lab.github.io/parthenon/pgrete/pmd-output/src/outputs.html#openpmd) including support for slices, data compression and coarse graining\
8+
Note, the original naming convention (in the development branch) used for labeling components was not fully standard compliant.
9+
New outputs are automatically written in the standard compliant version.
10+
However, to keep the old scheme (e.g., when restarting from existing simulation data with the intent to keep the timeseries consistent add `openpmd_format_version=1` to the corresponding openpmd output blocks.
11+
- A watchdog (to kill a simulation that hangs for whatever reason). Just run with `-w HH:MM:SS`.
12+
- Support for (tracer) particles with AMR.
13+
- Support for using more parallelism for the ghost zone exchange kernels, which speeds up simulation with few (<10) blocks per rank on device, see [here](https://github.com/parthenon-hpc-lab/parthenon/pull/1271).
14+
A good starting point is `parthenon/mesh/minimum_number_of_teams_for_boundary_kernel=8`.
15+
16+
With the update of Kokkos to version 5.1.1 (or >5.0 in general) a performance regression was identified.
17+
This is likely related to the Kokkos-internal use of int64 indices in the new `mdspan` based `View`s resulting more register usage (which. in turn, results in lower occupancy on devices).
18+
The Kokkos team is aware of this and working on a fix.
19+
If the current performance is (significantly) below expectation, one can try to use "legacy" views via `Kokkos_ENABLE_IMPL_VIEW_LEGACY=ON`.
20+
21+
**IMPORTANT** The latest Parthenon submodule includes a fix for a race condition in the flux correction communication routine when run with mesh refinement on GPUs, see [here](https://github.com/parthenon-hpc-lab/parthenon/pull/1405).
22+
Please update immediately or rebuild AthenaPK with `PARTHENON_DISABLE_SPARSE=OFF` to mitigate the race condition.
23+
24+
### Added (new features/APIs/variables/...)
25+
26+
### Changed (changing behavior/API/variables/...)
27+
28+
### Fixed (not changing behavior/API/variables/...)
29+
- [[PR 172]](https://github.com/parthenon-hpc-lab/athenapk/pull/172) Fixed data race condition in few modes IFT (no practical implication)
30+
31+
### Infrastructure
32+
- [[PR 167]](https://github.com/parthenon-hpc-lab/athenapk/pull/167) Bump Kokkos to 5.1.1 and `Parthenon` to upcoming 26.xx version (incl OpenPMD support)
33+
- [[PR 168]](https://github.com/parthenon-hpc-lab/athenapk/pull/168) Document agentic coding guidelines (and add PR template)
34+
35+
### Removed (removing behavior/API/varaibles/...)
36+
37+
### Incompatibilities (i.e. breaking changes)
38+
- [[PR 167]](https://github.com/parthenon-hpc-lab/athenapk/pull/167) C++20 is now the minimum standard
39+
- [[PR 167]](https://github.com/parthenon-hpc-lab/athenapk/pull/167) New Parthenon submodule changed input file parsing (removed `*pib = pin->pfirst_block;`), see [here](https://github.com/parthenon-hpc-lab/parthenon/pull/1385)
40+
41+
## Release 26.05
42+
43+
### General notes
44+
45+
Particle ids have been updated in Parthenon to be `uint64` and added by default.
46+
Thus, the original "`id`" tracer variable has been removed in favor of the Parthenon default version.
47+
Access to that `id` is done via `auto &id = swarm->Get<std::uint64_t>(swarm_position::id::name()).Get();`
48+
and via `swarm.id` in the `phdf` python tools.
49+
Other postprocessing tools, like VisIt will automatically identify the new field.
50+
51+
From updated Parthenon submodule:
52+
53+
- `packs_per_rank` can now be used instead of `pack_size` in the `<parthenon/mesh>` input block.
54+
It is the new default (i.e., it's set automatically when it's not present in the input file)
55+
because it result in better load balance.
56+
- For simulation on (AMD) GPUs with AMR and many blocks per rank, the number of MPI messages in flight
57+
(especially during mesh refinement) could sometimes cause "Memory access fault by GPU".
58+
This is related to how the MPI library and hardware manage handles to communication buffer in device memory.
59+
To circumvent this issue, Parthenon now supports [coalesced communication](https://parthenon-hpc-lab.github.io/parthenon/develop/src/boundary_communication.html#coalesced-mpi-communication)
60+
where multiple messages between ranks are combined.
61+
This comes at a small performance cost (due to the additional packing and unpacking of messages).
62+
To enable, set `do_coalesced_comms=true` in the `<parthenon/mesh>` block of the input file.
63+
- Input parameters can now be [automatically documented](https://github.com/parthenon-hpc-lab/parthenon/pull/1283)
64+
by adding an optional string as last argument to any `ParameterInput` `Get` or `GetOrAdd` call.
65+
66+
### Added (new features/APIs/variables/...)
67+
- [[PR 162]](https://github.com/parthenon-hpc-lab/athenapk/pull/162) Add pgen for cloud shattering setup
68+
- [[PR 158]](https://github.com/parthenon-hpc-lab/athenapk/pull/158) Update particle id handling (now automated `uint64`). Extend particle history lookback in turbulence pgen and include in turbulence test
69+
- [[PR 157]](https://github.com/parthenon-hpc-lab/athenapk/pull/157) Support injection of blobs with density/temp contrast in turbulence simulations
70+
71+
### Changed (changing behavior/API/variables/...)
72+
- [[PR 163]](https://github.com/parthenon-hpc-lab/athenapk/pull/163) Add normalization by volume for relative B field divergence in history file
73+
74+
### Fixed (not changing behavior/API/variables/...)
75+
- [[PR 160]](https://github.com/parthenon-hpc-lab/athenapk/pull/160) Backport HLLD degeneracy check from Athena++
76+
77+
### Infrastructure
78+
- [[PR 149]](https://github.com/parthenon-hpc-lab/athenapk/pull/149) Allow triggering of pipelines manually
79+
- [[PR 156]](https://github.com/parthenon-hpc-lab/athenapk/pull/156) Bump formatters to clang-format-20 and black 25.12
80+
- [[PR 146]](https://github.com/parthenon-hpc-lab/athenapk/pull/146) Bump Parthenon 25.12 and Kokkos 4.7.02
81+
82+
### Incompatibilities (i.e. breaking changes)
83+
- [[PR 146]](https://github.com/parthenon-hpc-lab/athenapk/pull/146) `pmesh->is_restart` removed. Use `arthenon::Globals::is_restart` instead.
84+
85+
## Release 25.05
86+
587
### IMPORTANT
688

789
If you pulled from `main` after 11 Nov 24 ([[PR 124]](https://github.com/parthenon-hpc-lab/athenapk/pull/124))
@@ -11,7 +93,7 @@ refinement.
1193

1294
### Added (new features/APIs/variables/...)
1395
- [[PR 140]](https://github.com/parthenon-hpc-lab/athenapk/pull/140) Add hydro reflecting boundary conditions
14-
- [[PR102]](https://github.com/parthenon-hpc-lab/athenapk/pull/102) Add support for tracer particles
96+
- [[PR 102]](https://github.com/parthenon-hpc-lab/athenapk/pull/102) Add support for tracer particles
1597
- [[PR 89]](https://github.com/parthenon-hpc-lab/athenapk/pull/89) Add viscosity and resistivity
1698
- [[PR 1]](https://github.com/parthenon-hpc-lab/athenapk/pull/1) Add isotropic thermal conduction and RKL2 supertimestepping
1799

@@ -26,6 +108,7 @@ refinement.
26108
- [[PR 128]](https://github.com/parthenon-hpc-lab/athenapk/pull/128) Fixed `dt_diff` in RKL2
27109

28110
### Infrastructure
111+
- [[PR 150]](https://github.com/parthenon-hpc-lab/athenapk/pull/150) Introduce CalVer and add CONTRIBUTING.md
29112
- [[PR 142]](https://github.com/parthenon-hpc-lab/athenapk/pull/142) Bump Kokkos 4.6.1 and Parthenon 25.05
30113
- [[PR 136]](https://github.com/parthenon-hpc-lab/athenapk/pull/136) Bump Kokkos 4.5.1 (for support of AMD APUs)
31114
- [[PR 129]](https://github.com/parthenon-hpc-lab/athenapk/pull/129) Bump Parthenon to support `dn` based outputs

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ else()
1515
"For further directions open an issue on GitLab.")
1616
endif()
1717

18-
project(athenaPK LANGUAGES CXX)
18+
project(athenaPK VERSION 26.05 LANGUAGES CXX)
1919

2020
set(CMAKE_CXX_EXTENSIONS OFF)
2121
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
22-
set(CMAKE_CXX_STANDARD 17)
22+
set(CMAKE_CXX_STANDARD 20)
2323

2424
# make paths in target_source() absolute
2525
# used for sources in src/pgen folder
@@ -70,6 +70,7 @@ set(PARTHENON_ENABLE_TESTING OFF CACHE BOOL "Disable Parthenon testing.")
7070
set(PARTHENON_DISABLE_OPENMP ON CACHE BOOL "Disable OpenMP")
7171
set(PARTHENON_DISABLE_EXAMPLES ON CACHE BOOL "Don't build Parthenon examples.")
7272
set(PARTHENON_DISABLE_SPARSE ON CACHE BOOL "Disable sparse (not used in AthenaPK yet)")
73+
set(PARTHENON_DISABLE_OPENPMD OFF CACHE BOOL "Enable OpenPMD outputs in AthenaPK by default")
7374

7475
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/external/parthenon/CMakeLists.txt)
7576
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/external/parthenon parthenon)

0 commit comments

Comments
 (0)