Skip to content

Commit

Permalink
getting fortran tests working
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed Mar 25, 2019
1 parent 00524dc commit dbaa196
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 19 deletions.
21 changes: 8 additions & 13 deletions tests/general/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,19 @@
# Put together AM_CPPFLAGS and AM_LDFLAGS.
include $(top_srcdir)/set_flags.am

AM_CPPFLAGS += -I${top_builddir}/tests/general/util

SRCDIRS = util

# Build the test for make check.
# check_PROGRAMS = pio_init_finalize
# pio_init_finalize_SOURCES = pio_init_finalize.F90 util/pio_tutil.F90
# pio_init_finalize_LDADD = ${top_builddir}/src/flib/libpiof.la ${top_builddir}/src/clib/libpio.la

# Build these uninstalled convenience libraries.
# noinst_LTLIBRARIES = libglobal_vars.la libncdf_tests.la \
# libbasic_tests.la

# # The convenience libraries depends on their source.
# libglobal_vars_la_SOURCES = global_vars.F90
# libncdf_tests_la_SOURCES = ncdf_tests.F90
# libbasic_tests_la_SOURCES = basic_tests.F90
check_PROGRAMS = pio_init_finalize
pio_init_finalize_SOURCES = pio_init_finalize.F90
pio_init_finalize_LDADD = util/libpio_tutil.la \
${top_builddir}/src/flib/libpiof.la \
${top_builddir}/src/clib/libpio.la

# Tests will run from a bash script.
#TESTS = run_tests.sh
TESTS = run_tests.sh

# Distribute the test script.
EXTRA_DIST = CMakeLists.txt run_tests.sh ncdf_fail.F90.in2 \
Expand Down
20 changes: 14 additions & 6 deletions tests/general/util/pio_tutil.F90
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,12 @@ SUBROUTINE PIO_TF_Get_nc_iotypes(iotypes, iotype_descs, num_iotypes)
#ifdef _NETCDF4
! netcdf, netcdf4p, netcdf4c
num_iotypes = num_iotypes + 3
#elif _NETCDF
#else
#ifdef _NETCDF
! netcdf
num_iotypes = num_iotypes + 1
#endif
#endif
#ifdef _PNETCDF
! pnetcdf
num_iotypes = num_iotypes + 1
Expand Down Expand Up @@ -317,11 +319,13 @@ SUBROUTINE PIO_TF_Get_nc_iotypes(iotypes, iotype_descs, num_iotypes)
iotypes(i) = PIO_iotype_netcdf4p
iotype_descs(i) = "NETCDF4P"
i = i + 1
#elif _NETCDF
#else
#ifdef _NETCDF
! netcdf
iotypes(i) = PIO_iotype_netcdf
iotype_descs(i) = "NETCDF"
i = i + 1
#endif
#endif
END SUBROUTINE

Expand Down Expand Up @@ -402,10 +406,12 @@ SUBROUTINE PIO_TF_Get_iotypes(iotypes, iotype_descs, num_iotypes)
num_iotypes = 0
#ifdef _NETCDF4
! netcdf, netcdf4p, netcdf4c
num_iotypes = num_iotypes + 3
#elif _NETCDF
num_iotypes = num_iotypes + 3
#else
#ifdef _NETCDF
! netcdf
num_iotypes = num_iotypes + 1
num_iotypes = num_iotypes + 1
#endif
#endif
#ifdef _PNETCDF
! pnetcdf
Expand Down Expand Up @@ -434,11 +440,13 @@ SUBROUTINE PIO_TF_Get_iotypes(iotypes, iotype_descs, num_iotypes)
iotypes(i) = PIO_iotype_netcdf4p
iotype_descs(i) = "NETCDF4P"
i = i + 1
#elif _NETCDF
#else
#ifdef _NETCDF
! netcdf
iotypes(i) = PIO_iotype_netcdf
iotype_descs(i) = "NETCDF"
i = i + 1
#endif
#endif
END SUBROUTINE

Expand Down

0 comments on commit dbaa196

Please sign in to comment.