pub fn version() -> (c_int, c_int)
Expand description
Identifies the version of the MPI standard implemented by the library.
Returns a tuple of (version, subversion)
, e.g. (3, 0)
.
Can be called without initializing MPI.
Examples found in repository?
examples/env_inq.rs (line 5)
4fn main() {
5 let (version, subversion) = mpi::environment::version();
6 println!("This is MPI-{}.{}.", version, subversion);
7 println!("{}", mpi::environment::library_version().unwrap());
8 let _universe = mpi::initialize().unwrap();
9 println!("{}", mpi::environment::processor_name().unwrap());
10
11 #[cfg(not(msmpi))]
12 assert!(
13 version >= 3,
14 "Rust MPI bindings require MPI standard 3.0 and up."
15 );
16}