Hi all,
We have ambiquite definitions of "slot" in rankfile, hostfile and carto
components.
Since "slot" is well defined as a processor in the hostfile and rankfile (
"slot" is defined as processing unit which can be processor number or
socket:core pair ).
I propose to change carto file syntax and make it more graph oriented. This
won't have any effect on the code.

In new carto syntax

NODE will be changed to EDGE
CONNECTION will be changed to BRANCH
SLOT will be changed to SOCKET.

Any comments are welcome.
few words about carto can be found at
https://svn.open-mpi.org/trac/ompi/wiki/OnHostTopologyDescription

  Index: opal/mca/carto/file/help-opal-carto-file.txt
===================================================================
--- opal/mca/carto/file/help-opal-carto-file.txt    (revision 18772)
+++ opal/mca/carto/file/help-opal-carto-file.txt    (working copy)
@@ -27,27 +27,27 @@
 #
 [expected node type]
-File: %s line: %d expected node type (free string). received %s
+File: %s line: %d expected Edge type (free string). received %s
 #
 [expected node name]
-File: %s line: %d expected Node name (free string). received %s
+File: %s line: %d expected Edge name (free string). received %s
 #
 [expected Connection]
-File: %s line: %d expected Node connection (node name:weight). received %s
+File: %s line: %d expected Edge branch (edge name:weight). received %s
 #
 [expected deceleration]
-File: %s line: %d expected Node deceleration (NODE) or connection
deceleration (CONNECTION). received %s
+File: %s line: %d expected Edge declaration (EDGE) or branch declaration
(BRANCH). received %s
 #
 [incorrect connection]
-File: %s line: %d - %s - incorrect connection
+File: %s line: %d - %s - incorrect branch
 #
 [vertex not found]
-File: %s line: %d - Node %s is not in the graph
+File: %s line: %d - Edge %s is not in the graph
 #
 [unknown token]
Index: opal/mca/carto/file/carto_file_lex.l
===================================================================
--- opal/mca/carto/file/carto_file_lex.l    (revision 18772)
+++ opal/mca/carto/file/carto_file_lex.l    (working copy)
@@ -80,13 +80,13 @@

-NODE               { carto_file_value.sval = yytext;
+EDGE               { carto_file_value.sval = yytext;
                      return OPAL_CARTO_FILE_NODE_DECELERATION; }
-CONNECTION         { carto_file_value.sval = yytext;
+BRANCH             { carto_file_value.sval = yytext;
                      return OPAL_CARTO_FILE_CONNECTION_DECELERATION; }
-CON_BI_DIR         { carto_file_value.sval = yytext;
+BRANCH_BI_DIR         { carto_file_value.sval = yytext;
                      return OPAL_CARTO_FILE_BIDIRECTION_CONNECTION; }
 [0-9]              { carto_file_value.ival = atol(yytext);
Index: opal/mca/carto/file/carto_file.h
===================================================================
--- opal/mca/carto/file/carto_file.h    (revision 18772)
+++ opal/mca/carto/file/carto_file.h    (working copy)
@@ -21,49 +21,49 @@
 /**
  * @file#this is a comment
 # Node declaration   Node type (Free string)   Node name (Free string)
-# (Reserve word)     (slot is a reserve word   (free string)
-#                     for CPU slot)
+# (Reserve word)     (socket is a reserve word   (free string)
+#                     for CPU socket)
 #=======================================================================
-  NODE               Memory                    mem0
-  NODE               Memory                    mem1
-  NODE               Memory                    mem2
-  NODE               Memory                    mem3
+  EDGE               Memory                    mem0
+  EDGE               Memory                    mem1
+  EDGE               Memory                    mem2
+  EDGE               Memory                    mem3
 #
-  NODE               slot                      slot0
-  NODE               slot                      slot1
-  NODE               slot                      slot2
-  NODE               slot                      slot3
+  EDGE               socket                      socket0
+  EDGE               socket                      socket1
+  EDGE               socket                      socket2
+  EDGE               socket                      socket3
 #
-  NODE               Infiniband                mthca0
-  NODE               Infiniband                mthca1
+  EDGE               Infiniband                mthca0
+  EDGE               Infiniband                mthca1
 #
-  NODE               Ethernet                  eth0
-  NODE               Ethernet                  eth1
+  EDGE               Ethernet                  eth0
+  EDGE               Ethernet                  eth1
 #
 #
 # Connection decleration  From node   To node:weight   To node:weight
......
 # (Reserve word)          (declered   (declered        (declered
 #                          above)      above)           above)
 
#===============================================================================================
-  CONNECTION              mem0        slot0:0
-  CONNECTION              mem3        slot3:0
+  BRANCH              mem0        socket0:0
+  BRANCH              mem3        socket3:0
 #
-  CONNECTION              slot0       mem0:0           slot1:1
slot2:1 mthca0:1 eth0:1
-  CONNECTION              slot1       slot0:1          slot3:1
-  CONNECTION              slot2       slot1:1          slot3:1
-  CONNECTION              slot3       mem3:0           slot1:1
slot2:1 mthca1:1 eth1:1
+  BRANCH              socket0       mem0:0           socket1:1
socket2:1 mthca0:1 eth0:1
+  BRANCH              socket1       socket0:1        socket3:1
+  BRANCH              socket2       socket1:1        socket3:1
+  BRANCH              socket3       mem3:0           socket1:1
socket2:1 mthca1:1 eth1:1
 #
 #
-  CONNECTION              mthca0      slot0:1
-  CONNECTION              mthca1      slot3:1
+  BRANCH              mthca0      socket0:1
+  BRANCH              mthca1      socket3:1
 #
-  CONNECTION              eth0        slot0:1
-  CONNECTION              eth1        slot3:1
+  BRANCH              eth0        socket0:1
+  BRANCH              eth1        socket3:1
 #Bi-Directional connection
 #
-  CON_BI_DIR              slot1       mem1:0
-  CON_BI_DIR              slot2       mem2:0
+  BRANCH_BI_DIR              socket1       mem1:0
+  BRANCH_BI_DIR              socket2       mem2:0
 #
 # end of carto file.
Index: opal/mca/carto/file/carto_file_module.c
===================================================================
--- opal/mca/carto/file/carto_file_module.c (revision 18772)
+++ opal/mca/carto/file/carto_file_module.c (working copy)
@@ -171,7 +171,7 @@
                 case OPAL_CARTO_FILE_NAME:
                     node = (opal_carto_base_node_t
*)malloc(sizeof(opal_carto_base_node_t));
                     node->node_type = strdup(carto_file_value.sval);
-                    if (0 == strcmp("slot",node->node_type)) {
+                    if (0 == strcmp("socket",node->node_type)) {
                         node->is_cpu = true;
                     }
                     else {

Reply via email to