From 259622303d463acc9ed8bd3aa1a0bc453e832f04 Mon Sep 17 00:00:00 2001 From: Ed Hartnett Date: Mon, 8 Jul 2019 06:29:36 -0600 Subject: [PATCH] developing fortran test of ncint --- tests/fncint/Makefile.am | 8 +++++--- tests/fncint/ftst_pio.f90 | 6 ++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/fncint/Makefile.am b/tests/fncint/Makefile.am index 6b6d7568547..2493c4b7007 100644 --- a/tests/fncint/Makefile.am +++ b/tests/fncint/Makefile.am @@ -3,9 +3,11 @@ # Ed Hartnett 7/3/19 -# Put together AM_CPPFLAGS and AM_LDFLAGS. -AM_FCFLAGS = -I$(top_srcdir)/src/flib -AM_LDADD = ${top_builddir}/src/clib/libpioc.la +# Link to the PIO Fortran and C libraries. +LDADD = ${top_builddir}/src/flib/libpiof.la ${top_builddir}/src/clib/libpioc.la + +# Find the pio.mod file. +AM_FCFLAGS = -I${top_builddir}/src/flib # Build the test for make check. check_PROGRAMS = ftst_pio diff --git a/tests/fncint/ftst_pio.f90 b/tests/fncint/ftst_pio.f90 index 04c589bc219..efdb30b9405 100644 --- a/tests/fncint/ftst_pio.f90 +++ b/tests/fncint/ftst_pio.f90 @@ -7,12 +7,18 @@ program ftst_pio include 'mpif.h' integer :: myRank, ntasks + type(iosystem_desc_t) :: ioSystem + integer :: niotasks = 1, numAggregator = 0, stride = 1, base = 0 integer :: ierr call MPI_Init(ierr) call MPI_Comm_rank(MPI_COMM_WORLD, myRank, ierr) call MPI_Comm_size(MPI_COMM_WORLD, ntasks, ierr) + call PIO_init(myRank, MPI_COMM_WORLD, niotasks, numAggregator, & + stride, PIO_rearr_subset, ioSystem, base) + + call PIO_finalize(ioSystem, ierr) call MPI_Finalize(ierr) if (myRank .eq. 0) then print *, '*** SUCCESS running ftst_pio!'