#include #include #include #include #include "mpi.h" #include "hdf5.h" int main(int argc, char **argv) { const char file_name[]="eff_file.h5"; hid_t file_id; hid_t gid1, gid2, gid3; hid_t dataspaceId; hid_t did1, did2, did3; hid_t aid1, aid2, aid3; hid_t fapl_id, dxpl_id; const unsigned int nelem=60; int *data = NULL, *r_data = NULL, *r2_data = NULL, *data2 = NULL, *data3 = NULL, *a_data = NULL; unsigned int i = 0; hsize_t dims[1]; int my_rank, my_size; int provided; hid_t int_id; H5ES_status_t *status = NULL; size_t num_events = 0; hsize_t extent = 20; hbool_t exists; H5_request_t req1; H5ES_status_t status; MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &provided); if(MPI_THREAD_MULTIPLE != provided) { fprintf(stderr, "MPI does not have MPI_THREAD_MULTIPLE support\n"); exit(1); } /* Call EFF_init to initialize the EFF stack. As a result of this call, the Function Shipper client is started, and HDF5 VOL calls are registered with the function shipper. An "IOD init" call is forwarded from the FS client to the FS server which should already be running. */ EFF_init(MPI_COMM_WORLD, MPI_INFO_NULL); MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); MPI_Comm_size(MPI_COMM_WORLD, &my_size); fprintf(stderr, "APP processes = %d, my rank is %d\n", my_size, my_rank); /* Choose the IOD VOL plugin to use with this file. First we create a file access property list. Then we call a new routine to set the IOD plugin to use with this fapl */ fapl_id = H5Pcreate (H5P_FILE_ACCESS); H5Pset_fapl_iod(fapl_id, MPI_COMM_WORLD, MPI_INFO_NULL); /* allocate and initialize 3 arrays for dataset writes, and 2 arrays for dataset reads. The write arrays are intialized to contain 60 integers (0-59). The read arrays are intialized to contain 60 integers all 0s. */ data = malloc (sizeof(int)*nelem); data2 = malloc (sizeof(int)*nelem); data3 = malloc (sizeof(int)*nelem); r_data = malloc (sizeof(int)*nelem); a_data = malloc (sizeof(int)*nelem); r2_data = malloc (sizeof(int)*nelem); for(i=0;i