From 116f7de06aa4ce200dee4e7dbe16b8812b07efe0 Mon Sep 17 00:00:00 2001 From: Ed Hartnett Date: Mon, 8 Jul 2019 05:49:39 -0600 Subject: [PATCH] starting to test ncint in fortran --- src/flib/piolib_mod.F90 | 18 ++++++++++++++++++ tests/fncint/Makefile.am | 5 +++-- tests/fncint/ftst_pio.f90 | 9 +++++++++ tests/ncint/tst_pio_udf.c | 2 +- 4 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 tests/fncint/ftst_pio.f90 diff --git a/src/flib/piolib_mod.F90 b/src/flib/piolib_mod.F90 index 11319bb603c..8fa5e0123b9 100644 --- a/src/flib/piolib_mod.F90 +++ b/src/flib/piolib_mod.F90 @@ -190,6 +190,24 @@ module piolib_mod module procedure PIO_initdecomp_bc end interface PIO_initdecomp + !> + !! PIO_initdecomp is an overload interface the models decomposition to pio. + !! initdecomp_1dof_bin_i8, initdecomp_1dof_nf_i4, initdecomp_2dof_bin_i4, + !! and initdecomp_2dof_nf_i4 are all depreciated, but supported for backwards + !! compatibility. + !< + ! interface nf_init_decomp + ! module procedure PIO_initdecomp_dof_i4 ! previous name: initdecomop_1dof_nf_box + ! module procedure PIO_initdecomp_dof_i8 ! previous name: initdecomop_1dof_nf_box + ! module procedure initdecomp_1dof_nf_i4 + ! module procedure initdecomp_1dof_nf_i8 + ! module procedure initdecomp_1dof_bin_i4 + ! module procedure initdecomp_1dof_bin_i8 + ! module procedure initdecomp_2dof_nf_i4 + ! module procedure initdecomp_2dof_nf_i8 + ! module procedure PIO_initdecomp_bc + ! end interface nf_init_decomp + !> !! Return the actual number of IO-tasks used. PIO will reset the !! total number of IO-tasks if certain conditions are meet. diff --git a/tests/fncint/Makefile.am b/tests/fncint/Makefile.am index e04bf067cbc..6e73a038531 100644 --- a/tests/fncint/Makefile.am +++ b/tests/fncint/Makefile.am @@ -4,11 +4,12 @@ # Ed Hartnett 7/3/19 # Put together AM_CPPFLAGS and AM_LDFLAGS. -AM_CPPFLAGS = -I$(top_srcdir)/src/clib +AM_FCFLAGS = -I$(top_srcdir)/src/flib LDADD = ${top_builddir}/src/clib/libpioc.la # Build the test for make check. -#check_PROGRAMS = tst_pio_udf +check_PROGRAMS = ftst_pio +ftst_pio_SOURCES = ftst_pio.f90 #if RUN_TESTS # Tests will run from a bash script. diff --git a/tests/fncint/ftst_pio.f90 b/tests/fncint/ftst_pio.f90 new file mode 100644 index 00000000000..f523370bd19 --- /dev/null +++ b/tests/fncint/ftst_pio.f90 @@ -0,0 +1,9 @@ + !> This is a test program for the Fortran API use of the netCDF + !! integration layer. + +program ftst_pio + use pio + implicit none + + print *, '*** SUCCESS running ftst_pio!' +end program ftst_pio diff --git a/tests/ncint/tst_pio_udf.c b/tests/ncint/tst_pio_udf.c index 4a6c7fb1be6..dda4cdf55af 100644 --- a/tests/ncint/tst_pio_udf.c +++ b/tests/ncint/tst_pio_udf.c @@ -51,7 +51,7 @@ main(int argc, char **argv) int i; /* Turn on logging for PIO library. */ - PIOc_set_log_level(3); + /* PIOc_set_log_level(3); */ /* Initialize the intracomm. */ if (nc_init_intracomm(MPI_COMM_WORLD, 1, 1, 0, 0, &iosysid)) ERR;