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

remove memcpy

parent 971fc930
......@@ -273,26 +273,26 @@ herr_t H5Dread_from_cache(hid_t dataset_id, hid_t mem_type_id,
int dest = b[i];
int src = dest/H5DMM.ns_loc;
MPI_Aint offset = (dest%H5DMM.ns_loc)*H5DMM.dim;
if (src==H5DMM.rank)
memcpy(&p_mem[i*H5DMM.dim*H5DMM.disp], &p_mmap[offset*H5DMM.disp],
H5DMM.dim*H5DMM.disp);
else
MPI_Get(&p_mem[i*H5DMM.dim*H5DMM.disp], H5DMM.dim,
H5DMM.buf_type, src,
offset, H5DMM.dim,
H5DMM.buf_type, H5DMM.win);
// if (src==H5DMM.rank)
//memcpy(&p_mem[i*H5DMM.dim*H5DMM.disp], &p_mmap[offset*H5DMM.disp],
//H5DMM.dim*H5DMM.disp);
//else
MPI_Get(&p_mem[i*H5DMM.dim*H5DMM.disp], H5DMM.dim,
H5DMM.buf_type, src,
offset, H5DMM.dim,
H5DMM.buf_type, H5DMM.win);
}
} else {
int dest = b[0];
int src = dest/H5DMM.ns_loc;
MPI_Aint offset = (dest%H5DMM.ns_loc)*H5DMM.dim;
if (src==H5DMM.rank)
memcpy(p_mem, &p_mmap[offset*H5DMM.disp], batch_size*H5DMM.dim*H5DMM.disp);
else
MPI_Get(p_mem, H5DMM.dim*batch_size,
H5DMM.buf_type, src,
offset, H5DMM.dim*batch_size,
H5DMM.buf_type, H5DMM.win);
//if (src==H5DMM.rank)
//memcpy(p_mem, &p_mmap[offset*H5DMM.disp], batch_size*H5DMM.dim*H5DMM.disp);
//else
MPI_Get(p_mem, H5DMM.dim*batch_size,
H5DMM.buf_type, src,
offset, H5DMM.dim*batch_size,
H5DMM.buf_type, H5DMM.win);
}
MPI_Win_fence(MPI_MODE_NOSUCCEED, H5DMM.win);
return 0;
......
......@@ -5,10 +5,10 @@
# module load cray-hdf5-parallel
# -------------------------------
#CC=mpicc
#CXX=mpicxx
CC=cc
CXX=CC
CC=mpicc
CXX=mpicxx
#CC=cc
#CXX=CC
CFLAGS:=-O3 -I$(HDF5_ROOT)/include -I../utils
CPATH=
#CFLAGS+= -DSSD_CACHE_DEBUG -DEBUG
......
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