Minor cleanups to reduce warnings in headers, and switch from MPI_BYTE to MPI_INT

for MPI_Allreduce() call.
This commit is contained in:
Quincey Koziol 2013-09-14 13:19:58 -05:00
parent c238435853
commit 7a4479be6b
4 changed files with 2 additions and 33 deletions

View File

@ -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 */

View File

@ -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 */

View File

@ -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.

View File

@ -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*/