From 7a4479be6b9227902923d62d5e29a210fd24a529 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Sat, 14 Sep 2013 13:19:58 -0500 Subject: [PATCH] Minor cleanups to reduce warnings in headers, and switch from MPI_BYTE to MPI_INT for MPI_Allreduce() call. --- include/ncdispatch.h | 23 ----------------------- libsrc4/nc4hdf.c | 4 ++-- oc2/oc.h | 6 ------ oc2/ocinternal.h | 2 -- 4 files changed, 2 insertions(+), 33 deletions(-) diff --git a/include/ncdispatch.h b/include/ncdispatch.h index 6c41f1c81..426b22f95 100644 --- a/include/ncdispatch.h +++ b/include/ncdispatch.h @@ -23,29 +23,6 @@ #define longtype ((sizeof(long) == sizeof(int) ? NC_INT : NC_INT64)) -extern int nc_get_vara_ubyte(int ncid, int varid, - const size_t* start, const size_t* count, - unsigned char* value); -extern int nc_get_vara_ushort(int ncid, int varid, - const size_t* start, const size_t* count, - unsigned short* value); -extern int nc_get_vara_uint(int ncid, int varid, - const size_t* start, const size_t* count, - unsigned int* value); -extern int nc_get_vara_ulonglong(int ncid, int varid, - const size_t* start, const size_t* count, - unsigned long long* value); - -extern int nc_put_vara_ushort(int ncid, int varid, - const size_t* start, const size_t* count, - const unsigned short* value); -extern int nc_put_vara_uint(int ncid, int varid, - const size_t* start, const size_t* count, - const unsigned int* value); -extern int nc_put_vara_ulonglong(int ncid, int varid, - const size_t* start, const size_t* count, - const unsigned long long* value); - #define X_INT_MAX 2147483647 /* Given a filename, check its magic number */ diff --git a/libsrc4/nc4hdf.c b/libsrc4/nc4hdf.c index 1d59df1fb..35ca9aa5e 100644 --- a/libsrc4/nc4hdf.c +++ b/libsrc4/nc4hdf.c @@ -798,11 +798,11 @@ nc4_put_vara(NC *nc, int ncid, int varid, const size_t *startp, BAIL(NC_ECANTEXTEND); /* Reach consensus about dimension sizes to extend to */ - /* (Note: Somewhat hackish, with the use of MPI_BYTE, but MPI_MAX is + /* (Note: Somewhat hackish, with the use of MPI_INTEGER, but MPI_MAX is * correct with this usage, as long as it's not executed on * heterogenous systems) */ - if(MPI_SUCCESS != MPI_Allreduce(MPI_IN_PLACE, &xtend_size, (var->ndims * sizeof(hsize_t)), MPI_BYTE, MPI_MAX, h5->comm)) + if(MPI_SUCCESS != MPI_Allreduce(MPI_IN_PLACE, &xtend_size, (var->ndims * (sizeof(hsize_t) / sizeof(int))), MPI_INT, MPI_MAX, h5->comm)) BAIL(NC_EMPI); } #endif /* USE_PARALLEL */ diff --git a/oc2/oc.h b/oc2/oc.h index 71f24b7f5..3a9bda5c5 100644 --- a/oc2/oc.h +++ b/oc2/oc.h @@ -439,12 +439,6 @@ extern OCerror oc_data_octype(OClink, OCdatanode data, OCtype*); */ extern int oc_data_indexed(OClink link, OCdatanode datanode); -/* Return 1 if the specified data has a valid index, 0 otherwise. - Valid index means it was created using - oc_data_ithelement or oc_data_ithrecord. -*/ -extern int oc_data_indexed(OClink, OCdatanode); - /* Return 1 if the specified data can be indexed Indexable means the data is pointing to an indexed structure or to a sequence. diff --git a/oc2/ocinternal.h b/oc2/ocinternal.h index 516fa7472..f77e350a1 100644 --- a/oc2/ocinternal.h +++ b/oc2/ocinternal.h @@ -208,8 +208,6 @@ extern int ocinternalinitialize(void); extern OCerror ocupdatelastmodifieddata(OCstate* state); -extern int ocinternalinitialize(void); - extern OCerror ocsetuseragent(OCstate* state, const char* agent); #endif /*COMMON_H*/