Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
850 commits
Select commit Hold shift + click to select a range
dd8a35b
(RUNTEST)
haykh Apr 4, 2025
cb34e94
mpi tests fixed (RUNTEST)
haykh Apr 4, 2025
0bc510f
added non-mpi cpu test action (RUNTEST)
haykh Apr 4, 2025
3d2d60f
Merge pull request #84 from entity-toolkit/dev/conductor_boundary
haykh Apr 4, 2025
6643066
exespace/memspace -> kokkos default + cmake flags changed
haykh Apr 1, 2025
908c08a
improved report + fetch adios2 + rm hdf5 dependency
haykh Apr 2, 2025
9e22301
cmake prints report with TESTS
haykh Apr 4, 2025
004c6e9
type+unused warnings fixed
haykh Apr 4, 2025
b539a91
warnings in cmake + nullptr
haykh Apr 4, 2025
ec7ff77
log level controlled from input
haykh Apr 4, 2025
7bfb6c6
Merge branch 'dev/cleanup' of github.com:entity-toolkit/entity into d…
haykh Apr 4, 2025
8850ab9
warnings fixed
haykh Apr 5, 2025
eab6f78
match.ds is now array
haykh Apr 3, 2025
b91268f
generalized uniform injector
haykh Apr 3, 2025
aaba83c
diff match boundaries in diff directions
haykh Apr 3, 2025
b4a79b7
const specifier added to mesh methods
haykh Apr 3, 2025
e879ca5
more general uniforminject class
haykh Apr 4, 2025
0feb1db
generalized uniform injector
haykh Apr 3, 2025
8be0487
merging
haykh Apr 5, 2025
85ae1d8
keepconst injector ready (untested)
haykh Apr 5, 2025
ddb706f
removed redundant piston distribution
LudwigBoess Apr 6, 2025
895ead3
updated injection to new UniformInjector behavior and use global doma…
LudwigBoess Apr 6, 2025
877f459
minor problem with flags
haykh Apr 7, 2025
45a1df0
i_edge passed in conduct BC
haykh Apr 7, 2025
cba889d
Merge branch 'dev/pgens' of github.com:entity-toolkit/entity into dev…
haykh Apr 7, 2025
8fb4b9f
fix global extent access
LudwigBoess Apr 7, 2025
8e0747b
mpi fixed
haykh Apr 7, 2025
2e3ae6b
safeguards for Dim
haykh Apr 7, 2025
b232265
fix bug in reading BC selection
LudwigBoess Apr 7, 2025
7a1eb73
Merge branch '1.2.0rc' into dev/pvc
LudwigBoess Apr 7, 2025
26ea9a3
bug in polar_area qks
alisagk Apr 8, 2025
f4c9a6c
axis boundary conditions now match SRPIC
alisagk Apr 8, 2025
bf3c349
Merge pull request #90 from entity-toolkit/dev/cleanup
haykh Apr 9, 2025
0ee06ce
new deposit scheme
haykh Apr 9, 2025
9a17030
keepconstinjector works
haykh Apr 9, 2025
7674780
keepconstinjector works
haykh Apr 9, 2025
6bb457b
cleanup before refactor
LudwigBoess Apr 10, 2025
b430107
comm aux
haykh Apr 10, 2025
fbd6c26
proper ordering of comm vs flds
haykh Apr 10, 2025
4fc9809
updated wald setup
alisagk Apr 11, 2025
5cf30af
dxdydz in minkowski are now compared with prec*100
alisagk Apr 11, 2025
1eb1e26
consistent type spidx_t & idx_t & dim_t
haykh Apr 12, 2025
3529036
better tests for pushers + extforce
haykh Apr 12, 2025
28f9d18
device compile flag passed + accuracy in pusher test
haykh Apr 14, 2025
a4ff094
(RUNTEST)
haykh Apr 14, 2025
63b848c
ROCm version in engine printer
haykh Apr 14, 2025
88800e2
alternative BC fields for testing
LudwigBoess Apr 14, 2025
124923e
README contribs
haykh Apr 16, 2025
ffe7045
turbulence setup
Apr 16, 2025
a2688b2
Merge branch 'dev/pgens' of github.com:entity-toolkit/entity into dev…
Apr 16, 2025
839ef20
Merge branch 'dev/pgens' of github.com:entity-toolkit/entity into dev…
haykh Apr 16, 2025
bf73008
deposit with ext curr + fix bug in current output
haykh Apr 16, 2025
2aabb1d
minor fix
haykh Apr 16, 2025
fdb07fd
shock
haykh Apr 17, 2025
7244912
bugfixes + ASCII comments
LudwigBoess Apr 17, 2025
503d46c
2temp maxwellian
haykh Apr 18, 2025
5d4d4ec
Merge branch 'dev/pgens' of github.com:entity-toolkit/entity into dev…
haykh Apr 18, 2025
7be845c
2temp maxwellian (fixed)
haykh Apr 18, 2025
5148488
added option for temperature ratio between electrons and protons
LudwigBoess Apr 18, 2025
28ccd7d
updated example shock parameters
LudwigBoess Apr 18, 2025
ec09669
removed redundant BC fields
LudwigBoess Apr 18, 2025
d9a39a6
stats output (kernels not finished)
haykh Apr 19, 2025
fdc9716
Merge branch 'dev/pgens' of github.com:entity-toolkit/entity into dev…
haykh Apr 19, 2025
bfbef1c
Merge branch 'dev/pgens' into dev/integerdeposit
haykh Apr 19, 2025
c2d44a2
bugfixes
LudwigBoess Apr 19, 2025
a8a3206
bugfix in temp calculation
LudwigBoess Apr 19, 2025
62d1ce4
change BCs routine
haykh Apr 20, 2025
c0361b0
Merge branch 'dev/integerdeposit' into bug/mpideposit
haykh Apr 21, 2025
5896e13
Merge pull request #101 from entity-toolkit/bug/mpideposit
haykh Apr 21, 2025
e0a7b18
rec setup BC + tested with MPI
haykh Apr 21, 2025
ec5c65c
inlined writer
haykh Apr 21, 2025
1f8db6c
minor print rm
haykh Apr 21, 2025
f82b681
new deposit scheme
haykh Apr 9, 2025
23822d2
Merge branch 'dev/integerdeposit' of github.com:entity-toolkit/entity…
haykh Apr 21, 2025
9b1d03e
2D turb almost done
Apr 21, 2025
67db7c4
2D turb almost done
Apr 21, 2025
496492f
Merge branch 'dev/pgens' of github.com:entity-toolkit/entity into dev…
Apr 21, 2025
d66c2b5
(RUNTEST)
haykh Apr 21, 2025
9bc0f2c
minor bug in enum test (RUNTEST)
haykh Apr 21, 2025
9c58aa4
accuracy in deposit test (RUNTEST)
haykh Apr 21, 2025
4794254
long double -> simtime_t
haykh Apr 21, 2025
e1ae598
acc in dep test
haykh Apr 21, 2025
ab85454
(RUNTEST)
haykh Apr 21, 2025
f609fb2
explicitly copying mpi buffers from GPU to CPU to solve GPU pinning i…
LudwigBoess Apr 21, 2025
d9a2e7f
turb done fully
Apr 21, 2025
d64dcee
bugfix
LudwigBoess Apr 21, 2025
ead3c51
ExternalCurrent rename to ext_current
Apr 22, 2025
d5cdbd9
proper comm test
haykh Apr 22, 2025
9b262e3
deptest fixed
haykh Apr 23, 2025
5602adf
turb
haykh Apr 23, 2025
561a3ff
turb escape
haykh Apr 23, 2025
e2c2b51
compile-time flag: mpi_device_copy
haykh Apr 23, 2025
b1ebdf1
higher order Faraday kernel implemented by @vanthieg
LudwigBoess Apr 23, 2025
0515a9d
example settings for higher order field solver
LudwigBoess Apr 23, 2025
4b670b4
bugfix
LudwigBoess Apr 23, 2025
88050f2
deposit test pgens
haykh Apr 24, 2025
37c5613
Merge branch 'dev/integerdeposit' of github.com:entity-toolkit/entity…
haykh Apr 24, 2025
1952708
added quotes
haykh Apr 24, 2025
30d0afd
mpi_device_copy default to OFF
haykh Apr 24, 2025
d71883c
rm coeff in match bcs
haykh Apr 24, 2025
5d7c254
reformat comm
haykh Apr 24, 2025
1eccfa4
Revert "example settings for higher order field solver"
LudwigBoess Apr 24, 2025
82cf56b
Revert "higher order Faraday kernel implemented by @vanthieg"
LudwigBoess Apr 24, 2025
d9f96f0
return older explicit copy for flds
haykh Apr 24, 2025
2b0c64a
patch for print size
haykh Apr 24, 2025
802916b
mpi flag bug in cmake
haykh Apr 24, 2025
e104c2e
Merge pull request #98 from entity-toolkit/dev/integerdeposit
haykh Apr 24, 2025
4db8033
mv pgens
haykh Apr 24, 2025
c375dce
Merge pull request #102 from entity-toolkit/dev/cpu_mpi_pointers
haykh Apr 25, 2025
dd4f756
minor change in input
alisagk Apr 25, 2025
368b5a8
particles are now deleted when they cross ghost zone
alisagk Apr 25, 2025
7e73df9
updated horizon boundaries for fields
alisagk Apr 25, 2025
d6558e6
gpu-aware-mpi flag added cmake + comms
haykh Apr 28, 2025
86ae954
weibel->streaming + experimental injector
haykh Apr 28, 2025
9175994
experimental maxwellian
haykh Apr 29, 2025
71e7799
weibel toml
haykh Apr 29, 2025
1f55143
pusher=none support
haykh Apr 29, 2025
deaf19a
turb bug fix
Apr 30, 2025
26a5658
Merge branch 'dev/pgens' of github.com:entity-toolkit/entity into dev…
Apr 30, 2025
d558d26
Merge branch 'dev/pgens' into dev/gpu-aware-mpi
haykh May 1, 2025
af74825
Merge pull request #105 from entity-toolkit/dev/gpu-aware-mpi
haykh May 1, 2025
82fc5d8
mag toml
haykh May 1, 2025
9ae1415
minimal samples added for external lib testing
haykh May 1, 2025
c7e6405
minimal mpi compile
haykh May 1, 2025
f8550dd
gpuawarempi added to minimal
haykh May 1, 2025
a4a3987
minor bug
haykh May 1, 2025
03d9f23
added simpler mpi test
haykh May 1, 2025
86d18ac
substep reports in minimal
haykh May 1, 2025
1d8c6c2
minor bug when output=OFF
haykh May 1, 2025
e2f0aac
Merge branch 'dev/pgens' into dev/pvc
LudwigBoess May 1, 2025
4022442
removed `override` to be compatible with SYCL
LudwigBoess May 1, 2025
d79078a
stats reduction for flds
haykh May 2, 2025
bed9c37
dev/nix for cuda
haykh May 2, 2025
b4cb794
stats reduction for flds
haykh May 2, 2025
a6897d0
Merge branch 'dev/stats' of github.com:entity-toolkit/entity into dev…
haykh May 2, 2025
ea6f71f
minimial simplified
haykh May 5, 2025
d3772bb
4.5.1->4.6.1 for kokkos
haykh May 5, 2025
5391a94
4.5.1->4.6.1 for kokkos
haykh May 5, 2025
cc403dc
minor include rm
haykh May 5, 2025
c757c3e
stats reduction for flds
haykh May 2, 2025
629f3a8
Merge branch 'dev/stats' of github.com:entity-toolkit/entity into dev…
haykh May 5, 2025
3f54fb1
stats for Fields tested
haykh May 7, 2025
fc2c046
disabled stats for non-Cart
haykh May 7, 2025
f5d415d
Merge pull request #92 from entity-toolkit/dev/pgens
haykh May 12, 2025
f50f62a
minor header include in tests
haykh May 13, 2025
e25b9c5
const in domain for injector
haykh May 13, 2025
435fa0f
setups -> pgens + external pgen support
haykh May 13, 2025
e32a902
submodule for pgens
haykh May 13, 2025
c1d82f1
entity-pgens to master
haykh May 14, 2025
1d2bb1b
adjusted horizon BCs to work with nfilters>0; depleted aux horizon BCs
alisagk May 20, 2025
7ac1b68
adjusted engine accordingly (previous below)
alisagk May 20, 2025
8c451b7
Merge branch '1.2.0rc' into dev/pvc
LudwigBoess May 20, 2025
a406827
Merge pull request #108 from entity-toolkit/dev/newpgens
haykh May 20, 2025
612dbad
turb bug fix
May 20, 2025
98e6ece
rec -> periodic
haykh May 21, 2025
b5a651e
stats reduction for flds
haykh May 2, 2025
ddb91f1
stats for Fields tested
haykh May 7, 2025
12cb4b2
disabled stats for non-Cart
haykh May 7, 2025
c207b20
stats reduction for flds
haykh May 2, 2025
88168be
stats reduction for flds
haykh May 2, 2025
9238f1d
stats for Fields tested
haykh May 7, 2025
2545c3f
rebase
haykh May 24, 2025
1585dcb
area-weighting in stats
haykh May 24, 2025
be4b51c
prtl mom stat
haykh May 24, 2025
a7b0d7e
stats ready
haykh May 24, 2025
71a8d42
macro for specialized initialization
haykh May 24, 2025
b25232c
custom stat
haykh May 24, 2025
49fdeed
test for custom stat
haykh May 24, 2025
ce195d3
taylor expand polar area to 4th order when small angle
haykh May 26, 2025
a8836ac
walltime checkpoint added
haykh May 27, 2025
3cfbb98
rebase with 1.2.0rc
haykh May 28, 2025
f3cb42b
additional range checks (in compl. with gcc-15)
haykh May 30, 2025
4204cb8
remove override to compile the code
May 30, 2025
df4b941
Merge pull request #106 from entity-toolkit/dev/stats
haykh Jun 3, 2025
b12da67
Merge branch '1.2.0rc' into bug/polararea
haykh Jun 3, 2025
c38fc93
Merge pull request #110 from entity-toolkit/bug/polararea
haykh Jun 3, 2025
bc2b92f
Merge branch '1.2.0rc' into bug/checkpoints
haykh Jun 3, 2025
54b9a2c
LICENSE upd
haykh Jun 7, 2025
b42022a
minor nix changes
haykh Jun 7, 2025
50b6a6e
cosmetic changes
haykh Jun 7, 2025
0599bcc
minor warnings + bugs
haykh Jun 7, 2025
ca2e1a3
checkpoint: read/write path + walltime
haykh Jun 7, 2025
b122d48
warning on failed write + fixed logging
haykh Jun 7, 2025
224bdec
fixed meta writing after restart
haykh Jun 7, 2025
30afad1
minor changes in tests
haykh Jun 7, 2025
bebf5d0
walltime defaults to 00:00:00 to prevent error in attr writing
haykh Jun 8, 2025
ff75f58
default name for checkpoints -> %s.ckpt
haykh Jun 9, 2025
79a0a69
default checkpoint.write_path in input
haykh Jun 9, 2025
f794a8a
Merge pull request #112 from entity-toolkit/bug/checkpoints
haykh Jun 9, 2025
e98af4d
emojis fixed
haykh Jun 9, 2025
9ab8aa5
Merge branch '1.2.0rc' into dev/gr-1.1.0
haykh Jun 13, 2025
81cdc01
merge 1.2.0rc + pgens separation
haykh Jun 13, 2025
f667d72
ds param fix
haykh Jun 13, 2025
dcfea62
minor refactor + BCs aligned with sr
haykh Jun 14, 2025
7470a41
minor bug in AbsorbCur: sign < 0
alisagk Jun 14, 2025
ffe110c
(RUNTEST)
haykh Jun 15, 2025
d750384
minor bug in test for plaw dist GR
haykh Jun 15, 2025
9a4d2b6
minor nix-shell fix for newest HIP/ROCm
haykh Jun 15, 2025
1149632
minor bugfix in test for stats
haykh Jun 15, 2025
b581ba3
(RUNTEST)
haykh Jun 15, 2025
9d3a6e7
minor bug in parallel checkpoint test
haykh Jun 15, 2025
d50161f
fixed deposit test for dprec (RUNTEST)
haykh Jun 15, 2025
e3c608c
Merge pull request #83 from entity-toolkit/dev/gr-1.1.0
haykh Jun 15, 2025
71a628e
Merge branch '1.2.0rc' into dev/pvc
haykh Jun 15, 2025
a5b53df
rm remaining overrides
haykh Jun 15, 2025
cfd3b77
new branch declaration
haykh Jun 17, 2025
6a36364
passing flds_bc to kernel
haykh Jun 17, 2025
b3e72bb
special treatment of axis
haykh Jun 17, 2025
677644e
Merge pull request #116 from entity-toolkit/bug/matchbounds
haykh Jun 18, 2025
b662207
assigning velocities to particle in uniforminject (bug fixed)
haykh Jun 20, 2025
8244594
Merge pull request #117 from entity-toolkit/bug/uniforminjector
haykh Jun 20, 2025
8b3a3a5
Merge branch '1.2.0rc' into dev/pvc
LudwigBoess Jun 20, 2025
7dafdd1
added missing Kokkos::printf in tests
LudwigBoess Jun 20, 2025
228ae2c
attempt to fix mpi spec
haykh Jun 23, 2025
d19ce5b
coc update
haykh Jun 27, 2025
6edd462
readme upd
haykh Jun 27, 2025
9ea6970
field dwn proper reading
haykh Jun 27, 2025
2bacf45
Merge pull request #120 from entity-toolkit/bug/dwnarr
haykh Jun 27, 2025
f2814b6
readme upd
haykh Jun 28, 2025
4751eb7
Merge pull request #119 from entity-toolkit/bug/mpispectra
haykh Jun 30, 2025
73f1f97
normalized input file comments
haykh Jul 3, 2025
5fb0220
Merge branch '1.2.0rc' of github.com:entity-toolkit/entity into 1.2.0rc
haykh Jul 3, 2025
f6d3098
> SR and GR: bug in deposit: wrong jx3 in 2D
alisagk Jul 7, 2025
fa0f111
Merge pull request #122 from entity-toolkit/dev/deposit-gr-bugs
alisagk Jul 7, 2025
6e6c675
fast Aphi calc (WIP MPI)
haykh Jul 7, 2025
03e5b54
Merge branch '1.2.0rc' into dev/vector-potential
haykh Jul 7, 2025
bb5b03d
mpicomm for vector pot
haykh Jul 7, 2025
5bf3be3
template spec
haykh Jul 7, 2025
d9a7a4b
extract vector potential to outside func
haykh Jul 7, 2025
a35451b
minor adjustments of indexes
alisagk Jul 7, 2025
2e8ad04
Merge pull request #93 from entity-toolkit/dev/pvc
haykh Jul 9, 2025
5260eca
added metric.alpha for velocity in gr deposit. important for the out-…
alisagk Jul 14, 2025
2feaffb
Merge pull request #124 from entity-toolkit/dev/GR_deposit
alisagk Jul 14, 2025
8ed46d0
fixed coordinate for deposit
alisagk Jul 14, 2025
a836889
Merge pull request #125 from entity-toolkit/dev/GR_deposit
alisagk Jul 14, 2025
55df3f1
added check for particles close to the axis. the "closeness" is defin…
alisagk Jul 14, 2025
8b692a5
added axis check in the GR deposit
alisagk Jul 14, 2025
a4965f1
minor (deleted useless line)
alisagk Jul 14, 2025
52cec30
Merge pull request #126 from entity-toolkit/dev/GR_pusher_axis
alisagk Jul 15, 2025
f5ca864
aphi with teampolicy
haykh Jul 15, 2025
4612481
wald toml fixed (slightly)
haykh Jul 16, 2025
5c481aa
added vertical field support in wald
haykh Jul 16, 2025
ec47ff8
old implementation returned
haykh Jul 16, 2025
f40e59f
Merge pull request #123 from entity-toolkit/dev/vector-potential
haykh Jul 16, 2025
7911a94
removed the small angle adjustment
alisagk Jul 17, 2025
7d89d5c
fixed ranges for aux calculation (does not matter for current BC unde…
alisagk Jul 17, 2025
c25aec6
Merge pull request #127 from entity-toolkit/dev/small-angle
alisagk Jul 17, 2025
772333a
added !TODO for axis BCs
alisagk Jul 17, 2025
f50aed5
reformat + minor bug in tests
haykh Jul 17, 2025
60c2bcf
formatting
haykh Jul 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ IncludeCategories:
Priority: 4
- Regex: '^"engines\/.*\.h"'
Priority: 4
- Regex: '^"checkpoint\/.*\.h"'
Priority: 4
- Regex: '^"output\/.*\.h"'
Priority: 4
- Regex: '^"archetypes\/.*\.h"'
Expand Down
36 changes: 28 additions & 8 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,44 @@
name: Unit tests

on:
pull_request:
branches:
- '**rc'
- 'master'
push:

jobs:
check-commit:
runs-on: ubuntu-latest
outputs:
run_tests: ${{ steps.check_message.outputs.run_tests }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Check commit message
id: check_message
run: |
if git log -1 --pretty=%B | grep -q "RUNTEST"; then
echo "run_tests=true" >> "$GITHUB_OUTPUT"
else
echo "run_tests=false" >> "$GITHUB_OUTPUT"
fi
tests:
needs: check-commit
if: needs.check-commit.outputs.run_tests == 'true'
strategy:
fail-fast: false
matrix:
device: [amd-gpu, nvidia-gpu]
device: [cpu, amd-gpu, nvidia-gpu]
precision: [double, single]
exclude:
mpi: [serial, parallel]
exclude: # my AMD GPU doesn't support fp64 atomics : (
- device: amd-gpu
precision: double
# my AMD GPUs doesn't support fp64 atomics : (
- device: amd-gpu
mpi: parallel
- device: nvidia-gpu
mpi: parallel
runs-on: [self-hosted, "${{ matrix.device }}"]
steps:
- name: Checkout
uses: actions/checkout@v3.3.0
uses: actions/checkout@v4
- name: Configure
run: |
if [ "${{ matrix.device }}" = "nvidia-gpu" ]; then
Expand All @@ -34,6 +52,8 @@ jobs:
fi
elif [ "${{ matrix.device }}" = "amd-gpu" ]; then
FLAGS="-D Kokkos_ENABLE_HIP=ON -D Kokkos_ARCH_AMD_GFX1100=ON"
elif [ "${{ matrix.mpi }}" = "parallel" ]; then
FLAGS="-D mpi=ON"
fi
cmake -B build -D TESTS=ON -D output=ON -D precision=${{ matrix.precision }} $FLAGS
- name: Compile
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ venv/
# CMake testing files
Testing/

tags
.clangd
.schema.json
*_old/
action-token
*.vim
ignore-*
7 changes: 3 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
[submodule "extern/toml11"]
path = extern/toml11
url = https://github.com/ToruNiina/toml11.git
[submodule "extern/plog"]
path = extern/plog
url = https://github.com/SergiusTheBest/plog.git
[submodule "extern/adios2"]
path = extern/adios2
url = https://github.com/ornladios/ADIOS2.git
branch = master
[submodule "extern/Kokkos"]
path = extern/Kokkos
url = https://github.com/kokkos/kokkos.git
[submodule "extern/entity-pgens"]
path = extern/entity-pgens
url = https://github.com/entity-toolkit/entity-pgens.git
6 changes: 6 additions & 0 deletions .taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[formatting]
align_entries = true
indent_tables = true
indent_entries = true
trailing_newline = true
align_comments = true
2 changes: 1 addition & 1 deletion .vscode/.taplo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include = ["input.example.toml", "setups/**/*.toml"]
include = ["input.example.toml", "pgens/**/*.toml"]
exclude = [".taplo.toml"]

[formatting]
Expand Down
136 changes: 79 additions & 57 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
# cmake-lint: disable=C0103,C0111,E1120,R0913,R0915

cmake_minimum_required(VERSION 3.16)
cmake_policy(SET CMP0110 NEW)

set(PROJECT_NAME entity)

project(
${PROJECT_NAME}
VERSION 1.1.1
VERSION 1.2.0
LANGUAGES CXX C)
add_compile_options("-D ENTITY_VERSION=\"${PROJECT_VERSION}\"")
execute_process(COMMAND
bash -c "git diff --quiet src/ && echo $(git rev-parse HEAD) || echo $(git rev-parse HEAD)-mod"
set(hash_cmd "git diff --quiet src/ && echo $(git rev-parse HEAD) ")
string(APPEND hash_cmd "|| echo $(git rev-parse HEAD)-mod")
execute_process(
COMMAND bash -c ${hash_cmd}
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE GIT_HASH
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE
)
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "Git hash: ${GIT_HASH}")
add_compile_options("-D ENTITY_GIT_HASH=\"${GIT_HASH}\"")

Expand All @@ -25,100 +28,115 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/defaults.cmake)

# defaults
set(DEBUG
${default_debug}
CACHE BOOL "Debug mode")
${default_debug}
CACHE BOOL "Debug mode")

