Skip to content

Commit

Permalink
Add missing file
Browse files Browse the repository at this point in the history
  • Loading branch information
mulimoen committed Jun 19, 2024
1 parent 2eb8b9a commit 5bd10c6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion netcdf-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ mod filter;
#[cfg(feature = "4.8.0")]
pub use filter::*;

#[cfg(feature = "has-par")]
#[cfg(feature = "mpi")]
pub mod par;

use std::sync::Mutex;
Expand Down
25 changes: 25 additions & 0 deletions netcdf-sys/src/par.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#![cfg(feature = "mpi")]
use std::ffi::{c_char, c_int};

use mpi_sys::{MPI_Comm, MPI_Info};

pub const NC_INDEPENDENT: c_int = 0;
pub const NC_COLLECTIVE: c_int = 1;

extern "C" {
pub fn nc_create_par(
path: *const c_char,
cmode: c_int,
comm: MPI_Comm,
info: MPI_Info,
ncidp: *mut c_int,
) -> c_int;
pub fn nc_open_par(
path: *const c_char,
mode: c_int,
comm: MPI_Comm,
info: MPI_Info,
ncidp: *mut c_int,
) -> c_int;
pub fn nc_var_par_access(ncid: c_int, varid: c_int, par_access: c_int) -> c_int;
}

0 comments on commit 5bd10c6

Please sign in to comment.