From 2368e610d5d6e4ec4f3b182f4c2ea14ec8fcacf3 Mon Sep 17 00:00:00 2001 From: Richard Warren Date: Wed, 30 Sep 2020 08:35:40 -0400 Subject: Fix typo for recording the info object --- src/H5FDsubfile_threads.c | 12 +++++++++++- test/h5subfiling_vol.c | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/H5FDsubfile_threads.c b/src/H5FDsubfile_threads.c index fa957a5..dcf2e80 100644 --- a/src/H5FDsubfile_threads.c +++ b/src/H5FDsubfile_threads.c @@ -102,7 +102,9 @@ int initialize_ioc_threads(subfiling_context_t *sf_context) { int status; + unsigned int thread_pool_count = HG_TEST_NUM_THREADS_DEFAULT; int64_t *context_id = (int64_t *) malloc(sizeof(int64_t)); + char *envValue; assert(context_id != NULL); /* Initialize the main IOC thread input argument. * Each IOC request will utilize this context_id which is @@ -127,8 +129,16 @@ initialize_ioc_threads(subfiling_context_t *sf_context) goto err_exit; } + /* Allow experimentation with the number of helper threads */ + if ((envValue = getenv("IOC_THREAD_POOL_COUNT")) != NULL) { + int value_check = atoi(envValue); + if (value_check > 0) { + thread_pool_count = (unsigned int)value_check; + } + } + /* Initialize a thread pool for the IO Concentrator to use */ - status = hg_thread_pool_init(HG_TEST_NUM_THREADS_DEFAULT, &ioc_thread_pool); + status = hg_thread_pool_init(thread_pool_count, &ioc_thread_pool); if (status) { puts("hg_thread_pool_init failed"); goto err_exit; diff --git a/test/h5subfiling_vol.c b/test/h5subfiling_vol.c index 6e7a797..2e861c2 100644 --- a/test/h5subfiling_vol.c +++ b/test/h5subfiling_vol.c @@ -1927,7 +1927,7 @@ H5VL_subfiling_file_create(const char *name, unsigned flags, hid_t fcpl_id, memset(subfiling_file, 0, sizeof(H5VL_subfiling_file_t)); file->obj.item.type = H5I_FILE; file->obj.item.file = subfiling_file; - file->info = info; + subfiling_file->info = info; /* Check for async request */ if(req && *req) -- cgit v0.12