From 85ab319efe86c3105fda6ed1d11f54194aaf34b2 Mon Sep 17 00:00:00 2001 From: Ed Hartnett Date: Fri, 19 Jul 2019 05:40:38 -0600 Subject: [PATCH] moving to use of iosysid --- src/flib/ncint_mod.F90 | 8 +++++--- tests/fncint/ftst_pio.f90 | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/flib/ncint_mod.F90 b/src/flib/ncint_mod.F90 index a374e27b274..8e9ca1ceca3 100644 --- a/src/flib/ncint_mod.F90 +++ b/src/flib/ncint_mod.F90 @@ -170,11 +170,11 @@ 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(:) @@ -182,8 +182,10 @@ function nf_def_decomp(iosystem, basepiotype, dims, compdof, & 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 diff --git a/tests/fncint/ftst_pio.f90 b/tests/fncint/ftst_pio.f90 index 33017692713..b45b421d84f 100644 --- a/tests/fncint/ftst_pio.f90 +++ b/tests/fncint/ftst_pio.f90 @@ -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. @@ -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)