diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2001-12-11 23:02:07 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2001-12-11 23:02:07 (GMT) |
commit | a72ee1251a82ec47b0dc5eb51ed5af77b6f2c33f (patch) | |
tree | d96edefd15a686275da5f60eb8ba77156a0608f6 | |
parent | 8ee62202858a17ec089bf8073f0d4aa196f6547a (diff) | |
download | hdf5-a72ee1251a82ec47b0dc5eb51ed5af77b6f2c33f.zip hdf5-a72ee1251a82ec47b0dc5eb51ed5af77b6f2c33f.tar.gz hdf5-a72ee1251a82ec47b0dc5eb51ed5af77b6f2c33f.tar.bz2 |
[svn-r4700] Purpose:
new feature
Description:
It writes to MPIO files now.
Platforms tested:
eirene (pp)
-rw-r--r-- | perform/pio_engine.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/perform/pio_engine.c b/perform/pio_engine.c index bf94a91..9bc026a 100644 --- a/perform/pio_engine.c +++ b/perform/pio_engine.c @@ -215,6 +215,7 @@ do_pio(parameters param) GOTOERROR(FAIL); } +#if 0 /* DEBUG*/ fprintf(stderr, "nfiles=%d\n", nfiles); fprintf(stderr, "ndsets=%ld\n", ndsets); @@ -222,8 +223,10 @@ fprintf(stderr, "nelmts=%ld\n", nelmts); fprintf(stderr, "niters=%d\n", niters); fprintf(stderr, "maxprocs=%d\n", maxprocs); fprintf(stderr, "buffer size=%ld\n", buf_size); -/* nfiles=3; */ -/*ndsets=5; */ +nfiles=MIN(3, nfiles); +ndsets=MIN(5, ndsets); +/* DEBUG END */ +#endif /* Create a sub communicator for this run. Easier to use the first N * processes. */ @@ -264,7 +267,7 @@ fprintf(stderr, "buffer size=%ld\n", buf_size); sprintf(base_name, "#pio_tmp_%u", nf); pio_create_filename(iot, base_name, fname, sizeof(fname)); -fprintf(stderr, "filename=%s\n", base_name); +fprintf(stderr, "filename=%s\n", fname); set_time(res.timers, HDF5_FILE_OPENCLOSE, START); hrc = do_fopen(iot, fname, &fd, PIO_CREATE | PIO_WRITE, comm); @@ -464,6 +467,9 @@ do_write(file_descr *fd, iotype iot, long ndsets, { int ret_code = SUCCESS; int rc; /*routine return code */ + int mrc; /*MPI return code */ + MPI_Offset mpi_offset; + MPI_Status mpi_status; long ndset; long nelmts_towrite, nelmts_written; char dname[64]; @@ -513,7 +519,7 @@ do_write(file_descr *fd, iotype iot, long ndsets, break; case PHDF5: - sprintf(dname, "Dataset_%lu", ndset); + sprintf(dname, "Dataset_%ld", ndset); h5ds_id = H5Dcreate(fd->h5fd, dname, H5T_NATIVE_INT, h5dset_space_id, H5P_DEFAULT); @@ -558,6 +564,11 @@ do_write(file_descr *fd, iotype iot, long ndsets, break; case MPIO: + mpi_offset = dset_offset; + mrc = MPI_File_write_at(fd->mpifd, mpi_offset, buffer, + nelmts_towrite*ELMT_SIZE, MPI_CHAR, &mpi_status); + VRFY((mrc==MPI_SUCCESS), "MPIO_WRITE"); + break; case PHDF5: break; } |