Skip to content

Commit

Permalink
now linking fncint test to netcdf fortran library
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed Jul 8, 2019
1 parent b0649ba commit c08f691
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 4 additions & 1 deletion tests/fncint/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions tests/fncint/ftst_pio.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/ncint/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ endif # RUN_TESTS
EXTRA_DIST = run_tests.sh

# Clean up files produced during testing.
#CLEANFILES = *.nc *.log
CLEANFILES = *.nc *.log

0 comments on commit c08f691

Please sign in to comment.