Skip to content

Commit

Permalink
allow static mut ref
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiyong1997 committed Sep 24, 2024
1 parent 49e838d commit 4425800
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/config/mpi_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ impl MPIConfig {
const ROOT_RANK: i32 = 0;

// OK if already initialized, mpi::initialize() will return None
#[allow(static_mut_refs)]
pub fn init() {
unsafe {
let universe = mpi::initialize();
Expand All @@ -90,6 +91,7 @@ impl MPIConfig {
unsafe { ffi::MPI_Finalize() };
}

#[allow(static_mut_refs)]
pub fn new() -> Self {
Self::init();
let universe = unsafe { UNIVERSE.as_ref() };
Expand Down

0 comments on commit 4425800

Please sign in to comment.