Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
5b7d068
twobody interactions as input
haykh May 12, 2026
1b19e2c
Merge branch '1.4.0rc' into dev/qed
haykh May 12, 2026
554e172
qed input params + caller in srpic.hpp
haykh May 12, 2026
d9930b8
compton tests
haykh May 14, 2026
388d9af
extra injector for single species
haykh May 14, 2026
a09db82
qed incorporated
haykh May 14, 2026
d70b393
twobody interactions as input
haykh May 12, 2026
f687ac6
qed input params + caller in srpic.hpp
haykh May 12, 2026
5b41982
compton tests
haykh May 14, 2026
2ef59cb
extra injector for single species
haykh May 14, 2026
5cfc138
qed incorporated
haykh May 14, 2026
7ae4cde
Merge branch 'dev/qed' of github.com:entity-toolkit/entity into dev/qed
haykh May 15, 2026
4c11843
rebased
haykh May 15, 2026
4f6d914
tests for compton fixed (proper cross section)
haykh May 15, 2026
e6f4c48
fmt script updated
haykh May 15, 2026
7f57abb
clang-tidy recommendations
haykh May 15, 2026
ca6470f
Merge branch '1.5.0rc' into dev/qed
haykh May 18, 2026
5cd3de6
Merge branch 'dev/momsmooth' into dev/qed
haykh May 18, 2026
5ca3bd2
confine zerofill only to necessary components
haykh May 21, 2026
5722ca4
support for average V scalar
haykh May 21, 2026
8db0b2b
single species nonuniform injector
haykh May 21, 2026
99f1b1f
Merge branch 'dev/momsmooth' into dev/qed
haykh May 21, 2026
a1ff3c0
Merge branch 'master' into dev/qed
haykh May 21, 2026
0933873
Merge branch '1.5.0rc' into dev/qed
haykh May 21, 2026
2ed90d3
upd
haykh Jun 9, 2026
3beef39
nix modules upd
haykh Jun 20, 2026
8084fa6
rms
haykh Jun 29, 2026
6ed5c5a
rms pgen
haykh Jun 29, 2026
6a62202
minor fixes for nvcc
haykh Jul 20, 2026
417beb4
nvcc 12.8 weirdness fix
haykh Jul 20, 2026
4bcd2d0
rms setup change
haykh Sep 7, 2026
2f93c2f
Merge branch 'master' into dev/qed
haykh Sep 14, 2026
8ff60c7
merged to 1.5.0rc
haykh Sep 14, 2026
6926b87
version fixed
haykh Sep 14, 2026
95a3590
post merge bugs fixed
haykh Sep 14, 2026
277eb74
devenv setup
haykh Sep 14, 2026
4574ccc
Merge branch 'dev/qed' of github.com:entity-toolkit/entity into dev/qed
haykh Sep 14, 2026
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
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,9 @@ action-token
ignore-*
tombi/
tidy/
.claude
.claude
.understand-anything

# devenv
.devenv*
devenv.local.nix
2 changes: 1 addition & 1 deletion CODEGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ entity
│ ├── styling.cmake # styling functions
│ └── tests.cmake # root cmake for tests
├── dev # developer-specific tools
│ ├── nix # nix-shells
│ ├── nix # nix-shell & devenv environments
│ ├── runners # dockerfiles for github runners on different architectures
│ ├── scripts # developer-specific scripts
│ ├── Dockerfile.common # parent docker environment for development
Expand Down
1 change: 1 addition & 0 deletions dev/nix/adios2.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ stdenv.mkDerivation {
];

