diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab3a7a4..f71ab77 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -174,7 +174,7 @@ jobs: run: cargo test --verbose --workspace --exclude netcdf-src --features netcdf/mpi,derive - name: Run example - run: cargo run --verbose --package netcdf-examples --features mpi,derive + run: cargo run --verbose --package netcdf-examples --features mpi - name: Run example in parallel run: mpirun -np 10 --oversubscribe -- target/debug/netcdf-examples diff --git a/netcdf/src/file.rs b/netcdf/src/file.rs index dff215b..ef0e287 100644 --- a/netcdf/src/file.rs +++ b/netcdf/src/file.rs @@ -97,7 +97,7 @@ impl RawFile { let f = get_ffi_from_path(path); let mut ncid: nc_type = 0; unsafe { - error::checked(super::with_lock(|| { + error::checked(with_lock(|| { netcdf_sys::par::nc_open_par( f.as_ptr().cast(), options.bits(), @@ -140,7 +140,7 @@ impl RawFile { let f = get_ffi_from_path(path); let mut ncid: nc_type = -1; unsafe { - error::checked(super::with_lock(|| { + error::checked(with_lock(|| { netcdf_sys::par::nc_create_par( f.as_ptr().cast(), options.bits(), @@ -500,16 +500,12 @@ impl FileMut { /// Open the file for new definitions pub fn redef(&mut self) -> error::Result<()> { - error::checked(super::with_lock(|| unsafe { - netcdf_sys::nc_redef(self.ncid()) - })) + error::checked(with_lock(|| unsafe { netcdf_sys::nc_redef(self.ncid()) })) } /// Close the file for new definitions pub fn enddef(&mut self) -> error::Result<()> { - error::checked(super::with_lock(|| unsafe { - netcdf_sys::nc_enddef(self.ncid()) - })) + error::checked(with_lock(|| unsafe { netcdf_sys::nc_enddef(self.ncid()) })) } } diff --git a/netcdf/src/par.rs b/netcdf/src/par.rs index 51855ba..d99586d 100644 --- a/netcdf/src/par.rs +++ b/netcdf/src/par.rs @@ -1,6 +1,6 @@ use crate::{ error::{checked, Result}, - with_lock, + utils::with_lock, }; use netcdf_sys::nc_type; diff --git a/netcdf/src/variable.rs b/netcdf/src/variable.rs index 13a8a8f..1386f68 100644 --- a/netcdf/src/variable.rs +++ b/netcdf/src/variable.rs @@ -194,7 +194,7 @@ impl<'g> Variable<'g> { #[cfg(feature = "mpi")] fn access_mode(&self, mode: crate::par::AccessMode) -> error::Result<()> { - error::checked(super::with_lock(|| unsafe { + error::checked(utils::with_lock(|| unsafe { netcdf_sys::par::nc_var_par_access( self.ncid, self.varid,