[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1.1-96-g299bfd40

Service Account noreply at mpich.org
Mon Jul 14 15:09:30 CDT 2014


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  299bfd406a68b22ee0b14a10f60780d5acf30129 (commit)
       via  7ba66aff0671fe03945a07df34c4f495619b0b12 (commit)
       via  abe3cfc65146ec1391688d733f0cb5942ffc7014 (commit)
       via  50de30865f12ea03052aa00ce8eb1afced249967 (commit)
       via  4b1186c76827fb8a20d1fb2174e9df3b5f6a1693 (commit)
       via  7d793095742dabd93d0e34a9cfa123af757948ba (commit)
      from  5b674543acfc345abd174577761a35651c740d69 (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/299bfd406a68b22ee0b14a10f60780d5acf30129

commit 299bfd406a68b22ee0b14a10f60780d5acf30129
Author: Paul Coffman <pkcoff at us.ibm.com>
Date:   Wed Jul 9 11:33:32 2014 -0500

    migrate ranklist from agents aggregators
    
    missed some comment and algorithm changes for ADIOI_PE_gen_agg_ranklist
    during branch migration
    
    Signed-off-by: Rob Latham <robl at mcs.anl.gov>

diff --git a/src/mpi/romio/adio/ad_gpfs/pe/ad_pe_aggrs.c b/src/mpi/romio/adio/ad_gpfs/pe/ad_pe_aggrs.c
index a727a4f..2098b85 100644
--- a/src/mpi/romio/adio/ad_gpfs/pe/ad_pe_aggrs.c
+++ b/src/mpi/romio/adio/ad_gpfs/pe/ad_pe_aggrs.c
@@ -33,11 +33,22 @@
 #endif
 
 /*
- * Compute the aggregator-related parameters that are required in 2-phase collective IO of ADIO.
+ * Compute the aggregator-related parameters that are required in 2-phase
+ * collective IO of ADIO.
  * The parameters are
  * 	. the number of aggregators (proxies) : fd->hints->cb_nodes
  *	. the ranks of the aggregators :        fd->hints->ranklist
- * For now set these based on MP_IOTASKLIST
+ * If MP_IONODEFILE is defined, POE determines all tasks on every node listed
+ * in the node file and defines MP_IOTASKLIST with them, making them all
+ * aggregators.  Alternatively, the user can explictly set MP_IOTASKLIST
+ * themselves.  The format of the MP_IOTASKLIST is a colon-delimited list of
+ * task ids, the first entry being the total number of aggregators, for example
+ * to specify 4 aggregators on task ids 0,8,16,24  the value would be:
+ * 4:0:8:16:24.  If there is no MP_IONODEFILE, or MP_IOTASKLIST, then the
+ * default aggregator selection is 1 task per node for every node of the job -
+ * additionally, an environment variable MP_IOAGGR_CNT  can be specified, which
+ * defines the total number of aggregators, spread evenly across all the nodes.
+ * The romio_cb_nodes and romio_cb_config_list hint user settings are ignored.
  */
 int
 ADIOI_PE_gen_agg_ranklist(ADIO_File fd)
@@ -45,7 +56,7 @@ ADIOI_PE_gen_agg_ranklist(ADIO_File fd)
 
     int numAggs = 0;
     char *ioTaskList = getenv( "MP_IOTASKLIST" );
-    char *ioAgentCount = getenv("MP_IOAGENT_CNT");
+    char *ioAggrCount = getenv("MP_IOAGGR_CNT");
     int i,j;
     int inTERcommFlag = 0;
 
@@ -107,7 +118,7 @@ ADIOI_PE_gen_agg_ranklist(ADIO_File fd)
       MPI_Allgather(MPI_IN_PLACE, 1, MPI_INT, allNodeRanks, 1, MPI_INT, fd->comm);
 
 #ifdef AGG_DEBUG
-      printf("MPID_Comm data: remote_size is %d local_size is %d\nintranode_table entries:\n",mpidCommData->remote_size,mpidCommData->local_size);
+      printf("MPID_Comm data: local_size is %d\nintranode_table entries:\n",mpidCommData->local_size);
       for (i=0;i<localSize;i++) {
         printf("%d ",mpidCommData->intranode_table[i]);
       }
@@ -117,7 +128,7 @@ ADIOI_PE_gen_agg_ranklist(ADIO_File fd)
       }
       printf("\n");
 
-      printf("\allNodeRanks entries:\n");
+      printf("\nallNodeRanks entries:\n");
       for (i=0;i<localSize;i++) {
         printf("%d ",allNodeRanks[i]);
       }
@@ -125,25 +136,25 @@ ADIOI_PE_gen_agg_ranklist(ADIO_File fd)
 
 #endif
 
-      if (ioAgentCount) {
+      if (ioAggrCount) {
         int cntType = -1;
 
-        if ( strcasecmp(ioAgentCount, "ALL") ) {
-           if ( (cntType = atoi(ioAgentCount)) <= 0 ) {
+        if ( strcasecmp(ioAggrCount, "ALL") ) {
+           if ( (cntType = atoi(ioAggrCount)) <= 0 ) {
               /* Input is other non-digit or less than 1 the  assume */
-              /* 1 agent per node.  Note: atoi(-1) reutns -1.        */
+              /* 1 aggregator per node.  Note: atoi(-1) reutns -1.   */
               /* No warning message given here -- done earlier.      */
               cntType = -1;
            }
         }
         else {
-           /* ALL is specified set agent count to localSize */
+           /* ALL is specified set aggr count to localSize */
            cntType = -2;
         }
         switch(cntType) {
            case -1:
-              /* 1 agent/node case */
-             {
+              /* 1 aggr/node case */
+            {
              int rankListIndex = 0;
              fd->hints->ranklist = (int *) ADIOI_Malloc (localSize * sizeof(int));
              for (i=0;i<localSize;i++) {
@@ -152,7 +163,7 @@ ADIOI_PE_gen_agg_ranklist(ADIO_File fd)
                  numAggs++;
                }
              }
-             }
+            }
               break;
            case -2:
               /* ALL tasks case */
@@ -163,59 +174,56 @@ ADIOI_PE_gen_agg_ranklist(ADIO_File fd)
              }
               break;
            default:
-              /* Specific agent count case -- MUST be less than localSize. */
-              if (cntType <= localSize) {
-                 numAggs = cntType;
-                 // Round-robin thru allNodeRanks - pick the 0's, then the 1's, etc
-                 int currentNodeRank = 0;  // node rank currently being selected as aggregator
-                 int rankListIndex = 0;
-                 int currentAllNodeIndex = 0;
-
-                 fd->hints->ranklist = (int *) ADIOI_Malloc (numAggs * sizeof(int));
-
-                 while (rankListIndex < numAggs) {
-
-                   int foundEntry = 0;
-                   while (!foundEntry && (currentAllNodeIndex < localSize)) {
-                     if (allNodeRanks[currentAllNodeIndex] == currentNodeRank) {
-                       fd->hints->ranklist[rankListIndex++] = currentAllNodeIndex;
-                       foundEntry = 1;
-                     }
-                     currentAllNodeIndex++;
-                   }
-                   if (!foundEntry) {
-                     currentNodeRank++;
-                     currentAllNodeIndex = 0;
-                   }
-                } // while
-              } // (cntType <= localSize)
-              else {
-                ADIOI_Assert(1);
-              }
-              break;
-            } // switch(cntType)
-        } // if (ioAgentCount)
+              /* Specific aggr count case -- MUST be less than localSize, otherwise set to localSize */
+             if (cntType > localSize)
+               cntType = localSize;
+
+             numAggs = cntType;
+             // Round-robin thru allNodeRanks - pick the 0's, then the 1's, etc
+             int currentNodeRank = 0;  // node rank currently being selected as aggregator
+             int rankListIndex = 0;
+             int currentAllNodeIndex = 0;
+
+             fd->hints->ranklist = (int *) ADIOI_Malloc (numAggs * sizeof(int));
+
+             while (rankListIndex < numAggs) {
+               int foundEntry = 0;
+               while (!foundEntry && (currentAllNodeIndex < localSize)) {
+                 if (allNodeRanks[currentAllNodeIndex] == currentNodeRank) {
+                   fd->hints->ranklist[rankListIndex++] = currentAllNodeIndex;
+                   foundEntry = 1;
+                 }
+                 currentAllNodeIndex++;
+               }
+               if (!foundEntry) {
+                 currentNodeRank++;
+                 currentAllNodeIndex = 0;
+               }
+             } // while
+          break;
+        } // switch(cntType)
+      } // if (ioAggrCount)
 
       else { // default is 1 aggregator per node
         // take the 0 entries from allNodeRanks
-          int rankListIndex = 0;
-          fd->hints->ranklist = (int *) ADIOI_Malloc (localSize * sizeof(int));
-          for (i=0;i<localSize;i++) {
-            if (allNodeRanks[i] == 0) {
-              fd->hints->ranklist[rankListIndex++] = i;
-              numAggs++;
-            }
+        int rankListIndex = 0;
+        fd->hints->ranklist = (int *) ADIOI_Malloc (localSize * sizeof(int));
+        for (i=0;i<localSize;i++) {
+          if (allNodeRanks[i] == 0) {
+            fd->hints->ranklist[rankListIndex++] = i;
+            numAggs++;
           }
+        }
       }
     }
 