propagatedBuildInputs = [
pkgs.libgcc
pkgs.gcc15
]
++ (
Expand Down
45 changes: 45 additions & 0 deletions dev/nix/devenv.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"nodes": {
"devenv": {
"locked": {
"dir": "src/modules",
"lastModified": 1789340509,
"narHash": "sha256-It2AD16uFwiAe9GvuLbk+j+qTDrQxT3XPclL71ZnJ3I=",
"owner": "cachix",
"repo": "devenv",
"rev": "6e830506b517d6a373f2dec6ee8c7f4683908856",
"type": "github"
},
"original": {
"dir": "src/modules",
"owner": "cachix",
"repo": "devenv",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1789286504,
"narHash": "sha256-eiEK7cKZORNEvX0GeF3RtNEF/JXhgf2RqSp3230q13E=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ef34387ddd751e1ab8857adf4676492d32eb24ec",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"devenv": "devenv",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}
173 changes: 173 additions & 0 deletions dev/nix/devenv.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
# devenv counterpart of `shell.nix`; run from this directory:
# devenv shell # cpu-only
# devenv shell -P cuda -O entity.arch:string AMPERE80 # cuda
# devenv shell -P hip -O entity.arch:string AMD_GFX90A # hip
# devenv shell -P mpi -P hdf5 # adios2 with mpi + hdf5
# persistent settings can be put into `devenv.local.nix` (gitignored).
{
pkgs,
lib,
config,
inputs,
...
}:

let
cfg = config.entity;

gpu = lib.toUpper cfg.gpu;
arch = lib.toUpper cfg.arch;

# `shell.nix` imports nixpkgs with `allowUnfree`/`cudaSupport` decided by the
# requested backend. devenv instantiates its own `pkgs` before this module is
# evaluated, so it cannot be reconfigured from here -- import the same input
# ourselves and build everything from that instance.
nixpkgs = import inputs.nixpkgs {
inherit (pkgs.stdenv.hostPlatform) system;
config = {
allowUnfree = true;
cudaSupport = gpu == "CUDA";
};
};

adios2Pkg = nixpkgs.callPackage ./adios2.nix {
pkgs = nixpkgs;
inherit (cfg) hdf5 mpi;
};

kokkosPkg = nixpkgs.callPackage ./kokkos.nix {
pkgs = nixpkgs;
stdenv = nixpkgs.stdenv;
inherit arch gpu;
};

extraPkgs = map (name: nixpkgs.${name}) (lib.filter (s: s != "") (lib.splitString "," cfg.extra));

# compilers are picked by the backend; CUDA goes through kokkos' nvcc_wrapper
compilerEnv =
{
NONE = {
CXX = "g++";
CC = "gcc";
};
HIP = {
CXX = "clang++";
CC = "clang";
};
CUDA = { };
}
.${gpu};
in
{
options.entity = {
gpu = lib.mkOption {
# case-insensitive, as in `shell.nix`
type = lib.types.enum [
"NONE"
"none"
"CUDA"
"cuda"
"HIP"
"hip"
];
default = "NONE";
description = "GPU backend to build Kokkos with.";
};

arch = lib.mkOption {
type = lib.types.str;
default = "NATIVE";
example = "AMPERE80";
description = ''
Kokkos architecture; mandatory when `gpu` is not `NONE`. See
https://kokkos.org/kokkos-core-wiki/get-started/configuration-guide.html#gpu-architectures
'';
};

hdf5 = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Build ADIOS2 with HDF5 support.";
};

mpi = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Build ADIOS2 with MPI support.";
};

extra = lib.mkOption {
type = lib.types.str;
default = "";
example = "gdb,valgrind";
description = ''
Comma-separated nixpkgs attributes to add to the environment, kept for
parity with `shell.nix`. `-O packages:pkgs "gdb valgrind"` does the same
without going through this option.
'';
};
};

config = {
name =
"nt2" + (if gpu != "NONE" then "-${lib.toLower gpu}" else "") + (if cfg.mpi then "-mpi" else "");

profiles = {
cuda.module = {
entity.gpu = "CUDA";
};
hip.module = {
entity.gpu = "HIP";
};
mpi.module = {
entity.mpi = true;
};
hdf5.module = {
entity.hdf5 = true;
};
};

packages =
(with nixpkgs; [
zlib
cmake

adios2Pkg
kokkosPkg

python314

cmake-format
cmake-lint
neocmakelsp
black
pyright
taplo
vscode-langservers-extracted
])
++ extraPkgs;

env = compilerEnv // {
LD_LIBRARY_PATH = lib.makeLibraryPath [
nixpkgs.stdenv.cc.cc
nixpkgs.zlib
];
};

enterShell = ''
BLUE='\033[0;34m'
NC='\033[0m'

echo "following environment variables are set:"
''
+ lib.concatStringsSep "" (
lib.mapAttrsToList (name: value: ''
echo -e " ''${BLUE}${name}''${NC}=${value}"
'') compilerEnv
)
+ ''
echo ""
echo -e "${config.name} devenv activated"
'';
};
}
4 changes: 4 additions & 0 deletions dev/nix/devenv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# devenv inputs; update the lock with `devenv update --from path:./dev/nix`
inputs:
nixpkgs:
url: github:NixOS/nixpkgs/nixos-unstable
1 change: 1 addition & 0 deletions dev/nix/kokkos.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ let
];
"NONE" = [
pkgs.clang-tools
pkgs.libgcc
pkgs.gcc15
];
};
Expand Down
39 changes: 23 additions & 16 deletions dev/nix/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
arch ? "NATIVE",
hdf5 ? false,
mpi ? false,
extra ? "",
}:

let
Expand All @@ -22,6 +23,9 @@ let
gpu = gpuUpper;
}
);
extraPkgs = map (name: pkgs.${name}) (
pkgs.lib.filter (s: s != "") (pkgs.lib.splitString "," extra)
);
envVars = {
compiler = {
NONE = {
Expand All @@ -41,28 +45,31 @@ pkgs.mkShell {
"${name}"
+ (if gpu != "NONE" then "-${pkgs.lib.toLower gpu}" else "")
+ (if mpi then "-mpi" else "");
nativeBuildInputs = with pkgs; [
zlib
cmake
nativeBuildInputs =
with pkgs;
[
zlib
cmake

adios2Pkg
kokkosPkg
adios2Pkg
kokkosPkg

python314
python314

cmake-format
cmake-lint
neocmakelsp
black
pyright
taplo
vscode-langservers-extracted
];
cmake-format
cmake-lint
neocmakelsp
black
pyright
taplo
vscode-langservers-extracted
]
++ extraPkgs;

LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath ([
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
pkgs.stdenv.cc.cc
pkgs.zlib
]);
];

shellHook = ''
BLUE='\033[0;34m'
Expand Down
Loading
Loading