set(precision
${default_precision}
CACHE STRING "Precision")
${default_precision}
CACHE STRING "Precision")
set(pgen
${default_pgen}
CACHE STRING "Problem generator")
${default_pgen}
CACHE STRING "Problem generator")

set(gui
${default_gui}
CACHE BOOL "Use GUI [nttiny]")
${default_gui}
CACHE BOOL "Use GUI [nttiny]")
set(output
${default_output}
CACHE BOOL "Enable output")
${default_output}
CACHE BOOL "Enable output")
set(mpi
${default_mpi}
CACHE BOOL "Use MPI")
${default_mpi}
CACHE BOOL "Use MPI")

set(gpu_aware_mpi
${default_gpu_aware_mpi}
CACHE BOOL "Enable GPU-aware MPI")

# -------------------------- Compilation settings -------------------------- #
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

if(${DEBUG} STREQUAL "OFF")
set(CMAKE_BUILD_TYPE
Release
CACHE STRING "CMake build type")
Release
CACHE STRING "CMake build type")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNDEBUG")
else()
set(CMAKE_BUILD_TYPE
Debug
CACHE STRING "CMake build type")
Debug
CACHE STRING "CMake build type")
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -DDEBUG -Wall -Wextra -Wno-unknown-pragmas")
"${CMAKE_CXX_FLAGS} -DDEBUG -Wall -Wextra -Wno-unknown-pragmas")
endif()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs")