-    if ( getenv("MP_I_SHOW_AGENTS") ) {
+    if ( getenv("MP_I_SHOW_AGGRS") ) {
       if (myRank == 0) {
-      printf("Agg rank list of %d generated:\n", numAggs);
-      for (i=0;i<numAggs;i++) {
-        printf("%d ",fd->hints->ranklist[i]);
-      }
-      printf("\n");
+        printf("Agg rank list of %d generated:\n", numAggs);
+        for (i=0;i<numAggs;i++) {
+          printf("%d ",fd->hints->ranklist[i]);
+        }
+        printf("\n");
       }
     }
 
diff --git a/src/mpi/romio/adio/ad_gpfs/pe/ad_pe_aggrs.h b/src/mpi/romio/adio/ad_gpfs/pe/ad_pe_aggrs.h
index 4498b39..f779d18 100644
--- a/src/mpi/romio/adio/ad_gpfs/pe/ad_pe_aggrs.h
+++ b/src/mpi/romio/adio/ad_gpfs/pe/ad_pe_aggrs.h
@@ -24,7 +24,7 @@
   #define GPFS_SUPER_MAGIC (0x47504653)
 #endif
 
-    /* generate a list of I/O aggregators for now based on the MP_IOTASKLIST. */
+    /* generate a list of I/O aggregators following a methodology specific for PE */
     int ADIOI_PE_gen_agg_ranklist(ADIO_File fd);
 
 #endif  /* AD_PE_AGGRS_H_ */

http://git.mpich.org/mpich.git/commitdiff/7ba66aff0671fe03945a07df34c4f495619b0b12

commit 7ba66aff0671fe03945a07df34c4f495619b0b12
Author: Paul Coffman <pkcoff at us.ibm.com>
Date:   Tue Jul 8 21:52:53 2014 -0500

    bg and pe to gpfs hints consolidation
    
    Signed-off-by: Rob Latham <robl at mcs.anl.gov>

diff --git a/src/mpi/romio/adio/ad_gpfs/Makefile.mk b/src/mpi/romio/adio/ad_gpfs/Makefile.mk
index 72fedef..db8737b 100644
--- a/src/mpi/romio/adio/ad_gpfs/Makefile.mk
+++ b/src/mpi/romio/adio/ad_gpfs/Makefile.mk
@@ -19,6 +19,7 @@ romio_other_sources +=                                               \
     adio/ad_gpfs/ad_gpfs_tuning.c                                        \
     adio/ad_gpfs/ad_gpfs.c                                               \
     adio/ad_gpfs/ad_gpfs_open.c                                          \
+    adio/ad_gpfs/ad_gpfs_hints.c                                         \
     adio/ad_gpfs/ad_gpfs_rdcoll.c                                        \
     adio/ad_gpfs/ad_gpfs_wrcoll.c
 
diff --git a/src/mpi/romio/adio/ad_gpfs/ad_gpfs.c b/src/mpi/romio/adio/ad_gpfs/ad_gpfs.c
index 8fc4939..73a4b58 100644
--- a/src/mpi/romio/adio/ad_gpfs/ad_gpfs.c
+++ b/src/mpi/romio/adio/ad_gpfs/ad_gpfs.c
@@ -25,12 +25,10 @@ struct ADIOI_Fns_struct ADIO_GPFS_operations = {
     ADIOI_GPFS_WriteStridedColl, /* WriteStridedColl */
     ADIOI_GEN_SeekIndividual, /* SeekIndividual */
     ADIOI_GEN_Fcntl, /* Fcntl */
-#ifdef BGQPLATFORM
-    ADIOI_BG_SetInfo, /* SetInfo */
-#elif PEPLATFORM
-    ADIOI_PE_SetInfo, /* SetInfo */
+#if defined(BGQPLATFORM) || defined(PEPLATFORM)
+    ADIOI_GPFS_SetInfo, /* SetInfo for BlueGene or PE */
 #else
-    ADIOI_GEN_SetInfo, /* SetInfo */
+    ADIOI_GEN_SetInfo, /* SetInfo for any platform besides BlueGene or PE */
 #endif
     ADIOI_GEN_ReadStrided, /* ReadStrided */
     ADIOI_GEN_WriteStrided, /* WriteStrided */
diff --git a/src/mpi/romio/adio/ad_gpfs/ad_gpfs.h b/src/mpi/romio/adio/ad_gpfs/ad_gpfs.h
index 686a7e5..81fb076 100644
--- a/src/mpi/romio/adio/ad_gpfs/ad_gpfs.h
+++ b/src/mpi/romio/adio/ad_gpfs/ad_gpfs.h
@@ -42,11 +42,7 @@ void ADIOI_GPFS_WriteContig(ADIO_File fd, const void *buf, int count,
                       ADIO_Offset offset, ADIO_Status *status, int
 		      *error_code);
 
-#ifdef BGQPLATFORM
-void ADIOI_BG_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code);
-#elif PEPLATFORM
-void ADIOI_PE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code);
-#endif
+void ADIOI_GPFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code);
 
 void ADIOI_GPFS_WriteStrided(ADIO_File fd, const void *buf, int count,
 		       MPI_Datatype datatype, int file_ptr_type,
diff --git a/src/mpi/romio/adio/ad_gpfs/pe/ad_pe_hints.c b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_hints.c
similarity index 76%
rename from src/mpi/romio/adio/ad_gpfs/pe/ad_pe_hints.c
rename to src/mpi/romio/adio/ad_gpfs/ad_gpfs_hints.c
index 21cb45f..7af0a0c 100644
--- a/src/mpi/romio/adio/ad_gpfs/pe/ad_pe_hints.c
+++ b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_hints.c
@@ -2,8 +2,8 @@
 /* (C)Copyright IBM Corp.  2007, 2008                               */
 /* ---------------------------------------------------------------- */
 /**
- * \file ad_pe_hints.c
- * \brief PE hint processing
+ * \file ad_gpfs_hints.c
+ * \brief GPFS hint processing - for now, only used for BlueGene and PE platforms
  */
 
 /* -*- Mode: C; c-basic-offset:4 ; -*- */
@@ -16,17 +16,28 @@
 #include "adio_extern.h"
 #include "hint_fns.h"
 
-#include "../ad_gpfs.h"
-#include "ad_pe_aggrs.h"
+#include "ad_gpfs.h"
+
+#define   ADIOI_GPFS_CB_BUFFER_SIZE_DFLT      	"16777216"
+#define	  ADIOI_GPFS_IND_RD_BUFFER_SIZE_DFLT	"4194304"
+#define   ADIOI_GPFS_IND_WR_BUFFER_SIZE_DFLT	"4194304"
+
+#ifdef BGQPLATFORM
+#define   ADIOI_BG_NAGG_IN_PSET_HINT_NAME	"bg_nodes_pset"
+#endif
 
-#define   ADIOI_PE_CB_BUFFER_SIZE_DFLT      	"16777216"
-#define	  ADIOI_PE_IND_RD_BUFFER_SIZE_DFLT	"4194304"
-#define   ADIOI_PE_IND_WR_BUFFER_SIZE_DFLT	"4194304"
 /** \page mpiio_vars MPIIO Configuration
  *
- * PE MPIIO configuration and performance tuning. Used by ad_gpfs ADIO.
+ * GPFS MPIIO configuration and performance tuning. Used by ad_gpfs ADIO.
+ *
+ * Used for BlueGene and PE platforms, which each have their own aggregator selection
+ * algorithms that ignore user provided cb_config_list.
  *
  * \section hint_sec Hints
+ * - bg_nodes_pset - BlueGene only - specify how many aggregators to use per pset.
+ *   This hint will override the cb_nodes hint based on BlueGene psets.
+ *   - N - Use N nodes per pset as aggregators.
+ *   - Default is based on partition configuration and cb_nodes.
  *
  *   The following default key/value pairs may differ from other platform defaults.
  *
@@ -37,7 +48,16 @@
  *     - key = ind_wr_buffer_size value = 4194304
  */
 
-void ADIOI_PE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
+#ifdef BGQPLATFORM
+/* Compute the aggregator-related parameters that are required in 2-phase collective IO of ADIO. */
+extern int
+ADIOI_BG_gen_agg_ranklist(ADIO_File fd, int n_proxy_per_pset);
+#elif PEPLATFORM
+extern int
+ADIOI_PE_gen_agg_ranklist(ADIO_File fd);
+#endif
+
+void ADIOI_GPFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
 {
 /* if fd->info is null, create a new info object.
    Initialize fd->info to default values.
@@ -48,7 +68,7 @@ void ADIOI_PE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
     MPI_Info info;
     char *value;
     int flag, intval, nprocs=0, nprocs_is_valid = 0;
-    static char myname[] = "ADIOI_PE_SetInfo";
+    static char myname[] = "ADIOI_GPFS_SETINFO";
 
     int did_anything = 0;
 
@@ -71,8 +91,8 @@ void ADIOI_PE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
 	did_anything = 1;
 
 	/* buffer size for collective I/O */
-	ADIOI_Info_set(info, "cb_buffer_size", ADIOI_PE_CB_BUFFER_SIZE_DFLT);
-	fd->hints->cb_buffer_size = atoi(ADIOI_PE_CB_BUFFER_SIZE_DFLT);
+	ADIOI_Info_set(info, "cb_buffer_size", ADIOI_GPFS_CB_BUFFER_SIZE_DFLT);
+	fd->hints->cb_buffer_size = atoi(ADIOI_GPFS_CB_BUFFER_SIZE_DFLT);
 
 	/* default is to let romio automatically decide when to use
 	 * collective buffering
@@ -90,13 +110,13 @@ void ADIOI_PE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
 	nprocs_is_valid = 1;
 	ADIOI_Snprintf(value, MPI_MAX_INFO_VAL+1, "%d", nprocs);
 	ADIOI_Info_set(info, "cb_nodes", value);
-	fd->hints->cb_nodes = nprocs;  // initialize to nprocs
+	fd->hints->cb_nodes = -1;
 
 	/* hint indicating that no indep. I/O will be performed on this file */
 	ADIOI_Info_set(info, "romio_no_indep_rw", "false");
 	fd->hints->no_indep_rw = 0;
 
-	/* PE is not implementing file realms (ADIOI_IOStridedColl),
+	/* gpfs is not implementing file realms (ADIOI_IOStridedColl),
 	   initialize to disabled it. 	   */
 	/* hint instructing the use of persistent file realms */
 	ADIOI_Info_set(info, "romio_cb_pfr", "disable");
@@ -123,31 +143,18 @@ void ADIOI_PE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
 	fd->hints->deferred_open = 0;
 
 	/* buffer size for data sieving in independent reads */
-	ADIOI_Info_set(info, "ind_rd_buffer_size", ADIOI_PE_IND_RD_BUFFER_SIZE_DFLT);
-	fd->hints->ind_rd_buffer_size = atoi(ADIOI_PE_IND_RD_BUFFER_SIZE_DFLT);
+	ADIOI_Info_set(info, "ind_rd_buffer_size", ADIOI_GPFS_IND_RD_BUFFER_SIZE_DFLT);
+	fd->hints->ind_rd_buffer_size = atoi(ADIOI_GPFS_IND_RD_BUFFER_SIZE_DFLT);
 
 	/* buffer size for data sieving in independent writes */
-	ADIOI_Info_set(info, "ind_wr_buffer_size", ADIOI_PE_IND_WR_BUFFER_SIZE_DFLT);
-	fd->hints->ind_wr_buffer_size = atoi(ADIOI_PE_IND_WR_BUFFER_SIZE_DFLT);
-
-  if(fd->file_system == ADIO_UFS)
-  {
-    /* default for ufs/pvfs is to disable data sieving  */
-    ADIOI_Info_set(info, "romio_ds_read", "disable");
-    fd->hints->ds_read = ADIOI_HINT_DISABLE;
-    ADIOI_Info_set(info, "romio_ds_write", "disable");
-    fd->hints->ds_write = ADIOI_HINT_DISABLE;
-  }
-  else
-  {
-    /* default is to let romio automatically decide when to use data
-     * sieving
-     */
+	ADIOI_Info_set(info, "ind_wr_buffer_size", ADIOI_GPFS_IND_WR_BUFFER_SIZE_DFLT);
+	fd->hints->ind_wr_buffer_size = atoi(ADIOI_GPFS_IND_WR_BUFFER_SIZE_DFLT);
+
+
     ADIOI_Info_set(info, "romio_ds_read", "automatic");
     fd->hints->ds_read = ADIOI_HINT_AUTO;
     ADIOI_Info_set(info, "romio_ds_write", "automatic");
     fd->hints->ds_write = ADIOI_HINT_AUTO;
-  }
 
     /* still to do: tune this a bit for a variety of file systems. there's
 	 * no good default value so just leave it unset */
@@ -161,7 +168,6 @@ void ADIOI_PE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
     if (users_info != MPI_INFO_NULL) {
 	ADIOI_Info_check_and_install_int(fd, users_info, "cb_buffer_size",
 		&(fd->hints->cb_buffer_size), myname, error_code);
-
 	/* new hints for enabling/disabling coll. buffering on
 	 * reads/writes
 	 */
@@ -179,7 +185,6 @@ void ADIOI_PE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
 	    ADIOI_Info_set(info, "romio_no_indep_rw", "false");
 	    fd->hints->no_indep_rw = ADIOI_HINT_DISABLE;
 	}
-
 	/* Has the user indicated all I/O will be done collectively? */
 	ADIOI_Info_check_and_install_true(fd, users_info, "romio_no_indep_rw",
 		&(fd->hints->no_indep_rw), myname, error_code);
@@ -201,14 +206,11 @@ void ADIOI_PE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
 	ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_ds_write",
 		&(fd->hints->ds_write), myname, error_code);
 
-
-
 	ADIOI_Info_check_and_install_int(fd, users_info, "ind_wr_buffer_size",
 		&(fd->hints->ind_wr_buffer_size), myname, error_code);
 	ADIOI_Info_check_and_install_int(fd, users_info, "ind_rd_buffer_size",
 		&(fd->hints->ind_rd_buffer_size), myname, error_code);
 
-
 	memset( value, 0, MPI_MAX_INFO_VAL+1 );
 	ADIOI_Info_get(users_info, "romio_min_fdomain_size", MPI_MAX_INFO_VAL,
 			value, &flag);
@@ -221,11 +223,26 @@ void ADIOI_PE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
 	ADIOI_Info_check_and_install_int(fd, users_info, "striping_unit",
 		&(fd->hints->striping_unit), myname, error_code);
 
+#ifdef BGQPLATFORM
+	memset( value, 0, MPI_MAX_INFO_VAL+1 );
+        ADIOI_Info_get(users_info, ADIOI_BG_NAGG_IN_PSET_HINT_NAME, MPI_MAX_INFO_VAL,
+		     value, &flag);
+	if (flag && ((intval = atoi(value)) > 0)) {
+
+	    did_anything = 1;
+	    ADIOI_Info_set(info, ADIOI_BG_NAGG_IN_PSET_HINT_NAME, value);
+	    fd->hints->cb_nodes = intval;
+	}
+#endif
     }
 
