diff --git a/src/clib/pio.h b/src/clib/pio.h index 38a83db62ca..83ed8f7feae 100644 --- a/src/clib/pio.h +++ b/src/clib/pio.h @@ -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. */ @@ -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 /** @@ -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) @@ -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. */ @@ -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); diff --git a/src/clib/pio_rearrange.c b/src/clib/pio_rearrange.c index fe449774358..fa946c140eb 100644 --- a/src/clib/pio_rearrange.c +++ b/src/clib/pio_rearrange.c @@ -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; diff --git a/src/clib/pioc_support.c b/src/clib/pioc_support.c index c771e584c2d..ae94aea8f64 100644 --- a/src/clib/pioc_support.c +++ b/src/clib/pioc_support.c @@ -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 diff --git a/src/clib/uthash.h b/src/clib/uthash.h index 76bdca64199..59910166f59 100644 --- a/src/clib/uthash.h +++ b/src/clib/uthash.h @@ -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; @@ -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; @@ -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 */