Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lots of updates #50

Merged
merged 28 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7dc7ab9
perf: Benchmark tweaks for paper results.
jetuk Aug 23, 2023
f80eb0c
feat: Add new SIMD IPM solver.
jetuk Sep 6, 2023
cf9cb7f
fix: Fix feature name in main.rs
jetuk Sep 6, 2023
cdbe905
perf: Tweaks to random benchmarking.
jetuk Sep 7, 2023
78f9ed8
feat: Add per-solver settings.
jetuk Sep 8, 2023
25b4d73
fix: Correct feature gate in Python API.
jetuk Sep 12, 2023
a8ab9cb
chore: Refactor benchmarks
jetuk Sep 12, 2023
6fba858
fix: Remove debug printing.
jetuk Sep 12, 2023
0c5f4bb
chore: Benchmark tweaks.
jetuk Sep 12, 2023
7612bad
fix: Feature gate solvers in benchmarks.
jetuk Sep 14, 2023
6b3adfa
fix: Correct feature gate on tests in test_utils module.
jetuk Sep 15, 2023
d13dbab
feat: Add methods to separate setup and running of a model.
jetuk Sep 15, 2023
1cbd4b1
feat: Make IPM SIMD solver generic.
jetuk Sep 15, 2023
89117e4
chore: Improve benchmark script feature handling.
jetuk Sep 15, 2023
a29d7c2
chore: Exit on error in benchmark script.
jetuk Sep 15, 2023
7957e08
chore: More tweaks to benchmarking.
jetuk Sep 16, 2023
9b8f92c
feat: Add run-random command to CLI.
jetuk Sep 18, 2023
c0c1a8c
feat: Several OCL solver updates.
jetuk Sep 19, 2023
20a0c95
fix: Remove unused import and println!
jetuk Sep 19, 2023
cb598bc
feat: Make costs random in random model
jetuk Sep 19, 2023
6948f24
fix: Fix error defining tolerances in IPM OCL solver.
jetuk Sep 19, 2023
ab181df
feat: Add NaN check to IPM SIMD solver.
jetuk Sep 19, 2023
1907b06
chore: Make random model run in CLI the same number of time-steps as …
jetuk Sep 19, 2023
b4e0dbc
fix: Better default to OCL solver.
jetuk Sep 20, 2023
c87fa92
chore: Merge branch 'main' into paper-benchmarks
jetuk Sep 21, 2023
f4b5bdb
fix: Several tests.
jetuk Sep 22, 2023
5c09d9b
fix: Fix broken doc test.
jetuk Sep 22, 2023
92f26fc
chore: Merge branch 'main' into paper-benchmarks
jetuk Sep 27, 2023
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
21 changes: 14 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ float-cmp = "0.9.0"
hdf5 = { version="0.8.1" }
csv = "1.1"
clp-sys = { path = "./clp-sys" }
clipm = { path = "./clipm", optional = true }
ipm-ocl = { path = "./ipm-ocl", optional = true }
ipm-simd = { path = "./ipm-simd", optional = true }
wasmer = "4.0.0"
serde = { version = "1", features = ["derive"] }
serde_json = "1.0"
Expand All @@ -43,17 +44,20 @@ pyo3-polars = "0.7.0"
pywr-schema = { git = "https://github.com/pywr/pywr-schema/", tag="v0.7.0" }
rhai = { version="1.12.0", features=["sync"] }

# OpenCL
ocl = { version = "0.19", optional = true }

# Binary dependencies
clap = { version="4.0", features=["derive"] }
anyhow = "1.0.69"

rand = "0.8.5"
rand_distr = "0.4.3"
rand_chacha = "0.3.1"

[dev-dependencies]
tempfile = "3.3.0"
criterion = "0.5"
rand = "0.8.5"
rand_distr = "0.4.3"
rand_chacha = "0.3.1"

[lib]
name = "pywr"
Expand All @@ -65,7 +69,8 @@ crate-type = ["cdylib", "rlib"]
extension-module = ["pyo3/extension-module"]
default = ["extension-module"]
highs = ["dep:highs-sys"]
clipm = ["dep:clipm"]
ipm-ocl = ["dep:ipm-ocl", "dep:ocl"]
ipm-simd = ["dep:ipm-simd"]

[[bin]]
name = "pywr-cli"
Expand All @@ -74,7 +79,9 @@ path = "src/main.rs"

[workspace]
members = [
"clipm",
"ipm-common",
"ipm-ocl",
"ipm-simd",
"clp-sys",
]
exclude = [
Expand All @@ -83,7 +90,7 @@ exclude = [

[profile.release]
opt-level = 3 # fast and small wasm
lto = true
# lto = true
# strip = true
# Turn this on for profiling
# debug = true
Expand Down
15 changes: 15 additions & 0 deletions bench.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

set -e

ODIR=benches/$1
FEATURES="ipm-ocl,ipm-simd"

mkdir -p "${ODIR}"

#cargo +nightly criterion --no-default-features --features ${FEATURES} --message-format=json -- random-models-size > "${ODIR}/random-models-size.json"
#cargo +nightly criterion --no-default-features --features ${FEATURES} --message-format=json -- random-models-scenarios > "${ODIR}/random-models-scenarios.json"
cargo +nightly criterion --no-default-features --features ${FEATURES} --message-format=json -- random-models-hyper-scenarios > "${ODIR}/random-models-hyper-scenarios.json"
#cargo +nightly criterion --no-default-features --features ${FEATURES} --message-format=json -- random-models-threads > "${ODIR}/random-models-threads.json"
#cargo +nightly criterion --no-default-features --features ${FEATURES} --message-format=json -- random-models-ipm-convergence > "${ODIR}/random-models-ipm-convergence.json"
# cargo +nightly criterion --no-default-features --features ipm-ocl --message-format=json random-models-ocl-chunks > "${ODIR}/random-models-ocl-chunks.json"
Loading