-    /* associate CB aggregators to certain CNs in every involved PSET */
+    /* special CB aggregator assignment */
     if (did_anything) {
+#ifdef BGQPLATFORM
+	ADIOI_BG_gen_agg_ranklist(fd, fd->hints->cb_nodes);
+#elif PEPLATFORM
 	ADIOI_PE_gen_agg_ranklist(fd);
+#endif
     }
 
     /* deferred_open won't be set by callers, but if the user doesn't
@@ -246,7 +263,9 @@ void ADIOI_PE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
 	    fd->hints->deferred_open = 0;
     }
 
-    /* we need to keep DS writes enabled on gpfs and disabled on PVFS */
+    /* BobC commented this out, but since hint processing runs on both bg and
+     * bglockless, we need to keep DS writes enabled on gpfs and disabled on
+     * PVFS */
     if (ADIO_Feature(fd, ADIO_DATA_SIEVING_WRITES) == 0) {
     /* disable data sieving for fs that do not
        support file locking */
diff --git a/src/mpi/romio/adio/ad_gpfs/bg/Makefile.mk b/src/mpi/romio/adio/ad_gpfs/bg/Makefile.mk
index f54727e..1d957ef 100644
--- a/src/mpi/romio/adio/ad_gpfs/bg/Makefile.mk
+++ b/src/mpi/romio/adio/ad_gpfs/bg/Makefile.mk
@@ -13,7 +13,6 @@ noinst_HEADERS +=                                                    \
 
 romio_other_sources +=                                               \
     adio/ad_gpfs/bg/ad_bg_aggrs.c                                         \
-    adio/ad_gpfs/bg/ad_bg_hints.c                                         \
     adio/ad_gpfs/bg/ad_bg_pset.c 
 
 endif BUILD_AD_BG
diff --git a/src/mpi/romio/adio/ad_gpfs/bg/ad_bg_hints.c b/src/mpi/romio/adio/ad_gpfs/bg/ad_bg_hints.c
deleted file mode 100644
index 6669b30..0000000
--- a/src/mpi/romio/adio/ad_gpfs/bg/ad_bg_hints.c
+++ /dev/null
@@ -1,318 +0,0 @@
-/* ---------------------------------------------------------------- */
-/* (C)Copyright IBM Corp.  2007, 2008                               */
-/* ---------------------------------------------------------------- */
-/**
- * \file ad_bg_hints.c
- * \brief BlueGene hint processing
- */
-
-/* -*- Mode: C; c-basic-offset:4 ; -*- */
-/* 
- *   Copyright (C) 1997 University of Chicago. 
- *   See COPYRIGHT notice in top-level directory.
- */
-
-#include "adio.h"
-#include "adio_extern.h"
-#include "hint_fns.h"
-
-#include "../ad_gpfs.h"
-#include "ad_bg_pset.h"
-#include "ad_bg_aggrs.h"
-
-#define   ADIOI_BG_CB_BUFFER_SIZE_DFLT      	"16777216"
-#define	  ADIOI_BG_IND_RD_BUFFER_SIZE_DFLT	"4194304"
-#define   ADIOI_BG_IND_WR_BUFFER_SIZE_DFLT	"4194304"
-#define   ADIOI_BG_NAGG_IN_PSET_HINT_NAME	"bg_nodes_pset"
-/** \page mpiio_vars MPIIO Configuration
- *
- * BlueGene MPIIO configuration and performance tuning. Used by ad_gpfs ADIO.
- *
- * \section hint_sec Hints
- * - bg_nodes_pset - Specify how many aggregators to use per pset.
- *   This hint will override the cb_nodes hint based on BlueGene psets.
- *   - N - Use N nodes per pset as aggregators.
- *   - Default is based on partition configuration and cb_nodes.
- *  
- *   The following default key/value pairs may differ from other platform defaults.
- *  
- *     - key = cb_buffer_size     value = 16777216
- *     - key = romio_cb_read      value = enable
- *     - key = romio_cb_write     value = enable
- *     - key = ind_rd_buffer_size value = 4194304
- *     - key = ind_wr_buffer_size value = 4194304
- */
-
-/* Compute the aggregator-related parameters that are required in 2-phase collective IO of ADIO. */
-extern int 
-ADIOI_BG_gen_agg_ranklist(ADIO_File fd, int n_proxy_per_pset);
-
-void ADIOI_BG_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
-{
-/* if fd->info is null, create a new info object. 
-   Initialize fd->info to default values.
-   Initialize fd->hints to default values.
-   Examine the info object passed by the user. If it contains values that
-   ROMIO understands, override the default. */
-
-    MPI_Info info;
-    char *value;
-    int flag, intval, nprocs=0, nprocs_is_valid = 0;
-    static char myname[] = "ADIOI_BG_SETINFO";
-
-    int did_anything = 0;
-
-    if (fd->info == MPI_INFO_NULL) MPI_Info_create(&(fd->info));
-    info = fd->info;
-
-    /* Note that fd->hints is allocated at file open time; thus it is
-     * not necessary to allocate it, or check for allocation, here.
-     */
-
-    value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char));
-    ADIOI_Assert ((value != NULL));
-
-    /* initialize info and hints to default values if they haven't been
-     * previously initialized
-     */
-    if (!fd->hints->initialized) {
-
-	ad_gpfs_get_env_vars();
-	did_anything = 1;
-
-	/* buffer size for collective I/O */
-	ADIOI_Info_set(info, "cb_buffer_size", ADIOI_BG_CB_BUFFER_SIZE_DFLT); 
-	fd->hints->cb_buffer_size = atoi(ADIOI_BG_CB_BUFFER_SIZE_DFLT);
-
-	/* default is to let romio automatically decide when to use
-	 * collective buffering
-	 */
-	ADIOI_Info_set(info, "romio_cb_read", "enable"); 
-	fd->hints->cb_read = ADIOI_HINT_ENABLE;
-	ADIOI_Info_set(info, "romio_cb_write", "enable"); 
-	fd->hints->cb_write = ADIOI_HINT_ENABLE;
-
-   	if ( fd->hints->cb_config_list != NULL ) ADIOI_Free (fd->hints->cb_config_list);
-	fd->hints->cb_config_list = NULL;
-
-	/* number of processes that perform I/O in collective I/O */
-	MPI_Comm_size(fd->comm, &nprocs);
-	nprocs_is_valid = 1;
-	ADIOI_Snprintf(value, MPI_MAX_INFO_VAL+1, "%d", nprocs);
-	ADIOI_Info_set(info, "cb_nodes", value);
-	fd->hints->cb_nodes = -1;
-
-	/* hint indicating that no indep. I/O will be performed on this file */
-	ADIOI_Info_set(info, "romio_no_indep_rw", "false");
-	fd->hints->no_indep_rw = 0;
-
-	/* bg is not implementing file realms (ADIOI_IOStridedColl),
-	   initialize to disabled it. 	   */
-	/* hint instructing the use of persistent file realms */
-	ADIOI_Info_set(info, "romio_cb_pfr", "disable");
-	fd->hints->cb_pfr = ADIOI_HINT_DISABLE;
-	
-	/* hint guiding the assignment of persistent file realms */
-	ADIOI_Info_set(info, "romio_cb_fr_types", "aar");
-	fd->hints->cb_fr_type = ADIOI_FR_AAR;
-
-	/* hint to align file realms with a certain byte value */
-	ADIOI_Info_set(info, "romio_cb_fr_alignment", "1");
-	fd->hints->cb_fr_alignment = 1;
-
-	/* hint to set a threshold percentage for a datatype's size/extent at
-	 * which data sieving should be done in collective I/O */
-	ADIOI_Info_set(info, "romio_cb_ds_threshold", "0");
-	fd->hints->cb_ds_threshold = 0;
-
-	/* hint to switch between point-to-point or all-to-all for two-phase */
-	ADIOI_Info_set(info, "romio_cb_alltoall", "automatic");
-	fd->hints->cb_alltoall = ADIOI_HINT_AUTO;
-
-	 /* deferred_open derived from no_indep_rw and cb_{read,write} */
-	fd->hints->deferred_open = 0;
-
-	/* buffer size for data sieving in independent reads */
-	ADIOI_Info_set(info, "ind_rd_buffer_size", ADIOI_BG_IND_RD_BUFFER_SIZE_DFLT);
-	fd->hints->ind_rd_buffer_size = atoi(ADIOI_BG_IND_RD_BUFFER_SIZE_DFLT);
-
-	/* buffer size for data sieving in independent writes */
-	ADIOI_Info_set(info, "ind_wr_buffer_size", ADIOI_BG_IND_WR_BUFFER_SIZE_DFLT);
-	fd->hints->ind_wr_buffer_size = atoi(ADIOI_BG_IND_WR_BUFFER_SIZE_DFLT);
-
-  if(fd->file_system == ADIO_UFS)
-  {
-    /* default for ufs/pvfs is to disable data sieving  */
-    ADIOI_Info_set(info, "romio_ds_read", "disable"); 
-    fd->hints->ds_read = ADIOI_HINT_DISABLE;
-    ADIOI_Info_set(info, "romio_ds_write", "disable"); 
-    fd->hints->ds_write = ADIOI_HINT_DISABLE;
-  }
-  else
-  {
-    /* default is to let romio automatically decide when to use data
-     * sieving
-     */
-    ADIOI_Info_set(info, "romio_ds_read", "automatic"); 
-    fd->hints->ds_read = ADIOI_HINT_AUTO;
-    ADIOI_Info_set(info, "romio_ds_write", "automatic"); 
-    fd->hints->ds_write = ADIOI_HINT_AUTO;
-  }
-
-    /* still to do: tune this a bit for a variety of file systems. there's
-	 * no good default value so just leave it unset */
-    fd->hints->min_fdomain_size = 0;
-    fd->hints->striping_unit = 0;
-
-    fd->hints->initialized = 1;
-    }
-
-    /* add in user's info if supplied */
-    if (users_info != MPI_INFO_NULL) {
-	ADIOI_Info_check_and_install_int(fd, users_info, "cb_buffer_size", 
-		&(fd->hints->cb_buffer_size), myname, error_code);
-#if 0
-	/* bg is not implementing file realms (ADIOI_IOStridedColl) ... */
-	/* aligning file realms to certain sizes (e.g. stripe sizes)
-	 * may benefit I/O performance */
-	ADIOI_Info_check_and_install_int(fd, users_info, "romio_cb_fr_alignment", 
-		&(fd->hints->cb_fr_alignment), myname, error_code);
-
-	/* for collective I/O, try to be smarter about when to do data sieving
-	 * using a specific threshold for the datatype size/extent
-	 * (percentage 0-100%) */
-	ADIOI_Info_check_and_install_int(fd, users_info, "romio_cb_ds_threshold", 
-		&(fd->hints->cb_ds_threshold), myname, error_code);
-
-	ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_cb_alltoall",
-		&(fd->hints->cb_alltoall), myname, error_code);
-#endif
-	/* new hints for enabling/disabling coll. buffering on
-	 * reads/writes
-	 */
-	ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_cb_read",
-		&(fd->hints->cb_read), myname, error_code);
-	if (fd->hints->cb_read == ADIOI_HINT_DISABLE) {
-	    /* romio_cb_read overrides no_indep_rw */
-	    ADIOI_Info_set(info, "romio_no_indep_rw", "false");
-	    fd->hints->no_indep_rw = ADIOI_HINT_DISABLE;
-	}
-	ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_cb_write",
-		&(fd->hints->cb_write), myname, error_code);
-	if (fd->hints->cb_write == ADIOI_HINT_DISABLE) {
-	    /* romio_cb_write overrides no_indep_rw */
-	    ADIOI_Info_set(info, "romio_no_indep_rw", "false");
-	    fd->hints->no_indep_rw = ADIOI_HINT_DISABLE;
-	}
-#if 0
-	/* bg is not implementing file realms (ADIOI_IOStridedColl) ... */
-	/* enable/disable persistent file realms for collective I/O */
-	/* may want to check for no_indep_rdwr hint as well */
-	ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_cb_pfr",
-		&(fd->hints->cb_pfr), myname, error_code);
-	
-	/* file realm assignment types ADIOI_FR_AAR(0),
-	 ADIOI_FR_FSZ(-1), ADIOI_FR_USR_REALMS(-2), all others specify
-	 a regular fr size in bytes. probably not the best way... */
-	ADIOI_Info_check_and_install_int(fd, users_info, "romio_cb_fr_type",
-		&(fd->hints->cb_fr_type), myname, error_code);
-
-#endif
-	/* Has the user indicated all I/O will be done collectively? */
-	ADIOI_Info_check_and_install_true(fd, users_info, "romio_no_indep_rw",
-		&(fd->hints->no_indep_rw), myname, error_code);
-	if (fd->hints->no_indep_rw == 1) {
-	    /* if 'no_indep_rw' set, also hint that we will do
-	     * collective buffering: if we aren't doing independent io,
-	     * then we have to do collective  */
-	    ADIOI_Info_set(info, "romio_cb_write", "enable");
-	    ADIOI_Info_set(info, "romio_cb_read", "enable");
-	    fd->hints->cb_read = 1;
-	    fd->hints->cb_write = 1;
-	} 
-
-	/* new hints for enabling/disabling data sieving on
-	 * reads/writes
-	 */
-	ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_ds_read",
-		&(fd->hints->ds_read), myname, error_code);
-	ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_ds_write",
-		&(fd->hints->ds_write), myname, error_code);
-
-
-
-	ADIOI_Info_check_and_install_int(fd, users_info, "ind_wr_buffer_size",
-		&(fd->hints->ind_wr_buffer_size), myname, error_code);
-	ADIOI_Info_check_and_install_int(fd, users_info, "ind_rd_buffer_size",
-		&(fd->hints->ind_rd_buffer_size), myname, error_code);
-
-
-	memset( value, 0, MPI_MAX_INFO_VAL+1 );
-	ADIOI_Info_get(users_info, "romio_min_fdomain_size", MPI_MAX_INFO_VAL,
-			value, &flag);
-	if ( flag && ((intval = atoi(value)) > 0) ) {
-		ADIOI_Info_set(info, "romio_min_fdomain_size", value);
-		fd->hints->min_fdomain_size = intval;
-	}
-  /* Now we use striping unit in common code so we should
-     process hints for it. */
-	ADIOI_Info_check_and_install_int(fd, users_info, "striping_unit", 
-		&(fd->hints->striping_unit), myname, error_code);
-
-	memset( value, 0, MPI_MAX_INFO_VAL+1 );
-        ADIOI_Info_get(users_info, ADIOI_BG_NAGG_IN_PSET_HINT_NAME, MPI_MAX_INFO_VAL,
-		     value, &flag);
-	if (flag && ((intval = atoi(value)) > 0)) {
-
-	    did_anything = 1;
-	    ADIOI_Info_set(info, ADIOI_BG_NAGG_IN_PSET_HINT_NAME, value);
-	    fd->hints->cb_nodes = intval;
-	}
-    }
-
-    /* associate CB aggregators to certain CNs in every involved PSET */
-    if (did_anything) {
-	ADIOI_BG_gen_agg_ranklist(fd, fd->hints->cb_nodes);
-    }
-
-    /* deferred_open won't be set by callers, but if the user doesn't
-     * explicitly disable collecitve buffering (two-phase) and does hint that
-     * io w/o independent io is going on, we'll set this internal hint as a
-     * convenience */
-    if ( ( (fd->hints->cb_read != ADIOI_HINT_DISABLE) \
-			    && (fd->hints->cb_write != ADIOI_HINT_DISABLE)\
-			    && fd->hints->no_indep_rw ) ) {
-	    fd->hints->deferred_open = 1;
-    } else {
-	    /* setting romio_no_indep_rw enable and romio_cb_{read,write}
-	     * disable at the same time doesn't make sense. honor
-	     * romio_cb_{read,write} and force the no_indep_rw hint to
-	     * 'disable' */
-	    ADIOI_Info_set(info, "romio_no_indep_rw", "false");
-	    fd->hints->no_indep_rw = 0;
-	    fd->hints->deferred_open = 0;
-    }
-
-    /* BobC commented this out, but since hint processing runs on both bg and
-     * bglockless, we need to keep DS writes enabled on gpfs and disabled on
-     * PVFS */
-    if (ADIO_Feature(fd, ADIO_DATA_SIEVING_WRITES) == 0) {
-    /* disable data sieving for fs that do not
-       support file locking */
-       	ADIOI_Info_get(info, "ind_wr_buffer_size", MPI_MAX_INFO_VAL,
-		     value, &flag);
-	if (flag) {
-	    /* get rid of this value if it is set */
-	    ADIOI_Info_delete(info, "ind_wr_buffer_size");
-	}
-	/* note: leave ind_wr_buffer_size alone; used for other cases
-	 * as well. -- Rob Ross, 04/22/2003
-	 */
-	ADIOI_Info_set(info, "romio_ds_write", "disable");
-	fd->hints->ds_write = ADIOI_HINT_DISABLE;
-    }
-
-    ADIOI_Free(value);
-
-    *error_code = MPI_SUCCESS;
-}
diff --git a/src/mpi/romio/adio/ad_gpfs/pe/Makefile.mk b/src/mpi/romio/adio/ad_gpfs/pe/Makefile.mk
index 494613a..6173bd7 100644
--- a/src/mpi/romio/adio/ad_gpfs/pe/Makefile.mk
+++ b/src/mpi/romio/adio/ad_gpfs/pe/Makefile.mk
@@ -11,7 +11,6 @@ noinst_HEADERS +=                                                    \
     adio/ad_gpfs/pe/ad_pe_aggrs.h
 
 romio_other_sources +=                                               \
