Skip to content

Commit

Permalink
moving to use of iosysid
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed Jul 19, 2019
1 parent c0dd8f4 commit 85ab319
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions src/flib/ncint_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -170,20 +170,22 @@ end function nf_free_decomp
!! @param compcount The count for the block-cyclic computational
!! decomposition
!! @param iodesc @copydoc iodesc_generate
!! @author Jim Edwards
!! @author Ed Hartnett
!<
function nf_def_decomp(iosystem, basepiotype, dims, compdof, &
function nf_def_decomp(iosysid, basepiotype, dims, compdof, &
decompid, rearr, iostart, iocount) result(status)
type (iosystem_desc_t), intent(in) :: iosystem
integer(i4), intent(in) :: iosysid
integer(i4), intent(in) :: basepiotype
integer(i4), intent(in) :: dims(:)
integer (PIO_OFFSET_KIND), intent(in) :: compdof(:)
integer, optional, target :: rearr
integer (PIO_OFFSET_KIND), optional :: iostart(:), iocount(:)
integer(i4), intent(inout) :: decompid
type (io_desc_t) :: iodesc
type (iosystem_desc_t) :: iosystem
integer :: status

iosystem%iosysid = iosysid
call PIO_initdecomp(iosystem, basepiotype, dims, compdof, &
iodesc, rearr, iostart, iocount)
decompid = iodesc%ioid
Expand Down
4 changes: 2 additions & 2 deletions tests/fncint/ftst_pio.f90
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ program ftst_pio
parameter (FILE_NAME='ftst_pio.nc')
integer(kind=PIO_OFFSET_KIND), dimension(3) :: data_buffer, compdof
integer, dimension(1) :: dims
integer :: decompid
integer :: decompid, iosysid
integer :: ierr

! Set up MPI.
Expand All @@ -34,7 +34,7 @@ program ftst_pio
! Define a decomposition.
dims(1) = 3 * ntasks
compdof = 3 * myRank + (/1, 2, 3/) ! Where in the global array each task writes
ierr = nf_def_decomp(ioSystem, PIO_int, dims, compdof, decompid)
ierr = nf_def_decomp(ioSystem%iosysid, PIO_int, dims, compdof, decompid)

! Create a file.
ierr = nf_create(FILE_NAME, 64, ncid)
Expand Down

0 comments on commit 85ab319

Please sign in to comment.