diff --git a/src/flib/ncint_mod.F90 b/src/flib/ncint_mod.F90 index 0426325c12f..9dead7c2142 100644 --- a/src/flib/ncint_mod.F90 +++ b/src/flib/ncint_mod.F90 @@ -91,14 +91,14 @@ subroutine nf_init_intracom(comp_rank, comp_comm, num_iotasks, & interface integer(C_INT) function nc_set_iosystem(iosystemid) & - bind(C,name="nc_set_iosystem") + bind(C, name="nc_set_iosystem") use iso_c_binding integer(C_INT), intent(in), value :: iosystemid end function nc_set_iosystem end interface call PIO_init(comp_rank, comp_comm, num_iotasks, num_aggregator, & - stride, rearr, iosystem, base, rearr_opts) + stride, rearr, iosystem, base, rearr_opts) ierr = nc_set_iosystem(iosystem%iosysid) @@ -115,13 +115,13 @@ end subroutine nf_init_intracom !< subroutine nf_free_iosystem() integer(i4) :: ierr - integer(i4) :: iosysid = 0; + integer(i4) :: iosysid; interface integer(C_INT) function nc_get_iosystem(iosysid) & bind(C, name="nc_get_iosystem") use iso_c_binding - integer(C_INT), intent(in), value :: iosysid + integer(C_INT), intent(out) :: iosysid end function nc_get_iosystem end interface diff --git a/src/flib/pio.F90 b/src/flib/pio.F90 index 283c2aad63d..652d2e9c78d 100644 --- a/src/flib/pio.F90 +++ b/src/flib/pio.F90 @@ -25,7 +25,7 @@ module pio pio_set_rearr_opts #ifdef NETCDF_INTEGRATION - use ncint_mod, only: nf_init_intracom + use ncint_mod, only: nf_init_intracom, nf_free_iosystem #endif use pio_types, only : io_desc_t, file_desc_t, var_desc_t, iosystem_desc_t, & diff --git a/tests/fncint/ftst_pio.f90 b/tests/fncint/ftst_pio.f90 index 1172cd65534..13c904d5790 100644 --- a/tests/fncint/ftst_pio.f90 +++ b/tests/fncint/ftst_pio.f90 @@ -27,7 +27,7 @@ program ftst_pio ierr = nf_create(FILE_NAME, 64, ncid) ierr = nf_close(ncid) - call PIO_finalize(ioSystem, ierr) + call nf_free_iosystem() call MPI_Finalize(ierr) if (myRank .eq. 0) then print *, '*** SUCCESS running ftst_pio!'