From 8a8ba30d3f0af5a02f17f53a88480ed3f1d8ea64 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Mon, 17 Aug 2020 06:57:03 -0600 Subject: [PATCH] more removal of unneeded pre-processor symbols --- configure.ac | 5 ++--- src/flib/pio.F90 | 2 -- tests/general/util/pio_tutil.F90 | 16 ++++------------ 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/configure.ac b/configure.ac index a9266b71c26..1b5e7e4b720 100644 --- a/configure.ac +++ b/configure.ac @@ -229,12 +229,11 @@ AC_MSG_NOTICE([setting flags]) # We must have MPI to build PIO. AC_DEFINE([HAVE_MPI], [1], [defined by CMake build]) -# All builds are on LINUX. -AC_DEFINE([LINUX], [1], [defined by CMake build]) - # Define to solve intel compiler warning. AC_DEFINE([_GNU_SOURCE], [1], [solve strnlen declared implicitly warning on intel compiler]) +AC_MSG_NOTICE([finding libraries]) + # Check for netCDF library. AC_CHECK_LIB([netcdf], [nc_create], [], [AC_MSG_ERROR([Can't find or link to the netcdf library.])]) AC_CHECK_HEADERS([netcdf.h netcdf_meta.h]) diff --git a/src/flib/pio.F90 b/src/flib/pio.F90 index a14a8af9912..d0e9e71d2bf 100644 --- a/src/flib/pio.F90 +++ b/src/flib/pio.F90 @@ -39,9 +39,7 @@ module pio pio_iotype_pnetcdf,pio_iotype_netcdf, & pio_global, pio_char, pio_write, pio_nowrite, pio_clobber, pio_noclobber, & pio_max_name, pio_max_var_dims, pio_rearr_subset, pio_rearr_box, & -#if defined(_NETCDF) || defined(_PNETCDF) pio_nofill, pio_unlimited, pio_fill_int, pio_fill_double, pio_fill_float, & -#endif pio_64bit_offset, pio_64bit_data, & pio_internal_error, pio_bcast_error, pio_return_error, pio_default diff --git a/tests/general/util/pio_tutil.F90 b/tests/general/util/pio_tutil.F90 index 181c897f88d..c5e3383f64f 100644 --- a/tests/general/util/pio_tutil.F90 +++ b/tests/general/util/pio_tutil.F90 @@ -295,11 +295,9 @@ SUBROUTINE PIO_TF_Get_nc_iotypes(iotypes, iotype_descs, num_iotypes) ! netcdf, netcdf4p, netcdf4c num_iotypes = num_iotypes + 3 #else -#ifdef _NETCDF - ! netcdf + ! netcdf is always present. num_iotypes = num_iotypes + 1 #endif -#endif #ifdef _PNETCDF ! pnetcdf num_iotypes = num_iotypes + 1 @@ -328,12 +326,10 @@ SUBROUTINE PIO_TF_Get_nc_iotypes(iotypes, iotype_descs, num_iotypes) iotype_descs(i) = "NETCDF4P" i = i + 1 #else -#ifdef _NETCDF - ! netcdf + ! netcdf is always present. iotypes(i) = PIO_iotype_netcdf iotype_descs(i) = "NETCDF" i = i + 1 -#endif #endif END SUBROUTINE @@ -416,11 +412,9 @@ SUBROUTINE PIO_TF_Get_iotypes(iotypes, iotype_descs, num_iotypes) ! netcdf, netcdf4p, netcdf4c num_iotypes = num_iotypes + 3 #else -#ifdef _NETCDF - ! netcdf + ! netcdf is always present. num_iotypes = num_iotypes + 1 #endif -#endif #ifdef _PNETCDF ! pnetcdf num_iotypes = num_iotypes + 1 @@ -449,12 +443,10 @@ SUBROUTINE PIO_TF_Get_iotypes(iotypes, iotype_descs, num_iotypes) iotype_descs(i) = "NETCDF4P" i = i + 1 #else -#ifdef _NETCDF - ! netcdf + ! netcdf is always present. iotypes(i) = PIO_iotype_netcdf iotype_descs(i) = "NETCDF" i = i + 1 -#endif #endif END SUBROUTINE