-    adio/ad_gpfs/pe/ad_pe_aggrs.c                                    \
-    adio/ad_gpfs/pe/ad_pe_hints.c
+    adio/ad_gpfs/pe/ad_pe_aggrs.c
 
 endif BUILD_AD_PE

http://git.mpich.org/mpich.git/commitdiff/abe3cfc65146ec1391688d733f0cb5942ffc7014

commit abe3cfc65146ec1391688d733f0cb5942ffc7014
Author: Paul Coffman <pkcoff at us.ibm.com>
Date:   Sun May 11 23:39:06 2014 -0500

    added code to check if fd->comm is intercomm then abort
    
    Signed-off-by: Rob Latham <robl at mcs.anl.gov>

diff --git a/src/mpi/romio/adio/ad_gpfs/pe/ad_pe_aggrs.c b/src/mpi/romio/adio/ad_gpfs/pe/ad_pe_aggrs.c
index 0520183..a727a4f 100644
--- a/src/mpi/romio/adio/ad_gpfs/pe/ad_pe_aggrs.c
+++ b/src/mpi/romio/adio/ad_gpfs/pe/ad_pe_aggrs.c
@@ -47,10 +47,18 @@ ADIOI_PE_gen_agg_ranklist(ADIO_File fd)
     char *ioTaskList = getenv( "MP_IOTASKLIST" );
     char *ioAgentCount = getenv("MP_IOAGENT_CNT");
     int i,j;