# options
set(precisions
"single" "double"
CACHE STRING "Precisions")
"single" "double"
CACHE STRING "Precisions")

include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/config.cmake)

# ------------------------- Third-Party Tests ------------------------------ #
set(BUILD_TESTING
OFF
CACHE BOOL "Build tests")
OFF
CACHE BOOL "Build tests")

# ------------------------ Third-party dependencies ------------------------ #
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/kokkosConfig.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/dependencies.cmake)

find_or_fetch_dependency(Kokkos FALSE)
find_or_fetch_dependency(plog TRUE)
find_or_fetch_dependency(toml11 TRUE)
find_or_fetch_dependency(Kokkos FALSE QUIET)
find_or_fetch_dependency(plog TRUE QUIET)
set(DEPENDENCIES Kokkos::kokkos)
include_directories(${plog_SRC}/include)
include_directories(${toml11_SRC})

# -------------------------------- Main code ------------------------------- #
set_precision(${precision})
if("${Kokkos_DEVICES}" MATCHES "CUDA")
add_compile_options("-D CUDA_ENABLED")
set(DEVICE_ENABLED ON)
add_compile_options("-D DEVICE_ENABLED")
elseif("${Kokkos_DEVICES}" MATCHES "HIP")
add_compile_options("-D HIP_ENABLED")
set(DEVICE_ENABLED ON)
add_compile_options("-D DEVICE_ENABLED")
elseif("${Kokkos_DEVICES}" MATCHES "SYCL")
add_compile_options("-D SYCL_ENABLED")
set(DEVICE_ENABLED ON)
add_compile_options("-D DEVICE_ENABLED")
else()
set(DEVICE_ENABLED OFF)
endif()

