Skip to content

Commit

Permalink
Merge pull request ESMCI#1609 from NCAR/ejh_header
Browse files Browse the repository at this point in the history
move reliance on ifdefs out of pio.h
  • Loading branch information
edhartnett authored Nov 12, 2019
2 parents db72388 + cbcc785 commit 12209c7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/clib/pio.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,7 @@
#include <mpi.h>
#include <uthash.h>

#ifdef _NETCDF
#include <netcdf.h>
#ifdef _NETCDF4
#include <netcdf_par.h>
#endif
#endif
#ifdef _PNETCDF
#include <pnetcdf.h>
#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
Expand Down
13 changes: 13 additions & 0 deletions src/clib/pio_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
#include <bget.h>
#include <limits.h>
#include <math.h>
#ifdef _NETCDF4
#include <netcdf_par.h>
#endif
#ifdef _PNETCDF
#include <pnetcdf.h>
#endif
#ifdef TIMING
#include <gptl.h>
#endif
Expand All @@ -24,6 +30,13 @@
#include <mpe.h>
#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
Expand Down

0 comments on commit 12209c7

Please sign in to comment.