diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2000-11-27 18:25:18 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2000-11-27 18:25:18 (GMT) |
commit | fb7987e708eb08d7cf7675a2aff50668a4941a55 (patch) | |
tree | 0b5bf71029aad3ac3ea2e8111171376e46f722aa /src/H5D.c | |
parent | f0b45019bb22d6a5240b12dfdb77871c83377454 (diff) | |
download | hdf5-fb7987e708eb08d7cf7675a2aff50668a4941a55.zip hdf5-fb7987e708eb08d7cf7675a2aff50668a4941a55.tar.gz hdf5-fb7987e708eb08d7cf7675a2aff50668a4941a55.tar.bz2 |
[svn-r3003] Purpose:
Bug fix
Description:
The optimized MPI-IO calls, H5S_mpio_spaces_write/H5S_mpio_spaces_read,
are changed for collective data transfer only since they
call H5FD_mpio_setup to do setup to eveually call MPI_File_set_view
in H5FD_mpio_read or H5FD_mpio_write. MPI_File_set_view is a
collective call. Letting independent data transfer use this
route would result in hanging.
Solution:
For now, the checking is being done in
H5D_write and H5D_read before H5S_mpio_spaces_write/H5S_mpio_spaces_read
is called because the checking code in H5S_mpio_spaces_xfer, though with
the right idea, is not correct yet.
Platforms tested:
IRIX64-64 parallel.
Diffstat (limited to 'src/H5D.c')
-rw-r--r-- | src/H5D.c | 21 |
1 files changed, 19 insertions, 2 deletions
@@ -1551,6 +1551,10 @@ H5D_close(H5D_t *dataset) * Added the code that when it detects it is not safe to process a * COLLECTIVE read request without hanging, it changes it to * INDEPENDENT calls. + * + * Albert Cheng, 2000-11-27 + * Changed to use the optimized MPIO transfer for Collective calls only. + * *------------------------------------------------------------------------- */ herr_t @@ -1673,7 +1677,12 @@ H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space, * turn out to be inappropriate for MPI-IO). */ if (H5_mpi_opt_types_g && IS_H5FD_MPIO(dataset->ent.file)) { - sconv->read = H5S_mpio_spaces_read; + /* Only collective write should call this since it eventually + * calls MPI_File_set_view which is a collective call. + * See H5S_mpio_spaces_xfer() for details. + */ + if (doing_mpio && xfer_mode==H5FD_MPIO_COLLECTIVE) + sconv->read = H5S_mpio_spaces_read; } #endif /*H5_HAVE_PARALLEL*/ @@ -1978,6 +1987,9 @@ printf("%s: check 2.0, src_type_size=%d, dst_type_size=%d, target_size=%d, min_e * COLLECTIVE write request without hanging, it changes it to * INDEPENDENT calls. * + * Albert Cheng, 2000-11-27 + * Changed to use the optimized MPIO transfer for Collective calls only. + * *------------------------------------------------------------------------- */ herr_t @@ -2137,7 +2149,12 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space, * turn out to be inappropriate for MPI-IO). */ if (H5_mpi_opt_types_g && IS_H5FD_MPIO(dataset->ent.file)) { - sconv->write = H5S_mpio_spaces_write; + /* Only collective write should call this since it eventually + * calls MPI_File_set_view which is a collective call. + * See H5S_mpio_spaces_xfer() for details. + */ + if (doing_mpio && xfer_mode==H5FD_MPIO_COLLECTIVE) + sconv->write = H5S_mpio_spaces_write; } #endif /*H5_HAVE_PARALLEL*/ |