if(("${Kokkos_DEVICES}" MATCHES "CUDA")
OR ("${Kokkos_DEVICES}" MATCHES "HIP")
OR ("${Kokkos_DEVICES}" MATCHES "SYCL"))
set(DEVICE_ENABLED ON)
else()
set(DEVICE_ENABLED OFF)
endif()

# MPI
if(${mpi})
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/MPIConfig.cmake)
find_or_fetch_dependency(MPI FALSE REQUIRED)
include_directories(${MPI_CXX_INCLUDE_PATH})
add_compile_options("-D MPI_ENABLED")
set(DEPENDENCIES ${DEPENDENCIES} MPI::MPI_CXX)
if(${DEVICE_ENABLED})
if(${gpu_aware_mpi})
add_compile_options("-D GPU_AWARE_MPI")
endif()
else()
set(gpu_aware_mpi
OFF
CACHE BOOL "Use explicit copy when using MPI + GPU")
endif()
endif()

# Output
if(${output})
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/adios2Config.cmake)
find_or_fetch_dependency(adios2 FALSE)
if (NOT DEFINED ENV{HDF5_ROOT})
set(USE_CUSTOM_HDF5 OFF)
if (DEFINED ENV{CONDA_PREFIX})
execute_process(COMMAND bash -c "conda list | grep \"hdf5\" -q"
RESULT_VARIABLE HDF5_INSTALLED)
if (HDF5_INSTALLED EQUAL 0)
set(HDF5_ROOT $ENV{CONDA_PREFIX})
else()
set(USE_CUSTOM_HDF5 ON)
endif()
else()
set(USE_CUSTOM_HDF5 ON)
endif()
if (USE_CUSTOM_HDF5)
message(FATAL_ERROR "HDF5_ROOT is not set. Please set it to the root of the HDF5 installation")
endif()
endif()
find_package(HDF5 REQUIRED)

