<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hi John,</p>
    <div>
      For example, this is the code in
      codes/doc/example_heterogeneous/example.c:<br>
      void handle_forwarder_fwd(<br>
              forwarder_state * ns,<br>
              forwarder_msg * m,<br>
              tw_lp * lp){<br>
          // compute the forwarder lpid to forward to<br>
          int mod;<br>
          const char * dest_group;<br>
          char * category;<br>
          if (ns->is_in_foo){<br>
              mod = num_bar_forwarders;<br>
              dest_group = "BAR_FORWARDERS";<br>
              category = "ping";<br>
          }<br>
          else{<br>
              mod = num_foo_forwarders;<br>
              dest_group = "FOO_FORWARDERS";<br>
              category = "pong";<br>
          }<br>
      <br>
          // compute the ROSS id corresponding to the dest forwarder<br>
          tw_lpid dest_lpid = codes_mapping_get_lpid_from_relative(<br>
                  ns->id % mod, dest_group, "forwarder", NULL, 0);<br>
      <br>
          forwarder_msg m_fwd = *m;<br>
    msg_set_header(forwarder_magic, FORWARDER_RECV, lp->gid, &m_fwd.h);<br>
    // here, we need to use the unannotated forwarding network, so we<br>
          // use the annotation version of model_net_event<br>
    model_net_event_annotated(net_id_forwarding, "foo", category, dest_lpid,<br>
            payload_sz, 0.0, sizeof(m_fwd), &m_fwd, 0, NULL, lp);<br>
      <br>
          ns->fwd_node_count++;<br>
      }<br>
the sender lp is the forwarder in FOO_FORWARDERS,id is 26,dest_lpid id is 58,means the dest lp is the forwarder in BAR_FORWARDERS,they have same net type with different annotations.We
      We don't modify the code but the configuration file. We changed
      the type of forwarder to two different types, they can still
      communicate. By the way, if we change the second parameter to
      "foo", "bar", or any string, model_net_event_annotated() can
      always run with success.<br>
      <br>
      <br>
      For <span style="font-size:11.0pt"> startup parameter in
        simplenet, what's the exact means of this parameter?  Now we
        want to use simplenet to construct a complex network.<br>
        <br>
        Thanks,<br>
      </span><br>
      Lei<br>
    </div>
    在 2016/8/8 22:10, Jenkins, Jonathan P. 写道:<br>
    <blockquote
      cite="mid:E8577F0A-2C4D-4E2F-99D2-09D60E9A2984@mcs.anl.gov"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <meta name="Title" content="">
      <meta name="Keywords" content="">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Courier New";
        panose-1:2 7 3 9 2 2 5 2 4 4;}
@font-face
        {font-family:宋体;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:MingLiU;
        panose-1:2 2 5 9 0 0 0 0 0 0;}
@font-face
        {font-family:"MS Mincho \;color\:black";}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        text-align:justify;
        font-size:10.5pt;
        font-family:Calibri;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        text-align:justify;
        font-size:10.5pt;
        font-family:宋体;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Courier;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:Courier;}
span.Char
        {mso-style-name:"纯文本 Char";
        mso-style-priority:99;
        mso-style-link:纯文本;
        font-family:宋体;}
p.a, li.a, div.a
        {mso-style-name:纯文本;
        mso-style-link:"纯文本 Char";
        margin:0in;
        margin-bottom:.0001pt;
        text-align:justify;
        font-size:10.5pt;
        font-family:Calibri;}
span.EmailStyle24
        {mso-style-type:personal;
        font-family:Calibri;
        color:windowtext;}
span.EmailStyle25
        {mso-style-type:personal-reply;
        font-family:Calibri;
        color:windowtext;}
