Compare commits
6 Commits
a4bbf607b7
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 19660f8cd0 | |||
| 7b07540a69 | |||
| 89c43e28f5 | |||
| b9b2e42ad2 | |||
| ca42fdff2f | |||
| 136cd89efb |
@@ -86,21 +86,17 @@ jobs:
|
|||||||
build-macos-arm64:
|
build-macos-arm64:
|
||||||
needs: create-release
|
needs: create-release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: registry.metabarcoding.org/cibuilder/rustcrossosx:latest
|
||||||
|
credentials:
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.REGISTRYTOKEN }}
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: src
|
working-directory: src
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- 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
|
- name: Cache cargo registry
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
@@ -112,9 +108,7 @@ jobs:
|
|||||||
restore-keys: macos-arm64-cargo-
|
restore-keys: macos-arm64-cargo-
|
||||||
|
|
||||||
- name: Build macOS binary
|
- name: Build macOS binary
|
||||||
env:
|
run: cargo build --release --target aarch64-apple-darwin --no-default-features
|
||||||
MACOSX_DEPLOYMENT_TARGET: "11.0"
|
|
||||||
run: cargo zigbuild --release --target aarch64-apple-darwin11.0 --no-default-features
|
|
||||||
|
|
||||||
- name: Prepare and upload artifact
|
- name: Prepare and upload artifact
|
||||||
env:
|
env:
|
||||||
|
|||||||
Generated
+1
-1
@@ -1704,7 +1704,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "obikmer"
|
name = "obikmer"
|
||||||
version = "1.1.24"
|
version = "1.1.27"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
"csv",
|
"csv",
|
||||||
|
|||||||
@@ -287,8 +287,9 @@ impl PartitionRunner {
|
|||||||
drop(event_tx);
|
drop(event_tx);
|
||||||
|
|
||||||
// ── Controller ────────────────────────────────────────────────────
|
// ── Controller ────────────────────────────────────────────────────
|
||||||
activate_tx.send(()).ok();
|
let initial_workers = n_nodes.min(max_workers).min(n_total);
|
||||||
let mut n_active = 1usize;
|
for _ in 0..initial_workers { activate_tx.send(()).ok(); }
|
||||||
|
let mut n_active = initial_workers;
|
||||||
let mut cpu_sample = CpuSample::now();
|
let mut cpu_sample = CpuSample::now();
|
||||||
let mut eff_at_last_spawn = 0.0f64; // 0 = no previous spawn to evaluate
|
let mut eff_at_last_spawn = 0.0f64; // 0 = no previous spawn to evaluate
|
||||||
let mut completed = 0usize;
|
let mut completed = 0usize;
|
||||||
@@ -361,13 +362,13 @@ fn maybe_activate(
|
|||||||
// Going from k-1 → k workers, the minimum acceptable speedup is (k-1+0.2)/(k-1).
|
// 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
|
// For the very first extra worker (n_active == 1, no previous spawn), skip this
|
||||||
// check: eff_at_last_spawn == 0 acts as the sentinel.
|
// check: eff_at_last_spawn == 0 acts as the sentinel.
|
||||||
let last_spawn_was_beneficial = if *eff_at_last_spawn < 1e-9 {
|
let last_spawn_was_beneficial = if *eff_at_last_spawn < 1e-9 || eff < 1e-9 {
|
||||||
true // first additional worker: no prior data to evaluate
|
true // first additional worker, or measurement too short: no prior data to evaluate
|
||||||
} else {
|
} else {
|
||||||
let k_before = (*n_active - 1) as f64;
|
let k_new = *n_active as f64; // worker count after the last spawn
|
||||||
let min_speedup = (k_before + 0.2) / k_before;
|
let min_gain = 0.2 / k_new;
|
||||||
let actual_speedup = eff / *eff_at_last_spawn;
|
let actual_gain = (eff - *eff_at_last_spawn) / eff;
|
||||||
actual_speedup >= min_speedup
|
actual_gain >= min_gain
|
||||||
};
|
};
|
||||||
|
|
||||||
if last_spawn_was_beneficial {
|
if last_spawn_was_beneficial {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "obikmer"
|
name = "obikmer"
|
||||||
version = "1.1.24"
|
version = "1.1.27"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
|
|||||||
Reference in New Issue
Block a user