From 72268e7d677584674c25190bacb3dd3162c41e2a Mon Sep 17 00:00:00 2001 From: Richard Warren Date: Tue, 23 Jun 2020 14:59:57 -0400 Subject: Update Makefile.am files and fix issues unearthed by building with autotools --- src/H5FDsubfile.c | 12 ++++++++++-- src/H5FDsubfile_private.h | 3 +++ src/H5FDsubfile_threads.c | 2 +- src/Makefile.am | 6 ++++-- testpar/Makefile.am | 3 ++- 5 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/H5FDsubfile.c b/src/H5FDsubfile.c index 2b94f0d..accded7 100644 --- a/src/H5FDsubfile.c +++ b/src/H5FDsubfile.c @@ -191,8 +191,9 @@ H5FDsubfiling_init(void) int world_rank, world_size; sf_topology_t *thisApp = NULL; subfiling_context_t *newContext = NULL; - + FUNC_ENTER_API(FAIL) + H5TRACE0("e",""); if (MPI_Comm_size(MPI_COMM_WORLD, &world_size) != MPI_SUCCESS) { puts("MPI_Comm_size returned an error"); @@ -224,6 +225,8 @@ H5FDsubfiling_init(void) } done: + FUNC_LEAVE_API(ret_value) + return ret_value; } @@ -231,6 +234,9 @@ herr_t H5FDsubfiling_finalize(void) { herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_API(FAIL) + H5TRACE0("e",""); /* Shutdown the IO Concentrator threads */ sf_shutdown_flag = 1; @@ -238,11 +244,13 @@ H5FDsubfiling_finalize(void) MPI_Barrier(MPI_COMM_WORLD); delete_subfiling_context(context_id); + FUNC_LEAVE_API(ret_value) +done: return ret_value; } hid_t -get_subfiling_context() +get_subfiling_context(void) { return context_id; } diff --git a/src/H5FDsubfile_private.h b/src/H5FDsubfile_private.h index cacfdb9..0774d7f 100644 --- a/src/H5FDsubfile_private.h +++ b/src/H5FDsubfile_private.h @@ -177,7 +177,10 @@ H5_DLL int decrement_file_ref_counts( int subfile_rank, int source, MPI_Comm com H5_DLL int sf_open_subfiles(hid_t context_id, char *prefix, int flags); H5_DLL int sf_close_subfiles(hid_t context_id); H5_DLL int sf_write_data(int fd, int64_t file_offset, void *data_buffer, int64_t data_size, int subfile_rank); +H5_DLL int sf_read_independent(hid_t context_id, int64_t offset, int64_t elements, int dtype_extent, void *data); +H5_DLL int sf_write_independent(hid_t context_id, int64_t offset, int64_t elements, int dtype_extent, void *data); H5_DLL int sf_read_data(int fd, int64_t file_offset, void *data_buffer, int64_t data_size, int subfile_rank); H5_DLL void delete_subfiling_context(hid_t context_id); +H5_DLL void finalize_ioc_threads(void); #endif diff --git a/src/H5FDsubfile_threads.c b/src/H5FDsubfile_threads.c index bc9e352..9c54a53 100644 --- a/src/H5FDsubfile_threads.c +++ b/src/H5FDsubfile_threads.c @@ -59,7 +59,7 @@ err_exit: } -void __attribute__((destructor)) finalize_ioc_threads() +void __attribute__((destructor)) finalize_ioc_threads(void) { if (ioc_thread_pool != NULL) { hg_thread_pool_destroy(ioc_thread_pool); diff --git a/src/Makefile.am b/src/Makefile.am index 787b502..5fd9be0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -118,7 +118,8 @@ libhdf5_la_SOURCES= H5.c H5checksum.c H5dbg.c H5lib_settings.c H5system.c \ # Only compile parallel sources if necessary if BUILD_PARALLEL_CONDITIONAL - libhdf5_la_SOURCES += H5mpi.c H5ACmpio.c H5Cmpio.c H5Dmpio.c H5Fmpi.c H5FDmpi.c H5FDmpio.c H5Smpio.c + libhdf5_la_SOURCES += H5mpi.c H5ACmpio.c H5Cmpio.c H5Dmpio.c H5Fmpi.c H5FDmpi.c H5FDmpio.c H5Smpio.c \ + H5FDsubfile.c H5FDsubfile_threads.c H5FDsubfile_mpi.c endif # Only compile the direct VFD if necessary @@ -150,7 +151,8 @@ include_HEADERS = hdf5.h H5api_adpt.h H5overflow.h H5pubconf.h H5public.h H5vers H5Rpublic.h H5Spublic.h H5Tpublic.h \ H5VLconnector.h H5VLconnector_passthru.h \ H5VLnative.h H5VLpassthru.h H5VLpublic.h \ - H5Zpublic.h + H5Zpublic.h H5FDsubfile_public.h H5FDsubfile_private.h \ + mercury/mercury_thread.h mercury/mercury_thread_mutex.h mercury/mercury_log.h # install libhdf5.settings in lib directory settingsdir=$(libdir) diff --git a/testpar/Makefile.am b/testpar/Makefile.am index 4509945..9f8eca9 100644 --- a/testpar/Makefile.am +++ b/testpar/Makefile.am @@ -30,7 +30,8 @@ check_SCRIPTS = $(TEST_SCRIPT_PARA) # Test programs. These are our main targets. # -TEST_PROG_PARA=t_mpi t_bigio testphdf5 t_cache t_cache_image t_pread t_pshutdown t_prestart t_init_term t_shapesame t_filters_parallel t_2Gio +TEST_PROG_PARA=t_mpi t_bigio testphdf5 t_cache t_cache_image t_pread t_pshutdown t_prestart t_init_term t_shapesame t_filters_parallel t_2Gio \ + t_subfile_openclose # t_pflush1 and t_pflush2 are used by testpflush.sh check_PROGRAMS = $(TEST_PROG_PARA) t_pflush1 t_pflush2 -- cgit v0.12