Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
1a1afd9
Add a place for agent SKILL files (.agents) and a script to mirror th…
manauref Sep 2, 2026
716319c
Fix the location of SKILL file (each skill needs to be in a separate …
manauref Sep 2, 2026
c1dec76
Revert write_efit_ltx_miller.py to 595e7425, undoing accidental chang…
manauref Sep 2, 2026
31b0117
Add claude/codex folders whose skills are automatically populated fro…
manauref Sep 2, 2026
9a22850
Fix upper-boundary CFL contribution being dropped from reduction (#1079)
manauref Sep 3, 2026
df03930
Standardize unit test names in gyrokinetic/unit so they all end with …
manauref Sep 3, 2026
7762d4f
Standardize unit test names in core/moments/vlasov unit so they all e…
manauref Sep 3, 2026
6c0ec37
Add file-context keywords to generic unit test names across core/mome…
manauref Sep 3, 2026
5c34171
Untrack files accidentally included in previous commit (not part of t…
manauref Sep 3, 2026
0243240
Add jenkinsfile and instructions for setting up jenkins-GH-based ci.
manauref Sep 3, 2026
5f5465f
Change Jenkins setup so it clones and builds from scratch.
manauref Sep 3, 2026
ac41dc7
Jenkins running make check in parallel exposed a bug in the Makefile.…
manauref Sep 3, 2026
36db859
Fix another race condition in Makefile
manauref Sep 3, 2026
50c974a
Change Jenkins config so it wipes out previous builds.
manauref Sep 3, 2026
8fcd6ad
Commenting out wv_vacuum_einstein test that doesn't pass with Jenkins…
manauref Sep 3, 2026
359c7c5
Add build-adas=yes to Mac machine file so that adas unit tests are ru…
manauref Sep 3, 2026
b8f8d82
Comment out another wv_vacuum test that fails in Jenkins.
manauref Sep 3, 2026
022fd5e
Make Jenkins config more sophisticated to A) allow others to use thei…
manauref Sep 3, 2026
b23cd91
Merge pull request #1103 from gkeyllorg/agent_tools-unit_clean
manauref Sep 3, 2026
a53f881
Merge pull request #1105 from gkeyllorg/agent_tools-cfl_fix
manauref Sep 3, 2026
9df0462
Attempt at plugging in runregression to Jenkins CI.
manauref Sep 4, 2026
9d78e8c
Forgot to add auxiliary files for runregression.
manauref Sep 4, 2026
0f992d2
Switch Jenkins build to use install instead of gkeyll-install, and fi…
manauref Sep 5, 2026
2827bc6
Change Jenkins config so it clones and pulls just the last commit, no…
manauref Sep 5, 2026
8ae0061
Move declaration of REGRESSION_LAYERS in Jenkins script.
manauref Sep 5, 2026
f07b9b4
Ran regression create and check on multiple gk files, all now passing in
tnbernard Sep 8, 2026
23008de
Merge pull request #1111 from gkeyllorg/agent_tools-jenkins_tnb
manauref Sep 8, 2026
b94d62c
Remove helical zpar case, the benchmark with Noah's thesis was done w…
Antoinehoff Sep 8, 2026
e1578c8
reduce t_end to stop before the dt drop.
Antoinehoff Sep 8, 2026
6ba6566
adjust end time and add recommended resolution
Antoinehoff Sep 8, 2026
d0d2cf9
reduce a bit the resolution to accelerate
Antoinehoff Sep 8, 2026
5835c37
adjust resolution to accelerate
Antoinehoff Sep 8, 2026
1a05a33
Merge pull request #1114 from gkeyllorg/agent_tools-jenkins-regtest_c…
manauref Sep 8, 2026
cf21e7d
Changing mapc2p to Cartesian to avoid geo errors regarding handedness.
tnbernard Sep 8, 2026
a4a6d19
Merge pull request #1115 from gkeyllorg/agent_tools-jenkins_tnb
manauref Sep 8, 2026
c7bb169
Change the check for absolute path so that if we give gyrokinetic/cre…
manauref Sep 9, 2026
e453fcd
Add p0 basis inv kernels, add a basis unit test for p0, and modify gk…
manauref Sep 9, 2026
b71deec
Merge branch 'agent_tools-jenkins' of https://github.com/gkeyllorg/gk…
manauref Sep 9, 2026
2522e0b
Fix typo in rt_gk_multib_sheath_1x2v_p1.c
manauref Sep 9, 2026
46ff328
Resolution and time length cuts for several gyrokinetic regression tests
Maxwell-Rosen Sep 9, 2026
6c8e6e3
Add a couple of TS tests to ignore list because they are too coarse t…
manauref Sep 9, 2026
3534514
Revert changes in tests that are not nozzle, mirror, leaky bag or wha…
manauref Sep 9, 2026
d46db6a
Merge pull request #1116 from gkeyllorg/agent_toold-jenkins-regtest-f…
manauref Sep 9, 2026
f393192
set num_frames=1 in some reg tests.
manauref Sep 9, 2026
3529f9c
Change Jenkins config so that a personal computer only builds/tests P…
manauref Sep 9, 2026
b0c10ca
Apply core/ and gyrokinetic/ changes from agent_tools-jenkins-prefere…
manauref Sep 9, 2026
a08ba34
Remove deprecated gkeyll_guide skill and update symlinks in Claude an…
Maxwell-Rosen Sep 9, 2026
c6eda2d
Add a review skill and remove a redundant line
Maxwell-Rosen Sep 9, 2026
9b0eac0
Add an agents.md for a role, and modify some of the skills
Maxwell-Rosen Sep 9, 2026
622a8d9
Get rid of _extra.c files in core/unit.
manauref Sep 9, 2026
df6abc5
Get rid of position_map _extras.c file.
manauref Sep 9, 2026
1102309
Undo mindless commenting of writing in unit tests, likely done by uns…
manauref Sep 9, 2026
e2747e4
Rename unit tests to remove _ctor from name, add tests to existing fi…
manauref Sep 9, 2026
fc67ef3
Merge pull request #1119 from gkeyllorg/agent_tools-jenkins-core-gyro…
manauref Sep 9, 2026
a58e09d
Update agents.md and claude.md symlink
Maxwell-Rosen Sep 9, 2026
3bc1b53
update skill
Maxwell-Rosen Sep 9, 2026
773b05d
Use nproc for running make
Maxwell-Rosen Sep 9, 2026
e98bbb0
Add push back and being helpful
Maxwell-Rosen Sep 10, 2026
bb10179
We don't only use DG methods, but we have others too
Maxwell-Rosen Sep 10, 2026
87de0e4
Rename and reword skill files.
manauref Sep 10, 2026
e162e49
Merge branch 'agent_tools-jenkins-skills-rosen' of https://github.com…
manauref Sep 10, 2026
b1b477f
Edit AGENTS.md
manauref Sep 10, 2026
9eaf281
Merge pull request #1121 from gkeyllorg/agent_tools-jenkins-skills-rosen
manauref Sep 10, 2026
a4cdcdb
Strip <layer>/creg from the user's argument to -r so that we can run …
manauref Sep 10, 2026
1aff4e5
Strip file extension so that user can provide test name to -r with or…
manauref Sep 10, 2026
f3f410d
Fix a couple of reg tests and remove them from the ignore list. Some …
manauref Sep 11, 2026
100d662
Add another directory cleaning step in runregression. This fixes rand…
manauref Sep 11, 2026
5a24813
Add a line break after executable is run so runregression messages ar…
manauref Sep 11, 2026
713b64e
Add 'antoine_mac' node configuration for specific PR author
Antoinehoff Sep 11, 2026
3e7c18a
Change the non-uniform maps for these regression tests so the timeste…
Maxwell-Rosen Sep 11, 2026
0e26008
Merge pull request #1123 from gkeyllorg/agent_tools-jenkins-nunif-tes…
manauref Sep 11, 2026
27a6567
Merge agent_tools -> agent_tools-jenkins to standardize unit tests. R…
manauref Sep 11, 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
100 changes: 100 additions & 0 deletions .agents/skills/compiling/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
name: compiling
description: How to compile Gkeyll libraries, executables, and specific unit or regression test targets on CPU or CUDA.
---

# Instructions

Use this skill whenever you need to compile
* Any of the Gkeyll libraries.
* A C unit or regression test.
* A C input file.

# Compiling in Gkeyll

We assume the dependencies have already been installed (e.g. via a machines/mkdeps
file) and configured (e.g. via a machines/configure file).

Operate relative to the repository root (`git rev-parse --show-toplevel`).
Dependencies are typically already installed in the sibling `gkylsoft/`
directory. Check the existing configuration before building. If configuration
is missing or needs changing, consult `machines/configure.<machine>.sh` for
required modules and library paths, or use `./configure` with the intended
installation prefix and solver.

## Compiling the Gkeyll library

We compile using a Makefile. The `make` command allows you to specify the number
of cores to use via `-j`. We will use no more than half the available processors for parallel builds.
So before invoking `make`, set the `NPROC` environment variable on a Mac using
```
export NPROC=$(sysctl -n hw.physicalcpu)
NPROC=$((NPROC > 1 ? NPROC / 2 : 1))
```
or on Linux using

```sh
NPROC=$(nproc)
NPROC=$((NPROC > 1 ? NPROC / 2 : 1))
```

Then, you can build the Gkeyll library with

```sh
make -j"$NPROC" install
```

## Compiling a C unit or regression test

Unit tests are located in the `unit/` directory of each solver
(core/moments/vlasov/gyrokinetic/pkpm), while C regression tests are located in `creg/` folders and
have names beginning with `rt_`.

Compile a specific test by giving make its executable target:

```sh
make -j"$NPROC" build/core/unit/ctest_array
make -j"$NPROC" build/gyrokinetic/creg/rt_gk_sheath_2x2v_p1
```

CPU targets are located in `build/`, and GPU targets are in `cuda-build/`.
Match test targets to the configured build directory.

For executing the resulting tests, see
[testing_and_verification](../testing_and_verification/SKILL.md).

### Compiling all or groups of C unit tests

The Makefile supports compiling groups of unit tests all at once. For example, to compile all the
unit tests at once run

```sh
make -j"$NPROC" unit
```

Alternatively, you can compile all the unit tests for a specific solver. For example, to compute all
the unit tests for the gyrokinetic solver use

```sh
make -j"$NPROC" unit-run
```

## Compiling C input files

Input files written in C work just like C regression tests. They can be compiled similarly if they
are located in the `creg/` folder. For example, if `my_sim.c` is a gyrokinetic input file, and located
in `gyrokinetic/creg/`, it can be compiled with

```sh
make -j"$NPROC" build/gyrokinetic/creg/my_sim
```

If the input file is outside of the repository, one needs to use the shared makefile in
`<path_to_gkylsoft>/gkylsoft/gkeyll/share/`. For example, if `my_other_sim.c` is an input file in `$HOME/new_sim/`,
compile it with:

```sh
cd ~
cp <path_to_gkylsoft>/gkylsoft/gkeyll/share/Makefile ./
make
```
71 changes: 71 additions & 0 deletions .agents/skills/directory_structure/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
name: directory_structure
description: Explanation of the Gkeyll directories.
---

# Instructions

* Use when exploring the repository, trying to find something, or deciding where new code belongs.
* Operate relative to the repository root (`git rev-parse --show-toplevel`).

# Gkeyll file structure

Gkeyll has four PDE solvers:
* Moments or fluid solver.
* Vlasov solver.
* Gyrokinetic solver.
* PKPM solver.

Correspondingly, these solvers are organized into four separate folders, and they
share some common functionality in a fifth folder. Gkeyll is mostly organized in:
* core/: functionality common to all solvers.
* moments/: files for the moments solver.
* vlasov/: files for the Vlasov solver.
* gyrokinetic/: files for the gyrokinetic solver.
* pkpm/: files for the PKPM solver.

Note that the four solvers are not independent. They have the following
dependencies:
* moments depends on core.
* vlasov depends on moments.
* gyrokinetic depends on vlasov.
* pkpm depends on gyrokinetic.

Keep lower layers independent of higher layers.

Each of the solvers' folders have the sub-folders:
* ker/: C kernels generated with Maxima stored in the gkylcas repository. Do
not hand-edit generated kernels; modify their source templates instead.
* zero/: C and CUDA functions or modules (sometimes we call them updaters),
some of which call kernels in ker/.
* data/: data needed for some simulations.
* unit/: unit tests of specific components in zero/.
* apps/: apps are called by input files or regression tests, and they organize
solver workflow or simulations and call modules in zero/. Communication
happens in the app level.
* creg/: C regression tests or short simulations to ensure solvers work (these
are also examples of C input files).
* luareg/: Lua regression tests or short simulations to ensure solvers work
(these are also examples of Lua input files).

## Library dependencies

The Gkeyll source code in gkeyll/ depends on other libraries installed in gkylsoft/.
Most of the time you shouldn't need to read files in gkylsoft/ unless prompted.

## CPU - GPU organization

Gkeyll runs on both CPUs and GPUs, the latter using CUDA.
- CPU-only implementations live in .c files.
- C files call host-side wrappers of CUDA kernels, both of which live in _cu.cu
files.

## Search hierarchy

Rather than looking into the entire codebase without prior knowledge, look into
folders in the following order:
- Look into a folder (ending in /) the user referenced.
- If the user referenced a specific solver (e.g. gyrokinetic), look into its
folder.
- Look into folders for solvers that the specified solver depends on, following
the dependency chain up through core/.
36 changes: 36 additions & 0 deletions .agents/skills/gyrokinetic_details/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: gyrokinetic_details
description: Details specific to the gyrokinetic solver.
---

# Instructions

* Use when working on the gyrokinetic/ code, or with an input file that uses
the gyrokinetic solver.

# Gyrokinetics

## MPI decomposition

Gyrokinetic regression tests parallelize along the last configuration-space
dimension. Choose the partition flag by dimensionality:

| Dimensionality | Flag for N partitions |
|---|---|
| 1x2v | `-c N` |
| 2x2v | `-d N` |
| 3x2v | `-e N` |

For example, run the compiled 2x2v sheath regression on four MPI ranks:

```sh
<path_to_gkylsoft>/gkylsoft/openmpi/bin/mpirun -np 4 ./build/gyrokinetic/creg/rt_gk_sheath_2x2v_p1 -M -d 4
```

Use the MPI installation matching the build. `-M` enables MPI in the
regression executable; `-d 4` partitions its second configuration dimension.
Add `-s1` for a one-step smoke test.

See [compiling](../compiling/SKILL.md) when a build is needed,
and [testing_and_verification](../testing_and_verification/SKILL.md) for general test
execution and memory checks.
33 changes: 33 additions & 0 deletions .agents/skills/naming_conventions/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: naming_conventions
description: Determine the correct name for files, functions, modules and variables.
---

# Instructions

* Apply these naming conventions when creating, editing, or reviewing C, CUDA, and Lua code.

# Naming conventions

### Files.

- Public header files have names starting with gkyl_ and ending in .h.
- Private header files have names starting with gkyl_ and ending in _priv.h.
- CUDA files have names ending in _cu.cu.
- luareg/ folders have Lua input files whose names end with .lua. The Lua
wrappers are in the apps/ folders and have names ending in _lw.c

### Functions

- Public functions (defined in public header files) should have a name that starts
with gkyl_.
- Public functions in files in zero/ folders should have a name that starts
with the name of the file that contains it.
- Private functions (defined in private header files) or static (and not defined
in private headers) in files in zero/ folders should have a name that starts
with an abbreviated version of the name of the file that contains it.

### Variables

- Do not use single letter names for variables whose scope spans more than 15 lines.

34 changes: 34 additions & 0 deletions .agents/skills/software_design/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: software_design
description: Some design practices in Gkeyll code to consider when implementing new modules (apps, updaters) or modifying existing ones.
---

# Instructions

* Load this skill whenever new modules or updaters in zero/ or apps/ folders
are to be created, or when existing ones will be edited.

## Software design elements

### Module structure

Most modules in zero/ or apps/ consist of 3 public functions:
1. A creation function, typically called gkyl_<module>_new or gkyl_<module>_init.
2. An execution function, often called gkyl_<module>_advance or gkyl_<module>_apply.
3. A deletion function, typically called gkyl_<module>_release.

There may also be some additional auxiliary private or public functions.

### Module best practices

- All dynamic (heap) allocations should happen in the initialization function,
and freed in the release function, using the appropriate gkyl_ allocation/deallocation functions when possible.
- Don't place logic branching (e.g. if-statements) that depend on a
time-independent choice or parameter inside the methods called in the time loop of a simulation (e.g. _advance). Instead, use function pointers to set the appropriate method during the initialization of the module, and call that method inside the time loop.

### Other principles to follow

- Consider extensibility, maintainability, simplicity and how modular design.
- Avoid code duplication whenever possible (e.g. write functions called
multiple times) and without breaking layering.
- Write shorter code and refactor into a sub-module whenever possible.
Loading
Loading