find_or_fetch_dependency(adios2 FALSE QUIET)
add_compile_options("-D OUTPUT_ENABLED")
if(${mpi})
set(DEPENDENCIES ${DEPENDENCIES} adios2::cxx11_mpi)
else()
Expand All @@ -131,14 +149,18 @@ link_libraries(${DEPENDENCIES})
if(TESTS)
# ---------------------------------- Tests --------------------------------- #
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/tests.cmake)
elseif(BENCHMARK)
# ------------------------------ Benchmark --------------------------------- #
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/benchmark.cmake)
else()
# ----------------------------------- GUI ---------------------------------- #
if(${gui})
find_or_fetch_dependency(nttiny FALSE)
find_or_fetch_dependency(nttiny FALSE QUIET)
endif()

# ------------------------------- Main source ------------------------------ #
set_problem_generator(${pgen})
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src src)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/report.cmake)
endif()

include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/report.cmake)
29 changes: 29 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
This code of conduct outlines shared principles and expectations for all participants in our open-source project. It's here to keep things open, respectful, and simple for everyone. Anyone involved with using and developing the code are expected to follow these guidelines starting from the release version `1.2.0`.

# Open-source Principles
- This project is fully open-source and does not belong to any individual or institution.
- It is developed and maintained by our team of incredibly talented people, whose goal is to make it accessible to everyone with no expectation of credits.
- Anyone is free to use, copy, modify, or distribute the code under the project's open license.
- If you contribute something to the repository, it becomes part of the project and thus will also be regarded as open-source.

