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

xgit

parent b5a4c6f9
......@@ -43,6 +43,7 @@ void *H5Dread_pthread_func(void *args) {
char *p_mem = (char *) H5DMM.tmp_buf;
//MPI_Barrier(MPI_COMM_WORLD);
MPI_Win_fence(MPI_MODE_NOPRECEDE, H5DMM.win);
//MPI_Win_fence(0, H5DMM.win);
int batch_size = H5DMM.batch_list.size();
if (H5DMM.batch_contig) {
......@@ -67,8 +68,8 @@ void *H5Dread_pthread_func(void *args) {
if (io_node()==H5DMM.rank and debug_level()>1)
cout << "Offset: rank-" << src << " "<< offset << " " << H5DMM.size/H5DMM.disp << endl;
if (src==H5DMM.rank)
memcpy(&p_mmap[offset*H5DMM.disp], &p_mem[i*H5DMM.dim*H5DMM.disp],
H5DMM.dim*H5DMM.disp);
memcpy(&p_mmap[offset*H5DMM.disp], &p_mem[i*H5DMM.dim*H5DMM.disp],
H5DMM.dim*H5DMM.disp);
else
MPI_Put(&p_mem[i*H5DMM.disp*H5DMM.dim], H5DMM.dim,
H5DMM.buf_type, src,
......@@ -78,6 +79,7 @@ void *H5Dread_pthread_func(void *args) {
}
MPI_Win_fence(MPI_MODE_NOSUCCEED, H5DMM.win);
//MPI_Win_unlock_all(H5DMM.win);
//MPI_Barrier(MPI_COMM_WORLD);
//MPI_Win_fence(0, H5DMM.win);
H5DMM.num_request--;
......
#Makefile
CXX=mpicxx -g
HDF5_ROOT=/blues/gpfs/software/centos7/spack/opt/spack/linux-centos7-x86_64/gcc-8.2.0/hdf5-1.10.5-vozfsah/
#HDF5_ROOT=/blues/gpfs/software/centos7/spack/opt/spack/linux-centos7-x86_64/gcc-8.2.0/hdf5-1.10.5-vozfsah/
CFLAGS=-I$(HDF5_ROOT)/include -O3 -I../utils
HDF5_LIB=-L$(HDF5_ROOT)/lib -lhdf5
......
#!/usr/bin/env python
# This is for preparing fake images for I/O tests
# One can select
from mpi4py import MPI
try:
from mpi4py import MPI
comm = MPI.COMM_WORLD
print(comm.size, comm.rank)
except:
class Comm:
def __init__(self, ):
self.rank=0
self.size=1
comm = Comm()
import h5py
import argparse
import numpy as np
import os
from tqdm import tqdm
comm = MPI.COMM_WORLD
parser = argparse.ArgumentParser(description="preparing data set")
parser.add_argument("--num_images", type=int, default=8192)
parser.add_argument("--sz", type=int, default=224)
......
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