span.msoIns
        {mso-style-type:export-only;
        mso-style-name:"";
        text-decoration:underline;
        color:teal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
      <div class="WordSection1">
        <p class="MsoNormal"><span style="font-size:11.0pt">Hi Yu,<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt">Thanks for
            the information. Can you additionally send the argument used
            for the "annotation" variable in model_net_event_annotated?<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt">In my
            previous answer to your second question, I meant that you
            should run that or a similar benchmark on a real (not
            simulated) system to get an accurate startup parameter for
            the system you are simulating. Eventually you'd want to use
            something like the loggp model that IIRC we've talked about
            off-thread, but simplenet is at least a reasonable model to
            start with.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt">Thanks,<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt">John<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
        <div style="border:none;border-top:solid #B5C4DF
          1.0pt;padding:3.0pt 0in 0in 0in">
          <p class="MsoNormal"><b><span style="color:black">From: </span></b><span
              style="font-family:"MS Mincho";color:black">于雷(</span><span
              style="color:black">Yu Lei</span><span
              style="font-family:"MS Mincho";color:black">)</span><span
              style="color:black"> <a class="moz-txt-link-rfc2396E" href="mailto:yulei@buaa.edu.cn"><yulei@buaa.edu.cn></a></span><span
              style="font-family:MingLiU;color:black"><br>
            </span><b><span style="color:black">Date: </span></b><span
              style="color:black">Saturday, August 6, 2016 at 10:58 PM<br>
              <b>To: </b>John Jenkins <a class="moz-txt-link-rfc2396E" href="mailto:jenkins@mcs.anl.gov"><jenkins@mcs.anl.gov></a>,
              <a class="moz-txt-link-rfc2396E" href="mailto:codes-ross-users@lists.mcs.anl.gov">"codes-ross-users@lists.mcs.anl.gov"</a>
              <a class="moz-txt-link-rfc2396E" href="mailto:codes-ross-users@lists.mcs.anl.gov"><codes-ross-users@lists.mcs.anl.gov></a><br>
              <b>Subject: </b>Re: [codes-ross-users] codes model net
              problems</span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
        </div>
        <div>
          <p class="MsoNormal"><span style="font-family:"Times New
              Roman","serif""><o:p> </o:p></span></p>
        </div>
        <blockquote style="border:none;border-left:solid #B5C4DF
          4.5pt;padding:0in 0in 0in
          4.0pt;margin-left:3.75pt;margin-right:0in"
          id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE">
          <div>
            <div>
              <p>Hi John,<o:p></o:p></p>
              <p>Thanks for your response.<o:p></o:p></p>
              <p><o:p> </o:p></p>
              <p>For the first question, the configuration is as
                follows:<o:p></o:p></p>
              <div>
                <p class="MsoNormal" style="margin-bottom:12.0pt">LPGROUPS {<br>
                      ## cluster foo<br>
                      FOO_CLUSTER {<br>
                          repetitions="12";<br>
                          node="1";<br>
                          modelnet_simplenet@foo="1";<br>
                      }<br>
                      FOO_FORWARDERS {<br>
                          repetitions="4";<br>
                          forwarder="1";<br>
                          modelnet_simplenet@foo="1";<br>
                      }<br>
                      ## cluster bar<br>
                      BAR_CLUSTER {<br>
                          repetitions="12";<br>
                          node="1";<br>
                          modelnet_simplenet@bar="1";<br>
                      }<br>
                      BAR_FORWARDERS {<br>
                          repetitions="4";<br>
                          forwarder="1";<br>
                          modelnet_simplenet@bar="1";<br>
                      }<br>
                  }<br>
                  <br>
                  PARAMS {<br>
                      ## ROSS parameters<br>
                      message_size="352";<br>
                  <br>
                      ## global modelnet parameters <br>
                      modelnet_order=("simplenet");<br>
                  <br>
                      ## foo cluster network parameters <br>
                      packet_size@foo="8192";<br>
                      modelnet_scheduler@foo="fcfs";<br>
                      net_startup_ns@foo="1.5";<br>
                      net_bw_mbps@foo="10000";<br>
                  <br>
                      ## bar cluster network parameters<br>
                      packet_size@bar="2048";<br>
                      modelnet_scheduler@bar="round-robin";<br>
                      net_startup_ns@bar="3.0";<br>
                      net_bw_mbps@bar="15000";<br>
                  <br>
                      ## forwarding network parameters<br>
                      packet_size="4096";<br>
                      modelnet_scheduler="fcfs";<br>
                      net_startup_ns="8.0";<br>
                      net_bw_mbps="5000";<br>
                  }<br>
                  <br>
                  run_params {<br>
                      num_reqs="5";<br>
                      payload_sz="16384";<br>
                  }<br>
                  <br>
                  FOO_FORWARDERS and BAR_FORWARDERS are two groups. The
                  lps in these groups have the same type but have
                  different annotations. we call 
                  model_net_event_annotated(<br>
                          int net_id,//SIMPLENET(0)<br>
                          char const * annotation,<br>
                          char const * category, <br>
        tw_lpid final_dest_lp, //sender->gid is 26,final_dest_lp is 58<br>
                          uint64_t message_size, <br>
                          tw_stime offset,<br>
                          int remote_event_size,<br>
                          void const * remote_event,<br>
                          int self_event_size,<br>
                          void const * self_event,<br>
                          tw_lp *sender);  <br>
                  <br>
                  Then we can achieve the communication between lp26 and
                  lp58.<br>
                  <br>
                  For the second questions, is it possible that we use
                  model_net_event() to establish a simple point-to-point
                  connection and
                  <span style="font-size:11.0pt">we send messages 1M
                    times and take the average?<br>
                    <br>
                    Thanks,</span><o:p></o:p></p>
              </div>
              <p class="MsoNormal">Lei<br>
                <br>
                <span style="font-family:"MS Mincho"">在</span>
                2016/8/5 21:40, Jenkins, Jonathan P.
                <span style="font-family:"MS Mincho"">写道</span>:<br>
                <br>
                <o:p></o:p></p>
              <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
                <p class="MsoNormal"><span style="font-size:11.0pt">Hi
                    Yu,</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
                <p class="MsoNormal"><span style="font-size:11.0pt">You
                    are correct that modelnet LPs with different
                    annotations shouldn't be able to communicate through
                    the modelnet interface. Can you send us the
                    configuration file you are using, along with the
                    net_id, annotation, final_dest_lp, and
                    sender->gid values for the call that misbehaves?
                    We'll try to reproduce on our end.</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
                <p class="MsoNormal"><span style="font-size:11.0pt">The
                    startup parameter in simplenet represents local
                    sender-side overhead on a packet granularity. So one
                    way to estimate the startup is to get an average
                    per-call time (on the sender side) of very small
                    (word-sized) messages. I.e. measure calling send(fd,
                    buf, 8, flags) 1M times and take the average.</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="font-size:11.0pt"><br>
                    Thanks,<br>
                    John</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
                <div style="border:none;border-top:solid #B5C4DF
                  1.0pt;padding:3.0pt 0in 0in 0in">
                  <p class="MsoNormal"><b><span style="color:black"
                        lang="FR">From: </span></b><span
                      style="color:black" lang="FR"><a
                        moz-do-not-send="true"
                        href="mailto:codes-ross-users-bounces@lists.mcs.anl.gov"><codes-ross-users-bounces@lists.mcs.anl.gov></a>
                      on behalf of
                    </span><span style="font-family:"MS Mincho
                      \;color\:black"">于雷(</span><span
                      style="color:black" lang="FR">Yu Lei</span><span
                      style="font-family:"MS
                      Mincho";color:black">)</span><span
                      style="color:black">
                      <span lang="FR"><a moz-do-not-send="true"
                          href="mailto:yulei@buaa.edu.cn"><yulei@buaa.edu.cn></a></span></span><span
                      style="font-family:MingLiU;color:black" lang="FR"><br>
                    </span><b><span style="color:black" lang="FR">Date:
                      </span></b><span style="color:black" lang="FR">Thursday,
                      August 4, 2016 at 10:34 PM<br>
                      <b>To: </b><a moz-do-not-send="true"
                        href="mailto:codes-ross-users@lists.mcs.anl.gov">"codes-ross-users@lists.mcs.anl.gov"</a>
                      <a moz-do-not-send="true"
                        href="mailto:codes-ross-users@lists.mcs.anl.gov"><codes-ross-users@lists.mcs.anl.gov></a><br>
                      <b>Subject: </b>[codes-ross-users] codes model
                      net problems</span><o:p></o:p></p>
                </div>
                <div>
                  <p class="MsoNormal"><span
                      style="font-family:"Times New
                      Roman","serif"" lang="FR"> </span><o:p></o:p></p>
                </div>
                <blockquote style="border:none;border-left:solid #B5C4DF
                  4.5pt;padding:0in 0in 0in
4.0pt;margin-left:3.75pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt"
                  id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE">
                  <div>
                    <div>
                      <p class="MsoPlainText"><span lang="FR">1/for the
                          method:</span><o:p></o:p></p>
                      <p class="MsoPlainText"><span lang="FR">model_net_event_return
                          model_net_event_annotated(<br>
                                  int net_id,<br>
                                  char const * annotation,<br>
                                  char const * category, <br>
                                  tw_lpid final_dest_lp, <br>
                                  uint64_t message_size, <br>
                                  tw_stime offset,<br>
                                  int remote_event_size,<br>
                                  void const * remote_event,<br>
                                  int self_event_size,<br>
                                  void const * self_event,<br>
                                  tw_lp *sender);</span><o:p></o:p></p>
                      <p class="MsoPlainText"><span lang="FR"> </span><o:p></o:p></p>
                      <p class="MsoPlainText"><span lang="FR">we think
                          that two lps with same network type but with
                          different annotation can not communicate with
                          this method. But we do some tests which prove
                          that the communication can be established. We
                          don't know why?</span><o:p></o:p></p>
                      <p class="MsoPlainText"><span lang="FR">2/for
                          simplenet model, it needs a parameter
                          "start_up". How can we obtain this parameter?</span><o:p></o:p></p>
                      <p class="MsoPlainText"><span lang="FR"> </span><o:p></o:p></p>
                      <p class="MsoPlainText"><span lang="FR">Thanks,</span><o:p></o:p></p>
                      <p class="MsoPlainText"><span lang="FR"> </span><o:p></o:p></p>
                      <p class="MsoPlainText"><span lang="FR">Lei</span><o:p></o:p></p>
                    </div>
                  </div>
                </blockquote>
              </blockquote>
              <p class="MsoNormal" style="text-align:left" align="left"><span
                  style="font-size:12.0pt;font-family:"Times New
                  Roman","serif""><o:p> </o:p></span></p>
            </div>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <br>
  </body>
</html>