[mpich2-commits] r7923 - in mpich2/trunk/src/mpi/romio: adio/ad_lustre adio/ad_nfs adio/ad_panfs adio/common mpi-io mpi-io/fortran mpi-io/glue/default

robl at mcs.anl.gov robl at mcs.anl.gov
Wed Feb 9 11:44:50 CST 2011


Author: robl
Date: 2011-02-09 11:44:50 -0600 (Wed, 09 Feb 2011)
New Revision: 7923

Modified:
   mpich2/trunk/src/mpi/romio/adio/ad_lustre/ad_lustre_wrstr.c
   mpich2/trunk/src/mpi/romio/adio/ad_nfs/ad_nfs_read.c
   mpich2/trunk/src/mpi/romio/adio/ad_nfs/ad_nfs_write.c
   mpich2/trunk/src/mpi/romio/adio/ad_panfs/ad_panfs_open.c
   mpich2/trunk/src/mpi/romio/adio/common/ad_read_str.c
   mpich2/trunk/src/mpi/romio/adio/common/ad_write_str.c
   mpich2/trunk/src/mpi/romio/mpi-io/fortran/get_viewf.c
   mpich2/trunk/src/mpi/romio/mpi-io/glue/default/mpio_err.c
   mpich2/trunk/src/mpi/romio/mpi-io/iwrite_sh.c
   mpich2/trunk/src/mpi/romio/mpi-io/read_sh.c
   mpich2/trunk/src/mpi/romio/mpi-io/write_sh.c
Log:
from Michael Raymond <mraymond at sgi.com>: some picky compilers want braces
around multi-line macros.


Modified: mpich2/trunk/src/mpi/romio/adio/ad_lustre/ad_lustre_wrstr.c
===================================================================
--- mpich2/trunk/src/mpi/romio/adio/ad_lustre/ad_lustre_wrstr.c	2011-02-09 17:44:12 UTC (rev 7922)
+++ mpich2/trunk/src/mpi/romio/adio/ad_lustre/ad_lustre_wrstr.c	2011-02-09 17:44:50 UTC (rev 7923)
@@ -18,8 +18,9 @@
            ADIO_WriteContig(fd, writebuf, writebuf_len, MPI_BYTE, \
                              ADIO_EXPLICIT_OFFSET, writebuf_off,        \
                              &status1, error_code);                     \
