Skip to content

Commit 7575092

Browse files
Merge branch '1.2.0rc' into dev/1dsr-sugon
2 parents 83abc0e + 8244594 commit 7575092

128 files changed

Lines changed: 5348 additions & 4052 deletions

File tree

Some content is hidden

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

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@
77
[submodule "extern/Kokkos"]
88
path = extern/Kokkos
99
url = https://github.com/kokkos/kokkos.git
10+
[submodule "extern/entity-pgens"]
11+
path = extern/entity-pgens
12+
url = https://github.com/entity-toolkit/entity-pgens.git

.vscode/.taplo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include = ["input.example.toml", "setups/**/*.toml"]
1+
include = ["input.example.toml", "pgens/**/*.toml"]
22
exclude = [".taplo.toml"]
33

44
[formatting]

LICENSE

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
11
BSD 3-Clause License
22

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

7-
Core developers (alphabetical order):
8-
* Alexander Chernoglazov
9-
* Benjamin Crinquand
10-
* Alisa Galishnikova
11-
* Hayk Hakobyan
12-
* Jens Mahlmann
13-
* Sasha Philippov
14-
* Arno Vanthieghem
15-
* Muni Zhou
16-
176
Redistribution and use in source and binary forms, with or without
187
modification, are permitted provided that the following conditions are met:
198

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ Our [detailed documentation](https://entity-toolkit.github.io/) includes everyth
1414

1515
* :guitar: Ludwig Böss {[@LudwigBoess](https://github.com/LudwigBoess)}
1616
* :eyes: Yangyang Cai {[@StaticObserver](https://github.com/StaticObserver)}
17-
* :person_tipping_hand: Alexander Chernoglazov {[@SChernoglazov](https://github.com/SChernoglazov)}
17+
* :tipping_hand_person: Alexander Chernoglazov {[@SChernoglazov](https://github.com/SChernoglazov)}
1818
* :tea: Benjamin Crinquand {[@bcrinquand](https://github.com/bcrinquand)}
1919
* :bubble_tea: Alisa Galishnikova {[@alisagk](https://github.com/alisagk)}
20-
* :locomotive: Evgeny Gorbunov {[@Alcauchy](https://github.com/Alcauchy)}
20+
* :steam_locomotive: Evgeny Gorbunov {[@Alcauchy](https://github.com/Alcauchy)}
2121
* :coffee: Hayk Hakobyan {[@haykh](https://github.com/haykh)}
2222
* :potato: Jens Mahlmann {[@jmahlmann](https://github.com/jmahlmann)}
2323
* :dolphin: Sasha Philippov {[@sashaph](https://github.com/sashaph)}

cmake/config.cmake

Lines changed: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,60 @@ endfunction()
1818

1919
# ---------------------------- Problem generator --------------------------- #
2020
function(set_problem_generator pgen_name)
21-
file(GLOB_RECURSE PGENS "${CMAKE_CURRENT_SOURCE_DIR}/setups/**/pgen.hpp"
22-
"${CMAKE_CURRENT_SOURCE_DIR}/setups/pgen.hpp")
21+
if(pgen_name STREQUAL ".")
22+
message(FATAL_ERROR "Problem generator not specified")
23+
endif()
24+
25+
file(GLOB_RECURSE PGENS "${CMAKE_CURRENT_SOURCE_DIR}/pgens/**/pgen.hpp")
26+
2327
foreach(PGEN ${PGENS})
2428
get_filename_component(PGEN_NAME ${PGEN} DIRECTORY)
25-
string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/setups/" "" PGEN_NAME
26-
${PGEN_NAME})
27-
string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/setups" "" PGEN_NAME
29+
string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/pgens/" "" PGEN_NAME
2830
${PGEN_NAME})
2931
list(APPEND PGEN_NAMES ${PGEN_NAME})
3032
endforeach()
33+
3134
list(FIND PGEN_NAMES ${pgen_name} PGEN_FOUND)
32-
if(NOT ${pgen_name} STREQUAL "." AND ${PGEN_FOUND} EQUAL -1)
33-
message(FATAL_ERROR "Invalid problem generator: "
34-
"${pgen_name}\nValid options are: ${PGEN_NAMES}")
35+
36+
file(GLOB_RECURSE EXTRA_PGENS
37+
"${CMAKE_CURRENT_SOURCE_DIR}/extern/entity-pgens/**/pgen.hpp")
38+
foreach(EXTRA_PGEN ${EXTRA_PGENS})
39+
get_filename_component(EXTRA_PGEN_NAME ${EXTRA_PGEN} DIRECTORY)
40+
string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/extern/entity-pgens/" ""
41+
EXTRA_PGEN_NAME ${EXTRA_PGEN_NAME})
42+
list(APPEND PGEN_NAMES "pgens/${EXTRA_PGEN_NAME}")
43+
endforeach()
44+
45+
if(${PGEN_FOUND} EQUAL -1)
46+
if(${pgen_name} MATCHES "^pgens/")
47+
get_filename_component(pgen_name ${pgen_name} NAME)
48+
set(pgen_path
49+
"${CMAKE_CURRENT_SOURCE_DIR}/extern/entity-pgens/${pgen_name}")
50+
set(pgen_name "pgens/${pgen_name}")
51+
else()
52+
set(pgen_path ${pgen_name})
53+
get_filename_component(pgen_path ${pgen_path} ABSOLUTE)
54+
string(REGEX REPLACE ".*/" "" pgen_name ${pgen_name})
55+
list(APPEND PGEN_NAMES ${pgen_name})
56+
endif()
57+
else()
58+
set(pgen_path ${CMAKE_CURRENT_SOURCE_DIR}/pgens/${pgen_name})
59+
endif()
60+
61+
file(GLOB_RECURSE PGEN_FILES "${pgen_path}/pgen.hpp")
62+
if(NOT PGEN_FILES)
63+
message(FATAL_ERROR "pgen.hpp file not found in ${pgen_path}")
3564
endif()
65+
66+
add_library(ntt_pgen INTERFACE)
67+
target_link_libraries(ntt_pgen INTERFACE ntt_global ntt_framework
68+
ntt_archetypes ntt_kernels)
69+
70+
target_include_directories(ntt_pgen INTERFACE ${pgen_path})
71+
3672
set(PGEN
3773
${pgen_name}
3874
PARENT_SCOPE)
39-
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/setups/${pgen_name})
4075
set(PGEN_FOUND
4176
TRUE
4277
PARENT_SCOPE)

cmake/report.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ if(${PGEN_FOUND})
44
"pgen"
55
"${problem_generators}"
66
${PGEN}
7-
${default_pgen}
7+
""
88
"${Blue}"
99
PGEN_REPORT
1010
0)

dev/nix/adios2.nix

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ let
1919
BUILD_TESTING = "OFF";
2020
ADIOS2_BUILD_EXAMPLES = "OFF";
2121
ADIOS2_USE_MPI = if mpi then "ON" else "OFF";
22+
ADIOS2_HAVE_HDF5_VOL = if mpi then "ON" else "OFF";
2223
CMAKE_BUILD_TYPE = "Release";
23-
} // (if !mpi then { ADIOS2_HAVE_HDF5_VOL = "OFF"; } else { });
24+
};
25+
stdenv = pkgs.gcc13Stdenv;
2426
in
25-
pkgs.stdenv.mkDerivation {
27+
stdenv.mkDerivation {
2628
pname = "${name}${if hdf5 then "-hdf5" else ""}${if mpi then "-mpi" else ""}";
2729
version = "${version}";
2830
src = pkgs.fetchgit {
@@ -36,12 +38,10 @@ pkgs.stdenv.mkDerivation {
3638
perl
3739
];
3840

39-
propagatedBuildInputs =
40-
[
41-
pkgs.gcc13
42-
]
43-
++ (if hdf5 then (if mpi then [ pkgs.hdf5-mpi ] else [ pkgs.hdf5 ]) else [ ])
44-
++ (if mpi then [ pkgs.openmpi ] else [ ]);
41+
propagatedBuildInputs = [
42+
pkgs.gcc13
43+
] ++ (if hdf5 then (if mpi then [ pkgs.hdf5-mpi ] else [ pkgs.hdf5-cpp ]) else [ ]);
44+
# ++ (if mpi then [ pkgs.openmpi ] else [ ]);
4545

4646
configurePhase = ''
4747
cmake -B build $src ${

dev/nix/kokkos.nix

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,24 @@ let
2020
"CUDA" = with pkgs.cudaPackages; [
2121
cudatoolkit
2222
cuda_cudart
23+
pkgs.gcc13
2324
];
2425
"NONE" = [
2526
pkgs.gcc13
2627
];
2728
};
29+
getArch =
30+
_:
31+
if gpu != "NONE" && arch == "NATIVE" then
32+
throw "Please specify an architecture when the GPU support is enabled. Available architectures: https://kokkos.org/kokkos-core-wiki/get-started/configuration-guide.html#gpu-architectures"
33+
else
34+
arch;
2835
cmakeExtraFlags = {
2936
"HIP" = [
3037
"-D Kokkos_ENABLE_HIP=ON"
3138
"-D Kokkos_ARCH_${getArch { }}=ON"
39+
# remove leading AMD_
40+
"-D AMDGPU_TARGETS=${builtins.replaceStrings [ "amd_" ] [ "" ] (pkgs.lib.toLower (getArch { }))}"
3241
"-D CMAKE_C_COMPILER=hipcc"
3342
"-D CMAKE_CXX_COMPILER=hipcc"
3443
];
@@ -39,13 +48,6 @@ let
3948
];
4049
"NONE" = [ ];
4150
};
42-
getArch =
43-
_:
44-
if gpu != "NONE" && arch == "NATIVE" then
45-
throw "Please specify an architecture when the GPU support is enabled. Available architectures: https://kokkos.org/kokkos-core-wiki/keywords.html#architectures"
46-
else
47-
arch;
48-
4951
in
5052
pkgs.stdenv.mkDerivation rec {
5153
pname = "${name}";

dev/nix/shell.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ pkgs.mkShell {
4242
zlib
4343
cmake
4444

45-
clang-tools
45+
llvmPackages_18.clang-tools
46+
libgcc
4647

4748
adios2Pkg
4849
kokkosPkg

extern/entity-pgens

Submodule entity-pgens added at 386eefc

0 commit comments

Comments
 (0)