diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2014-07-10 14:36:34 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2014-07-10 14:36:34 (GMT) |
commit | 2700d20859e67995145677af5e3c627c19bd87b4 (patch) | |
tree | 556d0b713ebf586094d38127ecd4a02f4490e745 /src | |
parent | 0cb7846c407daef8a2c35339676078f8338cdd12 (diff) | |
download | hdf5-2700d20859e67995145677af5e3c627c19bd87b4.zip hdf5-2700d20859e67995145677af5e3c627c19bd87b4.tar.gz hdf5-2700d20859e67995145677af5e3c627c19bd87b4.tar.bz2 |
[svn-r25402] Bring 25397/8 from trunk:
- remove configure checks for MPI_File_get_size and Big MPI_File_set_size as they are supported by MPIO implementations today.
- fix bug in t_mpi.c (HDFFV-8856)
tested with h5committest.
Diffstat (limited to 'src')
-rw-r--r-- | src/H5FDmpio.c | 39 | ||||
-rw-r--r-- | src/H5config.h.in | 7 | ||||
-rw-r--r-- | src/Makefile.in | 1 |
3 files changed, 1 insertions, 46 deletions
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index 2c97282..5189939 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -1004,9 +1004,6 @@ H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id, MPI_Comm comm_dup=MPI_COMM_NULL; MPI_Info info_dup=MPI_INFO_NULL; H5FD_t *ret_value; /* Return value */ -#ifndef H5_HAVE_MPI_GET_SIZE - h5_stat_t stat_buf; -#endif FUNC_ENTER_NOAPI_NOINIT @@ -1081,18 +1078,8 @@ H5FD_mpio_open(const char *name, unsigned flags, hid_t fapl_id, /* Only processor p0 will get the filesize and broadcast it. */ if (mpi_rank == 0) { - /* Get current file size. If MPI_File_get_size is disabled in configuration - * because it doesn't return correct value (SGI Altix Propack 4), - * use stat to get the file size. */ -#ifdef H5_HAVE_MPI_GET_SIZE if (MPI_SUCCESS != (mpi_code=MPI_File_get_size(fh, &size))) HMPI_GOTO_ERROR(NULL, "MPI_File_get_size failed", mpi_code) -#else - if((mpi_code=HDstat(name, &stat_buf))<0) - HMPI_GOTO_ERROR(NULL, "stat failed", mpi_code) - /* Hopefully this casting is safe */ - size = (MPI_Offset)(stat_buf.st_size); -#endif } /* end if */ /* Broadcast file size */ @@ -1987,38 +1974,14 @@ H5FD_mpio_truncate(H5FD_t *_file, hid_t UNUSED dxpl_id, hbool_t UNUSED closing) int mpi_code; /* mpi return code */ MPI_Offset mpi_off; -#ifdef H5_MPI_FILE_SET_SIZE_BIG if(H5FD_mpi_haddr_to_MPIOff(file->eoa, &mpi_off) < 0) HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "cannot convert from haddr_t to MPI_Offset") /* Extend the file's size */ if(MPI_SUCCESS != (mpi_code = MPI_File_set_size(file->f, mpi_off))) HMPI_GOTO_ERROR(FAIL, "MPI_File_set_size failed", mpi_code) -#else /* H5_MPI_FILE_SET_SIZE_BIG */ - /* Wait until all processes are here before reading/writing the byte at - * process 0's end of address space. The window for corruption is - * probably tiny, but does exist... - */ - if(MPI_SUCCESS != (mpi_code = MPI_Barrier(file->comm))) - HMPI_GOTO_ERROR(FAIL, "MPI_Barrier failed", mpi_code) - - if(0 == file->mpi_rank) { - uint8_t byte = 0; - MPI_Status mpi_stat; - - /* Portably initialize MPI status variable */ - HDmemset(&mpi_stat, 0, sizeof(MPI_Status)); - - if(H5FD_mpi_haddr_to_MPIOff(file->eoa-1, &mpi_off) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_BADRANGE, FAIL, "cannot convert from haddr_t to MPI_Offset") - if(MPI_SUCCESS != (mpi_code = MPI_File_read_at(file->f, mpi_off, &byte, 1, MPI_BYTE, &mpi_stat))) - HMPI_GOTO_ERROR(FAIL, "MPI_File_read_at failed", mpi_code) - if(MPI_SUCCESS != (mpi_code = MPI_File_write_at(file->f, mpi_off, &byte, 1, MPI_BYTE, &mpi_stat))) - HMPI_GOTO_ERROR(FAIL, "MPI_File_write_at failed", mpi_code) - } /* end if */ -#endif /* H5_MPI_FILE_SET_SIZE_BIG */ - /* Don't let any proc return until all have extended the file. + /* Don't let any proc return until all have extended the file. * (Prevents race condition where some processes go ahead and write * more data to the file before all the processes have finished making * it the shorter length, potentially truncating the file and dropping diff --git a/src/H5config.h.in b/src/H5config.h.in index 82925bf..daf7d0d 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -253,9 +253,6 @@ /* Define to 1 if you have the <mpe.h> header file. */ #undef HAVE_MPE_H -/* Define if MPI_File_get_size works correctly */ -#undef HAVE_MPI_GET_SIZE - /* Define if `MPI_Comm_c2f' and `MPI_Comm_f2c' exists */ #undef HAVE_MPI_MULTI_LANG_Comm @@ -479,10 +476,6 @@ /* Define if the metadata trace file code is to be compiled in */ #undef METADATA_TRACE_FILE -/* Define if your system's `MPI_File_set_size' function works for files over - 2GB. */ -#undef MPI_FILE_SET_SIZE_BIG - /* Define if we can violate pointer alignment restrictions */ #undef NO_ALIGNMENT_RESTRICTIONS diff --git a/src/Makefile.in b/src/Makefile.in index 30b0ae1..1d42bf0 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -564,7 +564,6 @@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MPE = @MPE@ -MPI_GET_SIZE = @MPI_GET_SIZE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ |