[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.0.4-188-g74639d5

mysql vizuser noreply at mpich.org
Tue May 14 10:42:22 CDT 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".

The branch, master has been updated
       via  74639d55be135e34a787f3627e9a084909dfd081 (commit)
      from  470667cbd81fea954ebcad19f1a820acea61789b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/74639d55be135e34a787f3627e9a084909dfd081

commit 74639d55be135e34a787f3627e9a084909dfd081
Author: Haizhu Liu <haizhu at us.ibm.com>
Date:   Wed May 1 13:39:25 2013 -0400

    adio/common wrong checking of lseek return
    
    (ibm) D190161
    (ibm) 55566af07e7d69df17005e50c783ff3ae26cc325
    
    Signed-off-by: Michael Blocksome <blocksom at us.ibm.com>

diff --git a/src/mpi/romio/adio/common/ad_read.c b/src/mpi/romio/adio/common/ad_read.c
index 0c706f8..3cea7ed 100644
--- a/src/mpi/romio/adio/common/ad_read.c
+++ b/src/mpi/romio/adio/common/ad_read.c
@@ -19,7 +19,9 @@ void ADIOI_GEN_ReadContig(ADIO_File fd, void *buf, int count,
 			  ADIO_Offset offset, ADIO_Status *status,
 			  int *error_code)
 {
-    int err = -1, datatype_size;
+    off_t err_lseek = -1;
+    ssize_t err = -1;
+    int datatype_size;
     ADIO_Offset len;
     static char myname[] = "ADIOI_GEN_READCONTIG";
 
@@ -38,12 +40,12 @@ void ADIOI_GEN_ReadContig(ADIO_File fd, void *buf, int count,
 #ifdef ADIOI_MPE_LOGGING
         MPE_Log_event( ADIOI_MPE_lseek_a, 0, NULL );
 #endif
-	err = lseek(fd->fd_sys, offset, SEEK_SET);
+	err_lseek = lseek(fd->fd_sys, offset, SEEK_SET);
 #ifdef ADIOI_MPE_LOGGING
         MPE_Log_event( ADIOI_MPE_lseek_b, 0, NULL );
 #endif
 	/* --BEGIN ERROR HANDLING-- */
-	if (err == -1) {
+	if (err_lseek == -1) {
 	    *error_code = MPIO_Err_create_code(MPI_SUCCESS,
 					       MPIR_ERR_RECOVERABLE,
 					       myname, __LINE__,
diff --git a/src/mpi/romio/adio/common/ad_write.c b/src/mpi/romio/adio/common/ad_write.c
index d9ccabf..eeba5da 100644
--- a/src/mpi/romio/adio/common/ad_write.c
+++ b/src/mpi/romio/adio/common/ad_write.c
@@ -19,7 +19,9 @@ void ADIOI_GEN_WriteContig(ADIO_File fd, const void *buf, int count,
 			   ADIO_Offset offset, ADIO_Status *status,
 			   int *error_code)
 {
-    int err = -1, datatype_size;
+    off_t err_lseek = -1;
+    ssize_t err = -1;
+    int datatype_size;
     ADIO_Offset len;
     static char myname[] = "ADIOI_GEN_WRITECONTIG";
 
@@ -39,12 +41,12 @@ void ADIOI_GEN_WriteContig(ADIO_File fd, const void *buf, int count,
 #ifdef ADIOI_MPE_LOGGING
         MPE_Log_event( ADIOI_MPE_lseek_a, 0, NULL );
 #endif
-	err = lseek(fd->fd_sys, offset, SEEK_SET);
+	err_lseek = lseek(fd->fd_sys, offset, SEEK_SET);
 #ifdef ADIOI_MPE_LOGGING
         MPE_Log_event( ADIOI_MPE_lseek_b, 0, NULL );
 #endif
 	/* --BEGIN ERROR HANDLING-- */
-	if (err == -1) {
+	if (err_lseek == -1) {
 	    *error_code = MPIO_Err_create_code(MPI_SUCCESS,
 					       MPIR_ERR_RECOVERABLE,
 					       myname, __LINE__,
diff --git a/src/mpi/romio/adio/common/ad_write_nolock.c b/src/mpi/romio/adio/common/ad_write_nolock.c
index 56a84d4..c84be8e 100644
--- a/src/mpi/romio/adio/common/ad_write_nolock.c
+++ b/src/mpi/romio/adio/common/ad_write_nolock.c
@@ -27,7 +27,9 @@ void ADIOI_NOLOCK_WriteStrided(ADIO_File fd, const void *buf, int count,
 /* offset is in units of etype relative to the filetype. */
 
     ADIOI_Flatlist_node *flat_buf, *flat_file;
-    int j, k, err=-1, st_index=0;
+    int j, k, st_index=0;
+    off_t err_lseek=-1;
+    ssize_t err=-1;
     ADIO_Offset fwr_size=0, bwr_size, new_bwr_size, new_fwr_size, i_offset, num;
     unsigned bufsize; 
     int n_etypes_in_filetype;
@@ -274,11 +276,11 @@ void ADIOI_NOLOCK_WriteStrided(ADIO_File fd, const void *buf, int count,
 		    printf("[%d/%d] c mem nc file writing loc = %Ld sz = %d\n", 
 			    rank, nprocs, off, fwr_size);
 #endif
-		    err = lseek(fd->fd_sys, off, SEEK_SET);
+		    err_lseek = lseek(fd->fd_sys, off, SEEK_SET);
 #ifdef ADIOI_MPE_LOGGING
 		    MPE_Log_event(ADIOI_MPE_lseek_b, 0, NULL);
 #endif
-		    if (err == -1) err_flag = 1;
+		    if (err_lseek == -1) err_flag = 1;
 #ifdef ADIOI_MPE_LOGGING
 		    MPE_Log_event(ADIOI_MPE_write_a, 0, NULL);
 #endif

-----------------------------------------------------------------------

Summary of changes:
 src/mpi/romio/adio/common/ad_read.c         |    8 +++++---
 src/mpi/romio/adio/common/ad_write.c        |    8 +++++---
 src/mpi/romio/adio/common/ad_write_nolock.c |    8 +++++---
 3 files changed, 15 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list