diff --git a/tests/fncint/Makefile.am b/tests/fncint/Makefile.am index 2493c4b7007..3cc3d3df955 100644 --- a/tests/fncint/Makefile.am +++ b/tests/fncint/Makefile.am @@ -6,8 +6,11 @@ # Link to the PIO Fortran and C libraries. LDADD = ${top_builddir}/src/flib/libpiof.la ${top_builddir}/src/clib/libpioc.la +# Link to the netCDF fortran library. +LDADD += -lnetcdff + # Find the pio.mod file. -AM_FCFLAGS = -I${top_builddir}/src/flib +AM_FCFLAGS = -I${top_builddir}/src/flib ${CPPFLAGS} # 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 fce640a994a..0283ed1673b 100644 --- a/tests/fncint/ftst_pio.f90 +++ b/tests/fncint/ftst_pio.f90 @@ -5,10 +5,12 @@ program ftst_pio use pio implicit none include 'mpif.h' + include 'netcdf.inc' integer :: myRank, ntasks type(iosystem_desc_t) :: ioSystem integer :: niotasks = 1, numAggregator = 0, stride = 1, base = 0 + integer :: ncid integer :: ierr call MPI_Init(ierr) @@ -19,6 +21,9 @@ program ftst_pio call PIO_init(myRank, MPI_COMM_WORLD, niotasks, numAggregator, & stride, PIO_rearr_subset, ioSystem, base) + ierr = nf_create('ftst_pio.nc', nf_clobber, ncid) + ierr = nf_close(ncid) + call PIO_finalize(ioSystem, ierr) call MPI_Finalize(ierr) if (myRank .eq. 0) then diff --git a/tests/ncint/Makefile.am b/tests/ncint/Makefile.am index e5d41d2f2b1..03ebdc02ef6 100644 --- a/tests/ncint/Makefile.am +++ b/tests/ncint/Makefile.am @@ -24,4 +24,4 @@ endif # RUN_TESTS EXTRA_DIST = run_tests.sh # Clean up files produced during testing. -#CLEANFILES = *.nc *.log +CLEANFILES = *.nc *.log