Skip to content

Commit

Permalink
Run clippy and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
skailasa committed Oct 25, 2024
1 parent 814a20c commit b477a3e
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 18 deletions.
17 changes: 10 additions & 7 deletions kifmm/examples/mpi_test_fmm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ fn main() {

use rayon::ThreadPoolBuilder;

use mpi::{datatype::PartitionMut, traits::*};
use mpi::{
datatype::PartitionMut,
traits::{Communicator, Root},
};
use rlst::RawAccess;

let (universe, _threading) = mpi::initialize_with_threading(mpi::Threading::Funneled).unwrap();
Expand Down Expand Up @@ -48,13 +51,13 @@ fn main() {
&comm,
points.data(),
points.data(),
local_depth.clone(),
global_depth.clone(),
local_depth,
global_depth,
prune_empty,
sort_kind.clone(),
)
.unwrap()
.parameters(expansion_order.clone(), kernel.clone(), source_to_target)
.parameters(expansion_order, kernel.clone(), source_to_target)
.unwrap()
.build()
.unwrap();
Expand Down Expand Up @@ -161,13 +164,13 @@ fn main() {
&comm,
points.data(),
points.data(),
local_depth.clone(),
global_depth.clone(),
local_depth,
global_depth,
prune_empty,
sort_kind,
)
.unwrap()
.parameters(expansion_order.clone(), kernel, source_to_target)
.parameters(expansion_order, kernel, source_to_target)
.unwrap()
.build()
.unwrap();
Expand Down
7 changes: 5 additions & 2 deletions kifmm/examples/mpi_test_ghost_exchange.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ fn main() {

use rayon::ThreadPoolBuilder;

use mpi::{datatype::PartitionMut, traits::*};
use mpi::{
datatype::PartitionMut,
traits::{Communicator, Root},
};
use rlst::RawAccess;

let (universe, _threading) = mpi::initialize_with_threading(mpi::Threading::Single).unwrap();
Expand Down Expand Up @@ -282,7 +285,7 @@ fn main() {
assert!(
distributed_interaction_list.contains(s),
"Test failed: element {:?} is missing in distributed_interaction_list. at leaf: {:?} \n: {:?} = {:?} \n is it contained locally? {:?} or in ghost tree? {:?}",
s, leaf.morton, i1, i2, multi_fmm.tree.source_tree.keys_set.contains(s), multi_fmm.ghost_fmm_u.tree.source_tree.keys_set.contains(&s)
s, leaf.morton, i1, i2, multi_fmm.tree.source_tree.keys_set.contains(s), multi_fmm.ghost_fmm_u.tree.source_tree.keys_set.contains(s)
);
}

Expand Down
6 changes: 5 additions & 1 deletion kifmm/examples/mpi_test_layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ fn main() {

use rayon::ThreadPoolBuilder;

use mpi::{collective::SystemOperation, datatype::PartitionMut, traits::*};
use mpi::{
collective::SystemOperation,
datatype::PartitionMut,
traits::{Communicator, CommunicatorCollectives},
};
use rlst::RawAccess;

let (universe, _threading) = mpi::initialize_with_threading(mpi::Threading::Single).unwrap();
Expand Down
5 changes: 4 additions & 1 deletion kifmm/examples/mpi_test_p2m.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ fn main() {

use rayon::ThreadPoolBuilder;

use mpi::{datatype::PartitionMut, traits::*};
use mpi::{
datatype::PartitionMut,
traits::{Communicator, Root},
};
use rlst::RawAccess;

let (universe, _threading) = mpi::initialize_with_threading(mpi::Threading::Single).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion kifmm/examples/mpi_test_sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ mod mpi {
}

fn test_sort<T: Equivalence + Ord + Default + Clone + Copy>(

Check failure on line 18 in kifmm/examples/mpi_test_sort.rs

View workflow job for this annotation

GitHub Actions / Run Rust tests (stable, mpich, --features "strict")

function `test_sort` is never used

Check failure on line 18 in kifmm/examples/mpi_test_sort.rs

View workflow job for this annotation

GitHub Actions / Run Rust tests (stable, openmpi, --features "strict")

function `test_sort` is never used

Check failure on line 18 in kifmm/examples/mpi_test_sort.rs

View workflow job for this annotation

GitHub Actions / Run Rust tests (stable, mpich, --features "strict")

function `test_sort` is never used

Check failure on line 18 in kifmm/examples/mpi_test_sort.rs

View workflow job for this annotation

GitHub Actions / Run Rust tests (stable, openmpi, --features "strict")

function `test_sort` is never used
sorted_arr: &Vec<T>,
sorted_arr: &[T],
comm: &SimpleCommunicator,
label: String,
) {
Expand Down
11 changes: 7 additions & 4 deletions kifmm/examples/mpi_test_trees.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ fn main() {

use rayon::ThreadPoolBuilder;

use mpi::{datatype::PartitionMut, traits::*};
use mpi::{
datatype::PartitionMut,
traits::{Communicator, Root},
};
use rlst::RawAccess;

let (universe, _threading) = mpi::initialize_with_threading(mpi::Threading::Single).unwrap();
Expand Down Expand Up @@ -49,13 +52,13 @@ fn main() {
&comm,
points.data(),
points.data(),
local_depth.clone(),
global_depth.clone(),
local_depth,
global_depth,
prune_empty,
sort_kind,
)
.unwrap()
.parameters(expansion_order.clone(), kernel, source_to_target)
.parameters(expansion_order, kernel, source_to_target)
.unwrap()
.build()
.unwrap();
Expand Down
7 changes: 5 additions & 2 deletions kifmm/examples/mpi_test_upward_pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ fn main() {
// FftFieldTranslation,
};
use kifmm::{BlasFieldTranslationSaRcmp, FmmSvdMode};
use mpi::{datatype::PartitionMut, traits::*};
use mpi::{
datatype::PartitionMut,
traits::{Communicator, Root},
};
use rlst::{RawAccess, RlstScalar};

let (universe, _threading) = mpi::initialize_with_threading(mpi::Threading::Funneled).unwrap();
Expand Down Expand Up @@ -86,7 +89,7 @@ fn main() {

fmm.kernel().evaluate_st(
GreenKernelEvalType::Value,
&coords,
coords,
&distant_point,
&charges,
&mut expected,
Expand Down

0 comments on commit b477a3e

Please sign in to comment.