diff options
Diffstat (limited to 'perform')
-rw-r--r-- | perform/pio_engine.c | 54 | ||||
-rw-r--r-- | perform/sio_engine.c | 72 | ||||
-rw-r--r-- | perform/sio_perf.c | 10 |
3 files changed, 68 insertions, 68 deletions
diff --git a/perform/pio_engine.c b/perform/pio_engine.c index 6f300c8..e409f04 100644 --- a/perform/pio_engine.c +++ b/perform/pio_engine.c @@ -612,7 +612,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, else { bytes_begin[0] = 0; - if(!parms->h5_use_chunks || parms->io_type==PHDF5) + if(!parms->h5_use_chunks || parms->io_type==PHDF5) bytes_begin[1] = (off_t)(blk_size*pio_mpi_rank_g); else bytes_begin[1] = (off_t)(blk_size*blk_size*pio_mpi_rank_g); @@ -684,7 +684,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, /* Commit partial buffer derived type */ mrc = MPI_Type_commit(&mpi_partial_buffer_cont); VRFY((mrc==MPI_SUCCESS), "MPIO_TYPE_COMMIT"); - + /* Build contiguous file's derived type */ mrc = MPI_Type_vector((int)blk_size, (int)1, (int)(snbytes/buf_size), mpi_partial_buffer_cont, &mpi_cont_type); @@ -721,7 +721,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, mrc = MPI_Type_commit(&mpi_full_buffer); VRFY((mrc==MPI_SUCCESS), "MPIO_TYPE_COMMIT"); - /* Build full chunk derived type */ + /* Build full chunk derived type */ mrc = MPI_Type_contiguous((int)(blk_size*blk_size), MPI_BYTE, &mpi_full_chunk); VRFY((mrc==MPI_SUCCESS), "MPIO_TYPE_CREATE"); @@ -730,7 +730,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, mrc = MPI_Type_commit(&mpi_full_chunk); VRFY((mrc==MPI_SUCCESS), "MPIO_TYPE_COMMIT"); - /* Build chunk interleaved file's derived type */ + /* Build chunk interleaved file's derived type */ mrc = MPI_Type_vector((int)(buf_size/blk_size), (int)1, (int)(snbytes/blk_size), mpi_full_chunk, &mpi_chunk_inter_type); VRFY((mrc==MPI_SUCCESS), "MPIO_TYPE_CREATE"); @@ -1025,7 +1025,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, /* Number of bytes to be transferred per I/O operation */ nbytes_xfer_advance = buf_size; - /* Global offset advance after each I/O operation */ + /* Global offset advance after each I/O operation */ file_offset_advance = (off_t)snbytes; } /* end if */ /* Interleaved access pattern */ @@ -1038,7 +1038,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, /* Number of bytes to be transferred per I/O operation */ nbytes_xfer_advance = blk_size; - /* Global offset advance after each I/O operation */ + /* Global offset advance after each I/O operation */ file_offset_advance = (off_t)snbytes; } /* end else */ } /* end if */ @@ -1052,7 +1052,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, /* Number of bytes to be transferred per I/O operation */ nbytes_xfer_advance = blk_size * buf_size; - /* Global offset advance after each I/O operation */ + /* Global offset advance after each I/O operation */ file_offset_advance = 0; } /* end if */ /*Interleaved access pattern */ @@ -1071,7 +1071,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, /* Number of bytes to be transferred per I/O operation */ nbytes_xfer_advance = blk_size * blk_size; - /* Global offset advance after each I/O operation */ + /* Global offset advance after each I/O operation */ /* file_offset_advance = (off_t)(snbytes/blk_size*(blk_size*blk_size)); */ file_offset_advance = (off_t)(snbytes*blk_size); } /* end else */ @@ -1213,7 +1213,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, /* Number of bytes to be transferred per I/O operation */ nbytes_xfer_advance = buf_size; - /* Global offset advance after each I/O operation */ + /* Global offset advance after each I/O operation */ mpi_offset_advance = snbytes; /* MPI type to be used for collective access */ @@ -1228,7 +1228,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, /* Number of bytes to be transferred per I/O operation */ nbytes_xfer_advance = blk_size; - /* Global offset advance after each I/O operation */ + /* Global offset advance after each I/O operation */ mpi_offset_advance = snbytes; /* MPI type to be used for collective access */ @@ -1245,7 +1245,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, /* Number of bytes to be transferred per I/O operation */ nbytes_xfer_advance = blk_size * buf_size; - /* Global offset advance after each I/O operation */ + /* Global offset advance after each I/O operation */ mpi_offset_advance = 0; /* MPI type to be used for collective access */ @@ -1267,7 +1267,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, /* Number of bytes to be transferred per I/O operation */ nbytes_xfer_advance = blk_size * blk_size; - /* Global offset advance after each I/O operation */ + /* Global offset advance after each I/O operation */ /* mpi_offset_advance = (MPI_Offset)(snbytes/blk_size*(blk_size*blk_size)); */ mpi_offset_advance = (MPI_Offset)(snbytes*blk_size); @@ -1438,7 +1438,7 @@ done: /* Free full chunk type */ mrc = MPI_Type_free(&mpi_full_chunk); VRFY((mrc==MPI_SUCCESS), "MPIO_TYPE_FREE"); - + /* Free chunk interleaved file type */ mrc = MPI_Type_free(&mpi_chunk_inter_type); VRFY((mrc==MPI_SUCCESS), "MPIO_TYPE_FREE"); @@ -1584,7 +1584,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, else { bytes_begin[0] = 0; - if (!parms->h5_use_chunks || parms->io_type==PHDF5) + if (!parms->h5_use_chunks || parms->io_type==PHDF5) bytes_begin[1] = (off_t)(blk_size*pio_mpi_rank_g); else bytes_begin[1] = (off_t)(blk_size*blk_size*pio_mpi_rank_g); @@ -1650,7 +1650,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, /* Commit partial buffer derived type */ mrc = MPI_Type_commit(&mpi_partial_buffer_cont); VRFY((mrc==MPI_SUCCESS), "MPIO_TYPE_COMMIT"); - + /* Build contiguous file's derived type */ mrc = MPI_Type_vector((int)blk_size, (int)1, (int)(snbytes/buf_size), mpi_partial_buffer_cont, &mpi_cont_type); @@ -1687,7 +1687,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, mrc = MPI_Type_commit(&mpi_full_buffer); VRFY((mrc==MPI_SUCCESS), "MPIO_TYPE_COMMIT"); - /* Build full chunk derived type */ + /* Build full chunk derived type */ mrc = MPI_Type_contiguous((int)(blk_size*blk_size), MPI_BYTE, &mpi_full_chunk); VRFY((mrc==MPI_SUCCESS), "MPIO_TYPE_CREATE"); @@ -1696,7 +1696,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, mrc = MPI_Type_commit(&mpi_full_chunk); VRFY((mrc==MPI_SUCCESS), "MPIO_TYPE_COMMIT"); - /* Build chunk interleaved file's derived type */ + /* Build chunk interleaved file's derived type */ mrc = MPI_Type_vector((int)(buf_size/blk_size), (int)1, (int)(snbytes/blk_size), mpi_full_chunk, &mpi_chunk_inter_type); VRFY((mrc==MPI_SUCCESS), "MPIO_TYPE_CREATE"); @@ -1949,7 +1949,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, /* Number of bytes to be transferred per I/O operation */ nbytes_xfer_advance = buf_size; - /* Global offset advance after each I/O operation */ + /* Global offset advance after each I/O operation */ file_offset_advance = (off_t)snbytes; } /* end if */ /* Interleaved access pattern */ @@ -1962,7 +1962,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, /* Number of bytes to be transferred per I/O operation */ nbytes_xfer_advance = blk_size; - /* Global offset advance after each I/O operation */ + /* Global offset advance after each I/O operation */ file_offset_advance = (off_t)snbytes; } /* end else */ } /* end if */ @@ -1976,7 +1976,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, /* Number of bytes to be transferred per I/O operation */ nbytes_xfer_advance = blk_size * buf_size; - /* Global offset advance after each I/O operation */ + /* Global offset advance after each I/O operation */ file_offset_advance = 0; } /* end if */ /*Interleaved access pattern */ @@ -1995,7 +1995,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, /* Number of bytes to be transferred per I/O operation */ nbytes_xfer_advance = blk_size * blk_size; - /* Global offset advance after each I/O operation */ + /* Global offset advance after each I/O operation */ /* file_offset_advance = (off_t)(snbytes/blk_size*(blk_size*blk_size)); */ file_offset_advance = (off_t)(snbytes*blk_size); } /* end else */ @@ -2136,7 +2136,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, /* Number of bytes to be transferred per I/O operation */ nbytes_xfer_advance = buf_size; - /* Global offset advance after each I/O operation */ + /* Global offset advance after each I/O operation */ mpi_offset_advance = snbytes; /* MPI type to be used for collective access */ @@ -2151,7 +2151,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, /* Number of bytes to be transferred per I/O operation */ nbytes_xfer_advance = blk_size; - /* Global offset advance after each I/O operation */ + /* Global offset advance after each I/O operation */ mpi_offset_advance = snbytes; /* MPI type to be used for collective access */ @@ -2168,7 +2168,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, /* Number of bytes to be transferred per I/O operation */ nbytes_xfer_advance = blk_size * buf_size; - /* Global offset advance after each I/O operation */ + /* Global offset advance after each I/O operation */ mpi_offset_advance = 0; /* MPI type to be used for collective access */ @@ -2190,7 +2190,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, /* Number of bytes to be transferred per I/O operation */ nbytes_xfer_advance = blk_size * blk_size; - /* Global offset advance after each I/O operation */ + /* Global offset advance after each I/O operation */ /* mpi_offset_advance = (MPI_Offset)(snbytes/blk_size*(blk_size*blk_size)); */ mpi_offset_advance = (MPI_Offset)(snbytes*blk_size); @@ -2386,7 +2386,7 @@ done: /* Free full chunk type */ mrc = MPI_Type_free(&mpi_full_chunk); VRFY((mrc==MPI_SUCCESS), "MPIO_TYPE_FREE"); - + /* Free chunk interleaved file type */ mrc = MPI_Type_free(&mpi_chunk_inter_type); VRFY((mrc==MPI_SUCCESS), "MPIO_TYPE_FREE"); @@ -2551,7 +2551,7 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags) } break; - } + } done: return ret_code; diff --git a/perform/sio_engine.c b/perform/sio_engine.c index b3a5b2a..928a325 100644 --- a/perform/sio_engine.c +++ b/perform/sio_engine.c @@ -13,7 +13,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Author: Christian Chilan, April 2008 + * Author: Christian Chilan, April 2008 */ #include <sys/types.h> @@ -137,7 +137,7 @@ static off_t offset[MAX_DIMS]; /* dataset size in bytes */ static size_t buf_offset[MAX_DIMS]; /* dataset size in bytes */ static int order[MAX_DIMS]; /* dimension access order */ static size_t linear_buf_size; /* linear buffer size */ -static int cont_dim; /* lowest dimension for contiguous POSIX +static int cont_dim; /* lowest dimension for contiguous POSIX access */ static size_t cont_size; /* size of contiguous POSIX access */ static hid_t fapl; /* file access list */ @@ -159,7 +159,7 @@ static hid_t h5dxpl = -1; /* Dataset transfer property list */ * Function: do_sio * Purpose: SIO Engine where IO are executed. * Return: results - * Programmer: Christian Chilan, April, 2008 + * Programmer: Christian Chilan, April, 2008 * Modifications: */ results @@ -202,7 +202,7 @@ do_sio(parameters param) GOTOERROR(FAIL); } - nbytes = param.num_bytes; + nbytes = param.num_bytes; linear_buf_size = 1; for (i=0; i<param.rank; i++){ @@ -232,14 +232,14 @@ do_sio(parameters param) } /* Allocate transfer buffer */ - buffer2 = malloc(linear_buf_size); + buffer2 = malloc(linear_buf_size); if ((buffer = malloc(linear_buf_size)) == NULL){ HDfprintf(stderr, "malloc for transfer buffer size (%Hd) failed\n", (long_long)(linear_buf_size)); GOTOERROR(FAIL); } - if (sio_debug_level >= 4) + if (sio_debug_level >= 4) /* output all of the times for all iterations */ fprintf(output, "Timer details:\n"); @@ -291,7 +291,7 @@ do_sio(parameters param) set_time(res.timers, HDF5_GROSS_READ_FIXED_DIMS, STOP); VRFY((hrc == SUCCESS), "do_fclose failed"); } - + do_cleanupfile(iot, fname); done: @@ -335,8 +335,8 @@ sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si const char *prefix, *suffix=""; char *ptr, last = '\0'; size_t i, j; - vfdtype vfd; - vfd = param->vfd; + vfdtype vfd; + vfd = param->vfd; if (!base_name || !fullname || size < 1) return NULL; @@ -437,7 +437,7 @@ sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si * Function: do_write * Purpose: Write the required amount of data to the file. * Return: SUCCESS or FAIL - * Programmer: Christian Chilan, April, 2008 + * Programmer: Christian Chilan, April, 2008 * Modifications: */ static herr_t @@ -476,7 +476,7 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer) /* determine lowest dimension for contiguous POSIX access */ cont_dim = rank; - + for (i=rank-1; i>=0; i--) { if (parms->buf_size[i]==parms->dset_size[i]) cont_dim = i; @@ -484,7 +484,7 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer) break; } - /* determine size of the contiguous POSIX access */ + /* determine size of the contiguous POSIX access */ cont_size = (!cont_dim)? 1 : parms->buf_size[cont_dim-1]; for (i=cont_dim; i<rank; i++) cont_size *= parms->buf_size[i]; @@ -501,7 +501,7 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer) h5count[i] = parms->buf_size[i]; h5chunk[i] = parms->chk_size[i]; h5maxdims[i] = H5S_UNLIMITED; - + } if (parms->h5_use_chunks && parms->h5_extendable) { @@ -514,7 +514,7 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer) } hrc = H5Sselect_hyperslab(h5dset_space_id, H5S_SELECT_SET, - h5start, h5stride, h5count, h5block); + h5start, h5stride, h5count, h5block); VRFY((hrc >= 0), "H5Sselect_hyperslab"); /* Create the memory dataspace that corresponds to the xfer buffer */ @@ -528,7 +528,7 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer) GOTOERROR(FAIL); } - break; + break; } /* end switch */ @@ -578,7 +578,7 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer) /* Perform write */ hrc = dset_write(rank-1, fd, parms, buffer); - + if (hrc < 0) { fprintf(stderr, "Error in dataset write\n"); GOTOERROR(FAIL); @@ -640,7 +640,7 @@ done: /* * Function: dset_write - * Purpose: Write buffer into the dataset. + * Purpose: Write buffer into the dataset. * Return: SUCCESS or FAIL * Programmer: Christian Chilan, April, 2008 * Modifications: @@ -655,11 +655,11 @@ static herr_t dset_write(int local_dim, file_descr *fd, parameters *parms, void long i,j; herr_t hrc; - /* iterates according to the dimensions in order array */ + /* iterates according to the dimensions in order array */ for (i=0; i < parms->dset_size[cur_dim]; i += parms->buf_size[cur_dim]){ h5offset[cur_dim] = offset[cur_dim] = i; - + if (local_dim > 0){ dset_write(local_dim-1, fd, parms, buffer); @@ -697,7 +697,7 @@ static herr_t dset_write(int local_dim, file_descr *fd, parameters *parms, void } } } - /* applies offset */ + /* applies offset */ hrc = H5Soffset_simple(h5dset_space_id, h5offset); VRFY((hrc >= 0), "H5Soffset_simple"); @@ -716,7 +716,7 @@ done: } /* - * Function: posix_buffer_write + * Function: posix_buffer_write * Purpose: Write buffer into the POSIX file considering contiguity. * Return: SUCCESS or FAIL * Programmer: Christian Chilan, April, 2008 @@ -780,7 +780,7 @@ done: * Function: do_read * Purpose: Read the required amount of data to the file. * Return: SUCCESS or FAIL - * Programmer: Christian Chilan, April, 2008 + * Programmer: Christian Chilan, April, 2008 * Modifications: */ static herr_t @@ -811,7 +811,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer) switch (parms->io_type) { case POSIXIO: cont_dim = rank; - + for (i=rank-1; i>=0; i--) { if (parms->buf_size[i]==parms->dset_size[i]) cont_dim = i; @@ -838,7 +838,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer) VRFY((h5dset_space_id >= 0), "H5Screate_simple"); hrc = H5Sselect_hyperslab(h5dset_space_id, H5S_SELECT_SET, - h5start, h5stride, h5count, h5block); + h5start, h5stride, h5count, h5block); VRFY((hrc >= 0), "H5Sselect_hyperslab"); /* Create the memory dataspace that corresponds to the xfer buffer */ @@ -852,7 +852,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer) GOTOERROR(FAIL); } - break; + break; } /* end switch */ @@ -950,12 +950,12 @@ static herr_t dset_read(int local_dim, file_descr *fd, parameters *parms, void * long i,j; herr_t hrc; - /* iterate on the current dimension */ + /* iterate on the current dimension */ for (i=0; i < parms->dset_size[cur_dim]; i += parms->buf_size[cur_dim]){ h5offset[cur_dim] = offset[cur_dim] = i; - - /* if traverse in order array is incomplete, recurse */ + + /* if traverse in order array is incomplete, recurse */ if (local_dim > 0){ ret_code = dset_read(local_dim-1, fd, parms, buffer); @@ -981,7 +981,7 @@ static herr_t dset_read(int local_dim, file_descr *fd, parameters *parms, void * hrc = H5Dread(h5ds_id, ELMT_H5_TYPE, h5mem_space_id, h5dset_space_id, h5dxpl, buffer); VRFY((hrc >= 0), "H5Dread"); -#if 0 +#if 0 for (j=0; j<linear_buf_size; j++) { buf_p = (unsigned char*)buffer; if (buf_p[j]!=buffer2[j]) @@ -1043,7 +1043,7 @@ static herr_t posix_buffer_read(int local_dim, file_descr *fd, parameters *parms rc = ((ssize_t)cont_size == POSIXREAD(fd->posixfd, buf_p, cont_size)); VRFY((rc != 0), "POSIXREAD"); -#if 0 +#if 0 for (j=0; j<cont_size; j++) { if (buf_p[j]!=buf2_p[j]) printf("Inconsistent data in %d\n", j); @@ -1108,18 +1108,18 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags) GOTOERROR(FAIL); } break; - } + } done: return ret_code; } /* - * Function: set_vfd - * Purpose: Sets file driver. + * Function: set_vfd + * Purpose: Sets file driver. * Return: SUCCESS or FAIL - * Programmer: Christian Chilan, April, 2008 - * Modifications: + * Programmer: Christian Chilan, April, 2008 + * Modifications: */ hid_t @@ -1296,7 +1296,7 @@ do_cleanupfile(iotype iot, char *filename) } H5Pclose(fapl); break; - } + } } } diff --git a/perform/sio_perf.c b/perform/sio_perf.c index a83e4ab..720f4cb 100644 --- a/perform/sio_perf.c +++ b/perform/sio_perf.c @@ -389,7 +389,7 @@ finish: * Return: Nothing * Programmer: Bill Wendling, 30. October 2001 * Modifications: - * Added multidimensional testing (Christian Chilan, April, 2008) + * Added multidimensional testing (Christian Chilan, April, 2008) */ static void run_test_loop(struct options *opts) @@ -397,7 +397,7 @@ run_test_loop(struct options *opts) parameters parms; int i; int doing_sio; /* if this process is doing SIO */ - size_t buf_bytes; + size_t buf_bytes; /* load options into parameter structure */ parms.num_files = opts->num_files; parms.num_dsets = opts->num_dsets; @@ -901,7 +901,7 @@ report_parameters(struct options *opts) else { HDfprintf(output, "Contiguous\n"); } - + HDfprintf(output, "HDF5 file driver="); if (opts->vfd==sec2) { HDfprintf(output, "sec2\n"); @@ -943,7 +943,7 @@ parse_command_line(int argc, char *argv[]) cl_opts->output_file = NULL; cl_opts->io_types = 0; /* will set default after parsing options */ cl_opts->num_iters = 1; - + default_rank = 2; cl_opts->dset_rank = 0; @@ -959,7 +959,7 @@ parse_command_line(int argc, char *argv[]) } cl_opts->vfd = sec2; - + cl_opts->print_times = FALSE; /* Printing times is off by default */ cl_opts->print_raw = FALSE; /* Printing raw data throughput is off by default */ cl_opts->h5_alignment = 1; /* No alignment for HDF5 objects by default */ |