Skip to content

Commit

Permalink
Fix weak scaling experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
skailasa committed Sep 13, 2023
1 parent 5a2aefd commit 5bb7076
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
19 changes: 8 additions & 11 deletions tree/examples/uniform_scaling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,28 +56,25 @@ fn main() {
// Setup tree parameters
let adaptive = false;

let depth: u64 = std::env::var("DEPTH").unwrap().parse().unwrap_or(5);
let depth: u64 = 5;
let n_crit: Option<_> = None;
let k = 4;
let n_max = 32;
let n = n_max/(size as u64);
let k = 2;

let depth = Some(depth);


let n_points = n*1000000;
let n_points = 1000000;

// Generate some random test data local to each process
let points = points_fixture(n_points, None, None);
let global_idxs: Vec<_> = (0..n_points).collect();
let global_idxs: Vec<usize> = (0..n_points).collect();

// Calculate the global domain
let domain = Domain::from_global_points(points.data(), &comm);
let domain = Domain::from_global_points(&points[..], &comm);

// Create a uniform tree
let s = Instant::now();
let tree = MultiNodeTree::new(&comm, &points[..], adaptive, n_crit, depth, k, &global_idxs);
let time = Instant::now().elapsed();
let tree = MultiNodeTree::new(&comm, &points[..], adaptive, n_crit, depth, k, &global_idxs[..]);
let time = s.elapsed();
let nleaves = tree.leaves.len();
let mut sum = 0;

Expand All @@ -90,7 +87,7 @@ fn main() {

} else {
world
.process_at_rank(root_rank)
.process_at_rank(0)
.reduce_into(&nleaves, SystemOperation::sum())
}

Expand Down
2 changes: 1 addition & 1 deletion tree/scaling/bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
#$ -wd /home/ucapska/Scratch

# Run the job
gerun $HOME/bempp-rs/target/release/exaples/uniform_scaling
gerun $HOME/bempp-rs/target/release/examples/uniform_scaling

0 comments on commit 5bb7076

Please sign in to comment.