From 1db00b4f8a3925254a6de2d1b8008957e85014f5 Mon Sep 17 00:00:00 2001 From: James Foucar Date: Wed, 15 Nov 2023 13:56:45 -0700 Subject: [PATCH] Defining PIO2 doesn't work at the moment --- components/cmake/common_setup.cmake | 8 +++++++- share/util/shr_pio_mod.F90 | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/components/cmake/common_setup.cmake b/components/cmake/common_setup.cmake index f3722aae2c47..5522687bd396 100644 --- a/components/cmake/common_setup.cmake +++ b/components/cmake/common_setup.cmake @@ -75,7 +75,13 @@ else() set(CPPDEFS "${CPPDEFS} -DHAVE_MPI") endif() -set(CPPDEFS "${CPPDEFS} -DPIO${PIO_VERSION}") +if (PIO_VERSION STREQUAL "1") + set(CPPDEFS "${CPPDEFS} -DPIO1") +endif() +# The code below is what we actually want but it's currently broken. +# Once fixes are in place, uncomment the line below and remove the 3 +# lines above. +# set(CPPDEFS "${CPPDEFS} -DPIO${PIO_VERSION}") # Not clear how to escape commas for libraries with their own configure # script, and they don't need this defined anyway, so leave this out of diff --git a/share/util/shr_pio_mod.F90 b/share/util/shr_pio_mod.F90 index a2750e2e51d9..d69c3f5811be 100644 --- a/share/util/shr_pio_mod.F90 +++ b/share/util/shr_pio_mod.F90 @@ -669,7 +669,7 @@ subroutine shr_pio_getiotypefromname(typename, iotype, defaulttype) iotype = pio_iotype_netcdf4p else if ( typename .eq. 'NETCDF4C') then iotype = pio_iotype_netcdf4c -#ifdef PIO2 +#ifndef PIO1 else if ( typename .eq. 'ADIOS') then iotype = pio_iotype_adios #endif