From 8dd4fdc493e41a1caa00fb6b86d74a41839f3560 Mon Sep 17 00:00:00 2001 From: Ed Hartnett Date: Sat, 23 Mar 2019 09:26:15 -0600 Subject: [PATCH] more fortran flags, plus fix warning --- set_flags.am | 12 ++++++++++++ tests/cunit/test_perf2.c | 5 ++--- tests/unit/Makefile.am | 7 ++----- 3 files changed, 16 insertions(+), 8 deletions(-) create mode 100644 set_flags.am diff --git a/set_flags.am b/set_flags.am new file mode 100644 index 00000000000..f914680637f --- /dev/null +++ b/set_flags.am @@ -0,0 +1,12 @@ +# This is part of the PIO package. +# +# Assemble the CPPFLAGS and for PIO Fortran tests. +# + +# Set the CPPFLAGS. +AM_CPPFLAGS = -I$(top_srcdir)/src/flib +AM_CPPFLAGS += "-D_NETCDF -D_NETCDF4 -D_PETCDF" + +# Link to our assembled libraries, C and Fortran. +AM_LDFLAGS = ${top_builddir}/src/clib/libpio.la +LDADD = ${top_builddir}/src/clib/libpiof.la diff --git a/tests/cunit/test_perf2.c b/tests/cunit/test_perf2.c index 36668776108..66f2b259a1b 100644 --- a/tests/cunit/test_perf2.c +++ b/tests/cunit/test_perf2.c @@ -219,9 +219,8 @@ int test_darray(int iosysid, int ioid, int num_flavors, int *flavor, int my_rank startt = (1000000 * starttime.tv_sec) + starttime.tv_usec; endt = (1000000 * endtime.tv_sec) + endtime.tv_usec; delta = (endt - startt)/NUM_TIMESTEPS; - /* if (!my_rank) */ - /* printf("%d\t%d\t%d\t%d\t%lld\n", rearranger, fmt, pio_type, test_multi, */ - /* delta); */ + if (!my_rank) + printf("%d\t%lld\n", fmt, delta); /* Reopen the file. */ if ((ret = PIOc_openfile(iosysid, &ncid2, &flavor[fmt], filename, PIO_NOWRITE))) diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am index 6e06006acb5..868cf96d18b 100644 --- a/tests/unit/Makefile.am +++ b/tests/unit/Makefile.am @@ -3,11 +3,8 @@ # Ed Hartnett 3/20/19 -# Link to our assembled library. -AM_LDFLAGS = ${top_builddir}/src/clib/libpio.la -AM_CPPFLAGS = -I$(top_srcdir)/src/flib -AM_CPPFLAGS += "-D_NETCDF -D_NETCDF4 -D_PETCDF" -LDADD = ${top_builddir}/src/clib/libpiof.la +# Put together AM_CPPFLAGS and AM_LDFLAGS. +include $(top_srcdir)/set_flags.am # Build the test for make check. check_PROGRAMS = pio_unit_test_driver