Repository navigation
CFDCraft v0.0
| Version | Stage | Highlights |
|---|---|---|
| 0.0 (2026-11-14) | 0 Foundations and gate G1 | Cargo workspace, CI on Linux, macOS and Windows with MPI runs on 4 ranks, the G1 kernel benchmark. G1 GPU verdict passed on a Tesla T4: single-source Rust kernels within 1.0 % of hand-written CUDA C, bitwise equal results; CPU verdict passed on an i9-9900K: single-source bodies within 1.8 % of hand-written loops, in two runs |
0.0 (2026-11-14) – stage 0: foundations and gate G1
Workspace (Cargo.toml, Rust 2024 edition, minimum Rust 1.89):
cfdcraft-core(no_std): the generic floating-point typeReal
(f64 reference path, f32 possible, D7), 32-bit local and 64-bit global
indices, pairwise summation in a fixed order (D31), counter-based random
numbers keyed by identity, step and event (D47).cfdcraft-kernels(no_std): the kernel bodies, one source for CPU and
GPU: face flux, cell gather, SpMV in CSR and SELL-C-σ. Gather-based, no
atomics. Featurechecked-indexingfor bounds-checked loads.cfdcraft-parallel:Communicatortrait withSerialCommandMpiComm
(featurempi, system MPI library, D9); reproducible all-rank sums;
multi-threaded sums bitwise equal to the sequential sum for any number of
threads.cfdcraft-bench: gate G1. Synthetic periodic face-based mesh (natural or
shuffled numbering), CSR and SELL-C-σ matrices, backendscpu-serial,
cpu-threads,cpu-native, and with featurecudacuda-reference
(hand-written CUDA C, compiled by NVRTC at run time) andcuda-rust(the
kernel bodies compiled to PTX). TOML case files, JSON, Markdown and SVG
reports, G1 verdict per candidate/reference pair.cfdcraft-cli: thecfdcraftcommand withinfo,bench g1and
bench backends.gpu/ptx-kernels: the kernel bodies as PTX entry points, built with the
nightly toolchain (build.sh).
Continuous integration (.github/workflows/ci.yml, D22): format, clippy and
docs; tests in debug and release on Linux, macOS and Windows; minimum Rust
version; MPI smoke test with 2 and 4 ranks on Linux and macOS (O12); PTX
build of the single-source kernels; G1 smoke run on every platform.
Cloud GPU runs: tools/g1_cloud.sh (installs Rust, builds PTX and CLI for
the GPU found, runs G1 twice) and tools/g1_colab.ipynb (the same on a free
Google Colab T4).
CLI: cfdcraft info reports the communicator and the rank count.
Documentation: gallery, case catalogue,
recipes, G1 procedure and results.
Findings:
- G1 GPU verdict, Tesla T4 (Google Colab), 10 million cells: PASS. The
single-source Rust kernels, compiled to PTX, run within 1.0 % of the
hand-written CUDA C kernels on all four kernels (220–255 GB/s of 320 GB/s),
in two runs, with results bitwise equal to the CPU. D8: one kernel source;
D11 stands. The single-source GPU route needs nightly Rust (O14). - G1 CPU verdict, Intel i9-9900K (macOS), 10 million cells: PASS in two
runs: largest time ratio single-source against hand-written Rust loops
1.018, results bitwise equal, 20–26 GB/s. - The rustc NVPTX target supports compute capability 7.0 (Volta) and newer
only; G1 needs such a GPU for the single-source route (O13). The
maintainer's GTX 960 (compute capability 5.2) runs the CPU verdict and the
CUDA reference (g1_gpu_reference_4m.toml, recipe 2); the GPU verdict is
taken on a free Colab T4 (recipe 3). - On the CPU the single-source bodies match hand-written loops once the
parallel loop uses large enough work packets (64 Ki outputs): with 4 Ki the
face-flux kernel was about 30 % slower on 10 million cells. - A branching max/min in the upwind flux cost bandwidth on random mass-flux
signs;Real::max_of/min_ofare now branch-free.