-           if (!(fd->atomicity)) \
+           if (!(fd->atomicity)) {						  \
                 ADIOI_UNLOCK(fd, writebuf_off, SEEK_SET, writebuf_len); \
+	    } \
            if (*error_code != MPI_SUCCESS) { \
                *error_code = MPIO_Err_create_code(*error_code, \
                                                    MPIR_ERR_RECOVERABLE, \
@@ -35,8 +36,9 @@
         writebuf_len = (unsigned) ADIOI_MIN(end_offset - writebuf_off + 1, \
                                        (writebuf_off / stripe_size + 1) * \
                                             stripe_size - writebuf_off); \
-	if (!(fd->atomicity)) \
+	if (!(fd->atomicity)) {						  \
             ADIOI_WRITE_LOCK(fd, writebuf_off, SEEK_SET, writebuf_len); \
+	} \
         ADIO_ReadContig(fd, writebuf, writebuf_len, MPI_BYTE,           \
                         ADIO_EXPLICIT_OFFSET,                           \
                         writebuf_off, &status1, error_code); \
@@ -58,8 +60,9 @@
     while (write_sz != req_len) {                                       \
         ADIO_WriteContig(fd, writebuf, writebuf_len, MPI_BYTE, \
                          ADIO_EXPLICIT_OFFSET, writebuf_off, &status1, error_code); \
-        if (!(fd->atomicity)) \
+        if (!(fd->atomicity)) { \
             ADIOI_UNLOCK(fd, writebuf_off, SEEK_SET, writebuf_len); \
+	 } \
         if (*error_code != MPI_SUCCESS) { \
             *error_code = MPIO_Err_create_code(*error_code, \
                                                MPIR_ERR_RECOVERABLE, myname, \
@@ -75,8 +78,9 @@
         writebuf_len = (unsigned) ADIOI_MIN(end_offset - writebuf_off + 1, \
                                        (writebuf_off / stripe_size + 1) * \
                                             stripe_size - writebuf_off); \
-	if (!(fd->atomicity)) \
+	if (!(fd->atomicity)) { \
             ADIOI_WRITE_LOCK(fd, writebuf_off, SEEK_SET, writebuf_len); \
+	} \
         ADIO_ReadContig(fd, writebuf, writebuf_len, MPI_BYTE,           \
                         ADIO_EXPLICIT_OFFSET,                           \
                         writebuf_off, &status1, error_code); \
@@ -222,8 +226,9 @@
         writebuf_len = 0;
 
         /* if atomicity is true, lock the region to be accessed */
-	if (fd->atomicity)
+	if (fd->atomicity) {
 	    ADIOI_WRITE_LOCK(fd, start_off, SEEK_SET, bufsize);
+	}
 
 	for (j = 0; j < count; j++) {
 	    for (i = 0; i < flat_buf->count; i++) {
@@ -241,8 +246,9 @@
 			 ADIO_EXPLICIT_OFFSET, writebuf_off, &status1,
 			 error_code);
 
-	if (fd->atomicity)
+	if (fd->atomicity) {
 	    ADIOI_UNLOCK(fd, start_off, SEEK_SET, bufsize);
+	}
 	if (*error_code != MPI_SUCCESS) {
             ADIOI_Free(writebuf);
 	    return;
@@ -379,8 +385,9 @@
 	    }
 
 /* if atomicity is true, lock the region to be accessed */
-        if (fd->atomicity)
+        if (fd->atomicity) {
             ADIOI_WRITE_LOCK(fd, start_off, SEEK_SET, end_offset-start_off+1);
+	 }
 
 	    writebuf_off = 0;
 	    writebuf_len = 0;
@@ -505,12 +512,14 @@
             ADIO_WriteContig(fd, writebuf, writebuf_len, MPI_BYTE,
                              ADIO_EXPLICIT_OFFSET,
 	                         writebuf_off, &status1, error_code);
-		if (!(fd->atomicity))
+		if (!(fd->atomicity)) {
 		    ADIOI_UNLOCK(fd, writebuf_off, SEEK_SET, writebuf_len);
+		}
             if (*error_code != MPI_SUCCESS) return;
 	    }
-	    if (fd->atomicity)
+	    if (fd->atomicity) {
             ADIOI_UNLOCK(fd, start_off, SEEK_SET, end_offset-start_off+1);
+	    }
 
         ADIOI_Free(writebuf);
 

Modified: mpich2/trunk/src/mpi/romio/adio/ad_nfs/ad_nfs_read.c
===================================================================
--- mpich2/trunk/src/mpi/romio/adio/ad_nfs/ad_nfs_read.c	2011-02-09 17:44:12 UTC (rev 7922)
+++ mpich2/trunk/src/mpi/romio/adio/ad_nfs/ad_nfs_read.c	2011-02-09 17:44:50 UTC (rev 7923)
@@ -28,9 +28,9 @@
             MPE_Log_event( ADIOI_MPE_lseek_b, 0, NULL );
 #endif
         }
-	if (fd->atomicity)
+	if (fd->atomicity) {
 	    ADIOI_WRITE_LOCK(fd, offset, SEEK_SET, len);
-	else ADIOI_READ_LOCK(fd, offset, SEEK_SET, len);
+	} else ADIOI_READ_LOCK(fd, offset, SEEK_SET, len);
 #ifdef ADIOI_MPE_LOGGING
         MPE_Log_event( ADIOI_MPE_read_a, 0, NULL );
 #endif
@@ -53,9 +53,9 @@
             MPE_Log_event( ADIOI_MPE_lseek_b, 0, NULL );
 #endif
         }
-	if (fd->atomicity)
+	if (fd->atomicity) {
 	    ADIOI_WRITE_LOCK(fd, offset, SEEK_SET, len);
-	else ADIOI_READ_LOCK(fd, offset, SEEK_SET, len);
+	} else ADIOI_READ_LOCK(fd, offset, SEEK_SET, len);
 #ifdef ADIOI_MPE_LOGGING
         MPE_Log_event( ADIOI_MPE_read_a, 0, NULL );
 #endif
@@ -132,9 +132,9 @@
 	readbuf_off = req_off; \
 	readbuf_len = (int) (ADIOI_MIN(max_bufsize, end_offset-readbuf_off+1));\
 	lseek(fd->fd_sys, readbuf_off, SEEK_SET);\
-        if (!(fd->atomicity)) ADIOI_READ_LOCK(fd, readbuf_off, SEEK_SET, readbuf_len);\
+	 if (!(fd->atomicity)) {ADIOI_READ_LOCK(fd, readbuf_off, SEEK_SET, readbuf_len);} \
         err = read(fd->fd_sys, readbuf, readbuf_len);\
-        if (!(fd->atomicity)) ADIOI_UNLOCK(fd, readbuf_off, SEEK_SET, readbuf_len);\
+        if (!(fd->atomicity)) {ADIOI_UNLOCK(fd, readbuf_off, SEEK_SET, readbuf_len);} \
         if (err == -1) err_flag = 1; \
     } \
     while (req_len > readbuf_off + readbuf_len - req_off) { \
@@ -149,9 +149,9 @@
 	readbuf_len = (int) (partial_read + ADIOI_MIN(max_bufsize, \
 				       end_offset-readbuf_off+1)); \
 	lseek(fd->fd_sys, readbuf_off+partial_read, SEEK_SET);\
-        if (!(fd->atomicity)) ADIOI_READ_LOCK(fd, readbuf_off+partial_read, SEEK_SET, readbuf_len-partial_read);\
+	 if (!(fd->atomicity)) {ADIOI_READ_LOCK(fd, readbuf_off+partial_read, SEEK_SET, readbuf_len-partial_read);} \
         err = read(fd->fd_sys, readbuf+partial_read, readbuf_len-partial_read);\
-        if (!(fd->atomicity)) ADIOI_UNLOCK(fd, readbuf_off+partial_read, SEEK_SET, readbuf_len-partial_read);\
+        if (!(fd->atomicity)) {ADIOI_UNLOCK(fd, readbuf_off+partial_read, SEEK_SET, readbuf_len-partial_read);}	\
         if (err == -1) err_flag = 1; \
     } \
     memcpy((char *)buf + userbuf_off, readbuf+req_off-readbuf_off, req_len); \
@@ -224,8 +224,9 @@
         readbuf_len = (int) (ADIOI_MIN(max_bufsize, end_offset-readbuf_off+1));
 
 /* if atomicity is true, lock (exclusive) the region to be accessed */
-        if (fd->atomicity)
+        if (fd->atomicity) {
             ADIOI_WRITE_LOCK(fd, start_off, SEEK_SET, end_offset-start_off+1);
+	 }
 
 #ifdef ADIOI_MPE_LOGGING
         MPE_Log_event( ADIOI_MPE_lseek_a, 0, NULL );
@@ -234,7 +235,7 @@
 #ifdef ADIOI_MPE_LOGGING
         MPE_Log_event( ADIOI_MPE_lseek_b, 0, NULL );
 #endif
-        if (!(fd->atomicity)) ADIOI_READ_LOCK(fd, readbuf_off, SEEK_SET, readbuf_len);
+        if (!(fd->atomicity)) {ADIOI_READ_LOCK(fd, readbuf_off, SEEK_SET, readbuf_len);}
 #ifdef ADIOI_MPE_LOGGING
         MPE_Log_event( ADIOI_MPE_read_a, 0, NULL );
 #endif
@@ -242,7 +243,7 @@
 #ifdef ADIOI_MPE_LOGGING
         MPE_Log_event( ADIOI_MPE_read_b, 0, NULL );
 #endif
-        if (!(fd->atomicity)) ADIOI_UNLOCK(fd, readbuf_off, SEEK_SET, readbuf_len);
+        if (!(fd->atomicity)) {ADIOI_UNLOCK(fd, readbuf_off, SEEK_SET, readbuf_len);}
         if (err == -1) err_flag = 1;
 
         for (j=0; j<count; j++) 
@@ -254,8 +255,9 @@
                 off += flat_buf->blocklens[i];
             }
 
-        if (fd->atomicity)
+        if (fd->atomicity) {
             ADIOI_UNLOCK(fd, start_off, SEEK_SET, end_offset-start_off+1);
+	 }
 
         if (file_ptr_type == ADIO_INDIVIDUAL) fd->fp_ind = off;
 
@@ -383,8 +385,9 @@
 	}
 
 /* if atomicity is true, lock (exclusive) the region to be accessed */
