From 6213867abc475bbc20d61d772d15c1a817edbc82 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Tue, 18 Aug 2020 06:33:08 -0600 Subject: [PATCH 01/10] cleanup of flag use in src/flib --- src/flib/Makefile.am | 2 -- src/flib/pio_kinds.F90 | 1 + src/flib/pio_nf.F90 | 1 + src/flib/pio_support.F90 | 1 + src/flib/pio_types.F90 | 1 + src/flib/piodarray.F90.in | 1 + src/flib/pionfatt_mod.F90.in | 1 + src/flib/pionfget_mod.F90.in | 1 + src/flib/pionfput_mod.F90.in | 1 + 9 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/flib/Makefile.am b/src/flib/Makefile.am index abb541fdde7..da5bb7331d0 100644 --- a/src/flib/Makefile.am +++ b/src/flib/Makefile.am @@ -7,8 +7,6 @@ # The library we are building. lib_LTLIBRARIES = libpiof.la -AM_CPPFLAGS = -D_NETCDF4 -D_PNETCDF - # These linker flags specify libtool version info. # See http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning # for information regarding incrementing `-version-info`. diff --git a/src/flib/pio_kinds.F90 b/src/flib/pio_kinds.F90 index c5074c1f850..f9de9a185aa 100644 --- a/src/flib/pio_kinds.F90 +++ b/src/flib/pio_kinds.F90 @@ -4,6 +4,7 @@ !! types like integer, character, logical, real4 and real8. !! !< +#include "config.h" module pio_kinds ! uses mpi if available diff --git a/src/flib/pio_nf.F90 b/src/flib/pio_nf.F90 index b40b7b71356..a8352b294b2 100644 --- a/src/flib/pio_nf.F90 +++ b/src/flib/pio_nf.F90 @@ -1,3 +1,4 @@ +#include "config.h" !> !! @file !! Code to implement the classic netCDF Fortran API in PIO. diff --git a/src/flib/pio_support.F90 b/src/flib/pio_support.F90 index ae212d1bbdc..686da26fed2 100644 --- a/src/flib/pio_support.F90 +++ b/src/flib/pio_support.F90 @@ -1,3 +1,4 @@ +#include "config.h" !> !! @file !! Internal code for compiler workarounds, aborts and debug functions. diff --git a/src/flib/pio_types.F90 b/src/flib/pio_types.F90 index 970c2c83402..844514f6171 100644 --- a/src/flib/pio_types.F90 +++ b/src/flib/pio_types.F90 @@ -1,3 +1,4 @@ +#include "config.h" !> !! @file !! Derived datatypes and constants for PIO Fortran API. diff --git a/src/flib/piodarray.F90.in b/src/flib/piodarray.F90.in index dfd2b5339a2..e9b5252a5ed 100644 --- a/src/flib/piodarray.F90.in +++ b/src/flib/piodarray.F90.in @@ -1,4 +1,5 @@ #define __PIO_FILE__ 'piodarray' +#include "config.h" !> !! @file !! Read and write routines for decomposed data. diff --git a/src/flib/pionfatt_mod.F90.in b/src/flib/pionfatt_mod.F90.in index cc4a3cd409d..da4e91d7c59 100644 --- a/src/flib/pionfatt_mod.F90.in +++ b/src/flib/pionfatt_mod.F90.in @@ -1,4 +1,5 @@ #define __PIO_FILE__ "pionfatt_mod.F90" +#include "config.h" !> !! @file !! @brief NetCDF attribute interface to PIO diff --git a/src/flib/pionfget_mod.F90.in b/src/flib/pionfget_mod.F90.in index 3fe5462d95a..fd98155e9b5 100644 --- a/src/flib/pionfget_mod.F90.in +++ b/src/flib/pionfget_mod.F90.in @@ -1,4 +1,5 @@ #define __PIO_FILE__ "pionfget_mod.F90" +#include "config.h" !> !! @file !! @brief Read Routines for non-decomposed NetCDF data. diff --git a/src/flib/pionfput_mod.F90.in b/src/flib/pionfput_mod.F90.in index 727c7d0dbcd..33024fd963e 100644 --- a/src/flib/pionfput_mod.F90.in +++ b/src/flib/pionfput_mod.F90.in @@ -1,4 +1,5 @@ #define __PIO_FILE__ "pionfput_mod.F90" +#include "config.h" !> !! @file !! @brief Write routines for non-decomposed NetCDF data. From 0a10f86bc1a748ccaa3b28c2faf2162b901ca44e Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Tue, 18 Aug 2020 06:37:10 -0600 Subject: [PATCH 02/10] adding some cmakedefines --- cmake_config.h.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake_config.h.in b/cmake_config.h.in index f8917ba563f..65ccd1d4587 100644 --- a/cmake_config.h.in +++ b/cmake_config.h.in @@ -32,4 +32,9 @@ #define HAVE_PAR_FILTERS @HAVE_PAR_FILTERS@ +#cmakedefine HAVE_PAR_FILTERS +#cmakedefine NETCDF_INTEGRATION +#cmakedefine _NETCDF4 +#cmakedefine _PNETCDF + #endif /* _PIO_CONFIG_ */ From db93ea51b2797f2d1b5576947235bf42e4d37122 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Tue, 18 Aug 2020 06:45:31 -0600 Subject: [PATCH 03/10] more changes so that all fortran files use config.h --- src/flib/Makefile.am | 8 ++++---- tests/general/ncdf_fail.F90.in | 1 + tests/general/ncdf_get_put.F90.in | 1 + tests/general/ncdf_inq.F90.in | 1 + tests/general/ncdf_simple_tests.F90.in | 1 + tests/general/pio_decomp_fillval.F90.in | 1 + tests/general/pio_decomp_frame_tests.F90.in | 1 + tests/general/pio_decomp_tests.F90.in | 1 + tests/general/pio_decomp_tests_1d.F90.in | 1 + tests/general/pio_decomp_tests_2d.F90.in | 1 + tests/general/pio_decomp_tests_3d.F90.in | 1 + tests/general/pio_fail.F90.in | 1 + tests/general/pio_file_fail.F90.in | 1 + tests/general/pio_file_simple_tests.F90.in | 1 + tests/general/pio_init_finalize.F90.in | 1 + tests/general/pio_iosystem_tests.F90.in | 1 + tests/general/pio_iosystem_tests2.F90.in | 1 + tests/general/pio_iosystem_tests3.F90.in | 1 + tests/general/pio_rearr.F90.in | 1 + tests/general/pio_rearr_opts.F90.in | 1 + tests/general/pio_rearr_opts2.F90.in | 1 + 21 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/flib/Makefile.am b/src/flib/Makefile.am index da5bb7331d0..758b1aba8cc 100644 --- a/src/flib/Makefile.am +++ b/src/flib/Makefile.am @@ -95,15 +95,15 @@ if BUILD_DOCS BUILT_SOURCES += piodarray.f90 piolib_mod.f90 pionfatt_mod.f90 pionfget_mod.f90 \ pionfput_mod.f90 pionfatt_mod_2.f90 pionfget_mod_2.f90 piodarray.f90: piodarray.F90 - $(CC) -E $< > $@ + $(CC) -I../.. $(AM_CPPFLAGS) -E $< > $@ piolib_mod.f90: piolib_mod.F90 $(CC) -I../.. $(AM_CPPFLAGS) -E $< > $@ pionfatt_mod.f90: pionfatt_mod.F90 - $(CC) -E $< > $@ + $(CC) -I../.. $(AM_CPPFLAGS) -E $< > $@ pionfget_mod.f90: pionfget_mod.F90 - $(CC) -E $< > $@ + $(CC) -I../.. $(AM_CPPFLAGS) -E $< > $@ pionfput_mod.f90: pionfput_mod.F90 - $(CC) -E $< > $@ + $(CC) -I../.. $(AM_CPPFLAGS) -E $< > $@ # Unfortunately the genf90.pl script which generates these fortran # files has no way of handling doxygen documentation. So use sed to diff --git a/tests/general/ncdf_fail.F90.in b/tests/general/ncdf_fail.F90.in index dfc09148a49..eed98aad6fa 100644 --- a/tests/general/ncdf_fail.F90.in +++ b/tests/general/ncdf_fail.F90.in @@ -1,3 +1,4 @@ +#include "config.h" MODULE ncdf_fail_tgv use pio_tutil implicit none diff --git a/tests/general/ncdf_get_put.F90.in b/tests/general/ncdf_get_put.F90.in index 7453fe32ede..2d00474cd00 100644 --- a/tests/general/ncdf_get_put.F90.in +++ b/tests/general/ncdf_get_put.F90.in @@ -1,3 +1,4 @@ +#include "config.h" PIO_TF_TEMPLATE PIO_TF_AUTO_TEST_SUB_BEGIN test_put_1datt Implicit none diff --git a/tests/general/ncdf_inq.F90.in b/tests/general/ncdf_inq.F90.in index 51586d7df27..9745bd1b8e2 100644 --- a/tests/general/ncdf_inq.F90.in +++ b/tests/general/ncdf_inq.F90.in @@ -1,3 +1,4 @@ +#include "config.h" MODULE ncdf_inq_tests_tgv use pio_tutil character(len=PIO_TF_MAX_STR_LEN), parameter :: tgv_fname = "pio_ncdf_inq_test_file.nc" diff --git a/tests/general/ncdf_simple_tests.F90.in b/tests/general/ncdf_simple_tests.F90.in index 272997d0a1c..12368f13000 100644 --- a/tests/general/ncdf_simple_tests.F90.in +++ b/tests/general/ncdf_simple_tests.F90.in @@ -1,3 +1,4 @@ +#include "config.h" MODULE ncdf_simple_tests_tgv use pio_tutil ! tgv in prefix corresponds to module name (ncdf_simple_tests_tgv) diff --git a/tests/general/pio_decomp_fillval.F90.in b/tests/general/pio_decomp_fillval.F90.in index 432adbfbfe3..1b67382e669 100644 --- a/tests/general/pio_decomp_fillval.F90.in +++ b/tests/general/pio_decomp_fillval.F90.in @@ -1,3 +1,4 @@ +#include "config.h" ! nc write 1d array with fillvalues (the holes are explicitly specified) PIO_TF_TEMPLATE PIO_TF_AUTO_TEST_SUB_BEGIN nc_write_1d_explicit_fval diff --git a/tests/general/pio_decomp_frame_tests.F90.in b/tests/general/pio_decomp_frame_tests.F90.in index 791d748052b..70edaf6fbbd 100644 --- a/tests/general/pio_decomp_frame_tests.F90.in +++ b/tests/general/pio_decomp_frame_tests.F90.in @@ -1,3 +1,4 @@ +#include "config.h" ! Get a 3D column decomposition ! If force_rearrange is FALSE, the decomposition is such that ! # All even procs have VEC_HGT_SZ blocks of diff --git a/tests/general/pio_decomp_tests.F90.in b/tests/general/pio_decomp_tests.F90.in index b6d7f06d0a4..cb6f9398691 100644 --- a/tests/general/pio_decomp_tests.F90.in +++ b/tests/general/pio_decomp_tests.F90.in @@ -1,3 +1,4 @@ +#include "config.h" PIO_TF_AUTO_TEST_SUB_BEGIN init_decomp_1d_get_loc_sz implicit none integer, parameter :: VEC_LOCAL_SZ = 7 diff --git a/tests/general/pio_decomp_tests_1d.F90.in b/tests/general/pio_decomp_tests_1d.F90.in index 866be4c4a8f..52acc3eb4c9 100644 --- a/tests/general/pio_decomp_tests_1d.F90.in +++ b/tests/general/pio_decomp_tests_1d.F90.in @@ -1,3 +1,4 @@ +#include "config.h" ! Get a block cyclic decomposition ! If force_rearrange is FALSE, the decomposition is such that ! # All even procs have VEC_LOCAL_SZ elements diff --git a/tests/general/pio_decomp_tests_2d.F90.in b/tests/general/pio_decomp_tests_2d.F90.in index 5cd711294f7..25b2a488432 100644 --- a/tests/general/pio_decomp_tests_2d.F90.in +++ b/tests/general/pio_decomp_tests_2d.F90.in @@ -1,3 +1,4 @@ +#include "config.h" ! Get a 2D column decomposition ! If force_rearrange is FALSE, the decomposition is such that ! # All even procs have VEC_COL_SZ rows of VEC_ROW_SZ elements diff --git a/tests/general/pio_decomp_tests_3d.F90.in b/tests/general/pio_decomp_tests_3d.F90.in index 79569dbaa4e..17a20b2d0e7 100644 --- a/tests/general/pio_decomp_tests_3d.F90.in +++ b/tests/general/pio_decomp_tests_3d.F90.in @@ -1,3 +1,4 @@ +#include "config.h" ! Get a 3D column decomposition ! If force_rearrange is FALSE, the decomposition is such that ! # All even procs have VEC_HGT_SZ blocks of diff --git a/tests/general/pio_fail.F90.in b/tests/general/pio_fail.F90.in index 464fc5c5d2a..796670bd87f 100644 --- a/tests/general/pio_fail.F90.in +++ b/tests/general/pio_fail.F90.in @@ -1,3 +1,4 @@ +#include "config.h" PIO_TF_AUTO_TEST_SUB_BEGIN fail_rank_even LOGICAL cond ! Even procs fail diff --git a/tests/general/pio_file_fail.F90.in b/tests/general/pio_file_fail.F90.in index a4b99acb43c..8ef10631809 100644 --- a/tests/general/pio_file_fail.F90.in +++ b/tests/general/pio_file_fail.F90.in @@ -1,3 +1,4 @@ +#include "config.h" PIO_TF_TEST_SUB_BEGIN create_file_always_fail(iotype, filename) implicit none integer, intent(in) :: iotype diff --git a/tests/general/pio_file_simple_tests.F90.in b/tests/general/pio_file_simple_tests.F90.in index af5604b1798..9fc177ec42a 100644 --- a/tests/general/pio_file_simple_tests.F90.in +++ b/tests/general/pio_file_simple_tests.F90.in @@ -1,3 +1,4 @@ +#include "config.h" PIO_TF_TEST_SUB_BEGIN create_file_no_opts(iotype, filename) implicit none integer, intent(in) :: iotype diff --git a/tests/general/pio_init_finalize.F90.in b/tests/general/pio_init_finalize.F90.in index ab36f00b6f2..27e03f8ea76 100644 --- a/tests/general/pio_init_finalize.F90.in +++ b/tests/general/pio_init_finalize.F90.in @@ -1,3 +1,4 @@ +#include "config.h" PIO_TF_AUTO_TEST_SUB_BEGIN init_finalize ! The default test driver should initialize and finalize PIO PRINT *, "Hello world" diff --git a/tests/general/pio_iosystem_tests.F90.in b/tests/general/pio_iosystem_tests.F90.in index c5610c5b0ad..2bbf399ec16 100644 --- a/tests/general/pio_iosystem_tests.F90.in +++ b/tests/general/pio_iosystem_tests.F90.in @@ -1,3 +1,4 @@ +#include "config.h" ! Split comm world into two comms (one with even procs and the other ! with odd procs SUBROUTINE split_world_odd_even(new_comm, new_rank, new_size, is_even) diff --git a/tests/general/pio_iosystem_tests2.F90.in b/tests/general/pio_iosystem_tests2.F90.in index 50a900b4a3d..6d900b73336 100644 --- a/tests/general/pio_iosystem_tests2.F90.in +++ b/tests/general/pio_iosystem_tests2.F90.in @@ -1,3 +1,4 @@ +#include "config.h" ! Split comm world into two comms (one with even procs and the other ! with odd procs SUBROUTINE split_world_odd_even(new_comm, new_rank, new_size, is_even) diff --git a/tests/general/pio_iosystem_tests3.F90.in b/tests/general/pio_iosystem_tests3.F90.in index fad87a4beb5..6477e05b067 100644 --- a/tests/general/pio_iosystem_tests3.F90.in +++ b/tests/general/pio_iosystem_tests3.F90.in @@ -1,3 +1,4 @@ +#include "config.h" ! Split comm world into two comms (even procs and odd procs) and ! rank == overlapped_rank included in both comms SUBROUTINE split_world_two_with_overlap(new_comms, new_ranks, new_sizes, overlapped_rank) diff --git a/tests/general/pio_rearr.F90.in b/tests/general/pio_rearr.F90.in index 1cddf87707a..202ad109585 100644 --- a/tests/general/pio_rearr.F90.in +++ b/tests/general/pio_rearr.F90.in @@ -1,3 +1,4 @@ +#include "config.h" ! Create a file with a global attribute (filename) SUBROUTINE create_file(comm, iosys, iotype, fname, attname, dimname, ret) use pio_tutil diff --git a/tests/general/pio_rearr_opts.F90.in b/tests/general/pio_rearr_opts.F90.in index a47695cb752..d209860c2f7 100644 --- a/tests/general/pio_rearr_opts.F90.in +++ b/tests/general/pio_rearr_opts.F90.in @@ -1,3 +1,4 @@ +#include "config.h" MODULE pio_rearr_opts_tgv use pio_tutil character(len=PIO_TF_MAX_STR_LEN), parameter ::tgv_fname ="pio_rearr_opts_test.nc" diff --git a/tests/general/pio_rearr_opts2.F90.in b/tests/general/pio_rearr_opts2.F90.in index a46565b5e59..0d6a48c8a83 100644 --- a/tests/general/pio_rearr_opts2.F90.in +++ b/tests/general/pio_rearr_opts2.F90.in @@ -1,3 +1,4 @@ +#include "config.h" MODULE pio_rearr_opts_tgv use pio_tutil character(len=PIO_TF_MAX_STR_LEN), parameter ::tgv_fname ="pio_rearr_opts2_test.nc" From a91eed922aa3f8563b96e86e8fac23b7fc744ed1 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Tue, 18 Aug 2020 07:27:42 -0600 Subject: [PATCH 04/10] more flag cleanup --- tests/general/Makefile.am | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/general/Makefile.am b/tests/general/Makefile.am index 68ece2cd2fd..38983137b49 100644 --- a/tests/general/Makefile.am +++ b/tests/general/Makefile.am @@ -7,10 +7,12 @@ .NOTPARALLEL: # Put together AM_CPPFLAGS and AM_LDFLAGS. -include $(top_srcdir)/set_flags.am +#include $(top_srcdir)/set_flags.am -LDADD = libpio_tutil.la \ -${top_builddir}/src/flib/libpiof.la \ +AM_CPPFLAGS = -I$(top_srcdir)/src/flib -D_NETCDF + +# Link to our test, fortran, and C libraries. +LDADD = libpio_tutil.la ${top_builddir}/src/flib/libpiof.la \ ${top_builddir}/src/clib/libpioc.la # There is a test utility mod file in this subdir which must be built. From 4d6e4f8646a2e8de72636f5b434272d4a7dc268b Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Tue, 18 Aug 2020 07:30:26 -0600 Subject: [PATCH 05/10] more flag cleanup --- tests/general/Makefile.am | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/general/Makefile.am b/tests/general/Makefile.am index 38983137b49..35779ca5b7a 100644 --- a/tests/general/Makefile.am +++ b/tests/general/Makefile.am @@ -6,10 +6,8 @@ # Parallel builds don't currently work in this directory. .NOTPARALLEL: -# Put together AM_CPPFLAGS and AM_LDFLAGS. -#include $(top_srcdir)/set_flags.am - -AM_CPPFLAGS = -I$(top_srcdir)/src/flib -D_NETCDF +# Find the pio.mod file. +AM_CPPFLAGS = -I$(top_srcdir)/src/flib # Link to our test, fortran, and C libraries. LDADD = libpio_tutil.la ${top_builddir}/src/flib/libpiof.la \ From 7067c6331082b63af3774531fbd7af13edb9fd60 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Tue, 18 Aug 2020 07:42:17 -0600 Subject: [PATCH 06/10] cleanup of flags in test/unit autotools build --- tests/unit/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am index 33264e29011..1eaea6e77b3 100644 --- a/tests/unit/Makefile.am +++ b/tests/unit/Makefile.am @@ -6,8 +6,8 @@ # Parallel builds don't currently work in this directory. .NOTPARALLEL: -# Put together AM_CPPFLAGS and AM_LDFLAGS. -include $(top_srcdir)/set_flags.am +# Find the pio.mod file. +AM_CPPFLAGS = -I$(top_srcdir)/src/flib # Build the test for make check. check_PROGRAMS = pio_unit_test_driver From 5f190e84e8ae7f10469376904bf359cb5f964447 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Tue, 18 Aug 2020 08:48:54 -0600 Subject: [PATCH 07/10] more fortran flag cleanup --- tests/fncint/Makefile.am | 4 ++-- tests/performance/Makefile.am | 4 ++-- tests/performance/pioperformance.F90 | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/fncint/Makefile.am b/tests/fncint/Makefile.am index f45c1ca5810..086b11ebaf7 100644 --- a/tests/fncint/Makefile.am +++ b/tests/fncint/Makefile.am @@ -3,8 +3,8 @@ # Ed Hartnett 7/3/19 -# Put together AM_CPPFLAGS and AM_LDFLAGS. -include $(top_srcdir)/set_flags.am +# Find the pio.mod file. +AM_CPPFLAGS = -I$(top_srcdir)/src/flib # Link to the PIO Fortran and C libraries. LDADD = ${top_builddir}/src/flib/libpiof.la ${top_builddir}/src/clib/libpioc.la diff --git a/tests/performance/Makefile.am b/tests/performance/Makefile.am index 751b970be92..d63c58c4b9d 100644 --- a/tests/performance/Makefile.am +++ b/tests/performance/Makefile.am @@ -6,8 +6,8 @@ # Parallel builds don't currently work in this directory. .NOTPARALLEL: -# Put together AM_CPPFLAGS and AM_LDFLAGS. -include $(top_srcdir)/set_flags.am +# Find the pio.mod file. +AM_CPPFLAGS = -I$(top_srcdir)/src/flib # Link to test util library and PIO Fortran and C libs. LDADD = $(top_builddir)/src/gptl/libperf_mod.la \ diff --git a/tests/performance/pioperformance.F90 b/tests/performance/pioperformance.F90 index cb293158740..8a5e2e732b0 100644 --- a/tests/performance/pioperformance.F90 +++ b/tests/performance/pioperformance.F90 @@ -1,3 +1,4 @@ +#include "config.h" #define VARINT 1 !#define VARREAL 1 !#define VARDOUBLE 1 From 5b7f801042774f4c2ec42c397acf29da707cd00d Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Tue, 18 Aug 2020 08:56:31 -0600 Subject: [PATCH 08/10] more fortran flag cleanup --- Makefile.am | 2 +- examples/f03/Makefile.am | 4 ++-- examples/f03/examplePio.f90 | 1 + set_flags.am | 18 ------------------ 4 files changed, 4 insertions(+), 21 deletions(-) delete mode 100644 set_flags.am diff --git a/Makefile.am b/Makefile.am index faa7feb3f4e..8d6fc16db28 100644 --- a/Makefile.am +++ b/Makefile.am @@ -14,5 +14,5 @@ endif SUBDIRS = src tests examples ${DOC} scripts cmake # Add these files to the distribution. -EXTRA_DIST = CMakeLists.txt set_flags.am COPYRIGHT cmake_config.h.in \ +EXTRA_DIST = CMakeLists.txt COPYRIGHT cmake_config.h.in \ libpio.settings.in diff --git a/examples/f03/Makefile.am b/examples/f03/Makefile.am index 9a8781d20ad..fc885d0878d 100644 --- a/examples/f03/Makefile.am +++ b/examples/f03/Makefile.am @@ -3,8 +3,8 @@ # Ed Hartnett 7/17/19 -# Put together AM_CPPFLAGS and AM_LDFLAGS. -include $(top_srcdir)/set_flags.am +# Find the pio.mod file. +AM_CPPFLAGS = -I$(top_srcdir)/src/flib AM_FCFLAGS = -I$(top_srcdir)/src/flib diff --git a/examples/f03/examplePio.f90 b/examples/f03/examplePio.f90 index d2baddf2096..88804b7acab 100644 --- a/examples/f03/examplePio.f90 +++ b/examples/f03/examplePio.f90 @@ -1,3 +1,4 @@ +#include "config.h" !> @file !! A simple Fortran example for the ParallelIO Library. module pioExample diff --git a/set_flags.am b/set_flags.am deleted file mode 100644 index 08efa30db22..00000000000 --- a/set_flags.am +++ /dev/null @@ -1,18 +0,0 @@ -# This is part of the PIO package. -# -# Assemble the CPPFLAGS and for PIO Fortran tests. -# -# Ed Hartnett 3/26/19 - -# Set the CPPFLAGS. -AM_CPPFLAGS = -I$(top_srcdir)/src/flib -D_NETCDF - -# Is the user building with pnetcdf? -if BUILD_PNETCDF -AM_CPPFLAGS += -D_PNETCDF -endif - -# Is the user building with netCDF-4 parallel I/O? -if BUILD_NETCDF4 -AM_CPPFLAGS += -D_NETCDF4 -endif From 089a7ecc634ab757dcdba3d725dfe4fc321cda23 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Tue, 18 Aug 2020 09:12:41 -0600 Subject: [PATCH 09/10] turning off logging in a test --- tests/cunit/test_darray_frame.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cunit/test_darray_frame.c b/tests/cunit/test_darray_frame.c index 949e90ebfb4..41f43452360 100644 --- a/tests/cunit/test_darray_frame.c +++ b/tests/cunit/test_darray_frame.c @@ -192,7 +192,7 @@ int main(int argc, char **argv) /* Initialize test. */ if ((ret = pio_test_init2(argc, argv, &my_rank, &ntasks, MIN_NTASKS, - MIN_NTASKS, 3, &test_comm))) + MIN_NTASKS, -1, &test_comm))) ERR(ERR_INIT); if ((ret = PIOc_set_iosystem_error_handling(PIO_DEFAULT, PIO_RETURN_ERROR, NULL))) From a1a04ef2e8cb03f25d0b59c372d2985c5ccc7186 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Tue, 18 Aug 2020 09:16:13 -0600 Subject: [PATCH 10/10] moved .f90 to .F90 --- examples/f03/CMakeLists.txt | 2 +- examples/f03/Makefile.am | 2 +- examples/f03/{examplePio.f90 => examplePio.F90} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename examples/f03/{examplePio.f90 => examplePio.F90} (100%) diff --git a/examples/f03/CMakeLists.txt b/examples/f03/CMakeLists.txt index a299c7cde8c..1073fda1a94 100644 --- a/examples/f03/CMakeLists.txt +++ b/examples/f03/CMakeLists.txt @@ -15,6 +15,6 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0") if(${PIO_BUILD_TIMING}) SET(TIMING_LINK_LIB timing) endif() -SET(SRC examplePio.f90) +SET(SRC examplePio.F90) ADD_EXECUTABLE(examplePio_f90 ${SRC}) TARGET_LINK_LIBRARIES(examplePio_f90 piof pioc ${TIMING_LINK_LIB}) diff --git a/examples/f03/Makefile.am b/examples/f03/Makefile.am index fc885d0878d..6f995163fda 100644 --- a/examples/f03/Makefile.am +++ b/examples/f03/Makefile.am @@ -14,7 +14,7 @@ ${top_builddir}/src/clib/libpioc.la # Build the test for make check. check_PROGRAMS = examplePio -examplePio_SOURCES = examplePio.f90 +examplePio_SOURCES = examplePio.F90 if RUN_TESTS # Tests will run from a bash script. diff --git a/examples/f03/examplePio.f90 b/examples/f03/examplePio.F90 similarity index 100% rename from examples/f03/examplePio.f90 rename to examples/f03/examplePio.F90