Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 21a20ce7ca |
@@ -1,8 +1,9 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches: ['main']
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
@@ -13,7 +13,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
|
||||
- name: Create Gitea release
|
||||
id: create
|
||||
@@ -86,17 +86,21 @@ jobs:
|
||||
build-macos-arm64:
|
||||
needs: create-release
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: registry.metabarcoding.org/cibuilder/rustcrossosx:latest
|
||||
credentials:
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.REGISTRYTOKEN }}
|
||||
defaults:
|
||||
run:
|
||||
working-directory: src
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust + zigbuild
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
|
||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||
sudo apt-get update -qq && sudo apt-get install -y -qq jq
|
||||
pip install ziglang --quiet --break-system-packages
|
||||
$HOME/.cargo/bin/cargo install cargo-zigbuild
|
||||
$HOME/.cargo/bin/rustup target add aarch64-apple-darwin
|
||||
|
||||
- name: Cache cargo registry
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@@ -108,7 +112,7 @@ jobs:
|
||||
restore-keys: macos-arm64-cargo-
|
||||
|
||||
- name: Build macOS binary
|
||||
run: cargo build --release --target aarch64-apple-darwin --no-default-features
|
||||
run: cargo zigbuild --release --target aarch64-apple-darwin --no-default-features
|
||||
|
||||
- name: Prepare and upload artifact
|
||||
env:
|
||||
|
||||
@@ -92,7 +92,6 @@ release: bump-version
|
||||
git_hash=$$(jj log -r @ --no-graph -T 'commit_id'); \
|
||||
commits=$$(jj log -r 'latest(tags())..@' --no-graph -T 'description ++ "\n"' 2>/dev/null || \
|
||||
jj log --no-graph -T 'description ++ "\n"' --limit 30); \
|
||||
notes=$$(printf 'Write concise markdown release notes for obikmer (a Rust kmer genomics tool). Be technical and direct. Base them strictly on these commit messages:\n\n%s' "$$commits" | aichat 2>/dev/null); \
|
||||
tag_msg="$${notes:-Release v$$new_version}"; \
|
||||
git tag -a "v$$new_version" -m "$$tag_msg" "$$git_hash" && \
|
||||
notes=$$(printf 'Write concise markdown release notes for obikmer (a Rust kmer genomics tool). Be technical and direct. Base them strictly on these commit messages:\n\n%s' "$$commits" | aichat); \
|
||||
git tag -a "v$$new_version" -m "$$notes" "$$git_hash" && \
|
||||
git push origin "v$$new_version"
|
||||
|
||||
Generated
+1
-1
@@ -1704,7 +1704,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "obikmer"
|
||||
version = "1.1.27"
|
||||
version = "1.1.17"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"csv",
|
||||
|
||||
@@ -287,9 +287,8 @@ impl PartitionRunner {
|
||||
drop(event_tx);
|
||||
|
||||
// ── Controller ────────────────────────────────────────────────────
|
||||
let initial_workers = n_nodes.min(max_workers).min(n_total);
|
||||
for _ in 0..initial_workers { activate_tx.send(()).ok(); }
|
||||
let mut n_active = initial_workers;
|
||||
activate_tx.send(()).ok();
|
||||
let mut n_active = 1usize;
|
||||
let mut cpu_sample = CpuSample::now();
|
||||
let mut eff_at_last_spawn = 0.0f64; // 0 = no previous spawn to evaluate
|
||||
let mut completed = 0usize;
|
||||
@@ -362,13 +361,13 @@ fn maybe_activate(
|
||||
// Going from k-1 → k workers, the minimum acceptable speedup is (k-1+0.2)/(k-1).
|
||||
// For the very first extra worker (n_active == 1, no previous spawn), skip this
|
||||
// check: eff_at_last_spawn == 0 acts as the sentinel.
|
||||
let last_spawn_was_beneficial = if *eff_at_last_spawn < 1e-9 || eff < 1e-9 {
|
||||
true // first additional worker, or measurement too short: no prior data to evaluate
|
||||
let last_spawn_was_beneficial = if *eff_at_last_spawn < 1e-9 {
|
||||
true // first additional worker: no prior data to evaluate
|
||||
} else {
|
||||
let k_new = *n_active as f64; // worker count after the last spawn
|
||||
let min_gain = 0.2 / k_new;
|
||||
let actual_gain = (eff - *eff_at_last_spawn) / eff;
|
||||
actual_gain >= min_gain
|
||||
let k_before = (*n_active - 1) as f64;
|
||||
let min_speedup = (k_before + 0.2) / k_before;
|
||||
let actual_speedup = eff / *eff_at_last_spawn;
|
||||
actual_speedup >= min_speedup
|
||||
};
|
||||
|
||||
if last_spawn_was_beneficial {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "obikmer"
|
||||
version = "1.1.27"
|
||||
version = "1.1.17"
|
||||
edition = "2024"
|
||||
|
||||
[[bin]]
|
||||
@@ -18,7 +18,7 @@ obikrope = { path = "../obikrope" }
|
||||
obikpartitionner = { path = "../obikpartitionner" }
|
||||
obisys = { path = "../obisys" }
|
||||
obiskio = { path = "../obiskio" }
|
||||
obikindex = { path = "../obikindex", default-features = false }
|
||||
obikindex = { path = "../obikindex" }
|
||||
obitaxonomy = { path = "../obitaxonomy" }
|
||||
obilayeredmap = { path = "../obilayeredmap" }
|
||||
clap = { version = "4", features = ["derive"] }
|
||||
@@ -33,6 +33,4 @@ tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] }
|
||||
pprof = { version = "0.13", features = ["prost-codec"], optional = true }
|
||||
|
||||
[features]
|
||||
default = ["numa"]
|
||||
numa = ["obikindex/numa"]
|
||||
profiling = ["dep:pprof"]
|
||||
|
||||
Reference in New Issue
Block a user