diff --git a/src/clib/pio.h b/src/clib/pio.h index 26e45d54f38..1cef2cecbf4 100644 --- a/src/clib/pio.h +++ b/src/clib/pio.h @@ -16,22 +16,7 @@ #include #include -#ifdef _NETCDF #include -#ifdef _NETCDF4 -#include -#endif -#endif -#ifdef _PNETCDF -#include -#endif - -#ifndef MPI_OFFSET -/** MPI_OFFSET is an integer type of size sufficient to represent the - * size (in bytes) of the largest file supported by MPI. In some MPI - * implementations MPI_OFFSET is not properly defined. */ -#define MPI_OFFSET MPI_LONG_LONG -#endif /** PIO_OFFSET is an integer type of size sufficient to represent the * size (in bytes) of the largest file supported by MPI. This is not diff --git a/src/clib/pio_internal.h b/src/clib/pio_internal.h index 595f3b93f31..9c789164509 100644 --- a/src/clib/pio_internal.h +++ b/src/clib/pio_internal.h @@ -16,6 +16,12 @@ #include #include #include +#ifdef _NETCDF4 +#include +#endif +#ifdef _PNETCDF +#include +#endif #ifdef TIMING #include #endif @@ -24,6 +30,13 @@ #include #endif /* USE_MPE */ +#ifndef MPI_OFFSET +/** MPI_OFFSET is an integer type of size sufficient to represent the + * size (in bytes) of the largest file supported by MPI. In some MPI + * implementations MPI_OFFSET is not properly defined. */ +#define MPI_OFFSET MPI_LONG_LONG +#endif + /* These are the sizes of types in netCDF files. Do not replace these * constants with sizeof() calls for C types. They are not the * same. Even on a system where sizeof(short) is 4, the size of a