-        if (fd->atomicity)
+	 if (fd->atomicity) {
             ADIOI_WRITE_LOCK(fd, start_off, SEEK_SET, end_offset-start_off+1);
+	 }
 
         /* initial read into readbuf */
 	readbuf_off = offset;
@@ -398,7 +401,7 @@
 #ifdef ADIOI_MPE_LOGGING
         MPE_Log_event( ADIOI_MPE_lseek_b, 0, NULL );
 #endif
-        if (!(fd->atomicity)) ADIOI_READ_LOCK(fd, offset, SEEK_SET, readbuf_len);
+        if (!(fd->atomicity)) {ADIOI_READ_LOCK(fd, offset, SEEK_SET, readbuf_len);}
 #ifdef ADIOI_MPE_LOGGING
         MPE_Log_event( ADIOI_MPE_read_a, 0, NULL );
 #endif
@@ -406,7 +409,7 @@
 #ifdef ADIOI_MPE_LOGGING
         MPE_Log_event( ADIOI_MPE_read_b, 0, NULL );
 #endif
-        if (!(fd->atomicity)) ADIOI_UNLOCK(fd, offset, SEEK_SET, readbuf_len);
+        if (!(fd->atomicity)) {ADIOI_UNLOCK(fd, offset, SEEK_SET, readbuf_len);}
 
         if (err == -1) err_flag = 1;
 
@@ -519,8 +522,9 @@
 	    }
 	}
 	
-        if (fd->atomicity)
+	 if (fd->atomicity) {
             ADIOI_UNLOCK(fd, start_off, SEEK_SET, end_offset-start_off+1);
+	 }
 
 	if (file_ptr_type == ADIO_INDIVIDUAL) fd->fp_ind = off;
 

