Skip to content

Commit

Permalink
more removal of unneeded pre-processor symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett committed Aug 17, 2020
1 parent 4754ab5 commit 8a8ba30
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 17 deletions.
5 changes: 2 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
2 changes: 0 additions & 2 deletions src/flib/pio.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
16 changes: 4 additions & 12 deletions tests/general/util/pio_tutil.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 8a8ba30

Please sign in to comment.