[codes-ross-users] codes model net problems

于雷(Yu Lei) yulei at buaa.edu.cn
Fri Aug 12 05:01:17 CDT 2016


Hi John,

For example, this is the code in codes/doc/example_heterogeneous/example.c:
void handle_forwarder_fwd(
         forwarder_state * ns,
         forwarder_msg * m,
         tw_lp * lp){
     // compute the forwarder lpid to forward to
     int mod;
     const char * dest_group;
     char * category;
     if (ns->is_in_foo){
         mod = num_bar_forwarders;
         dest_group = "BAR_FORWARDERS";
         category = "ping";
     }
     else{
         mod = num_foo_forwarders;
         dest_group = "FOO_FORWARDERS";
         category = "pong";
     }

     // compute the ROSS id corresponding to the dest forwarder
     tw_lpid dest_lpid = codes_mapping_get_lpid_from_relative(
             ns->id % mod, dest_group, "forwarder", NULL, 0);

     forwarder_msg m_fwd = *m;
     msg_set_header(forwarder_magic, FORWARDER_RECV, lp->gid, &m_fwd.h);
     // here, we need to use the unannotated forwarding network, so we
     // use the annotation version of model_net_event
     model_net_event_annotated(net_id_forwarding, "foo", category, dest_lpid,
             payload_sz, 0.0, sizeof(m_fwd), &m_fwd, 0, NULL, lp);

     ns->fwd_node_count++;
}
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.


For startup parameter in simplenet, what's the exact means of this 
parameter?  Now we want to use simplenet to construct a complex network.

Thanks,

Lei
在 2016/8/8 22:10, Jenkins, Jonathan P. 写道:
>
> Hi Yu,
>
> Thanks for the information. Can you additionally send the argument 
> used for the "annotation" variable in model_net_event_annotated?
>
> 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.
>
> Thanks,
>
> John
>
> *From: *于雷(Yu Lei)<yulei at buaa.edu.cn>
> *Date: *Saturday, August 6, 2016 at 10:58 PM
> *To: *John Jenkins <jenkins at mcs.anl.gov>, 
> "codes-ross-users at lists.mcs.anl.gov" <codes-ross-users at lists.mcs.anl.gov>
> *Subject: *Re: [codes-ross-users] codes model net problems
>
>     Hi John,
>
>     Thanks for your response.
>
>     For the first question, the configuration is as follows:
>
>     LPGROUPS {
>         ## cluster foo
>         FOO_CLUSTER {
>             repetitions="12";
>             node="1";
>             modelnet_simplenet at foo="1";
>         }
>         FOO_FORWARDERS {
>             repetitions="4";
>             forwarder="1";
>             modelnet_simplenet at foo="1";
>         }
>         ## cluster bar
>         BAR_CLUSTER {
>             repetitions="12";
>             node="1";
>             modelnet_simplenet at bar="1";
>         }
>         BAR_FORWARDERS {
>             repetitions="4";
>             forwarder="1";
>             modelnet_simplenet at bar="1";
>         }
>     }
>
>     PARAMS {
>         ## ROSS parameters
>         message_size="352";
>
>         ## global modelnet parameters
>         modelnet_order=("simplenet");
>
>         ## foo cluster network parameters
>         packet_size at foo="8192";
>         modelnet_scheduler at foo="fcfs";
>         net_startup_ns at foo="1.5";
>         net_bw_mbps at foo="10000";
>
>         ## bar cluster network parameters
>         packet_size at bar="2048";
>         modelnet_scheduler at bar="round-robin";
>         net_startup_ns at bar="3.0";
>         net_bw_mbps at bar="15000";
>
>         ## forwarding network parameters
>         packet_size="4096";
>         modelnet_scheduler="fcfs";
>         net_startup_ns="8.0";
>         net_bw_mbps="5000";
>     }
>
>     run_params {
>         num_reqs="5";
>         payload_sz="16384";
>     }
>
>     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(
>             int net_id,//SIMPLENET(0)
>             char const * annotation,
>             char const * category,
>             tw_lpid final_dest_lp, //sender->gid is 26,final_dest_lp is 58
>             uint64_t message_size,
>             tw_stime offset,
>             int remote_event_size,
>             void const * remote_event,
>             int self_event_size,
>             void const * self_event,
>             tw_lp *sender);
>
>     Then we can achieve the communication between lp26 and lp58.
>
>     For the second questions, is it possible that we use
>     model_net_event() to establish a simple point-to-point connection
>     and we send messages 1M times and take the average?
>
>     Thanks,
>
>     Lei
>
>     在 2016/8/5 21:40, Jenkins, Jonathan P. 写道:
>
>         Hi Yu,
>
>         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.
>
>         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.
>
>
>         Thanks,
>         John
>
>         *From: *<codes-ross-users-bounces at lists.mcs.anl.gov>
>         <mailto:codes-ross-users-bounces at lists.mcs.anl.gov> on behalf
>         of 于雷(Yu Lei)<yulei at buaa.edu.cn> <mailto:yulei at buaa.edu.cn>
>         *Date: *Thursday, August 4, 2016 at 10:34 PM
>         *To: *"codes-ross-users at lists.mcs.anl.gov"
>         <mailto:codes-ross-users at lists.mcs.anl.gov>
>         <codes-ross-users at lists.mcs.anl.gov>
>         <mailto:codes-ross-users at lists.mcs.anl.gov>
>         *Subject: *[codes-ross-users] codes model net problems
>
>             1/for the method:
>
>             model_net_event_return model_net_event_annotated(
>                     int net_id,
>                     char const * annotation,
>                     char const * category,
>                     tw_lpid final_dest_lp,
>                     uint64_t message_size,
>                     tw_stime offset,
>                     int remote_event_size,
>                     void const * remote_event,
>                     int self_event_size,
>                     void const * self_event,
>                     tw_lp *sender);
>
>             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?
>
>             2/for simplenet model, it needs a parameter "start_up".
>             How can we obtain this parameter?
>
>             Thanks,
>
>             Lei
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/codes-ross-users/attachments/20160812/088c0d0b/attachment-0001.html>


More information about the codes-ross-users mailing list