summaryrefslogtreecommitdiffstats
path: root/src/H5FDsubfiling
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2022-07-26 21:45:46 (GMT)
committerGitHub <noreply@github.com>2022-07-26 21:45:46 (GMT)
commitae414872f50187e64cbd6cc8f076c22cf5df2d53 (patch)
treeb616f33f5daa89f213e7c64e04c63afde906e939 /src/H5FDsubfiling
parent213eac2588369f75a11df6bb1788dde33c4b82e2 (diff)
downloadhdf5-ae414872f50187e64cbd6cc8f076c22cf5df2d53.zip
hdf5-ae414872f50187e64cbd6cc8f076c22cf5df2d53.tar.gz
hdf5-ae414872f50187e64cbd6cc8f076c22cf5df2d53.tar.bz2
Develop clang 13 format (#1933)
* Update format source to clang 13 * More format changes
Diffstat (limited to 'src/H5FDsubfiling')
-rw-r--r--src/H5FDsubfiling/H5FDioc.c38
-rw-r--r--src/H5FDsubfiling/H5FDioc_int.c10
-rw-r--r--src/H5FDsubfiling/H5FDioc_priv.h2
-rw-r--r--src/H5FDsubfiling/H5FDioc_threads.c18
-rw-r--r--src/H5FDsubfiling/H5FDsubfile_int.c6
-rw-r--r--src/H5FDsubfiling/H5FDsubfiling.c64
-rw-r--r--src/H5FDsubfiling/H5subfiling_common.c46
-rw-r--r--src/H5FDsubfiling/H5subfiling_common.h18
-rw-r--r--src/H5FDsubfiling/mercury/src/util/mercury_dlog.c4
-rw-r--r--src/H5FDsubfiling/mercury/src/util/mercury_dlog.h16
-rw-r--r--src/H5FDsubfiling/mercury/src/util/mercury_list.h2
-rw-r--r--src/H5FDsubfiling/mercury/src/util/mercury_log.c6
-rw-r--r--src/H5FDsubfiling/mercury/src/util/mercury_log.h4
-rw-r--r--src/H5FDsubfiling/mercury/src/util/mercury_queue.h4
-rw-r--r--src/H5FDsubfiling/mercury/src/util/mercury_thread.h2
-rw-r--r--src/H5FDsubfiling/mercury/src/util/mercury_thread_pool.c4
-rw-r--r--src/H5FDsubfiling/mercury/src/util/mercury_thread_pool.h2
17 files changed, 123 insertions, 123 deletions
diff --git a/src/H5FDsubfiling/H5FDioc.c b/src/H5FDsubfiling/H5FDioc.c
index 8017cc0..2eb7970 100644
--- a/src/H5FDsubfiling/H5FDioc.c
+++ b/src/H5FDsubfiling/H5FDioc.c
@@ -129,8 +129,8 @@ static herr_t H5FD__ioc_term(void);
static hsize_t H5FD__ioc_sb_size(H5FD_t *_file);
static herr_t H5FD__ioc_sb_encode(H5FD_t *_file, char *name /*out*/, unsigned char *buf /*out*/);
static herr_t H5FD__ioc_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf);
-static void * H5FD__ioc_fapl_get(H5FD_t *_file);
-static void * H5FD__ioc_fapl_copy(const void *_old_fa);
+static void *H5FD__ioc_fapl_get(H5FD_t *_file);
+static void *H5FD__ioc_fapl_copy(const void *_old_fa);
static herr_t H5FD__ioc_fapl_free(void *_fapl);
static H5FD_t *H5FD__ioc_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr);
static herr_t H5FD__ioc_close(H5FD_t *_file);
@@ -349,7 +349,7 @@ herr_t
H5Pset_fapl_ioc(hid_t fapl_id, H5FD_ioc_config_t *vfd_config)
{
H5FD_ioc_config_t *ioc_conf = NULL;
- H5P_genplist_t * plist_ptr = NULL;
+ H5P_genplist_t *plist_ptr = NULL;
herr_t ret_value = SUCCEED;
H5FD_IOC_LOG_CALL(__func__);
@@ -401,7 +401,7 @@ herr_t
H5Pget_fapl_ioc(hid_t fapl_id, H5FD_ioc_config_t *config_out)
{
const H5FD_ioc_config_t *config_ptr = NULL;
- H5P_genplist_t * plist_ptr = NULL;
+ H5P_genplist_t *plist_ptr = NULL;
hbool_t use_default_config = FALSE;
herr_t ret_value = SUCCEED;
@@ -626,7 +626,7 @@ static void *
H5FD__ioc_fapl_get(H5FD_t *_file)
{
H5FD_ioc_t *file = (H5FD_ioc_t *)_file;
- void * ret_value = NULL;
+ void *ret_value = NULL;
H5FD_IOC_LOG_CALL(__func__);
@@ -682,8 +682,8 @@ static void *
H5FD__ioc_fapl_copy(const void *_old_fa)
{
const H5FD_ioc_config_t *old_fa_ptr = (const H5FD_ioc_config_t *)_old_fa;
- H5FD_ioc_config_t * new_fa_ptr = NULL;
- void * ret_value = NULL;
+ H5FD_ioc_config_t *new_fa_ptr = NULL;
+ void *ret_value = NULL;
H5FD_IOC_LOG_CALL(__func__);
@@ -752,15 +752,15 @@ done:
static H5FD_t *
H5FD__ioc_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
{
- H5FD_ioc_t * file_ptr = NULL; /* Ioc VFD info */
+ H5FD_ioc_t *file_ptr = NULL; /* Ioc VFD info */
const H5FD_ioc_config_t *config_ptr = NULL; /* Driver-specific property list */
H5FD_ioc_config_t default_config;
- H5FD_class_t * driver = NULL; /* VFD for file */
- H5P_genplist_t * plist_ptr = NULL;
+ H5FD_class_t *driver = NULL; /* VFD for file */
+ H5P_genplist_t *plist_ptr = NULL;
H5FD_driver_prop_t driver_prop; /* Property for driver ID & info */
int mpi_inited = 0;
int mpi_code; /* MPI return code */
- H5FD_t * ret_value = NULL;
+ H5FD_t *ret_value = NULL;
H5FD_IOC_LOG_CALL(__func__);
@@ -884,7 +884,7 @@ H5FD__ioc_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
file_ptr->ioc_file = H5FD_open(file_ptr->file_path, flags, config_ptr->ioc_fapl_id, HADDR_UNDEF);
if (file_ptr->ioc_file) {
h5_stat_t sb;
- void * file_handle = NULL;
+ void *file_handle = NULL;
if (file_ptr->mpi_rank == 0) {
if (H5FDget_vfd_handle(file_ptr->ioc_file, config_ptr->ioc_fapl_id, &file_handle) < 0)
@@ -1286,7 +1286,7 @@ done:
static haddr_t
H5FD__ioc_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
- const H5FD_ioc_t * file = (const H5FD_ioc_t *)_file;
+ const H5FD_ioc_t *file = (const H5FD_ioc_t *)_file;
haddr_t ret_value = HADDR_UNDEF; /* Return value */
subfiling_context_t *sf_context = NULL;
@@ -1628,9 +1628,9 @@ H5FD__ioc_write_vector_internal(H5FD_t *_file, uint32_t count, H5FD_mem_t types[
size_t sizes[], const void *bufs[] /* in */)
{
subfiling_context_t *sf_context = NULL;
- MPI_Request * active_reqs = NULL;
- H5FD_ioc_t * file_ptr = (H5FD_ioc_t *)_file;
- io_req_t ** sf_async_reqs = NULL;
+ MPI_Request *active_reqs = NULL;
+ H5FD_ioc_t *file_ptr = (H5FD_ioc_t *)_file;
+ io_req_t **sf_async_reqs = NULL;
int64_t sf_context_id = -1;
herr_t ret_value = SUCCEED;
struct __mpi_req {
@@ -1732,9 +1732,9 @@ H5FD__ioc_read_vector_internal(H5FD_t *_file, uint32_t count, haddr_t addrs[], s
void *bufs[] /* out */)
{
subfiling_context_t *sf_context = NULL;
- MPI_Request * active_reqs = NULL;
- H5FD_ioc_t * file_ptr = (H5FD_ioc_t *)_file;
- io_req_t ** sf_async_reqs = NULL;
+ MPI_Request *active_reqs = NULL;
+ H5FD_ioc_t *file_ptr = (H5FD_ioc_t *)_file;
+ io_req_t **sf_async_reqs = NULL;
int64_t sf_context_id = -1;
herr_t ret_value = SUCCEED;
struct __mpi_req {
diff --git a/src/H5FDsubfiling/H5FDioc_int.c b/src/H5FDsubfiling/H5FDioc_int.c
index c1ce669..71afef4 100644
--- a/src/H5FDsubfiling/H5FDioc_int.c
+++ b/src/H5FDsubfiling/H5FDioc_int.c
@@ -51,7 +51,7 @@ cast_to_void(const void *data)
{
union {
const void *const_ptr_to_data;
- void * ptr_to_data;
+ void *ptr_to_data;
} eliminate_const_warning;
eliminate_const_warning.const_ptr_to_data = data;
return eliminate_const_warning.ptr_to_data;
@@ -95,11 +95,11 @@ ioc__write_independent_async(int64_t context_id, int n_io_concentrators, int64_t
{
subfiling_context_t *sf_context = NULL;
MPI_Request ack_request = MPI_REQUEST_NULL;
- io_req_t * sf_io_request = NULL;
+ io_req_t *sf_io_request = NULL;
int64_t ioc_start;
int64_t ioc_offset;
int64_t msg[3] = {0};
- int * io_concentrators = NULL;
+ int *io_concentrators = NULL;
int data_tag = 0;
int mpi_code;
herr_t ret_value = SUCCEED;
@@ -245,11 +245,11 @@ ioc__read_independent_async(int64_t context_id, int n_io_concentrators, int64_t
void *data, io_req_t **io_req)
{
subfiling_context_t *sf_context = NULL;
- io_req_t * sf_io_request = NULL;
+ io_req_t *sf_io_request = NULL;
int64_t ioc_start;
int64_t ioc_offset;
int64_t msg[3] = {0};
- int * io_concentrators = NULL;
+ int *io_concentrators = NULL;
int mpi_code;
herr_t ret_value = SUCCEED;
diff --git a/src/H5FDsubfiling/H5FDioc_priv.h b/src/H5FDsubfiling/H5FDioc_priv.h
index 07eb124..7ad7acc 100644
--- a/src/H5FDsubfiling/H5FDioc_priv.h
+++ b/src/H5FDsubfiling/H5FDioc_priv.h
@@ -400,7 +400,7 @@ typedef struct _client_io_args {
int64_t context_id; /* The context id provided for the read or write */
int64_t offset; /* The file offset for the IO operation */
int64_t elements; /* How many bytes */
- void * data; /* A pointer to the (contiguous) data segment */
+ void *data; /* A pointer to the (contiguous) data segment */
MPI_Request io_req; /* An MPI request to allow the code to loop while */
/* making progress on multiple IOs */
} io_args_t;
diff --git a/src/H5FDsubfiling/H5FDioc_threads.c b/src/H5FDsubfiling/H5FDioc_threads.c
index 0d620b5..2d50503 100644
--- a/src/H5FDsubfiling/H5FDioc_threads.c
+++ b/src/H5FDsubfiling/H5FDioc_threads.c
@@ -117,9 +117,9 @@ int
initialize_ioc_threads(void *_sf_context)
{
subfiling_context_t *sf_context = _sf_context;
- ioc_data_t * ioc_data = NULL;
+ ioc_data_t *ioc_data = NULL;
unsigned thread_pool_count = HG_TEST_NUM_THREADS_DEFAULT;
- char * env_value;
+ char *env_value;
int ret_value = 0;
#ifdef H5FD_IOC_COLLECT_STATS
double t_start = 0.0, t_end = 0.0;
@@ -218,7 +218,7 @@ int
finalize_ioc_threads(void *_sf_context)
{
subfiling_context_t *sf_context = _sf_context;
- ioc_data_t * ioc_data = NULL;
+ ioc_data_t *ioc_data = NULL;
int ret_value = 0;
HDassert(sf_context);
@@ -273,7 +273,7 @@ static HG_THREAD_RETURN_TYPE
ioc_thread_main(void *arg)
{
hg_thread_ret_t thread_ret = (hg_thread_ret_t)0;
- ioc_data_t * ioc_data = (ioc_data_t *)arg;
+ ioc_data_t *ioc_data = (ioc_data_t *)arg;
/* Pass along the ioc_data_t */
ioc_main(ioc_data);
@@ -506,9 +506,9 @@ static HG_THREAD_RETURN_TYPE
handle_work_request(void *arg)
{
ioc_io_queue_entry_t *q_entry_ptr = (ioc_io_queue_entry_t *)arg;
- subfiling_context_t * sf_context = NULL;
- sf_work_request_t * msg = &(q_entry_ptr->wk_req);
- ioc_data_t * ioc_data = NULL;
+ subfiling_context_t *sf_context = NULL;
+ sf_work_request_t *msg = &(q_entry_ptr->wk_req);
+ ioc_data_t *ioc_data = NULL;
int64_t file_context_id = msg->header[2];
int op_ret;
hg_thread_ret_t ret_value = 0;
@@ -1000,7 +1000,7 @@ ioc_file_write_data(int fd, int64_t file_offset, void *data_buffer, int64_t data
{
ssize_t bytes_remaining = (ssize_t)data_size;
ssize_t bytes_written = 0;
- char * this_data = (char *)data_buffer;
+ char *this_data = (char *)data_buffer;
int ret_value = 0;
#ifndef H5FD_IOC_DEBUG
@@ -1047,7 +1047,7 @@ ioc_file_read_data(int fd, int64_t file_offset, void *data_buffer, int64_t data_
useconds_t delay = 100;
ssize_t bytes_remaining = (ssize_t)data_size;
ssize_t bytes_read = 0;
- char * this_buffer = (char *)data_buffer;
+ char *this_buffer = (char *)data_buffer;
int retries = MIN_READ_RETRIES;
int ret_value = 0;
diff --git a/src/H5FDsubfiling/H5FDsubfile_int.c b/src/H5FDsubfiling/H5FDsubfile_int.c
index 577762a..af14db3 100644
--- a/src/H5FDsubfiling/H5FDsubfile_int.c
+++ b/src/H5FDsubfiling/H5FDsubfile_int.c
@@ -204,9 +204,9 @@ herr_t
H5FD__subfiling__get_real_eof(hid_t context_id, int64_t *logical_eof_ptr)
{
subfiling_context_t *sf_context = NULL;
- MPI_Request * recv_reqs = NULL;
- int64_t * recv_msg = NULL;
- int64_t * sf_eofs = NULL; /* dynamically allocated array for subfile EOFs */
+ MPI_Request *recv_reqs = NULL;
+ int64_t *recv_msg = NULL;
+ int64_t *sf_eofs = NULL; /* dynamically allocated array for subfile EOFs */
int64_t msg[3] = {0, 0, 0};
int64_t logical_eof = 0;
int64_t sf_logical_eof;
diff --git a/src/H5FDsubfiling/H5FDsubfiling.c b/src/H5FDsubfiling/H5FDsubfiling.c
index 32ac6a8..2b436fe 100644
--- a/src/H5FDsubfiling/H5FDsubfiling.c
+++ b/src/H5FDsubfiling/H5FDsubfiling.c
@@ -189,8 +189,8 @@ typedef struct H5FD_subfiling_t {
/* Prototypes */
static herr_t H5FD__subfiling_term(void);
-static void * H5FD__subfiling_fapl_get(H5FD_t *_file);
-static void * H5FD__subfiling_fapl_copy(const void *_old_fa);
+static void *H5FD__subfiling_fapl_get(H5FD_t *_file);
+static void *H5FD__subfiling_fapl_copy(const void *_old_fa);
static herr_t H5FD__subfiling_fapl_free(void *_fa);
static H5FD_t *H5FD__subfiling_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr);
static herr_t H5FD__subfiling_close(H5FD_t *_file);
@@ -460,7 +460,7 @@ herr_t
H5Pset_fapl_subfiling(hid_t fapl_id, H5FD_subfiling_config_t *vfd_config)
{
H5FD_subfiling_config_t *subfiling_conf = NULL;
- H5P_genplist_t * plist = NULL;
+ H5P_genplist_t *plist = NULL;
herr_t ret_value = SUCCEED;
/*NO TRACE*/
@@ -514,7 +514,7 @@ herr_t
H5Pget_fapl_subfiling(hid_t fapl_id, H5FD_subfiling_config_t *config_out)
{
const H5FD_subfiling_config_t *config_ptr = NULL;
- H5P_genplist_t * plist = NULL;
+ H5P_genplist_t *plist = NULL;
hbool_t use_default_config = FALSE;
herr_t ret_value = SUCCEED;
@@ -557,7 +557,7 @@ H5FD__subfiling_get_default_config(hid_t fapl_id, H5FD_subfiling_config_t *confi
{
MPI_Comm comm = MPI_COMM_NULL;
MPI_Info info = MPI_INFO_NULL;
- char * h5_require_ioc;
+ char *h5_require_ioc;
herr_t ret_value = SUCCEED;
HDassert(config_out);
@@ -676,9 +676,9 @@ done:
static void *
H5FD__subfiling_fapl_get(H5FD_t *_file)
{
- H5FD_subfiling_t * file = (H5FD_subfiling_t *)_file;
+ H5FD_subfiling_t *file = (H5FD_subfiling_t *)_file;
H5FD_subfiling_config_t *fa = NULL;
- void * ret_value = NULL;
+ void *ret_value = NULL;
fa = (H5FD_subfiling_config_t *)H5MM_calloc(sizeof(H5FD_subfiling_config_t));
@@ -762,8 +762,8 @@ static void *
H5FD__subfiling_fapl_copy(const void *_old_fa)
{
const H5FD_subfiling_config_t *old_fa = (const H5FD_subfiling_config_t *)_old_fa;
- H5FD_subfiling_config_t * new_fa = NULL;
- void * ret_value = NULL;
+ H5FD_subfiling_config_t *new_fa = NULL;
+ void *ret_value = NULL;
new_fa = (H5FD_subfiling_config_t *)H5MM_malloc(sizeof(H5FD_subfiling_config_t));
if (new_fa == NULL) {
@@ -836,17 +836,17 @@ H5FD__subfiling_fapl_free(void *_fa)
static H5FD_t *
H5FD__subfiling_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
{
- H5FD_subfiling_t * file_ptr = NULL; /* Subfiling VFD info */
+ H5FD_subfiling_t *file_ptr = NULL; /* Subfiling VFD info */
const H5FD_subfiling_config_t *config_ptr = NULL; /* Driver-specific property list */
H5FD_subfiling_config_t default_config;
- H5FD_class_t * driver = NULL; /* VFD for file */
- H5P_genplist_t * plist_ptr = NULL;
+ H5FD_class_t *driver = NULL; /* VFD for file */
+ H5P_genplist_t *plist_ptr = NULL;
H5FD_driver_prop_t driver_prop; /* Property for driver ID & info */
hbool_t bcasted_inode = FALSE;
hbool_t bcasted_eof = FALSE;
int64_t sf_eof = -1;
int mpi_code; /* MPI return code */
- H5FD_t * ret_value = NULL;
+ H5FD_t *ret_value = NULL;
/* Check arguments */
if (!name || !*name)
@@ -961,7 +961,7 @@ H5FD__subfiling_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t ma
if (driver->value == H5_VFD_IOC) {
h5_stat_t sb;
uint64_t fid;
- void * file_handle = NULL;
+ void *file_handle = NULL;
if (file_ptr->mpi_rank == 0) {
if (H5FDget_vfd_handle(file_ptr->sf_file, file_ptr->fa.ioc_fapl_id, &file_handle) < 0)
@@ -1000,7 +1000,7 @@ H5FD__subfiling_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t ma
if (file_ptr->mpi_rank == 0) {
if (file_ptr->sf_file) {
h5_stat_t sb;
- void * file_handle = NULL;
+ void *file_handle = NULL;
if (H5FDget_vfd_handle(file_ptr->sf_file, file_ptr->fa.ioc_fapl_id, &file_handle) < 0)
H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTGET, NULL, "can't get file handle");
@@ -1419,14 +1419,14 @@ H5FD__subfiling_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr
void *buf /*out*/)
{
subfiling_context_t *sf_context = NULL;
- H5FD_subfiling_t * file_ptr = (H5FD_subfiling_t *)_file;
- H5FD_mem_t * io_types = NULL;
- haddr_t * io_addrs = NULL;
- size_t * io_sizes = NULL;
- void ** io_bufs = NULL;
- int64_t * source_data_offset = NULL;
- int64_t * sf_data_size = NULL;
- int64_t * sf_offset = NULL;
+ H5FD_subfiling_t *file_ptr = (H5FD_subfiling_t *)_file;
+ H5FD_mem_t *io_types = NULL;
+ haddr_t *io_addrs = NULL;
+ size_t *io_sizes = NULL;
+ void **io_bufs = NULL;
+ int64_t *source_data_offset = NULL;
+ int64_t *sf_data_size = NULL;
+ int64_t *sf_offset = NULL;
hbool_t rank0_bcast = FALSE;
int ioc_total;
herr_t ret_value = SUCCEED;
@@ -1688,14 +1688,14 @@ H5FD__subfiling_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t add
const void *buf /*in*/)
{
subfiling_context_t *sf_context = NULL;
- H5FD_subfiling_t * file_ptr = (H5FD_subfiling_t *)_file;
- const void ** io_bufs = NULL;
- H5FD_mem_t * io_types = NULL;
- haddr_t * io_addrs = NULL;
- size_t * io_sizes = NULL;
- int64_t * source_data_offset = NULL;
- int64_t * sf_data_size = NULL;
- int64_t * sf_offset = NULL;
+ H5FD_subfiling_t *file_ptr = (H5FD_subfiling_t *)_file;
+ const void **io_bufs = NULL;
+ H5FD_mem_t *io_types = NULL;
+ haddr_t *io_addrs = NULL;
+ size_t *io_sizes = NULL;
+ int64_t *source_data_offset = NULL;
+ int64_t *sf_data_size = NULL;
+ int64_t *sf_offset = NULL;
int ioc_total;
herr_t ret_value = SUCCEED;
@@ -2421,7 +2421,7 @@ H5FD__subfiling_del(const char *name, hid_t fapl)
{
const H5FD_subfiling_config_t *subfiling_config = NULL;
H5FD_subfiling_config_t default_config;
- H5P_genplist_t * plist = NULL;
+ H5P_genplist_t *plist = NULL;
herr_t ret_value = SUCCEED;
if (NULL == (plist = H5P_object_verify(fapl, H5P_FILE_ACCESS)))
diff --git a/src/H5FDsubfiling/H5subfiling_common.c b/src/H5FDsubfiling/H5subfiling_common.c
index 980a1b3..25e80fb 100644
--- a/src/H5FDsubfiling/H5subfiling_common.c
+++ b/src/H5FDsubfiling/H5subfiling_common.c
@@ -50,7 +50,7 @@ char H5subfiling_mpi_error_str[MPI_MAX_ERROR_STRING];
int H5subfiling_mpi_error_str_len;
static subfiling_context_t *sf_context_cache = NULL;
-static sf_topology_t * sf_topology_cache = NULL;
+static sf_topology_t *sf_topology_cache = NULL;
static size_t sf_context_cache_limit = 16;
static size_t sf_topology_cache_limit = 4;
@@ -105,7 +105,7 @@ static int get_next_fid_map_index(void);
static void clear_fid_map_entry(uint64_t sf_fid, int64_t sf_context_id);
static int compare_hostid(const void *h1, const void *h2);
static herr_t get_ioc_selection_criteria_from_env(ioc_selection_t *ioc_selection_type,
- char ** ioc_sel_info_str);
+ char **ioc_sel_info_str);
static int count_nodes(sf_topology_t *info, MPI_Comm comm);
static herr_t gather_topology_info(sf_topology_t *info, MPI_Comm comm);
static int identify_ioc_ranks(sf_topology_t *info, int node_count, int iocs_per_node);
@@ -549,7 +549,7 @@ static inline void
assign_ioc_ranks(sf_topology_t *app_topology, int ioc_count, int rank_multiple)
{
app_layout_t *app_layout = NULL;
- int * io_concentrators = NULL;
+ int *io_concentrators = NULL;
HDassert(app_topology);
HDassert(app_topology->app_layout);
@@ -667,7 +667,7 @@ H5_get_subfiling_object(int64_t object_id)
/* Make more space in context cache if needed */
if ((size_t)obj_index == sf_context_cache_limit) {
size_t old_num_entries;
- void * tmp_realloc;
+ void *tmp_realloc;
old_num_entries = sf_context_cache_limit;
@@ -1095,7 +1095,7 @@ static herr_t
init_subfiling(ioc_selection_t ioc_selection_type, MPI_Comm comm, int64_t *context_id_out)
{
subfiling_context_t *new_context = NULL;
- sf_topology_t * app_topology = NULL;
+ sf_topology_t *app_topology = NULL;
int64_t context_id = -1;
int file_index = -1;
herr_t ret_value = SUCCEED;
@@ -1210,10 +1210,10 @@ static herr_t
init_app_topology(ioc_selection_t ioc_selection_type, MPI_Comm comm, sf_topology_t **app_topology_out)
{
sf_topology_t *app_topology = NULL;
- app_layout_t * app_layout = sf_app_layout;
- char * env_value = NULL;
- char * ioc_sel_str = NULL;
- int * io_concentrators = NULL;
+ app_layout_t *app_layout = sf_app_layout;
+ char *env_value = NULL;
+ char *ioc_sel_str = NULL;
+ int *io_concentrators = NULL;
long ioc_select_val = -1;
long iocs_per_node = 1;
int ioc_count = 0;
@@ -1511,7 +1511,7 @@ done:
static herr_t
init_subfiling_context(subfiling_context_t *sf_context, sf_topology_t *app_topology, MPI_Comm file_comm)
{
- char * env_value = NULL;
+ char *env_value = NULL;
int comm_rank;
int mpi_code;
herr_t ret_value = SUCCEED;
@@ -1959,9 +1959,9 @@ ioc_open_file(sf_work_request_t *msg, int file_acc_flags)
int64_t file_context_id;
hbool_t mutex_locked = FALSE;
mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
- char * filepath = NULL;
- char * subfile_dir = NULL;
- char * base = NULL;
+ char *filepath = NULL;
+ char *subfile_dir = NULL;
+ char *base = NULL;
int fd = -1;
herr_t ret_value = SUCCEED;
@@ -2073,11 +2073,11 @@ static herr_t
generate_subfile_name(subfiling_context_t *sf_context, int file_acc_flags, char *filename_out,
size_t filename_out_len, char **filename_basename_out, char **subfile_dir_out)
{
- FILE * config_file = NULL;
- char * config_buf = NULL;
- char * subfile_dir = NULL;
- char * prefix = NULL;
- char * base = NULL;
+ FILE *config_file = NULL;
+ char *config_buf = NULL;
+ char *subfile_dir = NULL;
+ char *prefix = NULL;
+ char *base = NULL;
int n_io_concentrators;
int num_digits;
herr_t ret_value = SUCCEED;
@@ -2323,9 +2323,9 @@ create_config_file(subfiling_context_t *sf_context, const char *base_filename, c
hbool_t truncate_if_exists)
{
hbool_t config_file_exists = FALSE;
- FILE * config_file = NULL;
- char * config_filename = NULL;
- char * line_buf = NULL;
+ FILE *config_file = NULL;
+ char *config_filename = NULL;
+ char *line_buf = NULL;
int ret = 0;
herr_t ret_value = SUCCEED;
@@ -2505,8 +2505,8 @@ open_config_file(subfiling_context_t *sf_context, const char *base_filename, con
const char *mode, FILE **config_file_out)
{
hbool_t config_file_exists = FALSE;
- FILE * config_file = NULL;
- char * config_filename = NULL;
+ FILE *config_file = NULL;
+ char *config_filename = NULL;
int ret = 0;
herr_t ret_value = SUCCEED;
diff --git a/src/H5FDsubfiling/H5subfiling_common.h b/src/H5FDsubfiling/H5subfiling_common.h
index cfcbf4a..19c5c0c 100644
--- a/src/H5FDsubfiling/H5subfiling_common.h
+++ b/src/H5FDsubfiling/H5subfiling_common.h
@@ -156,7 +156,7 @@ typedef struct {
typedef struct app_layout_t {
long hostid; /* value returned by gethostid() */
layout_t *layout; /* Vector of {rank,hostid} values */
- int * node_ranks; /* ranks extracted from sorted layout */
+ int *node_ranks; /* ranks extracted from sorted layout */
int node_count; /* Total nodes (different hostids) */
int node_index; /* My node: index into node_ranks */
int local_peers; /* How may local peers on my node */
@@ -166,12 +166,12 @@ typedef struct app_layout_t {
/* This typedef defines things related to IOC selections */
typedef struct topology {
- app_layout_t * app_layout; /* Pointer to our layout struct */
+ app_layout_t *app_layout; /* Pointer to our layout struct */
bool rank_is_ioc; /* Indicates that we host an IOC */
int subfile_rank; /* Valid only if rank_is_ioc */
int n_io_concentrators; /* Number of IO concentrators */
- int * io_concentrators; /* Vector of ranks which are IOCs */
- int * subfile_fd; /* file descriptor (if IOC) */
+ int *io_concentrators; /* Vector of ranks which are IOCs */
+ int *subfile_fd; /* file descriptor (if IOC) */
ioc_selection_t selection_type; /* Cache our IOC selection criteria */
} sf_topology_t;
@@ -194,10 +194,10 @@ typedef struct {
int sf_group_size; /* IOC count (in sf_group_comm) */
int sf_group_rank; /* IOC rank (in sf_group_comm) */
int sf_intercomm_root; /* Not used: for IOC comms */
- char * subfile_prefix; /* If subfiles are node-local */
- char * sf_filename; /* A generated subfile name */
- char * h5_filename; /* The user supplied file name */
- void * ioc_data; /* Private data for underlying IOC */
+ char *subfile_prefix; /* If subfiles are node-local */
+ char *sf_filename; /* A generated subfile name */
+ char *h5_filename; /* The user supplied file name */
+ void *ioc_data; /* Private data for underlying IOC */
sf_topology_t *topology; /* pointer to our topology */
#ifdef H5_SUBFILING_DEBUG
@@ -242,7 +242,7 @@ H5_DLL herr_t H5_open_subfiles(const char *base_filename, uint64_t h5_file_id,
H5_DLL herr_t H5_close_subfiles(int64_t subfiling_context_id);
H5_DLL int64_t H5_new_subfiling_object_id(sf_obj_type_t obj_type, int64_t index_val);
-H5_DLL void * H5_get_subfiling_object(int64_t object_id);
+H5_DLL void *H5_get_subfiling_object(int64_t object_id);
H5_DLL int64_t H5_subfile_fid_to_context(uint64_t h5_fid);
H5_DLL herr_t H5_free_subfiling_object(int64_t object_id);
diff --git a/src/H5FDsubfiling/mercury/src/util/mercury_dlog.c b/src/H5FDsubfiling/mercury/src/util/mercury_dlog.c
index 7dd5104..2589795 100644
--- a/src/H5FDsubfiling/mercury/src/util/mercury_dlog.c
+++ b/src/H5FDsubfiling/mercury/src/util/mercury_dlog.c
@@ -37,7 +37,7 @@ struct hg_dlog *
hg_dlog_alloc(char *name, unsigned int lesize, int leloop)
{
struct hg_dlog_entry *le;
- struct hg_dlog * d;
+ struct hg_dlog *d;
le = malloc(sizeof(*le) * lesize);
if (!le)
@@ -249,7 +249,7 @@ hg_dlog_dump_file(struct hg_dlog *d, const char *base, int addpid, int trylock)
{
char buf[2048];
int pid;
- FILE * fp = NULL;
+ FILE *fp = NULL;
unsigned int left, idx;
struct hg_dlog_dcount32 *dc32;
struct hg_dlog_dcount64 *dc64;
diff --git a/src/H5FDsubfiling/mercury/src/util/mercury_dlog.h b/src/H5FDsubfiling/mercury/src/util/mercury_dlog.h
index 0027fde..81182f5 100644
--- a/src/H5FDsubfiling/mercury/src/util/mercury_dlog.h
+++ b/src/H5FDsubfiling/mercury/src/util/mercury_dlog.h
@@ -49,11 +49,11 @@
* hg_dlog_entry: an entry in the dlog
*/
struct hg_dlog_entry {
- const char * file; /* file name */
+ const char *file; /* file name */
unsigned int line; /* line number */
- const char * func; /* function name */
- const char * msg; /* entry message (optional) */
- const void * data; /* user data (optional) */
+ const char *func; /* function name */
+ const char *msg; /* entry message (optional) */
+ const void *data; /* user data (optional) */
hg_time_t time; /* time added to log */
};
@@ -61,8 +61,8 @@ struct hg_dlog_entry {
* hg_dlog_dcount32: 32-bit debug counter in the dlog
*/
struct hg_dlog_dcount32 {
- const char * name; /* counter name (short) */
- const char * descr; /* description of counter */
+ const char *name; /* counter name (short) */
+ const char *descr; /* description of counter */
hg_atomic_int32_t c; /* the counter itself */
HG_LIST_ENTRY(hg_dlog_dcount32) l; /* linkage */
};
@@ -71,8 +71,8 @@ struct hg_dlog_dcount32 {
* hg_dlog_dcount64: 64-bit debug counter in the dlog
*/
struct hg_dlog_dcount64 {
- const char * name; /* counter name (short) */
- const char * descr; /* description of counter */
+ const char *name; /* counter name (short) */
+ const char *descr; /* description of counter */
hg_atomic_int64_t c; /* the counter itself */
HG_LIST_ENTRY(hg_dlog_dcount64) l; /* linkage */
};
diff --git a/src/H5FDsubfiling/mercury/src/util/mercury_list.h b/src/H5FDsubfiling/mercury/src/util/mercury_list.h
index 7b66c23..1de32c5 100644
--- a/src/H5FDsubfiling/mercury/src/util/mercury_list.h
+++ b/src/H5FDsubfiling/mercury/src/util/mercury_list.h
@@ -59,7 +59,7 @@
#define HG_LIST_ENTRY(struct_entry_name) \
struct { \
- struct struct_entry_name * next; \
+ struct struct_entry_name *next; \
struct struct_entry_name **prev; \
}
diff --git a/src/H5FDsubfiling/mercury/src/util/mercury_log.c b/src/H5FDsubfiling/mercury/src/util/mercury_log.c
index def1abe..f77ba23 100644
--- a/src/H5FDsubfiling/mercury/src/util/mercury_log.c
+++ b/src/H5FDsubfiling/mercury/src/util/mercury_log.c
@@ -303,7 +303,7 @@ const char *
hg_log_get_subsys(void)
{
static char log_subsys[HG_LOG_SUBSYS_MAX * (HG_LOG_SUBSYS_NAME_MAX + 2)] = "\0";
- char * p = log_subsys;
+ char *p = log_subsys;
int i = 0;
while (hg_log_subsys_g[i][0] != '\0' && i < HG_LOG_SUBSYS_MAX) {
@@ -324,7 +324,7 @@ void
hg_log_set_subsys_level(const char *subsys, enum hg_log_level log_level)
{
const char *log_subsys = hg_log_get_subsys();
- char * new_subsys = NULL;
+ char *new_subsys = NULL;
const char *new_subsys_ptr;
if (strcmp(log_subsys, "") != 0) {
@@ -451,7 +451,7 @@ hg_log_write(struct hg_log_outlet *hg_log_outlet, enum hg_log_level log_level, c
unsigned int line, const char *func, const char *format, ...)
{
char buf[HG_LOG_BUF_MAX];
- FILE * stream = NULL;
+ FILE *stream = NULL;
const char *level_name = NULL;
#ifdef HG_UTIL_HAS_LOG_COLOR
const char *color = hg_log_colors_g[log_level];
diff --git a/src/H5FDsubfiling/mercury/src/util/mercury_log.h b/src/H5FDsubfiling/mercury/src/util/mercury_log.h
index a550d97..8076272 100644
--- a/src/H5FDsubfiling/mercury/src/util/mercury_log.h
+++ b/src/H5FDsubfiling/mercury/src/util/mercury_log.h
@@ -179,11 +179,11 @@ enum hg_log_state { HG_LOG_PASS, HG_LOG_OFF, HG_LOG_ON };
/* Log outlet */
struct hg_log_outlet {
- const char * name; /* Name of outlet */
+ const char *name; /* Name of outlet */
enum hg_log_state state; /* Init state of outlet */
enum hg_log_level level; /* Level of outlet */
struct hg_log_outlet *parent; /* Parent of outlet */
- struct hg_dlog * debug_log; /* Debug log to use */
+ struct hg_dlog *debug_log; /* Debug log to use */
HG_QUEUE_ENTRY(hg_log_outlet) entry; /* List entry */
};
diff --git a/src/H5FDsubfiling/mercury/src/util/mercury_queue.h b/src/H5FDsubfiling/mercury/src/util/mercury_queue.h
index 07d977f..6cc65f7 100644
--- a/src/H5FDsubfiling/mercury/src/util/mercury_queue.h
+++ b/src/H5FDsubfiling/mercury/src/util/mercury_queue.h
@@ -49,13 +49,13 @@
#define HG_QUEUE_HEAD_DECL(struct_head_name, struct_entry_name) \
struct struct_head_name { \
- struct struct_entry_name * head; \
+ struct struct_entry_name *head; \
struct struct_entry_name **tail; \
}
#define HG_QUEUE_HEAD(struct_entry_name) \
struct { \
- struct struct_entry_name * head; \
+ struct struct_entry_name *head; \
struct struct_entry_name **tail; \
}
diff --git a/src/H5FDsubfiling/mercury/src/util/mercury_thread.h b/src/H5FDsubfiling/mercury/src/util/mercury_thread.h
index 185d997..d199bc7 100644
--- a/src/H5FDsubfiling/mercury/src/util/mercury_thread.h
+++ b/src/H5FDsubfiling/mercury/src/util/mercury_thread.h
@@ -25,7 +25,7 @@ typedef DWORD_PTR hg_cpu_set_t;
#include <pthread.h>
typedef pthread_t hg_thread_t;
typedef void *(*hg_thread_func_t)(void *);
-typedef void * hg_thread_ret_t;
+typedef void *hg_thread_ret_t;
#define HG_THREAD_RETURN_TYPE hg_thread_ret_t
typedef pthread_key_t hg_thread_key_t;
#ifdef __APPLE__
diff --git a/src/H5FDsubfiling/mercury/src/util/mercury_thread_pool.c b/src/H5FDsubfiling/mercury/src/util/mercury_thread_pool.c
index 76248d1..cbb7563 100644
--- a/src/H5FDsubfiling/mercury/src/util/mercury_thread_pool.c
+++ b/src/H5FDsubfiling/mercury/src/util/mercury_thread_pool.c
@@ -21,7 +21,7 @@
struct hg_thread_pool_private {
struct hg_thread_pool pool;
unsigned int thread_count;
- hg_thread_t * threads;
+ hg_thread_t *threads;
};
/********************/
@@ -42,7 +42,7 @@ static HG_THREAD_RETURN_TYPE
hg_thread_pool_worker(void *args)
{
hg_thread_ret_t ret = 0;
- hg_thread_pool_t * pool = (hg_thread_pool_t *)args;
+ hg_thread_pool_t *pool = (hg_thread_pool_t *)args;
struct hg_thread_work *work;
while (1) {
diff --git a/src/H5FDsubfiling/mercury/src/util/mercury_thread_pool.h b/src/H5FDsubfiling/mercury/src/util/mercury_thread_pool.h
index b399f66..e3b9f4d 100644
--- a/src/H5FDsubfiling/mercury/src/util/mercury_thread_pool.h
+++ b/src/H5FDsubfiling/mercury/src/util/mercury_thread_pool.h
@@ -27,7 +27,7 @@ struct hg_thread_pool {
struct hg_thread_work {
hg_thread_func_t func;
- void * args;
+ void *args;
HG_QUEUE_ENTRY(hg_thread_work) entry; /* Internal */
};