Skip to content

Commit

Permalink
made nf_feee_iosystem into function
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed Jul 14, 2019
1 parent c8e5381 commit 91754ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
18 changes: 4 additions & 14 deletions src/flib/ncint_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,9 @@ module ncint_mod
#ifdef NO_MPIMOD
include 'mpif.h' ! _EXTERNAL
#endif
! !public member functions:

public :: nf_init_intracom, nf_free_iosystem

interface nf_init_intracom
module procedure nf_init_intracom
end interface nf_init_intracom

!>
!! Shuts down an IOSystem and associated resources.
!<
interface nf_free_iosystem
module procedure nf_free_iosystem
end interface nf_free_iosystem

contains

!>
Expand Down Expand Up @@ -113,9 +101,10 @@ end subroutine nf_init_intracom
!! @retval ierr @copydoc error_return
!! @author Ed Hartnett
!<
subroutine nf_free_iosystem()
function nf_free_iosystem() result(status)
integer(i4) :: ierr
integer(i4) :: iosysid;
integer :: status

interface
integer(C_INT) function nc_get_iosystem(iosysid) &
Expand All @@ -135,6 +124,7 @@ end function PIOc_finalize

ierr = nc_get_iosystem(iosysid)
ierr = PIOc_finalize(iosysid)
end subroutine nf_free_iosystem
status = ierr
end function nf_free_iosystem

end module ncint_mod
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 nf_free_iosystem()
ierr = nf_free_iosystem()
call MPI_Finalize(ierr)
if (myRank .eq. 0) then
print *, '*** SUCCESS running ftst_pio!'
Expand Down

0 comments on commit 91754ab

Please sign in to comment.