Corrected logic use of USE_PARALLEL for no-hdf5 but still using pnetcdf.

Added fix for github issue http://github.com/Unidata/netcdf-c/issues/143 as suggested by Wei-keng Liao.
This commit is contained in:
Ward Fisher 2015-11-09 18:21:04 +00:00
parent 1043461623
commit f2b8e69ea8
3 changed files with 6 additions and 5 deletions

View File

@ -857,6 +857,8 @@ IF(ENABLE_PNETCDF)
IF(NOT PNETCDF)
MESSAGE(STATUS "Cannot find pNetCDF library. Disabling pNetCDF support.")
SET(USE_PNETCDF OFF CACHE BOOL "")
ELSE(NOT PNETCDF)
SET(USE_PARALLEL ON CACHE BOOL "")
ENDIF(NOT PNETCDF)
# ELSE()
## SET(TMP_INC ${CMAKE_REQUIRED_INCLUDES})

View File

@ -14,7 +14,7 @@
#include <stdio.h>
#include <string.h>
#include <assert.h>
#ifdef HDF5_PARALLEL
#if defined(HDF5_PARALLEL) || defined(USE_PNETCDF)
#include <mpi.h>
#endif
#ifdef USE_PARALLEL
@ -245,8 +245,8 @@ int (*put_vars)(int, int, const size_t*, const size_t*, const ptrdiff_t*, const
int (*get_varm)(int, int, const size_t*, const size_t*, const ptrdiff_t*, const ptrdiff_t*, void*, nc_type);
int (*put_varm)(int, int, const size_t*, const size_t*, const ptrdiff_t*, const ptrdiff_t*, const void*, nc_type);
int (*inq_var_all)(int ncid, int varid, char *name, nc_type *xtypep,
int *ndimsp, int *dimidsp, int *nattsp,
int (*inq_var_all)(int ncid, int varid, char *name, nc_type *xtypep,
int *ndimsp, int *dimidsp, int *nattsp,
int *shufflep, int *deflatep, int *deflate_levelp,
int *fletcher32p, int *contiguousp, size_t *chunksizesp,
int *no_fill, void *fill_valuep, int *endiannessp,

View File

@ -715,8 +715,7 @@ NCP_put_vara(int ncid,
case NC_UINT:
status = ncmpi_put_vara_uint(nc->int_ncid, varid, mpi_start, mpi_count, ip); break;
case NC_INT64:
status = ncmpi_put_vara_long(nc->int_ncid, varid, mpi_start, mpi_count, ip); break;
status = ncmpi_put_vara_longlong(nc->int_ncid, varid, mpi_start, mpi_count, ip); break;
status = ncmpi_put_vara_longlong(nc->int_ncid, varid, mpi_start, mpi_count, ip); break;
case NC_UINT64:
status = ncmpi_put_vara_ulonglong(nc->int_ncid, varid, mpi_start, mpi_count, ip); break;
default: