Commit 52135344 authored by Huihuo Zheng's avatar Huihuo Zheng
Browse files

test

parent 1dc4cad3
......@@ -1234,6 +1234,7 @@ void *H5Dwrite_pthread_func_vol(void *arg) {
msync(data->buf, data->size, MS_SYNC);
H5VL_pass_through_ext_t *o = (H5VL_pass_through_ext_t *)data->dataset_obj;
void **req;
sleep(5);
#ifdef THETA
wmm->mmap.tmp_buf = malloc(data->size);
memcpy(wmm->mmap.tmp_buf, data->buf, data->size);
......@@ -1289,6 +1290,7 @@ H5VL_pass_through_ext_dataset_write(void *dset, hid_t mem_type_id, hid_t mem_spa
if (o->write_cache) {
hsize_t size = get_buf_size(mem_space_id, mem_type_id);
if (o->H5DWMM->ssd->mspace_per_rank_left < size) {
printf("Wait to finish? \n");
pthread_mutex_lock(&o->H5DWMM->io.request_lock);
while(o->H5DWMM->io.num_request>0) {
pthread_cond_signal(&o->H5DWMM->io.io_cond);
......@@ -1317,8 +1319,10 @@ H5VL_pass_through_ext_dataset_write(void *dset, hid_t mem_type_id, hid_t mem_spa
o->H5DWMM->io.request_list->xfer_plist_id = H5Pcopy(plist_id);
o->H5DWMM->io.request_list->size = size;
o->H5DWMM->io.request_list->next = (thread_data_t*) malloc(sizeof(thread_data_t));
if (o->H5DWMM->mpi.rank==0) printf("added task %d to the list;\n", o->H5DWMM->io.request_list->id);
o->H5DWMM->io.request_list->next->id = o->H5DWMM->io.request_list->id + 1;
o->H5DWMM->io.request_list = o->H5DWMM->io.request_list->next;
pthread_mutex_lock(&o->H5DWMM->io.request_lock);
o->H5DWMM->io.num_request++;
o->num_request_dataset++;
......@@ -1330,7 +1334,6 @@ H5VL_pass_through_ext_dataset_write(void *dset, hid_t mem_type_id, hid_t mem_spa
/* Check for async request */
if(req && *req)
*req = H5VL_pass_through_ext_new_obj(*req, o->under_vol_id);
return ret_value;
} /* end H5VL_pass_through_ext_dataset_write() */
......@@ -2057,7 +2060,6 @@ H5VL_pass_through_ext_file_close(void *file, hid_t dxpl_id, void **req)
#ifdef ENABLE_EXT_PASSTHRU_LOGGING
printf("------- EXT PASS THROUGH VOL FILE Close\n");
#endif
if (o->write_cache) {
if (o->H5DWMM->mpi.rank==0) printf("file_close\n");
pthread_mutex_lock(&o->H5DWMM->io.request_lock);
......
......@@ -7,7 +7,7 @@ LIBS=-L$(HDF5_DIR)/lib -lhdf5 -lz
#DEBUG=-DENABLE_EXT_PASSTHRU_LOGGING
CFLAGS=$(INCLUDES) $(LIBS)
TARGET=libh5passthrough_vol.dylib
TARGET=libh5passthrough_vol.so
CXX=mpicxx -DTHETA
all: makeso test_write_cache
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment