summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5FDmpio.c37
-rw-r--r--src/H5config.h.in7
-rw-r--r--src/Makefile.in1
3 files changed, 0 insertions, 45 deletions
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index d4b8fdc..8162ccd 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 */
@@ -1989,36 +1976,12 @@ 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.
* (Prevents race condition where some processes go ahead and write
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 a7766aa..8311916 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -568,7 +568,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@