Add an underscore prefix to partition so that they are identified as non-user
authorNikhil Jain <nikhil@illinois.edu>
Fri, 29 Mar 2013 01:54:38 +0000 (20:54 -0500)
committerXiang Ni <xiangni2@c558-002.stampede.tacc.utexas.edu>
Fri, 29 Mar 2013 01:54:38 +0000 (20:54 -0500)
globals

src/arch/util/machine-common-core.c
src/conv-core/converse.h

index 9d1aa438918fbc11b124b9b5de334e79daa9ef4e..8266b230d5ffe63d55f5e3325ee22a00068acd11 100644 (file)
@@ -135,7 +135,7 @@ void CmiFreeNodeBroadcastAllFn(int size, char *msg);
 #endif
 
 // global state, equals local if running one replica
-PartitionInfo partitionInfo;
+PartitionInfo _partitionInfo;
 int _Cmi_mype_global;
 int _Cmi_numpes_global;
 int _Cmi_mynode_global;
@@ -697,23 +697,23 @@ if (  MSG_STATISTIC)
 
 // functions related to replica
 void CmiCreatePartitions(char **argv) {
-  partitionInfo.numPartitions = 1; 
-  CmiGetArgInt(argv,"+partitions", &partitionInfo.numPartitions);
+  _partitionInfo.numPartitions = 1; 
+  CmiGetArgInt(argv,"+partitions", &_partitionInfo.numPartitions);
 
   _Cmi_numnodes_global = _Cmi_numnodes;
   _Cmi_mynode_global = _Cmi_mynode;
   _Cmi_numpes_global = _Cmi_numnodes_global * _Cmi_mynodesize;
   //still need to set _Cmi_mype_global
 
-  CmiAssert(partitionInfo.numPartitions <= _Cmi_numnodes_global);
-  CmiAssert((_Cmi_numnodes_global % partitionInfo.numPartitions) == 0);
+  CmiAssert(_partitionInfo.numPartitions <= _Cmi_numnodes_global);
+  CmiAssert((_Cmi_numnodes_global % _partitionInfo.numPartitions) == 0);
   
   //simple partition, this will be made more complex in future
-  partitionInfo.partitionSize = _Cmi_numnodes_global / partitionInfo.numPartitions;
-  partitionInfo.myPartition = _Cmi_mynode_global / partitionInfo.partitionSize;
+  _partitionInfo.partitionSize = _Cmi_numnodes_global / _partitionInfo.numPartitions;
+  _partitionInfo.myPartition = _Cmi_mynode_global / _partitionInfo.partitionSize;
        
 
-  //CmiPrintf("in partition %d size %d\n",partitionInfo.myPartition, partitionInfo.partitionSize);
+  //CmiPrintf("in partition %d size %d\n",_partitionInfo.myPartition, _partitionInfo.partitionSize);
   //reset local variables
   _Cmi_mynode = CmiGetNodeLocal(_Cmi_mynode);
   _Cmi_numnodes = CmiPartitionSize();
@@ -721,11 +721,11 @@ void CmiCreatePartitions(char **argv) {
 }
 
 INLINE_KEYWORD int node_lToGTranslate(int node, int partition) {
-  return (partition*partitionInfo.partitionSize)+node;
+  return (partition*_partitionInfo.partitionSize)+node;
 }
 
 INLINE_KEYWORD int node_gToLTranslate(int node) {
-  return (node % partitionInfo.partitionSize);
+  return (node % _partitionInfo.partitionSize);
 }
 
 INLINE_KEYWORD int pe_lToGTranslate(int pe, int partition) {
index 46f9645fcfa449fcf07a2a9420491473700f6830..f156d9204b9356eb5b49efa6fcc84f73a328d76a 100644 (file)
@@ -139,10 +139,10 @@ extern int _Cmi_mype_global;
 extern int _Cmi_numpes_global;
 extern int _Cmi_mynode_global;
 extern int _Cmi_numnodes_global;
-extern PartitionInfo partitionInfo;
-#define CmiMyPartition()         partitionInfo.myPartition
-#define CmiPartitionSize()       partitionInfo.partitionSize
-#define CmiNumPartition()        partitionInfo.numPartitions
+extern PartitionInfo _partitionInfo;
+#define CmiMyPartition()         _partitionInfo.myPartition
+#define CmiPartitionSize()       _partitionInfo.partitionSize
+#define CmiNumPartition()        _partitionInfo.numPartitions
 #define CmiNumNodesGlobal()     _Cmi_numnodes_global
 #define CmiMyNodeGlobal()       _Cmi_mynode_global
 #define CmiNumPesGlobal()       _Cmi_numpes_global