Modified: mpich2/trunk/src/mpi/romio/adio/ad_nfs/ad_nfs_write.c
===================================================================
--- mpich2/trunk/src/mpi/romio/adio/ad_nfs/ad_nfs_write.c	2011-02-09 17:44:12 UTC (rev 7922)
+++ mpich2/trunk/src/mpi/romio/adio/ad_nfs/ad_nfs_write.c	2011-02-09 17:44:50 UTC (rev 7923)
@@ -152,11 +152,11 @@
     if (req_off >= writebuf_off + writebuf_len) { \
 	lseek(fd->fd_sys, writebuf_off, SEEK_SET); \
 	err = write(fd->fd_sys, writebuf, writebuf_len); \
-        if (!(fd->atomicity)) ADIOI_UNLOCK(fd, writebuf_off, SEEK_SET, writebuf_len); \
+	 if (!(fd->atomicity)) {ADIOI_UNLOCK(fd, writebuf_off, SEEK_SET, writebuf_len);} \
         if (err == -1) err_flag = 1; \
 	writebuf_off = req_off; \
         writebuf_len = (int) (ADIOI_MIN(max_bufsize,end_offset-writebuf_off+1));\
-	if (!(fd->atomicity)) ADIOI_WRITE_LOCK(fd, writebuf_off, SEEK_SET, writebuf_len); \
+	if (!(fd->atomicity)) {ADIOI_WRITE_LOCK(fd, writebuf_off, SEEK_SET, writebuf_len);} \
 	lseek(fd->fd_sys, writebuf_off, SEEK_SET); \
 	err = read(fd->fd_sys, writebuf, writebuf_len); \
         if (err == -1) { \
@@ -172,13 +172,13 @@
     while (write_sz != req_len) { \
 	lseek(fd->fd_sys, writebuf_off, SEEK_SET); \
 	err = write(fd->fd_sys, writebuf, writebuf_len); \
-        if (!(fd->atomicity)) ADIOI_UNLOCK(fd, writebuf_off, SEEK_SET, writebuf_len); \
+	 if (!(fd->atomicity)) {ADIOI_UNLOCK(fd, writebuf_off, SEEK_SET, writebuf_len);} \
         if (err == -1) err_flag = 1; \
         req_len -= write_sz; \
         userbuf_off += write_sz; \
         writebuf_off += writebuf_len; \
         writebuf_len = (int) (ADIOI_MIN(max_bufsize,end_offset-writebuf_off+1));\
-	if (!(fd->atomicity)) ADIOI_WRITE_LOCK(fd, writebuf_off, SEEK_SET, writebuf_len); \
+	if (!(fd->atomicity)) {ADIOI_WRITE_LOCK(fd, writebuf_off, SEEK_SET, writebuf_len);} \
 	lseek(fd->fd_sys, writebuf_off, SEEK_SET); \
 	err = read(fd->fd_sys, writebuf, writebuf_len); \
         if (err == -1) { \
@@ -203,11 +203,11 @@
         MPE_Log_event( ADIOI_MPE_lseek_a, 0, NULL ); \
 	lseek(fd->fd_sys, writebuf_off, SEEK_SET); \
         MPE_Log_event( ADIOI_MPE_lseek_b, 0, NULL ); \
-	if (!(fd->atomicity)) ADIOI_WRITE_LOCK(fd, writebuf_off, SEEK_SET, writebuf_len); \
+	if (!(fd->atomicity)) {ADIOI_WRITE_LOCK(fd, writebuf_off, SEEK_SET, writebuf_len);} \
         MPE_Log_event( ADIOI_MPE_write_a, 0, NULL ); \
 	err = write(fd->fd_sys, writebuf, writebuf_len); \
         MPE_Log_event( ADIOI_MPE_write_b, 0, NULL ); \
-        if (!(fd->atomicity)) ADIOI_UNLOCK(fd, writebuf_off, SEEK_SET, writebuf_len); \
+        if (!(fd->atomicity)) {ADIOI_UNLOCK(fd, writebuf_off, SEEK_SET, writebuf_len);} \
         if (err == -1) err_flag = 1; \
 	writebuf_off = req_off; \
         writebuf_len = (int) (ADIOI_MIN(max_bufsize,end_offset-writebuf_off+1));\
@@ -218,11 +218,11 @@
         MPE_Log_event( ADIOI_MPE_lseek_a, 0, NULL ); \
 	lseek(fd->fd_sys, writebuf_off, SEEK_SET); \
         MPE_Log_event( ADIOI_MPE_lseek_b, 0, NULL ); \
-	if (!(fd->atomicity)) ADIOI_WRITE_LOCK(fd, writebuf_off, SEEK_SET, writebuf_len); \
+	if (!(fd->atomicity)) {ADIOI_WRITE_LOCK(fd, writebuf_off, SEEK_SET, writebuf_len);} \
         MPE_Log_event( ADIOI_MPE_write_a, 0, NULL ); \
 	err = write(fd->fd_sys, writebuf, writebuf_len); \
         MPE_Log_event( ADIOI_MPE_write_b, 0, NULL ); \
-        if (!(fd->atomicity)) ADIOI_UNLOCK(fd, writebuf_off, SEEK_SET, writebuf_len); \
+        if (!(fd->atomicity)) {ADIOI_UNLOCK(fd, writebuf_off, SEEK_SET, writebuf_len);} \
         if (err == -1) err_flag = 1; \
         req_len -= write_sz; \
         userbuf_off += write_sz; \
@@ -237,9 +237,9 @@
 { \
     if (req_off >= writebuf_off + writebuf_len) { \
 	lseek(fd->fd_sys, writebuf_off, SEEK_SET); \
-	if (!(fd->atomicity)) ADIOI_WRITE_LOCK(fd, writebuf_off, SEEK_SET, writebuf_len); \
+	if (!(fd->atomicity)) {ADIOI_WRITE_LOCK(fd, writebuf_off, SEEK_SET, writebuf_len);}	\
 	err = write(fd->fd_sys, writebuf, writebuf_len); \
-        if (!(fd->atomicity)) ADIOI_UNLOCK(fd, writebuf_off, SEEK_SET, writebuf_len); \
+	 if (!(fd->atomicity)) {ADIOI_UNLOCK(fd, writebuf_off, SEEK_SET, writebuf_len);} \
         if (err == -1) err_flag = 1; \
 	writebuf_off = req_off; \
         writebuf_len = (int) (ADIOI_MIN(max_bufsize,end_offset-writebuf_off+1));\
@@ -248,9 +248,9 @@
     memcpy(writebuf+req_off-writebuf_off, (char *)buf +userbuf_off, write_sz);\
     while (write_sz != req_len) { \
 	lseek(fd->fd_sys, writebuf_off, SEEK_SET); \
-	if (!(fd->atomicity)) ADIOI_WRITE_LOCK(fd, writebuf_off, SEEK_SET, writebuf_len); \
+	if (!(fd->atomicity)) {ADIOI_WRITE_LOCK(fd, writebuf_off, SEEK_SET, writebuf_len);}	\
 	err = write(fd->fd_sys, writebuf, writebuf_len); \
-        if (!(fd->atomicity)) ADIOI_UNLOCK(fd, writebuf_off, SEEK_SET, writebuf_len); \
+	 if (!(fd->atomicity)) {ADIOI_UNLOCK(fd, writebuf_off, SEEK_SET, writebuf_len);} \
         if (err == -1) err_flag = 1; \
         req_len -= write_sz; \
         userbuf_off += write_sz; \
@@ -327,8 +327,9 @@
         writebuf_len = (int) (ADIOI_MIN(max_bufsize,end_offset-writebuf_off+1));
 
 /* if atomicity is true, lock the region to be accessed */
-        if (fd->atomicity) 
+        if (fd->atomicity) {
             ADIOI_WRITE_LOCK(fd, start_off, SEEK_SET, end_offset-start_off+1);
+	 }
 
         for (j=0; j<count; j++) 
             for (i=0; i<flat_buf->count; i++) {
@@ -347,7 +348,7 @@
 #ifdef ADIOI_MPE_LOGGING
         MPE_Log_event( ADIOI_MPE_lseek_b, 0, NULL );
 #endif
-	if (!(fd->atomicity)) ADIOI_WRITE_LOCK(fd, writebuf_off, SEEK_SET, writebuf_len);
+	if (!(fd->atomicity)) {ADIOI_WRITE_LOCK(fd, writebuf_off, SEEK_SET, writebuf_len);}
 #ifdef ADIOI_MPE_LOGGING
         MPE_Log_event( ADIOI_MPE_write_a, 0, NULL );
 #endif
@@ -355,11 +356,12 @@
 #ifdef ADIOI_MPE_LOGGING
         MPE_Log_event( ADIOI_MPE_write_b, 0, NULL );
 #endif
-        if (!(fd->atomicity)) ADIOI_UNLOCK(fd, writebuf_off, SEEK_SET, writebuf_len);
+        if (!(fd->atomicity)) {ADIOI_UNLOCK(fd, writebuf_off, SEEK_SET, writebuf_len);}
         if (err == -1) err_flag = 1; 
 
-        if (fd->atomicity) 
+        if (fd->atomicity) {
             ADIOI_UNLOCK(fd, start_off, SEEK_SET, end_offset-start_off+1);
+	 }
 
 	ADIOI_Free(writebuf); /* malloced in the buffered_write macro */
 
@@ -486,14 +488,15 @@
 	}
 
 /* if atomicity is true, lock the region to be accessed */
-        if (fd->atomicity) 
+	 if (fd->atomicity) {
             ADIOI_WRITE_LOCK(fd, start_off, SEEK_SET, end_offset-start_off+1);
+	 }
 
         /* initial read for the read-modify-write */
         writebuf_off = offset;
         writebuf = (char *) ADIOI_Malloc(max_bufsize);
         writebuf_len = (int)(ADIOI_MIN(max_bufsize,end_offset-writebuf_off+1));
-	if (!(fd->atomicity)) ADIOI_WRITE_LOCK(fd, writebuf_off, SEEK_SET, writebuf_len);
+	if (!(fd->atomicity)) {ADIOI_WRITE_LOCK(fd, writebuf_off, SEEK_SET, writebuf_len);}
 #ifdef ADIOI_MPE_LOGGING
         MPE_Log_event( ADIOI_MPE_lseek_a, 0, NULL );
 #endif
@@ -635,7 +638,7 @@
 #ifdef ADIOI_MPE_LOGGING
         MPE_Log_event( ADIOI_MPE_lseek_b, 0, NULL );
 #endif
-	if (!(fd->atomicity)) ADIOI_WRITE_LOCK(fd, writebuf_off, SEEK_SET, writebuf_len);
+	if (!(fd->atomicity)) {ADIOI_WRITE_LOCK(fd, writebuf_off, SEEK_SET, writebuf_len);}
 #ifdef ADIOI_MPE_LOGGING
         MPE_Log_event( ADIOI_MPE_write_a, 0, NULL );
 #endif

Modified: mpich2/trunk/src/mpi/romio/adio/ad_panfs/ad_panfs_open.c
===================================================================
--- mpich2/trunk/src/mpi/romio/adio/ad_panfs/ad_panfs_open.c	2011-02-09 17:44:12 UTC (rev 7922)
+++ mpich2/trunk/src/mpi/romio/adio/ad_panfs/ad_panfs_open.c	2011-02-09 17:44:50 UTC (rev 7923)
@@ -156,7 +156,7 @@
             char* slash;
             struct stat stat_buf;
             int err;
-            char *value, *path, *file_name_ptr;
+            char *path;
 
             /* Check that the file does not exist before
              * trying to create it.  The ioctl itself should
@@ -327,6 +327,8 @@
                         ADIOI_Snprintf(temp_buffer,TEMP_BUFFER_SIZE,"%u",file_query_args.layout.u.raid10.layout_visit_policy);
                         ADIOI_Info_set(fd->info, "panfs_layout_visit_policy", temp_buffer);
                         break;
+		  default:
+			  break;
                 }
             }
         }

Modified: mpich2/trunk/src/mpi/romio/adio/common/ad_read_str.c
===================================================================
--- mpich2/trunk/src/mpi/romio/adio/common/ad_read_str.c	2011-02-09 17:44:12 UTC (rev 7922)
+++ mpich2/trunk/src/mpi/romio/adio/common/ad_read_str.c	2011-02-09 17:44:50 UTC (rev 7923)
@@ -126,8 +126,9 @@
         readbuf_len = (unsigned) (ADIOI_MIN(max_bufsize, end_offset-readbuf_off+1));
 
 /* if atomicity is true, lock (exclusive) the region to be accessed */
-        if ((fd->atomicity) && ADIO_Feature(fd, ADIO_LOCKS))
+        if ((fd->atomicity) && ADIO_Feature(fd, ADIO_LOCKS)) {
             ADIOI_WRITE_LOCK(fd, start_off, SEEK_SET, end_offset-start_off+1);
+	 }
 
         ADIO_ReadContig(fd, readbuf, readbuf_len, MPI_BYTE, 
             ADIO_EXPLICIT_OFFSET, readbuf_off, &status1, error_code);
@@ -144,8 +145,9 @@
               }
         }
 
-        if ((fd->atomicity) && ADIO_Feature(fd, ADIO_LOCKS))
+        if ((fd->atomicity) && ADIO_Feature(fd, ADIO_LOCKS)) {
             ADIOI_UNLOCK(fd, start_off, SEEK_SET, end_offset-start_off+1);
+	 }
 
         if (file_ptr_type == ADIO_INDIVIDUAL) fd->fp_ind = off;
 
@@ -265,8 +267,9 @@
 	}
 
 /* if atomicity is true, lock (exclusive) the region to be accessed */
-        if ((fd->atomicity) && ADIO_Feature(fd, ADIO_LOCKS))
+	 if ((fd->atomicity) && ADIO_Feature(fd, ADIO_LOCKS)) {
             ADIOI_WRITE_LOCK(fd, start_off, SEEK_SET, end_offset-start_off+1);
+	}
 
 	readbuf_off = 0;
 	readbuf_len = 0;
@@ -382,8 +385,9 @@
 	    }
 	}
 	
-        if ((fd->atomicity) && ADIO_Feature(fd, ADIO_LOCKS))
+	 if ((fd->atomicity) && ADIO_Feature(fd, ADIO_LOCKS)) {
             ADIOI_UNLOCK(fd, start_off, SEEK_SET, end_offset-start_off+1);
+	 }
 
 	if (file_ptr_type == ADIO_INDIVIDUAL) fd->fp_ind = off;
 

Modified: mpich2/trunk/src/mpi/romio/adio/common/ad_write_str.c
===================================================================
--- mpich2/trunk/src/mpi/romio/adio/common/ad_write_str.c	2011-02-09 17:44:12 UTC (rev 7922)
+++ mpich2/trunk/src/mpi/romio/adio/common/ad_write_str.c	2011-02-09 17:44:50 UTC (rev 7923)
@@ -14,7 +14,7 @@
         if (writebuf_len) { \
            ADIO_WriteContig(fd, writebuf, writebuf_len, MPI_BYTE, \
                   ADIO_EXPLICIT_OFFSET, writebuf_off, &status1, error_code); \
-           if (!(fd->atomicity)) ADIOI_UNLOCK(fd, writebuf_off, SEEK_SET, writebuf_len); \
+           if (!(fd->atomicity)) {ADIOI_UNLOCK(fd, writebuf_off, SEEK_SET, writebuf_len);}	\
            if (*error_code != MPI_SUCCESS) { \
                *error_code = MPIO_Err_create_code(*error_code, \
                                                   MPIR_ERR_RECOVERABLE, myname, \
@@ -25,7 +25,7 @@
         } \
 	writebuf_off = req_off; \
         writebuf_len = (unsigned) (ADIOI_MIN(max_bufsize,end_offset-writebuf_off+1));\
-	if (!(fd->atomicity)) ADIOI_WRITE_LOCK(fd, writebuf_off, SEEK_SET, writebuf_len); \
+	 if (!(fd->atomicity)) {ADIOI_WRITE_LOCK(fd, writebuf_off, SEEK_SET, writebuf_len);} \
 	ADIO_ReadContig(fd, writebuf, writebuf_len, MPI_BYTE, \
                  ADIO_EXPLICIT_OFFSET, writebuf_off, &status1, error_code); \
 	if (*error_code != MPI_SUCCESS) { \
@@ -42,7 +42,7 @@
     while (write_sz != req_len) { \
         ADIO_WriteContig(fd, writebuf, writebuf_len, MPI_BYTE, \
                   ADIO_EXPLICIT_OFFSET, writebuf_off, &status1, error_code); \
-        if (!(fd->atomicity)) ADIOI_UNLOCK(fd, writebuf_off, SEEK_SET, writebuf_len); \
+        if (!(fd->atomicity)) {ADIOI_UNLOCK(fd, writebuf_off, SEEK_SET, writebuf_len);} \
         if (*error_code != MPI_SUCCESS) { \
             *error_code = MPIO_Err_create_code(*error_code, \
                                                MPIR_ERR_RECOVERABLE, myname, \
@@ -54,7 +54,7 @@
         userbuf_off += write_sz; \
         writebuf_off += writebuf_len; \
         writebuf_len = (unsigned) (ADIOI_MIN(max_bufsize,end_offset-writebuf_off+1));\
-	if (!(fd->atomicity)) ADIOI_WRITE_LOCK(fd, writebuf_off, SEEK_SET, writebuf_len); \
+	 if (!(fd->atomicity)) {ADIOI_WRITE_LOCK(fd, writebuf_off, SEEK_SET, writebuf_len);} \
         ADIO_ReadContig(fd, writebuf, writebuf_len, MPI_BYTE, \
                   ADIO_EXPLICIT_OFFSET, writebuf_off, &status1, error_code); \
 	if (*error_code != MPI_SUCCESS) { \
@@ -191,8 +191,9 @@
         writebuf_len = (unsigned) (ADIOI_MIN(max_bufsize, end_offset-writebuf_off+1));
 
 /* if atomicity is true, lock the region to be accessed */
-	if (fd->atomicity) 
+	 if (fd->atomicity) {
 	    ADIOI_WRITE_LOCK(fd, start_off, SEEK_SET, end_offset-start_off+1);
+	 }
 
         for (j=0; j<count; j++) 
         {
@@ -209,8 +210,9 @@
         ADIO_WriteContig(fd, writebuf, writebuf_len, MPI_BYTE, ADIO_EXPLICIT_OFFSET,
 			writebuf_off, &status1, error_code);
 
-	if (fd->atomicity) 
+	 if (fd->atomicity) {
 	    ADIOI_UNLOCK(fd, start_off, SEEK_SET, end_offset-start_off+1);
+	 }
 
 	if (*error_code != MPI_SUCCESS) return;
 
@@ -334,8 +336,9 @@
 	}
 
 /* if atomicity is true, lock the region to be accessed */
-	if (fd->atomicity) 
+	if (fd->atomicity) {
 	    ADIOI_WRITE_LOCK(fd, start_off, SEEK_SET, end_offset-start_off+1);
+	}
 
         writebuf_off = 0;
         writebuf_len = 0;
@@ -457,12 +460,14 @@
 	if (writebuf_len) {
 	    ADIO_WriteContig(fd, writebuf, writebuf_len, MPI_BYTE, ADIO_EXPLICIT_OFFSET,
 			writebuf_off, &status1, error_code);
-	    if (!(fd->atomicity)) 
+	    if (!(fd->atomicity)) {
 		ADIOI_UNLOCK(fd, writebuf_off, SEEK_SET, writebuf_len);
+	    }
 	    if (*error_code != MPI_SUCCESS) return;
 	}
-	if (fd->atomicity) 
+	if (fd->atomicity) {
 	    ADIOI_UNLOCK(fd, start_off, SEEK_SET, end_offset-start_off+1);
+	}
 
 	ADIOI_Free(writebuf); 
 

Modified: mpich2/trunk/src/mpi/romio/mpi-io/fortran/get_viewf.c
===================================================================
--- mpich2/trunk/src/mpi/romio/mpi-io/fortran/get_viewf.c	2011-02-09 17:44:12 UTC (rev 7922)
+++ mpich2/trunk/src/mpi/romio/mpi-io/fortran/get_viewf.c	2011-02-09 17:44:50 UTC (rev 7923)
@@ -160,7 +160,8 @@
     
     tmprep = (char *) ADIOI_Malloc((MPI_MAX_DATAREP_STRING+1) * sizeof(char));
     fh_c = MPI_File_f2c(*fh);
-    *ierr = MPI_File_get_view(fh_c, disp, etype, filetype, tmprep);
+    *ierr = MPI_File_get_view(fh_c, disp, (MPI_Datatype*)etype,
+				  (MPI_Datatype*)filetype, tmprep);
 
     tmpreplen = strlen(tmprep);
     if (tmpreplen <= str_len) {

Modified: mpich2/trunk/src/mpi/romio/mpi-io/glue/default/mpio_err.c
===================================================================
--- mpich2/trunk/src/mpi/romio/mpi-io/glue/default/mpio_err.c	2011-02-09 17:44:12 UTC (rev 7922)
+++ mpich2/trunk/src/mpi/romio/mpi-io/glue/default/mpio_err.c	2011-02-09 17:44:50 UTC (rev 7923)
@@ -83,8 +83,6 @@
     {
 	MPI_Abort(mpi_comm, 1);
     }
-    else
-    {
-	return error_code;
-    }
+
+    return error_code;
 }

Modified: mpich2/trunk/src/mpi/romio/mpi-io/iwrite_sh.c
===================================================================
--- mpich2/trunk/src/mpi/romio/mpi-io/iwrite_sh.c	2011-02-09 17:44:12 UTC (rev 7922)
+++ mpich2/trunk/src/mpi/romio/mpi-io/iwrite_sh.c	2011-02-09 17:44:50 UTC (rev 7923)
@@ -93,14 +93,16 @@
             /* to maintain strict atomicity semantics with other concurrent
               operations, lock (exclusive) and call blocking routine */
 
-            if (fh->file_system != ADIO_NFS)
+		if (fh->file_system != ADIO_NFS) {
                 ADIOI_WRITE_LOCK(fh, off, SEEK_SET, bufsize);
+		}
 
             ADIO_WriteContig(fh, buf, count, datatype, ADIO_EXPLICIT_OFFSET,
 			     off, &status, &error_code);  
 
-            if (fh->file_system != ADIO_NFS)
+            if (fh->file_system != ADIO_NFS) {
                 ADIOI_UNLOCK(fh, off, SEEK_SET, bufsize);
+	     }
 
 	    MPIO_Completed_request_create(&fh, bufsize, &error_code, request);
 	}

Modified: mpich2/trunk/src/mpi/romio/mpi-io/read_sh.c
===================================================================
--- mpich2/trunk/src/mpi/romio/mpi-io/read_sh.c	2011-02-09 17:44:12 UTC (rev 7922)
+++ mpich2/trunk/src/mpi/romio/mpi-io/read_sh.c	2011-02-09 17:44:50 UTC (rev 7923)
@@ -106,14 +106,16 @@
            could be a concurrent noncontiguous request. On NFS, locking 
            is done in the ADIO_ReadContig.*/
 
-        if ((fh->atomicity) && (fh->file_system != ADIO_NFS))
+        if ((fh->atomicity) && (fh->file_system != ADIO_NFS)) {
             ADIOI_WRITE_LOCK(fh, off, SEEK_SET, bufsize);
+	 }
 
         ADIO_ReadContig(fh, buf, count, datatype, ADIO_EXPLICIT_OFFSET,
                         off, status, &error_code); 
 
-        if ((fh->atomicity) && (fh->file_system != ADIO_NFS))
+        if ((fh->atomicity) && (fh->file_system != ADIO_NFS)) {
             ADIOI_UNLOCK(fh, off, SEEK_SET, bufsize);
+	 }
     }
     else
     {

Modified: mpich2/trunk/src/mpi/romio/mpi-io/write_sh.c
===================================================================
--- mpich2/trunk/src/mpi/romio/mpi-io/write_sh.c	2011-02-09 17:44:12 UTC (rev 7922)
+++ mpich2/trunk/src/mpi/romio/mpi-io/write_sh.c	2011-02-09 17:44:50 UTC (rev 7923)
@@ -106,14 +106,16 @@
            could be a concurrent noncontiguous request. On NFS, locking is 
            done in the ADIO_WriteContig.*/
 
-        if ((fh->atomicity) && (fh->file_system != ADIO_NFS))
+	if ((fh->atomicity) && (fh->file_system != ADIO_NFS)) {
             ADIOI_WRITE_LOCK(fh, off, SEEK_SET, bufsize);
+	}
 
 	ADIO_WriteContig(fh, buf, count, datatype, ADIO_EXPLICIT_OFFSET,
 		     off, status, &error_code); 
 
-        if ((fh->atomicity) && (fh->file_system != ADIO_NFS))
+	if ((fh->atomicity) && (fh->file_system != ADIO_NFS)) {
             ADIOI_UNLOCK(fh, off, SEEK_SET, bufsize);
+	}
     }
     else
     {



More information about the mpich2-commits mailing list