Skip to content

Commit

Permalink
fix: put checkout_cores test behind a single-threaded feature (#1383)
Browse files Browse the repository at this point in the history
* fix: put checkout_cores test behind a single-threaded feature
* feat: add checkout_cores test to CI, run single threaded
* fix: correct arg ordering typo
  • Loading branch information
cryptonemo committed Dec 4, 2020
1 parent 56c18bd commit b1a8d84
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ jobs:
ulimit -u 20000
ulimit -n 20000
cargo +<< pipeline.parameters.nightly-toolchain >> -Zpackage-features test --all --verbose --release lifecycle -- --ignored --nocapture
cargo +<< pipeline.parameters.nightly-toolchain >> -Zpackage-features test -p storage-proofs-porep --features single-threaded --release checkout_cores -- --test-threads=1
no_output_timeout: 30m
environment:
RUST_TEST_THREADS: 1
Expand Down
1 change: 1 addition & 0 deletions storage-proofs/porep/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ default = ["pairing", "gpu"]
gpu = ["storage-proofs-core/gpu", "filecoin-hashers/gpu"]
pairing = ["storage-proofs-core/pairing", "bellperson/pairing", "neptune/pairing", "filecoin-hashers/pairing"]
blst = ["storage-proofs-core/blst", "bellperson/blst", "neptune/blst", "filecoin-hashers/blst"]
single-threaded = []

[[bench]]
name = "encode"
Expand Down
1 change: 1 addition & 0 deletions storage-proofs/porep/src/stacked/vanilla/cores.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ mod tests {
}

#[test]
#[cfg(feature = "single-threaded")]
fn test_checkout_cores() {
let checkout1 = checkout_core_group();
dbg!(&checkout1);
Expand Down
2 changes: 1 addition & 1 deletion storage-proofs/porep/src/stacked/vanilla/proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub const TOTAL_PARENTS: usize = 37;
lazy_static! {
/// Ensure that only one `TreeBuilder` or `ColumnTreeBuilder` uses the GPU at a time.
/// Curently, this is accomplished by only instantiating at most one at a time.
/// It might be possible relax this constraint, but in that case, only one builder
/// It might be possible to relax this constraint, but in that case, only one builder
/// should actually be active at any given time, so the mutex should still be used.
static ref GPU_LOCK: Mutex<()> = Mutex::new(());
}
Expand Down

0 comments on commit b1a8d84

Please sign in to comment.