Skip to content

Commit

Permalink
getting nf_free_iosystem working better
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed Jul 14, 2019
1 parent ec594c3 commit c14f8b7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/flib/ncint_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/flib/pio.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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, &
Expand Down
2 changes: 1 addition & 1 deletion tests/fncint/ftst_pio.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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!'
Expand Down

0 comments on commit c14f8b7

Please sign in to comment.