mpi 0.8.0

Message Passing Interface bindings for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![deny(warnings)]
use mpi::traits::Equivalence;

fn main() {
    // Initialize and then immediately finalize MPI.
    let _ = mpi::initialize().unwrap();

    // Ensures that rsmpi panics if the user attempts to initialize a Datatype after MPI has been
    // finalized.
    assert!(std::panic::catch_unwind(|| {
        #[derive(Equivalence)]
        struct CheckPostFinalizePanic;
        let _ = CheckPostFinalizePanic::equivalent_datatype();
    })
    .is_err());
}