+    int inTERcommFlag = 0;
 
     int myRank;
     MPI_Comm_rank(fd->comm, &myRank);
 
+    MPI_Comm_test_inter(fd->comm, &inTERcommFlag);
+    if (inTERcommFlag) {
+      FPRINTF(stderr,"inTERcomms are not supported in MPI-IO - aborting....\n");
+      perror("ADIOI_PE_gen_agg_ranklist:");
+      MPI_Abort(MPI_COMM_WORLD, 1);
+    }
+
     if (ioTaskList) {
       char tmpBuf[8];   /* Big enough for 1M tasks (7 digits task ID). */
       tmpBuf[7] = '\0';

http://git.mpich.org/mpich.git/commitdiff/50de30865f12ea03052aa00ce8eb1afced249967

commit 50de30865f12ea03052aa00ce8eb1afced249967
Author: Paul Coffman <pkcoff at us.ibm.com>
Date:   Fri Apr 4 16:23:43 2014 -0500

    Teach GPFS-PE about MP_IOAGENT_CNT
    
    The MP_IOAGENT_CNT is another environment variable to control I/O
    aggregation selection. Teach ROMIO about this to ease PE->ROMIO transistion.
    
    Signed-off-by: Rob Latham <robl at mcs.anl.gov>

diff --git a/src/mpi/romio/adio/ad_gpfs/pe/ad_pe_aggrs.c b/src/mpi/romio/adio/ad_gpfs/pe/ad_pe_aggrs.c
index a3afc0c..0520183 100644
--- a/src/mpi/romio/adio/ad_gpfs/pe/ad_pe_aggrs.c
+++ b/src/mpi/romio/adio/ad_gpfs/pe/ad_pe_aggrs.c
@@ -18,6 +18,8 @@
 #include "adio_cb_config_list.h"
 #include "../ad_gpfs.h"
 #include "ad_pe_aggrs.h"
+#include "mpiimpl.h"
+
 #ifdef AGGREGATION_PROFILE
 #include "mpe.h"
 #endif
@@ -43,12 +45,16 @@ ADIOI_PE_gen_agg_ranklist(ADIO_File fd)
 
     int numAggs = 0;
     char *ioTaskList = getenv( "MP_IOTASKLIST" );
+    char *ioAgentCount = getenv("MP_IOAGENT_CNT");
+    int i,j;
 
-    ADIOI_Assert(ioTaskList);
+    int myRank;
+    MPI_Comm_rank(fd->comm, &myRank);
 
+    if (ioTaskList) {
       char tmpBuf[8];   /* Big enough for 1M tasks (7 digits task ID). */
       tmpBuf[7] = '\0';
-      for (int i=0; i<7; i++) {
+      for (i=0; i<7; i++) {
          tmpBuf[i] = *ioTaskList++;      /* Maximum is 7 digits for 1 million. */
          if (*ioTaskList == ':') {       /* If the next char is a ':' ends it. */
              tmpBuf[i+1] = '\0';
@@ -58,9 +64,9 @@ ADIOI_PE_gen_agg_ranklist(ADIO_File fd)
       numAggs = atoi(tmpBuf);
       fd->hints->ranklist = (int *) ADIOI_Malloc (numAggs * sizeof(int));
 
-      for (int j=0; j<numAggs; j++) {
+      for (j=0; j<numAggs; j++) {
          ioTaskList++;                /* Advance past the ':' */
-         for (int i=0; i<7; i++) {
+         for (i=0; i<7; i++) {
             tmpBuf[i] = *ioTaskList++;
             if ( (*ioTaskList == ':') || (*ioTaskList == '\0') ) {
                 tmpBuf[i+1] = '\0';
@@ -77,18 +83,136 @@ ADIOI_PE_gen_agg_ranklist(ADIO_File fd)
             break;
          }
       }
+    }
+    else {
+      MPID_Comm *mpidCommData;
+
+      MPID_Comm_get_ptr(fd->comm,mpidCommData);
+      int localSize = mpidCommData->local_size;
+
+      // get my node rank
+      int myNodeRank = mpidCommData->intranode_table[mpidCommData->rank];
+
+      int *allNodeRanks = (int *) ADIOI_Malloc (localSize * sizeof(int));
 
-      fd->hints->cb_nodes = numAggs;
+      allNodeRanks[myRank] = myNodeRank;
+      MPI_Allgather(MPI_IN_PLACE, 1, MPI_INT, allNodeRanks, 1, MPI_INT, fd->comm);
 
 #ifdef AGG_DEBUG
-  printf("Agg rank list of %d generated for PE:\n", numAggs);
-  for (int i=0;i<numAggs;i++) {
-    printf("%d ",fd->hints->ranklist[i]);
-  }
-  printf("\n");
+      printf("MPID_Comm data: remote_size is %d local_size is %d\nintranode_table entries:\n",mpidCommData->remote_size,mpidCommData->local_size);
+      for (i=0;i<localSize;i++) {
+        printf("%d ",mpidCommData->intranode_table[i]);
+      }
+      printf("\ninternode_table entries:\n");
+      for (i=0;i<localSize;i++) {
+        printf("%d ",mpidCommData->internode_table[i]);
+      }
+      printf("\n");
+
+      printf("\allNodeRanks entries:\n");
+      for (i=0;i<localSize;i++) {
+        printf("%d ",allNodeRanks[i]);
+      }
+      printf("\n");
 
 #endif
 
+      if (ioAgentCount) {
+        int cntType = -1;
+
+        if ( strcasecmp(ioAgentCount, "ALL") ) {
+           if ( (cntType = atoi(ioAgentCount)) <= 0 ) {
+              /* Input is other non-digit or less than 1 the  assume */
+              /* 1 agent per node.  Note: atoi(-1) reutns -1.        */
+              /* No warning message given here -- done earlier.      */
+              cntType = -1;
+           }
+        }
+        else {
+           /* ALL is specified set agent count to localSize */
+           cntType = -2;
+        }
+        switch(cntType) {
+           case -1:
+              /* 1 agent/node case */
+             {
+             int rankListIndex = 0;
+             fd->hints->ranklist = (int *) ADIOI_Malloc (localSize * sizeof(int));
+             for (i=0;i<localSize;i++) {
+               if (allNodeRanks[i] == 0) {
+                 fd->hints->ranklist[rankListIndex++] = i;
+                 numAggs++;
+               }
+             }
+             }
+              break;
+           case -2:
+              /* ALL tasks case */
+             fd->hints->ranklist = (int *) ADIOI_Malloc (localSize * sizeof(int));
+             for (i=0;i<localSize;i++) {
+               fd->hints->ranklist[i] = i;
+               numAggs++;
+             }
+              break;
+           default:
+              /* Specific agent count case -- MUST be less than localSize. */
+              if (cntType <= localSize) {
+                 numAggs = cntType;
+                 // Round-robin thru allNodeRanks - pick the 0's, then the 1's, etc
+                 int currentNodeRank = 0;  // node rank currently being selected as aggregator
+                 int rankListIndex = 0;
+                 int currentAllNodeIndex = 0;
+
+                 fd->hints->ranklist = (int *) ADIOI_Malloc (numAggs * sizeof(int));
+
+                 while (rankListIndex < numAggs) {
+
+                   int foundEntry = 0;
+                   while (!foundEntry && (currentAllNodeIndex < localSize)) {
+                     if (allNodeRanks[currentAllNodeIndex] == currentNodeRank) {
+                       fd->hints->ranklist[rankListIndex++] = currentAllNodeIndex;
+                       foundEntry = 1;
+                     }
+                     currentAllNodeIndex++;
+                   }
+                   if (!foundEntry) {
+                     currentNodeRank++;
+                     currentAllNodeIndex = 0;
+                   }
+                } // while
+              } // (cntType <= localSize)
+              else {
+                ADIOI_Assert(1);
+              }
+              break;
+            } // switch(cntType)
+        } // if (ioAgentCount)
+
+      else { // default is 1 aggregator per node
+        // take the 0 entries from allNodeRanks
+          int rankListIndex = 0;
+          fd->hints->ranklist = (int *) ADIOI_Malloc (localSize * sizeof(int));
+          for (i=0;i<localSize;i++) {
+            if (allNodeRanks[i] == 0) {
+              fd->hints->ranklist[rankListIndex++] = i;
+              numAggs++;
+            }
+          }
+      }
+    }
+
+    if ( getenv("MP_I_SHOW_AGENTS") ) {
+      if (myRank == 0) {
+      printf("Agg rank list of %d generated:\n", numAggs);
+      for (i=0;i<numAggs;i++) {
+        printf("%d ",fd->hints->ranklist[i]);
+      }
+      printf("\n");
+      }
+    }
+
+    fd->hints->cb_nodes = numAggs;
+
     return 0;
 }
 

http://git.mpich.org/mpich.git/commitdiff/4b1186c76827fb8a20d1fb2174e9df3b5f6a1693

commit 4b1186c76827fb8a20d1fb2174e9df3b5f6a1693
Author: Paul Coffman <pkcoff at us.ibm.com>
Date:   Mon Mar 31 23:47:33 2014 -0500

    remove BGL_OPTIM_STEP flags from PE Makefile.mk
    
    Signed-off-by: Rob Latham <robl at mcs.anl.gov>

diff --git a/src/mpi/romio/adio/ad_gpfs/pe/Makefile.mk b/src/mpi/romio/adio/ad_gpfs/pe/Makefile.mk
index 34d2330..494613a 100644
--- a/src/mpi/romio/adio/ad_gpfs/pe/Makefile.mk
+++ b/src/mpi/romio/adio/ad_gpfs/pe/Makefile.mk
@@ -7,8 +7,6 @@
 
 if BUILD_AD_PE
 
-AM_CPPFLAGS += -DBGL_OPTIM_STEP1_2=1 -DBGL_OPTIM_STEP1_1=1
-
 noinst_HEADERS +=                                                    \
     adio/ad_gpfs/pe/ad_pe_aggrs.h
 

http://git.mpich.org/mpich.git/commitdiff/7d793095742dabd93d0e34a9cfa123af757948ba

commit 7d793095742dabd93d0e34a9cfa123af757948ba
Author: Paul Coffman <pkcoff at us.ibm.com>
Date:   Sun Mar 30 23:41:30 2014 -0500

    Teach GPFS about PE platform
    
    We extend gpfs filesystem to PE.  Right now, the main accomodation is
    for ROMIO aggregation selection using MP_IOTASKLIST to mimic current PE
    functionality
    
    Signed-off-by: Rob Latham <robl at mcs.anl.gov>

diff --git a/src/mpi/romio/adio/Makefile.mk b/src/mpi/romio/adio/Makefile.mk
index 825abad..a64eb9e 100644
--- a/src/mpi/romio/adio/Makefile.mk
+++ b/src/mpi/romio/adio/Makefile.mk
@@ -23,6 +23,7 @@ noinst_HEADERS +=                      \
 
 include $(top_srcdir)/adio/ad_gpfs/Makefile.mk
 include $(top_srcdir)/adio/ad_gpfs/bg/Makefile.mk
+include $(top_srcdir)/adio/ad_gpfs/pe/Makefile.mk
 include $(top_srcdir)/adio/ad_gridftp/Makefile.mk
 include $(top_srcdir)/adio/ad_hfs/Makefile.mk
 include $(top_srcdir)/adio/ad_lustre/Makefile.mk
diff --git a/src/mpi/romio/adio/ad_gpfs/ad_gpfs.c b/src/mpi/romio/adio/ad_gpfs/ad_gpfs.c
index e241cc9..8fc4939 100644
--- a/src/mpi/romio/adio/ad_gpfs/ad_gpfs.c
+++ b/src/mpi/romio/adio/ad_gpfs/ad_gpfs.c
@@ -27,6 +27,8 @@ struct ADIOI_Fns_struct ADIO_GPFS_operations = {
     ADIOI_GEN_Fcntl, /* Fcntl */
 #ifdef BGQPLATFORM
     ADIOI_BG_SetInfo, /* SetInfo */
+#elif PEPLATFORM
+    ADIOI_PE_SetInfo, /* SetInfo */
 #else
     ADIOI_GEN_SetInfo, /* SetInfo */
 #endif
diff --git a/src/mpi/romio/adio/ad_gpfs/ad_gpfs.h b/src/mpi/romio/adio/ad_gpfs/ad_gpfs.h
index b4b1556..686a7e5 100644
--- a/src/mpi/romio/adio/ad_gpfs/ad_gpfs.h
+++ b/src/mpi/romio/adio/ad_gpfs/ad_gpfs.h
@@ -44,6 +44,8 @@ void ADIOI_GPFS_WriteContig(ADIO_File fd, const void *buf, int count,
 
 #ifdef BGQPLATFORM
 void ADIOI_BG_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code);
+#elif PEPLATFORM
+void ADIOI_PE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code);
 #endif
 
 void ADIOI_GPFS_WriteStrided(ADIO_File fd, const void *buf, int count,
diff --git a/src/mpi/romio/adio/ad_gpfs/pe/Makefile.mk b/src/mpi/romio/adio/ad_gpfs/pe/Makefile.mk
new file mode 100644
index 0000000..34d2330
--- /dev/null
+++ b/src/mpi/romio/adio/ad_gpfs/pe/Makefile.mk
@@ -0,0 +1,19 @@
+## -*- Mode: Makefile; -*-
+## vim: set ft=automake :
+##
+## (C) 2012 by Argonne National Laboratory.
+##     See COPYRIGHT in top-level directory.
+##
+
+if BUILD_AD_PE
+
+AM_CPPFLAGS += -DBGL_OPTIM_STEP1_2=1 -DBGL_OPTIM_STEP1_1=1
+
+noinst_HEADERS +=                                                    \
+    adio/ad_gpfs/pe/ad_pe_aggrs.h
+
+romio_other_sources +=                                               \
+    adio/ad_gpfs/pe/ad_pe_aggrs.c                                    \
+    adio/ad_gpfs/pe/ad_pe_hints.c
+
+endif BUILD_AD_PE
diff --git a/src/mpi/romio/adio/ad_gpfs/pe/ad_pe_aggrs.c b/src/mpi/romio/adio/ad_gpfs/pe/ad_pe_aggrs.c
new file mode 100644
index 0000000..a3afc0c
--- /dev/null
+++ b/src/mpi/romio/adio/ad_gpfs/pe/ad_pe_aggrs.c
@@ -0,0 +1,94 @@
+/* ---------------------------------------------------------------- */
+/* (C)Copyright IBM Corp.  2007, 2008                               */
+/* ---------------------------------------------------------------- */
+/**
+ * \file ad_pe_aggrs.c
+ * \brief The externally used function from this file is is declared in ad_pe_aggrs.h
+ */
+
+/* -*- Mode: C; c-basic-offset:4 ; -*- */
+/*
+ *   Copyright (C) 1997-2001 University of Chicago.
+ *   See COPYRIGHT notice in top-level directory.
+ */
+
+/*#define TRACE_ON */
+
+#include "adio.h"
+#include "adio_cb_config_list.h"
+#include "../ad_gpfs.h"
+#include "ad_pe_aggrs.h"
+#ifdef AGGREGATION_PROFILE
+#include "mpe.h"
+#endif
+
+#ifdef USE_DBG_LOGGING
+  #define AGG_DEBUG 1
+#endif
+
+#ifndef TRACE_ERR
+#  define TRACE_ERR(format...)
+#endif
+
+/*
+ * Compute the aggregator-related parameters that are required in 2-phase collective IO of ADIO.
+ * The parameters are
+ * 	. the number of aggregators (proxies) : fd->hints->cb_nodes
+ *	. the ranks of the aggregators :        fd->hints->ranklist
+ * For now set these based on MP_IOTASKLIST
+ */
+int
+ADIOI_PE_gen_agg_ranklist(ADIO_File fd)
+{
+
+    int numAggs = 0;
+    char *ioTaskList = getenv( "MP_IOTASKLIST" );
+
+    ADIOI_Assert(ioTaskList);
+
+      char tmpBuf[8];   /* Big enough for 1M tasks (7 digits task ID). */
+      tmpBuf[7] = '\0';
+      for (int i=0; i<7; i++) {
+         tmpBuf[i] = *ioTaskList++;      /* Maximum is 7 digits for 1 million. */
+         if (*ioTaskList == ':') {       /* If the next char is a ':' ends it. */
+             tmpBuf[i+1] = '\0';
+             break;
+         }
+      }
+      numAggs = atoi(tmpBuf);
+      fd->hints->ranklist = (int *) ADIOI_Malloc (numAggs * sizeof(int));
+
+      for (int j=0; j<numAggs; j++) {
+         ioTaskList++;                /* Advance past the ':' */
+         for (int i=0; i<7; i++) {
+            tmpBuf[i] = *ioTaskList++;
+            if ( (*ioTaskList == ':') || (*ioTaskList == '\0') ) {
+                tmpBuf[i+1] = '\0';
+                break;
+            }
+         }
+         fd->hints->ranklist[j] = atoi(tmpBuf);
+
+         /* At the end check whether the list is shorter than specified. */
+         if (*ioTaskList == '\0') {
+            if (j < (numAggs-1)) {
+               numAggs = j;
+            }
+            break;
+         }
+      }
+
+      fd->hints->cb_nodes = numAggs;
+
+#ifdef AGG_DEBUG
+  printf("Agg rank list of %d generated for PE:\n", numAggs);
+  for (int i=0;i<numAggs;i++) {
+    printf("%d ",fd->hints->ranklist[i]);
+  }
+  printf("\n");
+
+#endif
+
+    return 0;
+}
+
diff --git a/src/mpi/romio/adio/ad_gpfs/pe/ad_pe_aggrs.h b/src/mpi/romio/adio/ad_gpfs/pe/ad_pe_aggrs.h
new file mode 100644
index 0000000..4498b39
--- /dev/null
+++ b/src/mpi/romio/adio/ad_gpfs/pe/ad_pe_aggrs.h
@@ -0,0 +1,30 @@
+/* ---------------------------------------------------------------- */
+/* (C)Copyright IBM Corp.  2007, 2008                               */
+/* ---------------------------------------------------------------- */
+/**
+ * \file ad_pe_aggrs.h
+ * \brief ???
+ */
+
+/*
+ *
+ * Declares functions specific for the PE platform within the GPFS
+ * parallel I/O solution.  For now simply processes the MP_IOTASKLIST
+ * env var.
+ *
+ */
+
+#ifndef AD_PE_AGGRS_H_
+#define AD_PE_AGGRS_H_
+
+#include "adio.h"
+#include <sys/stat.h>
+
+#if !defined(GPFS_SUPER_MAGIC)
+  #define GPFS_SUPER_MAGIC (0x47504653)
+#endif
+
+    /* generate a list of I/O aggregators for now based on the MP_IOTASKLIST. */
+    int ADIOI_PE_gen_agg_ranklist(ADIO_File fd);
+
+#endif  /* AD_PE_AGGRS_H_ */
diff --git a/src/mpi/romio/adio/ad_gpfs/pe/ad_pe_hints.c b/src/mpi/romio/adio/ad_gpfs/pe/ad_pe_hints.c
new file mode 100644
index 0000000..21cb45f
--- /dev/null
+++ b/src/mpi/romio/adio/ad_gpfs/pe/ad_pe_hints.c
@@ -0,0 +1,269 @@
+/* ---------------------------------------------------------------- */
+/* (C)Copyright IBM Corp.  2007, 2008                               */
+/* ---------------------------------------------------------------- */
+/**
+ * \file ad_pe_hints.c
+ * \brief PE hint processing
+ */
+
+/* -*- Mode: C; c-basic-offset:4 ; -*- */
+/*
+ *   Copyright (C) 1997 University of Chicago.
+ *   See COPYRIGHT notice in top-level directory.
+ */
+
+#include "adio.h"
+#include "adio_extern.h"
+#include "hint_fns.h"
+
+#include "../ad_gpfs.h"
+#include "ad_pe_aggrs.h"
+
+#define   ADIOI_PE_CB_BUFFER_SIZE_DFLT      	"16777216"
+#define	  ADIOI_PE_IND_RD_BUFFER_SIZE_DFLT	"4194304"
+#define   ADIOI_PE_IND_WR_BUFFER_SIZE_DFLT	"4194304"
+/** \page mpiio_vars MPIIO Configuration
+ *
+ * PE MPIIO configuration and performance tuning. Used by ad_gpfs ADIO.
+ *
+ * \section hint_sec Hints
+ *
+ *   The following default key/value pairs may differ from other platform defaults.
+ *
+ *     - key = cb_buffer_size     value = 16777216
+ *     - key = romio_cb_read      value = enable
+ *     - key = romio_cb_write     value = enable
+ *     - key = ind_rd_buffer_size value = 4194304
+ *     - key = ind_wr_buffer_size value = 4194304
+ */
+
+void ADIOI_PE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
+{
+/* if fd->info is null, create a new info object.
+   Initialize fd->info to default values.
+   Initialize fd->hints to default values.
+   Examine the info object passed by the user. If it contains values that
+   ROMIO understands, override the default. */
+
+    MPI_Info info;
+    char *value;
+    int flag, intval, nprocs=0, nprocs_is_valid = 0;
+    static char myname[] = "ADIOI_PE_SetInfo";
+
+    int did_anything = 0;
+
+    if (fd->info == MPI_INFO_NULL) MPI_Info_create(&(fd->info));
+    info = fd->info;
+
+    /* Note that fd->hints is allocated at file open time; thus it is
+     * not necessary to allocate it, or check for allocation, here.
+     */
+
+    value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char));
+    ADIOI_Assert ((value != NULL));
+
+    /* initialize info and hints to default values if they haven't been
+     * previously initialized
+     */
+    if (!fd->hints->initialized) {
+
+	ad_gpfs_get_env_vars();
+	did_anything = 1;
+
+	/* buffer size for collective I/O */
+	ADIOI_Info_set(info, "cb_buffer_size", ADIOI_PE_CB_BUFFER_SIZE_DFLT);
+	fd->hints->cb_buffer_size = atoi(ADIOI_PE_CB_BUFFER_SIZE_DFLT);
+
+	/* default is to let romio automatically decide when to use
+	 * collective buffering
+	 */
+	ADIOI_Info_set(info, "romio_cb_read", "enable");
+	fd->hints->cb_read = ADIOI_HINT_ENABLE;
+	ADIOI_Info_set(info, "romio_cb_write", "enable");
+	fd->hints->cb_write = ADIOI_HINT_ENABLE;
+
+   	if ( fd->hints->cb_config_list != NULL ) ADIOI_Free (fd->hints->cb_config_list);
+	fd->hints->cb_config_list = NULL;
+
+	/* number of processes that perform I/O in collective I/O */
+	MPI_Comm_size(fd->comm, &nprocs);
+	nprocs_is_valid = 1;
+	ADIOI_Snprintf(value, MPI_MAX_INFO_VAL+1, "%d", nprocs);
+	ADIOI_Info_set(info, "cb_nodes", value);
+	fd->hints->cb_nodes = nprocs;  // initialize to nprocs
+
+	/* hint indicating that no indep. I/O will be performed on this file */
+	ADIOI_Info_set(info, "romio_no_indep_rw", "false");
+	fd->hints->no_indep_rw = 0;
+
+	/* PE is not implementing file realms (ADIOI_IOStridedColl),
+	   initialize to disabled it. 	   */
+	/* hint instructing the use of persistent file realms */
+	ADIOI_Info_set(info, "romio_cb_pfr", "disable");
+	fd->hints->cb_pfr = ADIOI_HINT_DISABLE;
+
+	/* hint guiding the assignment of persistent file realms */
+	ADIOI_Info_set(info, "romio_cb_fr_types", "aar");
+	fd->hints->cb_fr_type = ADIOI_FR_AAR;
+
+	/* hint to align file realms with a certain byte value */
+	ADIOI_Info_set(info, "romio_cb_fr_alignment", "1");
+	fd->hints->cb_fr_alignment = 1;
+
+	/* hint to set a threshold percentage for a datatype's size/extent at
+	 * which data sieving should be done in collective I/O */
+	ADIOI_Info_set(info, "romio_cb_ds_threshold", "0");
+	fd->hints->cb_ds_threshold = 0;
+
+	/* hint to switch between point-to-point or all-to-all for two-phase */
+	ADIOI_Info_set(info, "romio_cb_alltoall", "automatic");
+	fd->hints->cb_alltoall = ADIOI_HINT_AUTO;
+
+	 /* deferred_open derived from no_indep_rw and cb_{read,write} */
+	fd->hints->deferred_open = 0;
+
+	/* buffer size for data sieving in independent reads */
+	ADIOI_Info_set(info, "ind_rd_buffer_size", ADIOI_PE_IND_RD_BUFFER_SIZE_DFLT);
+	fd->hints->ind_rd_buffer_size = atoi(ADIOI_PE_IND_RD_BUFFER_SIZE_DFLT);
+
+	/* buffer size for data sieving in independent writes */
+	ADIOI_Info_set(info, "ind_wr_buffer_size", ADIOI_PE_IND_WR_BUFFER_SIZE_DFLT);
+	fd->hints->ind_wr_buffer_size = atoi(ADIOI_PE_IND_WR_BUFFER_SIZE_DFLT);
+
+  if(fd->file_system == ADIO_UFS)
+  {
+    /* default for ufs/pvfs is to disable data sieving  */
+    ADIOI_Info_set(info, "romio_ds_read", "disable");
+    fd->hints->ds_read = ADIOI_HINT_DISABLE;
+    ADIOI_Info_set(info, "romio_ds_write", "disable");
+    fd->hints->ds_write = ADIOI_HINT_DISABLE;
+  }
+  else
+  {
+    /* default is to let romio automatically decide when to use data
+     * sieving
+     */
+    ADIOI_Info_set(info, "romio_ds_read", "automatic");
+    fd->hints->ds_read = ADIOI_HINT_AUTO;
+    ADIOI_Info_set(info, "romio_ds_write", "automatic");
+    fd->hints->ds_write = ADIOI_HINT_AUTO;
+  }
+
+    /* still to do: tune this a bit for a variety of file systems. there's
+	 * no good default value so just leave it unset */
+    fd->hints->min_fdomain_size = 0;
+    fd->hints->striping_unit = 0;
+
+    fd->hints->initialized = 1;
+    }
+
+    /* add in user's info if supplied */
+    if (users_info != MPI_INFO_NULL) {
+	ADIOI_Info_check_and_install_int(fd, users_info, "cb_buffer_size",
+		&(fd->hints->cb_buffer_size), myname, error_code);
+
+	/* new hints for enabling/disabling coll. buffering on
+	 * reads/writes
+	 */
+	ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_cb_read",
+		&(fd->hints->cb_read), myname, error_code);
+	if (fd->hints->cb_read == ADIOI_HINT_DISABLE) {
+	    /* romio_cb_read overrides no_indep_rw */
+	    ADIOI_Info_set(info, "romio_no_indep_rw", "false");
+	    fd->hints->no_indep_rw = ADIOI_HINT_DISABLE;
+	}
+	ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_cb_write",
+		&(fd->hints->cb_write), myname, error_code);
+	if (fd->hints->cb_write == ADIOI_HINT_DISABLE) {
+	    /* romio_cb_write overrides no_indep_rw */
+	    ADIOI_Info_set(info, "romio_no_indep_rw", "false");
+	    fd->hints->no_indep_rw = ADIOI_HINT_DISABLE;
+	}
+
+	/* Has the user indicated all I/O will be done collectively? */
+	ADIOI_Info_check_and_install_true(fd, users_info, "romio_no_indep_rw",
+		&(fd->hints->no_indep_rw), myname, error_code);
+	if (fd->hints->no_indep_rw == 1) {
+	    /* if 'no_indep_rw' set, also hint that we will do
+	     * collective buffering: if we aren't doing independent io,
+	     * then we have to do collective  */
+	    ADIOI_Info_set(info, "romio_cb_write", "enable");
+	    ADIOI_Info_set(info, "romio_cb_read", "enable");
+	    fd->hints->cb_read = 1;
+	    fd->hints->cb_write = 1;
+	}
+
+	/* new hints for enabling/disabling data sieving on
+	 * reads/writes
+	 */
+	ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_ds_read",
+		&(fd->hints->ds_read), myname, error_code);
+	ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_ds_write",
+		&(fd->hints->ds_write), myname, error_code);
+
+
+
+	ADIOI_Info_check_and_install_int(fd, users_info, "ind_wr_buffer_size",
+		&(fd->hints->ind_wr_buffer_size), myname, error_code);
+	ADIOI_Info_check_and_install_int(fd, users_info, "ind_rd_buffer_size",
+		&(fd->hints->ind_rd_buffer_size), myname, error_code);
+
+
+	memset( value, 0, MPI_MAX_INFO_VAL+1 );
+	ADIOI_Info_get(users_info, "romio_min_fdomain_size", MPI_MAX_INFO_VAL,
+			value, &flag);
+	if ( flag && ((intval = atoi(value)) > 0) ) {
+		ADIOI_Info_set(info, "romio_min_fdomain_size", value);
+		fd->hints->min_fdomain_size = intval;
+	}
+  /* Now we use striping unit in common code so we should
+     process hints for it. */
+	ADIOI_Info_check_and_install_int(fd, users_info, "striping_unit",
+		&(fd->hints->striping_unit), myname, error_code);
+
+    }
+
+    /* associate CB aggregators to certain CNs in every involved PSET */
+    if (did_anything) {
+	ADIOI_PE_gen_agg_ranklist(fd);
+    }
+
+    /* deferred_open won't be set by callers, but if the user doesn't
+     * explicitly disable collecitve buffering (two-phase) and does hint that
+     * io w/o independent io is going on, we'll set this internal hint as a
+     * convenience */
+    if ( ( (fd->hints->cb_read != ADIOI_HINT_DISABLE) \
+			    && (fd->hints->cb_write != ADIOI_HINT_DISABLE)\
+			    && fd->hints->no_indep_rw ) ) {
+	    fd->hints->deferred_open = 1;
+    } else {
+	    /* setting romio_no_indep_rw enable and romio_cb_{read,write}
+	     * disable at the same time doesn't make sense. honor
+	     * romio_cb_{read,write} and force the no_indep_rw hint to
+	     * 'disable' */
+	    ADIOI_Info_set(info, "romio_no_indep_rw", "false");
+	    fd->hints->no_indep_rw = 0;
+	    fd->hints->deferred_open = 0;
+    }
+
+    /* we need to keep DS writes enabled on gpfs and disabled on PVFS */
+    if (ADIO_Feature(fd, ADIO_DATA_SIEVING_WRITES) == 0) {
+    /* disable data sieving for fs that do not
+       support file locking */
+       	ADIOI_Info_get(info, "ind_wr_buffer_size", MPI_MAX_INFO_VAL,
+		     value, &flag);
+	if (flag) {
+	    /* get rid of this value if it is set */
+	    ADIOI_Info_delete(info, "ind_wr_buffer_size");
+	}
+	/* note: leave ind_wr_buffer_size alone; used for other cases
+	 * as well. -- Rob Ross, 04/22/2003
+	 */
+	ADIOI_Info_set(info, "romio_ds_write", "disable");
+	fd->hints->ds_write = ADIOI_HINT_DISABLE;
+    }
+
+    ADIOI_Free(value);
+
+    *error_code = MPI_SUCCESS;
+}

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

Summary of changes:
 src/mpi/romio/adio/Makefile.mk                     |    1 +
 src/mpi/romio/adio/ad_gpfs/Makefile.mk             |    1 +
 src/mpi/romio/adio/ad_gpfs/ad_gpfs.c               |    6 +-
 src/mpi/romio/adio/ad_gpfs/ad_gpfs.h               |    4 +-
 .../ad_gpfs/{bg/ad_bg_hints.c => ad_gpfs_hints.c}  |  134 +++++-------
 src/mpi/romio/adio/ad_gpfs/bg/Makefile.mk          |    1 -
 src/mpi/romio/adio/ad_gpfs/pe/Makefile.mk          |   16 ++
 src/mpi/romio/adio/ad_gpfs/pe/ad_pe_aggrs.c        |  234 ++++++++++++++++++++
 src/mpi/romio/adio/ad_gpfs/pe/ad_pe_aggrs.h        |   30 +++
 9 files changed, 338 insertions(+), 89 deletions(-)
 rename src/mpi/romio/adio/ad_gpfs/{bg/ad_bg_hints.c => ad_gpfs_hints.c} (73%)
 create mode 100644 src/mpi/romio/adio/ad_gpfs/pe/Makefile.mk
 create mode 100644 src/mpi/romio/adio/ad_gpfs/pe/ad_pe_aggrs.c
 create mode 100644 src/mpi/romio/adio/ad_gpfs/pe/ad_pe_aggrs.h


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list