Skip to content

Commit

Permalink
developing fortran test of ncint
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed Jul 8, 2019
1 parent e03d43f commit 2596223
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/fncint/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions tests/fncint/ftst_pio.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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!'
Expand Down

0 comments on commit 2596223

Please sign in to comment.