From 2cfad5ea64ec453002c8c5d1bc6736ffe727fbd3 Mon Sep 17 00:00:00 2001 From: Ed Hartnett Date: Tue, 16 Jul 2019 06:42:51 -0600 Subject: [PATCH] calling PIO_InitDecomp and PIO_freedecomp --- tests/fncint/ftst_pio.f90 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/fncint/ftst_pio.f90 b/tests/fncint/ftst_pio.f90 index fa43db5053e..31bc59f9d58 100644 --- a/tests/fncint/ftst_pio.f90 +++ b/tests/fncint/ftst_pio.f90 @@ -13,20 +13,31 @@ program ftst_pio integer :: ncid character*(*) FILE_NAME parameter (FILE_NAME='ftst_pio.nc') + integer, dimension(3) :: data_buffer, compdof + integer, dimension(1) :: dims + type(io_desc_t) :: iodesc_nCells integer :: ierr call MPI_Init(ierr) call MPI_Comm_rank(MPI_COMM_WORLD, myRank, ierr) call MPI_Comm_size(MPI_COMM_WORLD, ntasks, ierr) + ierr = pio_set_log_level(2) ierr = nf_set_log_level(2) ierr = nf_init_intracom(myRank, MPI_COMM_WORLD, niotasks, numAggregator, & stride, PIO_rearr_subset, ioSystem, base) + + dims(1) = 3 * ntasks + compdof = 3 * myRank + (/1, 2, 3/) ! Where in the global array each task writes + data_buffer = myRank + call PIO_initdecomp(ioSystem, PIO_int, dims, compdof, iodesc_nCells) + ierr = nf_create(FILE_NAME, 64, ncid) ierr = nf_close(ncid) + call PIO_freedecomp(ioSystem, iodesc_nCells) ierr = nf_free_iosystem() call MPI_Finalize(ierr) if (myRank .eq. 0) then