[dcmf] [PATCH 3/3] ifdef any bluegene changes outside ad_bgl.

Bob Cernohous bobc at us.ibm.com
Fri Feb 15 12:30:05 CST 2008


Signed-off-by: Bob Cernohous <bobc at us.ibm.com>
---
 .../src/mpi/romio/adio/ad_testfs/ad_testfs_hints.c |    4 ++++
 lib/mpi/mpich2/src/mpi/romio/adio/ad_ufs/ad_ufs.c  |   16 ++++++++++++++++
 .../mpich2/src/mpi/romio/adio/common/ad_fstype.c   |    5 +++--
 3 files changed, 23 insertions(+), 2 deletions(-)
 mode change 100644 => 100755 lib/mpi/mpich2/src/mpi/romio/adio/ad_testfs/ad_testfs_hints.c
 mode change 100644 => 100755 lib/mpi/mpich2/src/mpi/romio/adio/ad_ufs/ad_ufs.c
 mode change 100644 => 100755 lib/mpi/mpich2/src/mpi/romio/adio/common/ad_fstype.c

diff --git a/lib/mpi/mpich2/src/mpi/romio/adio/ad_testfs/ad_testfs_hints.c b/lib/mpi/mpich2/src/mpi/romio/adio/ad_testfs/ad_testfs_hints.c
old mode 100644
new mode 100755
index 2bb6e1b..58db1e8
--- a/lib/mpi/mpich2/src/mpi/romio/adio/ad_testfs/ad_testfs_hints.c
+++ b/lib/mpi/mpich2/src/mpi/romio/adio/ad_testfs/ad_testfs_hints.c
@@ -22,6 +22,10 @@ void ADIOI_TESTFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
     FPRINTF(stdout, "[%d/%d]    calling ADIOI_GEN_SetInfo\n", 
 	    myrank, nprocs);
 
+#ifdef ROMIO_BGL   /* BlueGene support for pvfs through ufs */
     /* BlueGene hack: force testfs to mimic BlueGene hints */
     ADIOI_BGL_SetInfo(fd, users_info, error_code);
+#else
+    ADIOI_GEN_SetInfo(fd, users_info, error_code);
+#endif
 }
diff --git a/lib/mpi/mpich2/src/mpi/romio/adio/ad_ufs/ad_ufs.c b/lib/mpi/mpich2/src/mpi/romio/adio/ad_ufs/ad_ufs.c
old mode 100644
new mode 100755
index a13ef78..1d85233
--- a/lib/mpi/mpich2/src/mpi/romio/adio/ad_ufs/ad_ufs.c
+++ b/lib/mpi/mpich2/src/mpi/romio/adio/ad_ufs/ad_ufs.c
@@ -12,17 +12,33 @@
 #include "adioi.h"
 
 struct ADIOI_Fns_struct ADIO_UFS_operations = {
+#ifdef ROMIO_BGL   /* BlueGene support for pvfs through ufs */
     ADIOI_BGL_Open, /* Open */
+#else
+    ADIOI_UFS_Open, /* Open */
+#endif
     ADIOI_GEN_ReadContig, /* ReadContig */
     ADIOI_GEN_WriteContig, /* WriteContig */
+#ifdef ROMIO_BGL   /* BlueGene support for pvfs through ufs */
     ADIOI_BGL_ReadStridedColl, /* ReadStridedColl */
     ADIOI_BGL_WriteStridedColl, /* WriteStridedColl */
+#else
+    ADIOI_GEN_ReadStridedColl, /* ReadStridedColl */
+    ADIOI_GEN_WriteStridedColl, /* WriteStridedColl */
+#endif
     ADIOI_GEN_SeekIndividual, /* SeekIndividual */
     ADIOI_GEN_Fcntl, /* Fcntl */
+#ifdef ROMIO_BGL   /* BlueGene support for pvfs through ufs */
     ADIOI_BGL_SetInfo, /* SetInfo */
     ADIOI_GEN_ReadStrided_naive, /*ADIOI_GEN_ReadStrided, * ReadStrided */
     ADIOI_GEN_WriteStrided_naive, /*ADIOI_NOLOCK_WriteStrided, * WriteStrided */
     ADIOI_BGL_Close, /* Close */
+#else
+    ADIOI_GEN_SetInfo, /* SetInfo */
+    ADIOI_GEN_ReadStrided, /* ReadStrided */
+    ADIOI_GEN_WriteStrided, /* WriteStrided */
+    ADIOI_GEN_Close, /* Close */
+#endif
 #ifdef ROMIO_HAVE_WORKING_AIO
     ADIOI_GEN_IreadContig, /* IreadContig */
     ADIOI_GEN_IwriteContig, /* IwriteContig */
diff --git a/lib/mpi/mpich2/src/mpi/romio/adio/common/ad_fstype.c b/lib/mpi/mpich2/src/mpi/romio/adio/common/ad_fstype.c
old mode 100644
new mode 100755
index d5d19cf..da26051
--- a/lib/mpi/mpich2/src/mpi/romio/adio/common/ad_fstype.c
+++ b/lib/mpi/mpich2/src/mpi/romio/adio/common/ad_fstype.c
@@ -196,6 +196,7 @@ static void ADIO_FileSysType_parentdir(char *filename, char **dirnamep)
 }
 #endif /* ROMIO_NTFS */
 
+#ifdef ROMIO_BGL   /* BlueGene support for pvfs through ufs */
 static void check_for_pvfs_exception(char *filename, int *fstype)
 {
     /* exception for lockless PVFS file system */
@@ -215,9 +216,9 @@ static void check_for_pvfs_exception(char *filename, int *fstype)
     /* 2030528: magic number for pvfs, but we might not have pvfs header files
      * in this environment */
     if (fsbuf.f_type == 20030528) 
-	    *fstype = ADIO_UFS;
+	    *fstype = ADIO_UFS; /* use ad_ufs on bluegene to support pvfs */
 }
-
+#endif
 /*
  ADIO_FileSysType_fncall - determines the file system type for a given file 
  using a system-dependent function call
-- 
1.5.3.7




More information about the dcmf mailing list