Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions cmake/report.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ printchoices(
ON
"${Green}"
VENDOR_SORT_REPORT
44)
46)
printchoices(
"Debug mode"
"DEBUG"
Expand Down Expand Up @@ -234,6 +234,9 @@ string(
" - DEVICES [${Magenta}Kokkos_ENABLE_***${ColorReset}]: "
"${Kokkos_DEVICES}"
"\n"
" "
${VENDOR_SORT_REPORT}
"\n"
" > Multi-node specs"
" ${Dim}[requires mpi=ON]${ColorReset}"
"\n"
Expand All @@ -255,9 +258,6 @@ string(
" "
"- Deposit drift [${Magenta}team_policy_drift${ColorReset}]: "
${team_policy_drift}
"\n"
" "
${VENDOR_SORT_REPORT}
"\n")

string(
Expand Down
31 changes: 19 additions & 12 deletions dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from dataclasses import dataclass, field
from typing import Callable, List, Optional, Tuple


# ============================
# colors: edit these
# ============================
Expand Down Expand Up @@ -54,7 +53,7 @@ class Settings:

# versions
kokkos_version: str = "5.2.1"
adios2_version: str = "2.11.0"
adios2_version: str = "2.12.1"

# options
kokkos_backend: str = "cpu"
Expand Down Expand Up @@ -135,7 +134,9 @@ def InstallKokkosScriptModfile(settings: Settings) -> tuple[str, str]:
[f"module load {module}" for module in settings.module_loads]
)
src_path = os.path.join(prefix, "src", "kokkos")
install_path = os.path.join(prefix, "kokkos", version, backend, arch.lower() if arch else "")
install_path = os.path.join(
prefix, "kokkos", version, backend, arch.lower() if arch else ""
)
if os.path.exists(install_path) and not settings.overwrite:
raise FileExistsError(
f"Kokkos install path {install_path} already exists and overwrite is disabled"
Expand Down Expand Up @@ -300,7 +301,7 @@ def InstallNt2pyScript(settings: Settings) -> str:
},
"stellar": {"module_loads": []},
"perlmutter": {
"module_loads": ["gpu/1.0"],
"module_loads": ["gpu/1.0", "python/3.14-26.8.1"],
"kokkos_backend": "cuda",
"kokkos_arch": "AMPERE80",
"extra_kokkos_flags": [
Expand All @@ -313,17 +314,19 @@ def InstallNt2pyScript(settings: Settings) -> str:
],
},
"lumi": {
"module_loads": ["PrgEnv-cray", "cray-mpich", "craype-accel-amd-gfx90a", "rocm"],
"module_loads": [
"PrgEnv-cray",
"cray-mpich",
"craype-accel-amd-gfx90a",
"rocm",
],
"kokkos_backend": "hip",
"kokkos_arch": "AMD_GFX90A",
"extra_kokkos_flags": [
"CMAKE_CXX_COMPILER=hipcc",
"AMDGPU_TARGETS=gfx90a",
],
"extra_adios2_flags": [
"CMAKE_CXX_COMPILER=CC",
"CMAKE_C_COMPILER=cc"
]
"extra_adios2_flags": ["CMAKE_CXX_COMPILER=CC", "CMAKE_C_COMPILER=cc"],
},
"frontier": {"module_loads": []},
"aurora": {"module_loads": []},
Expand Down Expand Up @@ -366,7 +369,7 @@ def on_install_confirmed(settings: Settings) -> None:
"modules",
"kokkos",
settings.kokkos_version,
settings.kokkos_backend,
settings.kokkos_backend,
settings.kokkos_arch.strip().lower(),
)
os.makedirs(os.path.dirname(kokkos_modfile_file), exist_ok=True)
Expand Down Expand Up @@ -1089,14 +1092,18 @@ def toggle(k: str):

def menu_cluster(self) -> Tuple[str, str, List[MenuItem]]:
def choose(name: str):
print ("CALLING:", name)
print("CALLING:", name)
apply_preset(self.s, name)
self.push("custom")

return (
"cluster-specific",
"pick a preset:",
[MenuItem(cluster, "apply preset", on_enter=lambda c=cluster: choose(c)) for cluster in list(PRESETS.keys())] + [MenuItem("back", "", on_enter=self.pop)],
[
MenuItem(cluster, "apply preset", on_enter=lambda c=cluster: choose(c))
for cluster in list(PRESETS.keys())
]
+ [MenuItem("back", "", on_enter=self.pop)],
)

def get_menu(self) -> Tuple[str, str, List[MenuItem]]:
Expand Down
8 changes: 6 additions & 2 deletions input.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -627,10 +627,14 @@
# @type: bool
# @default: true
log_bins = ""
# Number of bins for the spectra output
# Number of energy bins for the spectra output
# @type: uint [> 0]
# @default: 200
n_bins = ""
num_energy_bins = ""
# Number of spatial bins for the spectra output
# @type: array<uint> [size 1 :->: 3]
# @default: [1, 1, 1]
num_spatial_bins = ""
# Number of timesteps between spectra outputs
# @type: uint
# @default: 0
Expand Down
31 changes: 17 additions & 14 deletions pgens/shock/shock.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,35 +40,38 @@
maxnpart = 2e7

[setup]
drift_ux = 0.15 # speed towards the wall [c]
temperature = 0.168 # temperature of maxwell distribution [kB T / (m_i c^2)]
temperature_ratio = 1.0 # temperature ratio of electrons to protons
Bmag = 1.0 # magnetic field strength as fraction of magnetisation
Btheta = 63.0 # magnetic field angle in the plane
Bphi = 0.0 # magnetic field angle out of plane
filling_fraction = 0.99 # fraction of the shock piston filled with plasma
injector_velocity = 0.0 # speed of injector [c]
injection_start = 0.0 # start time of moving injector
drift_ux = 0.15 # speed towards the wall [c]
temperature = 0.168 # temperature of maxwell distribution [kB T / (m_i c^2)]
temperature_ratio = 1.0 # temperature ratio of electrons to protons
Bmag = 1.0 # magnetic field strength as fraction of magnetisation
Btheta = 63.0 # magnetic field angle in the plane
Bphi = 0.0 # magnetic field angle out of plane
filling_fraction = 0.99 # fraction of the shock piston filled with plasma
injector_velocity = 0.0 # speed of injector [c]
injection_start = 0.0 # start time of moving injector
injection_frequency = 100

[output]
interval_time = 1000.0
format = "BPFile"

[output.fields]
quantities = ["N", "B", "E"]

[output.particles]
enable = true
stride = 10
stride = 10

[output.spectra]
enable = false
enable = true
e_min = 1e-2
e_max = 1e1
log_bins = true
num_spatial_bins = [40, 3, 1]

[diagnostics]
log_level = "WARNING"
blocking_timers = true

[checkpoint]
interval = 10000
keep = 1
keep = 2
4 changes: 3 additions & 1 deletion src/framework/domain/io/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ namespace ntt {
for (const auto& sp : species_params()) {
spectra_species.push_back(sp.index());
}
g_writer.defineSpectraOutputs(spectra_species);
const auto num_spatial_bins = params.template get<std::vector<size_t>>(
"output.spectra.num_spatial_bins");
g_writer.defineSpectraOutputs(spectra_species, num_spatial_bins);
for (const auto& type : { "fields", "particles", "spectra" }) {
g_writer.addTracker(type,
params.template get<timestep_t>(
Expand Down
Loading
Loading