Skip to content

Commit

Permalink
more documentation and warning fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed May 18, 2019
1 parent 6fe3aed commit d22a00c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
26 changes: 18 additions & 8 deletions src/clib/pio.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,13 @@
#endif

/** PIO_OFFSET is an integer type of size sufficient to represent the
* size (in bytes) of the largest file supported by MPI. */
* size (in bytes) of the largest file supported by MPI. This is not
* actually used by the code. */
#define PIO_OFFSET MPI_OFFSET

/** PIO_OFFSET is defined as MPI_Offset, which is defined in
* pio_internal.h as long long. This is what is used throughout the C
* code. */
#define PIO_Offset MPI_Offset

/** The maximum number of variables allowed in a netCDF file. */
Expand Down Expand Up @@ -210,7 +215,7 @@ enum PIO_REARR_COMM_FC_DIR
PIO_REARR_COMM_FC_2D_DISABLE
};

/* Constant to indicate unlimited requests. */
/** Constant to indicate unlimited requests for the rearranger. */
#define PIO_REARR_COMM_UNLIMITED_PEND_REQ -1

/**
Expand Down Expand Up @@ -760,13 +765,16 @@ enum PIO_ERROR_HANDLERS
#define PIO_EINDEP (-203)
#endif /* _PNETCDF */

/** Define error codes for PIO. */
/** The first error code for PIO. */
#define PIO_FIRST_ERROR_CODE (-500)

/** Bad IOTYPE error. */
#define PIO_EBADIOTYPE (-500)
/** variable dimensions do not match in a multivar call */

/** Variable dimensions do not match in a multivar call. */
#define PIO_EVARDIMMISMATCH (-501)

/** ??? */
/** Request NULL. */
#define PIO_REQ_NULL (NC_REQ_NULL-1)

#if defined(__cplusplus)
Expand Down Expand Up @@ -818,11 +826,14 @@ extern "C" {
int *num_procs_per_comp, int **proc_list, MPI_Comm *io_comm, MPI_Comm *comp_comm,
int rearranger, int *iosysidp);

int PIOc_Init_Intercomm(int component_count, MPI_Comm peer_comm, MPI_Comm *comp_comms,
MPI_Comm io_comm, int *iosysidp);
/* How many IO tasks in this iosysid? */
int PIOc_get_numiotasks(int iosysid, int *numiotasks);

/* Initialize PIO for intracomm mode. */
int PIOc_Init_Intracomm(MPI_Comm comp_comm, int num_iotasks, int stride, int base, int rearr,
int *iosysidp);

/* Shut down iosystem and free all associated resources. */
int PIOc_finalize(int iosysid);

/* Set error handling for entire io system. */
Expand Down Expand Up @@ -913,7 +924,6 @@ extern "C" {
int deflate_level);
int PIOc_inq_var_deflate(int ncid, int varid, int *shufflep, int *deflatep,
int *deflate_levelp);
int PIOc_inq_var_szip(int ncid, int varid, int *options_maskp, int *pixels_per_blockp);
int PIOc_def_var_chunking(int ncid, int varid, int storage, const PIO_Offset *chunksizesp);
int PIOc_inq_var_chunking(int ncid, int varid, int *storagep, PIO_Offset *chunksizesp);
int PIOc_def_var_endian(int ncid, int varid, int endian);
Expand Down
1 change: 0 additions & 1 deletion src/clib/pio_rearrange.c
Original file line number Diff line number Diff line change
Expand Up @@ -1344,7 +1344,6 @@ int box_rearrange_create(iosystem_desc_t *ios, int maplen, const PIO_Offset *com
}
if(ios->ioproc){
/* Only I/O procs send sc_info messages */
int nmsgs = ios->num_iotasks;
for (int i = 0; i < ios->num_comptasks; i++)
{
sendcounts[ios->compranks[i]] = sc_info_msg_sz;
Expand Down
2 changes: 1 addition & 1 deletion src/clib/pioc_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -1710,7 +1710,7 @@ int PIOc_writemap_from_f90(const char *file, int ndims, const int *gdims,
* parameters are read on comp task 0 and ignored elsewhere.
*
* @param iosysid A defined pio system ID, obtained from
* PIOc_Init_Intercomm() or PIOc_InitAsync().
* PIOc_Init_Intracomm() or PIOc_InitAsync().
* @param ncidp A pointer that gets the ncid of the newly created
* file.
* @param iotype A pointer to a pio output format. Must be one of
Expand Down
3 changes: 3 additions & 0 deletions src/clib/uthash.h
Original file line number Diff line number Diff line change
Expand Up @@ -1156,6 +1156,7 @@ for(((el)=(head)), ((tmp)=DECLTYPE(el)((head!=NULL)?(head)->hh.next:NULL));
#define HASH_COUNT(head) HASH_CNT(hh,head)
#define HASH_CNT(hh,head) ((head != NULL)?((head)->hh.tbl->num_items):0U)

/** Hash bucket. */
typedef struct UT_hash_bucket {
struct UT_hash_handle *hh_head;
unsigned count;
Expand All @@ -1180,6 +1181,7 @@ typedef struct UT_hash_bucket {
#define HASH_SIGNATURE 0xa0111fe1u
#define HASH_BLOOM_SIGNATURE 0xb12220f2u

/** Hash table. */
typedef struct UT_hash_table {
UT_hash_bucket *buckets;
unsigned num_buckets, log2_num_buckets;
Expand Down Expand Up @@ -1213,6 +1215,7 @@ typedef struct UT_hash_table {

} UT_hash_table;

/** Hash handle. */
typedef struct UT_hash_handle {
struct UT_hash_table *tbl;
void *prev; /* prev element in app order */
Expand Down

0 comments on commit d22a00c

Please sign in to comment.