summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5FDioc.c11
-rw-r--r--src/H5FDioc_threads.c5
-rw-r--r--src/H5FDsubfile_int.c2
-rw-r--r--src/H5FDsubfile_mpi.c10
-rw-r--r--src/H5FDsubfiling.c11
-rw-r--r--src/H5FDsubfiling.h1
-rw-r--r--src/H5FDsubfiling_priv.h2
7 files changed, 13 insertions, 29 deletions
diff --git a/src/H5FDioc.c b/src/H5FDioc.c
index ef2d9ec..b00fb51 100644
--- a/src/H5FDioc.c
+++ b/src/H5FDioc.c
@@ -854,11 +854,7 @@ H5FD__ioc_open(const char *name, unsigned flags, hid_t ioc_fapl_id, haddr_t maxa
else if (file_ptr->inode > 0) { /* No errors opening the subfiles */
subfiling_context_t *sf_context = get__subfiling_object(file_ptr->fa.common.context_id);
-#if 0 /* JRM */ /* original */
- if (sf_context) {
-#else /* JRM */ /* Richard's fix */
- if (sf_context && sf_context->topology->rank_is_ioc) {
-#endif
+ if (sf_context && sf_context->topology->rank_is_ioc) {
if (initialize_ioc_threads(sf_context) < 0) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "Unable to initialize IOC threads")
}
@@ -873,10 +869,7 @@ else
ret_value = (H5FD_t *)file_ptr;
-done :
-
- if (NULL == ret_value)
-{
+done : if (NULL == ret_value) {
if (file_ptr) {
if (file_ptr->ioc_file)
H5FD_close(file_ptr->ioc_file);
diff --git a/src/H5FDioc_threads.c b/src/H5FDioc_threads.c
index e7c7f24..3a7ee84 100644
--- a/src/H5FDioc_threads.c
+++ b/src/H5FDioc_threads.c
@@ -432,6 +432,7 @@ tpool_add_work(void *_work)
work->in_progress = 0;
hg_thread_mutex_lock(&ioc_mutex);
if (check__overlap(_work, work_index, &conflict_id) > 0) {
+#ifdef VERBOSE
const char * type = (work->tag == WRITE_INDEP ? "WRITE" : "READ");
sf_work_request_t *next = (sf_work_request_t *)(pool_request[conflict_id].args);
printf("%s - (%d) Found conflict: index=%d: work(offset=%ld,length=%ld) conflict(offset=%ld, "
@@ -439,10 +440,6 @@ tpool_add_work(void *_work)
type, work_index, conflict_id, work->header[1], work->header[0], next->header[1],
next->header[0]);
fflush(stdout);
-#if 0
- add_delayed(work, conflict_id);
- hg_thread_mutex_unlock(&ioc_mutex);
- return 0;
#endif
}
diff --git a/src/H5FDsubfile_int.c b/src/H5FDsubfile_int.c
index 7140047..0d231fa 100644
--- a/src/H5FDsubfile_int.c
+++ b/src/H5FDsubfile_int.c
@@ -70,6 +70,7 @@ static stat_record_t subfiling_stats[TOTAL_STAT_COUNT];
#define SF_READ_TIME (subfiling_stats[READ_STAT].total / (double)subfiling_stats[READ_STAT].op_count)
#define SF_READ_WAIT_TIME (subfiling_stats[READ_WAIT].total / (double)subfiling_stats[READ_WAIT].op_count)
#define SF_QUEUE_DELAYS (subfiling_stats[QUEUE_STAT].total)
+
#define SF_ALIGNMENT 8
static void
@@ -557,6 +558,7 @@ close__subfiles(subfiling_context_t *sf_context, uint64_t fid)
sf_logfile = NULL;
}
}
+
#endif
}
if (sf_context->h5_filename) {
diff --git a/src/H5FDsubfile_mpi.c b/src/H5FDsubfile_mpi.c
index 5963870..2204d8d 100644
--- a/src/H5FDsubfile_mpi.c
+++ b/src/H5FDsubfile_mpi.c
@@ -43,7 +43,6 @@ atomic_int sf_file_refcount = 0;
atomic_int sf_ioc_fini_refcount = 0;
atomic_int sf_ioc_ready = 0;
atomic_int sf_shutdown_flag = 0;
-// volatile int sf_shutdown_flag = 0;
/*
* Structure definitions to enable async io completions
@@ -1002,7 +1001,6 @@ write__independent_async(int n_io_concentrators, hid_t context_id, int64_t offse
fflush(stdout);
#endif
status = MPI_Send(msg, 3, MPI_INT64_T, io_concentrator[ioc_start], WRITE_INDEP, sf_context->sf_msg_comm);
-
if (status != MPI_SUCCESS) {
int len;
char estring[MPI_MAX_ERROR_STRING];
@@ -1827,14 +1825,9 @@ int
subfiling_open_file(sf_work_request_t *msg, int subfile_rank, int flags)
{
int errors = 0;
-#if 0
- char filepath[PATH_MAX];
- char config[PATH_MAX];
- char linebuf[PATH_MAX];
-#else
char filepath[PATH_MAX];
char linebuf[PATH_MAX];
-#endif
+
char * temp = NULL;
char * prefix = NULL;
char * subfile_dir = NULL;
@@ -1968,7 +1961,6 @@ subfiling_open_file(sf_work_request_t *msg, int subfile_rank, int flags)
done:
t_end = MPI_Wtime();
-
if (base)
HDfree(base);
if (subfile_dir)
diff --git a/src/H5FDsubfiling.c b/src/H5FDsubfiling.c
index fc8ecb0..b19df57 100644
--- a/src/H5FDsubfiling.c
+++ b/src/H5FDsubfiling.c
@@ -898,8 +898,8 @@ done:
static herr_t
H5FD__subfiling_close(H5FD_t *_file)
{
- H5FD_subfiling_t * file_ptr = (H5FD_subfiling_t *)_file;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_subfiling_t *file_ptr = (H5FD_subfiling_t *)_file;
+ herr_t ret_value = SUCCEED; /* Return value */
subfiling_context_t *sf_context = NULL;
FUNC_ENTER_NOAPI_NOINIT
@@ -910,7 +910,6 @@ H5FD__subfiling_close(H5FD_t *_file)
sf_context = (subfiling_context_t *)get__subfiling_object(file_ptr->fa.common.context_id);
#ifdef VERBOSE
-
if (sf_context->topology->rank_is_ioc)
printf("[%s %d] fd=%d\n", __func__, file_ptr->mpi_rank, sf_context->sf_fid);
else
@@ -1182,9 +1181,9 @@ H5FD__subfiling_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t a
static haddr_t
H5FD__subfiling_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
- const H5FD_subfiling_t *file = (const H5FD_subfiling_t *)_file;
- haddr_t ret_value = HADDR_UNDEF;
- haddr_t local_eof, global_eof = 0;
+ H5FD_subfiling_t *file = (const H5FD_subfiling_t *)_file;
+ haddr_t ret_value = HADDR_UNDEF;
+ haddr_t local_eof, global_eof = 0;
FUNC_ENTER_STATIC
local_eof = H5FD_get_eof(file->sf_file, type);
diff --git a/src/H5FDsubfiling.h b/src/H5FDsubfiling.h
index fdaf93e..93a2b0a 100644
--- a/src/H5FDsubfiling.h
+++ b/src/H5FDsubfiling.h
@@ -234,6 +234,7 @@ H5_DLL herr_t H5FD__write_vector(hid_t h5_fid, hssize_t count, haddr_t *addrs, h
H5_DLL int H5FD__truncate(hid_t h5_fid, haddr_t addr);
H5_DLL int H5FD__shutdown_local_ioc(hid_t fid);
H5_DLL void manage_client_logfile(int client_rank, int flag_value);
+H5_DLL int initialize_ioc_threads(void *sf_context);
H5_DLL herr_t H5FD__write_vector_internal(hid_t h5_fid, hssize_t count, haddr_t addrs[], size_t sizes[],
const void *bufs[] /* data_in */);
diff --git a/src/H5FDsubfiling_priv.h b/src/H5FDsubfiling_priv.h
index a242884..4753423 100644
--- a/src/H5FDsubfiling_priv.h
+++ b/src/H5FDsubfiling_priv.h
@@ -280,7 +280,7 @@ typedef struct app_layout_t {
int * node_ranks; /* ranks extracted from sorted layout */
int node_count; /* Total nodes (differnt hostids) */
int node_index; /* My node: index into node_ranks */
- int local_peers; /* How may local peers on my node (NOT USED) */
+ int local_peers; /* How may local peers on my node */
int world_rank; /* My MPI rank */
int world_size; /* Total number of MPI ranks */
} app_layout_t;