# Contributions and Credit
- The only attribution we strongly encourage is a citation of either the code repository, or the corresponding method papers (coming soon).
- All contributions are made voluntarily, and there is no expectation of recognition of isolated individuals.
- There's no built-in expectation of credit or authorship for modules or changes pushed to the repository. Anyone is free to use any part of the code with no attribution to the author of any specific module or algorithm.
- The code is there for everyone to use, and its only goal is to enable the community to produce exciting science!

# Roles in the Project
- There are three informal roles:
- users: anyone using the code;
- contributors: users who have write access to the repository;
- maintainers: contributors who also take care of organizational, administrative, and tech-support duties.
- Role changes (user -> contributor or vice versa) are easy and open, and can be done by asking the maintainers.
- Contributors are also expected to follow any shared guidelines -- whether discussed informally or written down -- around code-development things, such as committing, merging, and creating pull requests.
- Maintainers have the most strict obligations of keeping the repository clean, managing pull-requests, issuing releases, documenting all the features and additions, writing unit tests, helping other users and contributors with any problems they encounter, etc.
- To reiterate, regardless of the extent of involvement and help, there is absolutely no expectation of recognition or attribution on maintainers' end!

# Community and Participation
- Everyone is welcome in the community.
- Joining meetings on Zoom, using the Slack workspace, giving feedback, taking part in decision making and planning, or following development doesn't require any special status -- it's open to all.

Finally, while we cannot enforce it, we strongly encourage any projects that build on this code to be open source too. If you build upon this project, we welcome transparency and openness in spirit. You may contribute to the code as much or as little as you like; all effort is appreciated, none is required.
13 changes: 1 addition & 12 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
BSD 3-Clause License

Copyright (c) 2024, Princeton University (PU), and
Princeton Plasma Physics Lab (PPPL).
Copyright (c) 2021-present, Entity development team.
All rights reserved.

Core developers (alphabetical order):
* Alexander Chernoglazov
* Benjamin Crinquand
* Alisa Galishnikova
* Hayk Hakobyan
* Jens Mahlmann
* Sasha Philippov
* Arno Vanthieghem
* Muni Zhou

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

Expand Down
Loading