File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Correctness Check
2+
3+ on :
4+ push :
5+ pull_request :
6+
7+ jobs :
8+ build-test :
9+ runs-on : ubuntu-latest
10+
11+ steps :
12+ - name : Checkout
13+ uses : actions/checkout@v4
14+
15+ - name : Build partdiff
16+ run : cargo build --release
17+
18+ - name : Install Valgrind
19+ run : sudo apt-get update && sudo apt-get install -y valgrind
20+
21+ - name : Install uv
22+ uses : astral-sh/setup-uv@v6
23+ with :
24+ version : " 0.9.8"
25+
26+ - name : Set up Python
27+ run : uv python install
28+
29+ - name : Clone partdiff_tester
30+ run : git clone https://github.com/parcio/partdiff_tester.git
31+
32+ - name : Run small correctness check subset with valgrind
33+ run : |
34+ cd partdiff_tester && \
35+ uv run pytest -n auto --verbose \
36+ --executable='../target/release/rust_partdiff' \
37+ --strictness=4 \
38+ --valgrind \
39+ --shuffle=42 \
40+ --max-num-tests=5
41+
42+ - name : Run correctness check
43+ run : |
44+ cd partdiff_tester && \
45+ uv run pytest -n auto --verbose \
46+ --executable='../target/release/rust_partdiff' \
47+ --strictness=4 \
48+ --shuffle=42
Original file line number Diff line number Diff line change @@ -9,8 +9,5 @@ edition = "2018"
99[features ]
1010
1111default = []
12- 2d-array-indexing = []
13- C-style-indexing = []
14- unsafe-indexing = []
1512
1613[dependencies ]
Original file line number Diff line number Diff line change 11# rust_partdiff
2+
23Program for calculation of partial differential equations implemented in Rust
34
4- # building the crate
5- To build the crate correctly currently some features have to be activated.
6- ## Features
7- * Decide which indexing implementation is used for PartdiffMatrix
8- * feature: ` 2d-array-indexing ` has a syntax of ` matrix[[x,y]] ` and should provide better performance
9- * feature: ` C-style-indexing ` has a syntax of ` matrix[x][y] ` and has probably worse performance due to the internals of the implementation
10- * Decide whether bounds checking should be used for matrix access
11- * feature: ` unsafe-indexing ` uses the unsafe ` get_unchecked ` methods of Vec and does no bounds checking but therefore performs better
12- * not building with ` unsafe-indexing ` defaults to using access methods of Vec that apply bounds checking
5+ ## Usage
136
14- The current default way to build the crate for performance should be: ` cargo build --release --features "2d-array-indexing,unsafe-indexing" `
7+ ``` shell
8+ $ git clone https://github.com/mblesel/rust_partdiff.git
9+ $ cd rust_partdiff
10+ $ cargo build --release
11+ $ target/release/rust_partdiff 1 2 100 1 2 100
12+ ```
You can’t perform that action at this time.
0 commit comments