Skip to content

Commit

Permalink
starting to test ncint in fortran
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed Jul 8, 2019
1 parent ed9f6c5 commit 116f7de
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
18 changes: 18 additions & 0 deletions src/flib/piolib_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 3 additions & 2 deletions tests/fncint/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 9 additions & 0 deletions tests/fncint/ftst_pio.f90
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion tests/ncint/tst_pio_udf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 116f7de

Please sign in to comment.