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

fixed

parent fc935935
......@@ -1233,12 +1233,11 @@ void *H5Dwrite_pthread_func_vol(void *arg) {
pthread_mutex_unlock(&wmm->io.request_lock);
while (loop) {
if (working) {
sleep(1);
thread_data_t *data = wmm->io.current_request;
data->buf = mmap(NULL, data->size, PROT_READ, MAP_SHARED, wmm->mmap.fd, data->offset);
msync(data->buf, data->size, MS_SYNC);
H5VL_pass_through_ext_t *o = (H5VL_pass_through_ext_t *)data->dataset_obj;
void **req;
void **req;
#ifdef THETA
wmm->mmap.tmp_buf = malloc(data->size);
memcpy(wmm->mmap.tmp_buf, data->buf, data->size);
......@@ -1331,7 +1330,7 @@ H5VL_pass_through_ext_dataset_write(void *dset, hid_t mem_type_id, hid_t mem_spa
#else
fsync(o->H5DWMM->mmap.fd);
#endif
o->H5DWMM->io.request_list->dataset_obj = dset;
o->H5DWMM->io.request_list->dataset_obj = dset;
o->H5DWMM->io.request_list->mem_type_id = H5Tcopy(mem_type_id);
o->H5DWMM->io.request_list->mem_space_id = H5Scopy(mem_space_id);
o->H5DWMM->io.request_list->file_space_id = H5Scopy(file_space_id);
......@@ -1341,7 +1340,6 @@ H5VL_pass_through_ext_dataset_write(void *dset, hid_t mem_type_id, hid_t mem_spa
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++;
......
......@@ -7,7 +7,7 @@ LIBS=-L$(HDF5_DIR)/lib -lhdf5 -lz
#DEBUG=-DENABLE_EXT_PASSTHRU_LOGGING
CFLAGS=$(INCLUDES) $(LIBS)
TARGET=libh5passthrough_vol.so
TARGET=libh5passthrough_vol.dylib
CXX=mpicxx -DTHETA
all: makeso test_write_cache
......
......@@ -112,7 +112,7 @@ int main(int argc, char **argv) {
int* data = new int[ldims[0]*ldims[1]];
// set up dataset access property list
hid_t dxf_id = H5Pcreate(H5P_DATASET_XFER);
H5Pset_dxpl_mpio(dxf_id, H5FD_MPIO_COLLECTIVE);
H5Pset_dxpl_mpio(dxf_id, H5FD_MPIO_INDEPENDENT);
// define local memory space
// create file space and dataset
......
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