@@ -45,41 +45,30 @@ shamconfigure # alias to the correct cmake command
4545shammake # alias to ninja build (or make if ninja is unavailable)
4646```
4747
48- ### Build types / sanitizers
49-
50- These are set during the ` shamconfigure ` step (after ` source ./activate ` ):
51-
52- - ` ASAN ` — ` -fsanitize=address `
53- - ` UBSAN ` — ` -fsanitize=undefined `
54- - ` TSAN ` — ` -fsanitize=thread `
55- - ` MSAN ` — ` -fsanitize=memory `
56- - ` COVERAGE ` — ` -fprofile-instr-generate -fcoverage-mapping ` (forces
57- SHAMROCK_USE_SHARED_LIB=Off)
58-
5948## Testing
6049
6150``` bash
6251cd build
6352source ./activate
64- ctest # runs the C++ test suite
53+ ./shamrock --smi # or ./shamrock_test --smi
54+ ```
55+
56+ Pick a device ID from the output, then run:
57+
58+ ``` bash
59+ ./shamrock_test --sycl-cfg < id> :< id> --loglevel 1 --unittest
6560```
6661
67- Tests live in ` src/tests/ ` alongside the library sources they exercise
68- (e.g. ` src/tests/shambase/ ` , ` src/tests/shammath/ ` ). The project also has
69- Python tests but they are mainly run via CI.
62+ where ` <id> ` is the device ID the user selected from ` --smi ` output.
7063
7164## Code style & linting
7265
73- - ** Formatter** : ` .clang-format ` — LLVM style, 4-space indent, column limit
74- ** 100** , C++17.
75- - ** CI linter** : ` .clang-tidy ` — runs with ` run-clang-tidy-20 ` (LLVM 20).
76- Custom CheckOptions for naming: classes CamelCase, functions/lower_case,
77- members lower_case.
78- - ** Pre-commit** : clang-format (v22), cmake-format, ruff (Python), license/
79- doxygen/pragma-once checks via local Python hooks.
80- - ** Always run** ` pre-commit run --all-files ` before committing.
66+ - ** Formatter** : ` .clang-format `
67+ - ** CI linter** : ` .clang-tidy `
68+ - ** Pre-commit hooks** : ` .pre-commit-config.yaml `
69+ - Run ` pre-commit run --all-files ` before committing
8170
82- ## Naming conventions (from .clang-tidy)
71+ ## Naming conventions (from ` .clang-tidy ` ` CheckOptions ` )
8372
8473| Entity | Case |
8574| ------ ------ ---------------- | ---------- |
@@ -91,48 +80,26 @@ Python tests but they are mainly run via CI.
9180
9281``` text
9382src/
94- shamrock/ core hydrodynamics solvers, mesh, Riemann
95- shamphys/ physics models (EOS, reaction tables)
96- shammodels/ higher-level models
83+ shamalgs/ GPU & MPI algorithms
84+ shambackends/ SYCL GPU device management and kernels
9785 shambase/ base containers, math utils, I/O
98- shammath/ math primitives (tensors, linear algebra)
99- shamcomm/ MPI / SYCL comm layer
100- shambackends/ SYCL backend implementations
101- shamcmdopt/ CLI argument parsing
102- shamsys/ system-level glue
103- shamtree/ YAML tree / config parsing
104- shamtest/ test helpers / macros
105- shambindings/ pybind11 glue
106- shampylib/ Python library entry point
107- shamalsgs/ ALGOS (algorithms)
108- pylib/ Python package root
109- tests/ unit + integration tests
86+ shambindings/ embeds Python via pybind11, registering C++ types and modules
87+ shamcmdopt/ CLI argument parsing, env/tty detection utilities
88+ shamcomm/ MPI and SYCL comm layer for Shamrock
89+ shammath/ tensor and linear algebra math routines
90+ shammodels/ SPH, GSPH, Ramses, Zeus hydro model implementations
91+ shamphys/ physics utilities: EOS, MHD, orbits, collapse
92+ shamrock/ core hydrodynamics framework: solvers, mesh, AMR, I/O, scheduler, graph
93+ shamsys/ SHAMROCK system and runtime glue
94+ shamtest/ Shamrock's internal C++ test framework
95+ shamtree/ SYCL-accelerated Morton-code trees for hydrodynamics queries
96+ shamunits/ compile-time physics unit conversion library
97+ pylib/ Python package root for Shamrock
98+ tests/ unit tests for Shamrock library components
11099```
111100
112- ## CI highlights
113-
114- - ` main_workflow.yml ` orchestrates all CI: source checks, docs, conda build,
115- ASAN/UBSAN/TSAN.
116- - ` on_pr.yml ` gates merges on CI passing (respects ` light-ci ` label).
117- - ` shamrock-acpp-clang-tidy.yml ` — full clang-tidy on AdaptiveCpp + Ubuntu.
118- - ` shamrock-acpp-clang-asan.yml ` , ` shamrock-acpp-clang-ubsan.yml ` — sanitizer
119- CI.
120- - ` shamrock-acpp-phys-test.yml ` — physics regression tests.
121-
122- ## Important constraints
123-
124- - ** SYCL backend is mandatory** — ` --backend [SYCL|omp|hetero] ` must be set
125- during configure. Any major SYCL compiler works
126- (AdaptiveCpp, DPC++, intel/llvm).
127- - ** Submodules must be in sync** — CMake checks their commit hashes at configure
128- time. Run ` git pull --recurse-submodules ` .
129- - ** MacOS forces** ` SHAMROCK_USE_SHARED_LIB=Off ` due to known issues.
130- - ** License headers** are checked at pre-commit — CeCILL boilerplate required on
131- every source file.
132-
133101## Files to avoid modifying unless explicitly asked
134102
135- - ` env/machine/*/setup-env.py ` — machine-specific env configs.
136103- ` .github/workflows/*.yml ` — CI workflows.
137104- ` external/ ` submodules — upstream dependencies.
138105- ` LICENSE ` , ` LICENSE.en ` — legal files.
@@ -151,19 +118,11 @@ src/
151118 < machine specific flags>
152119
153120# Build
154- cd build && source ./activate && shammake
155-
156- # Run clang-tidy locally
157- CLANGTIDYBINARY=clang-tidy-20 run-clang-tidy-20 -p build/ \
158- -use-color -config-file .clang-tidy
121+ pwd && ls && cd build && source ./activate && shammake
159122
160123# Run pre-commit
161124pre-commit run --all-files
162125
163126# Run tests
164- cd build && source ./activate && ctest
165-
166- # Python bindings
167- cd build && source ./activate
168- python3 -c " import shampylib; shampylib.main()"
127+ pwd && ls && cd build && source ./activate && ./shamrock_test --sycl-cfg < id> :< id> --loglevel 1 --unittest
169128```
0 commit comments