mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-30 16:10:44 +08:00
Minor cleanups to reduce warnings in headers, and switch from MPI_BYTE to MPI_INT
for MPI_Allreduce() call.
This commit is contained in:
parent
c238435853
commit
7a4479be6b
@ -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 */
|
||||
|
@ -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 */
|
||||
|
6
oc2/oc.h
6
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.
|
||||
|
@ -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*/
|
||||
|
Loading…
Reference in New Issue
Block a user