Commit b74da2c3 authored by Misbah Mubarak's avatar Misbah Mubarak

Merge branch 'qos-dev-merge-resolved' into 'master'

DFP QoS work and DFDally Custom Standalone model

See merge request !64
parents b734e145 24e8b225
...@@ -24,6 +24,7 @@ extern "C" { ...@@ -24,6 +24,7 @@ extern "C" {
#include "net/dragonfly.h" #include "net/dragonfly.h"
#include "net/dragonfly-custom.h" #include "net/dragonfly-custom.h"
#include "net/dragonfly-plus.h" #include "net/dragonfly-plus.h"
#include "net/dragonfly-dally.h"
#include "net/slimfly.h" #include "net/slimfly.h"
#include "net/fattree.h" #include "net/fattree.h"
#include "net/loggp.h" #include "net/loggp.h"
...@@ -133,6 +134,7 @@ typedef struct model_net_wrap_msg { ...@@ -133,6 +134,7 @@ typedef struct model_net_wrap_msg {
terminal_message m_dfly; // dragonfly terminal_message m_dfly; // dragonfly
terminal_custom_message m_custom_dfly; // dragonfly-custom terminal_custom_message m_custom_dfly; // dragonfly-custom
terminal_plus_message m_dfly_plus; // dragonfly plus terminal_plus_message m_dfly_plus; // dragonfly plus
terminal_dally_message m_dally_dfly; // dragonfly dally
slim_terminal_message m_slim; // slimfly slim_terminal_message m_slim; // slimfly
fattree_message m_fat; // fattree fattree_message m_fat; // fattree
loggp_message m_loggp; // loggp loggp_message m_loggp; // loggp
......
...@@ -76,6 +76,8 @@ typedef struct mn_stats mn_stats; ...@@ -76,6 +76,8 @@ typedef struct mn_stats mn_stats;
X(EXPRESS_MESH_ROUTER, "modelnet_express_mesh_router", "express_mesh_router", &express_mesh_router_method)\ X(EXPRESS_MESH_ROUTER, "modelnet_express_mesh_router", "express_mesh_router", &express_mesh_router_method)\
X(DRAGONFLY_PLUS, "modelnet_dragonfly_plus", "dragonfly_plus", &dragonfly_plus_method)\ X(DRAGONFLY_PLUS, "modelnet_dragonfly_plus", "dragonfly_plus", &dragonfly_plus_method)\
X(DRAGONFLY_PLUS_ROUTER, "modelnet_dragonfly_plus_router", "dragonfly_plus_router", &dragonfly_plus_router_method)\ X(DRAGONFLY_PLUS_ROUTER, "modelnet_dragonfly_plus_router", "dragonfly_plus_router", &dragonfly_plus_router_method)\
X(DRAGONFLY_DALLY, "modelnet_dragonfly_dally", "dragonfly_dally", &dragonfly_dally_method)\
X(DRAGONFLY_DALLY_ROUTER, "modelnet_dragonfly_dally_router", "dragonfly_dally_router", &dragonfly_dally_router_method)\
X(MAX_NETS, NULL, NULL, NULL) X(MAX_NETS, NULL, NULL, NULL)
#define X(a,b,c,d) a, #define X(a,b,c,d) a,
......
/*
* Copyright (C) 2014 University of Chicago.
* See COPYRIGHT notice in top-level directory.
*
*/
#ifndef DRAGONFLY_DALLY_H
#define DRAGONFLY_DALLY_H
#ifdef __cplusplus
extern "C" {
#endif
#include <ross.h>
typedef struct terminal_dally_message terminal_dally_message;
/* this message is used for both dragonfly compute nodes and routers */
struct terminal_dally_message
{
/* magic number */
int magic;
/* flit travel start time*/
tw_stime travel_start_time;
/* packet ID of the flit */
unsigned long long packet_ID;
/* event type of the flit */
short type;
/* category: comes from codes */
char category[CATEGORY_NAME_MAX];
/* store category hash in the event */
uint32_t category_hash;
/* final destination LP ID, this comes from codes can be a server or any other LP type*/
tw_lpid final_dest_gid;
/*sending LP ID from CODES, can be a server or any other LP type */
tw_lpid sender_lp;
tw_lpid sender_mn_lp; // source modelnet id
/* destination terminal ID of the dragonfly */
tw_lpid dest_terminal_id;
/* source terminal ID of the dragonfly */
unsigned int src_terminal_id;
/* message originating router id. MM: Can we calculate it through
* sender_mn_lp??*/
unsigned int origin_router_id;
/* number of hops traversed by the packet */
short my_N_hop;
short my_l_hop, my_g_hop;
short saved_channel;
short saved_vc;
int next_stop;
short nonmin_done;
/* Intermediate LP ID from which this message is coming */
unsigned int intm_lp_id;
/* last hop of the message, can be a terminal, local router or global router */
short last_hop;
/* For routing */
int intm_rtr_id;
int saved_src_dest;
int saved_src_chan;
uint32_t chunk_id;
uint32_t packet_size;
uint32_t message_id;
uint32_t total_size;
int remote_event_size_bytes;
int local_event_size_bytes;
// For buffer message
short vc_index;
int output_chan;
model_net_event_return event_rc;
int is_pull;
uint32_t pull_size;
int path_type;
/* for reverse computation */
short num_rngs;
short num_cll;
int qos_index;
short last_saved_qos;
short qos_reset1;
short qos_reset2;
tw_stime saved_available_time;
tw_stime saved_avg_time;
tw_stime saved_rcv_time;
tw_stime saved_busy_time;
tw_stime saved_total_time;
tw_stime saved_sample_time;
tw_stime msg_start_time;
tw_stime saved_busy_time_ross;
tw_stime saved_fin_chunks_ross;
};
#ifdef __cplusplus
}
#endif
#endif /* end of include guard: DRAGONFLY_H */
/*
* Local variables:
* c-indent-level: 4
* c-basic-offset: 4
* End:
*
* vim: ft=c ts=8 sts=4 sw=4 expandtab
*/
...@@ -83,6 +83,21 @@ struct terminal_plus_message ...@@ -83,6 +83,21 @@ struct terminal_plus_message
int is_pull; int is_pull;
uint32_t pull_size; uint32_t pull_size;
/* for counting reverse calls */
short num_rngs;
short num_cll;
/* qos related attributes */
short last_saved_qos;
short qos_reset1;
short qos_reset2;
/* new qos rc - These are calloced in forward events, free'd in RC or commit_f */
/* note: dynamic memory here is OK since it's only accessed by the LP that alloced it in the first place. */
short rc_is_qos_set;
unsigned long long * rc_qos_data;
int * rc_qos_status;
/* for reverse computation */ /* for reverse computation */
int path_type; int path_type;
tw_stime saved_available_time; tw_stime saved_available_time;
......
...@@ -230,4 +230,7 @@ AC_CONFIG_FILES([Makefile]) ...@@ -230,4 +230,7 @@ AC_CONFIG_FILES([Makefile])
AC_OUTPUT([maint/codes.pc]) AC_OUTPUT([maint/codes.pc])
AC_OUTPUT([src/network-workloads/conf/dragonfly-custom/modelnet-test-dragonfly-1728-nodes.conf]) AC_OUTPUT([src/network-workloads/conf/dragonfly-custom/modelnet-test-dragonfly-1728-nodes.conf])
AC_OUTPUT([src/network-workloads/conf/dragonfly-plus/modelnet-test-dragonfly-plus.conf])
AC_OUTPUT([src/network-workloads/conf/dragonfly-dally/modelnet-test-dragonfly-dally.conf])
CONT rand
3456 1024
2 2
1 1
1024 128 512 512
...@@ -94,8 +94,9 @@ nobase_include_HEADERS = \ ...@@ -94,8 +94,9 @@ nobase_include_HEADERS = \
codes/connection-manager.h \ codes/connection-manager.h \
codes/net/common-net.h \ codes/net/common-net.h \
codes/net/dragonfly.h \ codes/net/dragonfly.h \
codes/net/dragonfly-plus.h \
codes/net/dragonfly-custom.h \ codes/net/dragonfly-custom.h \
codes/net/dragonfly-dally.h \
codes/net/dragonfly-plus.h \
codes/net/slimfly.h \ codes/net/slimfly.h \
codes/net/fattree.h \ codes/net/fattree.h \
codes/net/loggp.h \ codes/net/loggp.h \
...@@ -164,6 +165,7 @@ src_libcodes_la_SOURCES = \ ...@@ -164,6 +165,7 @@ src_libcodes_la_SOURCES = \
src/networks/model-net/dragonfly.c \ src/networks/model-net/dragonfly.c \
src/networks/model-net/dragonfly-custom.C \ src/networks/model-net/dragonfly-custom.C \
src/networks/model-net/dragonfly-plus.C \ src/networks/model-net/dragonfly-plus.C \
src/networks/model-net/dragonfly-dally.C \
src/networks/model-net/slimfly.c \ src/networks/model-net/slimfly.c \
src/networks/model-net/fattree.c \ src/networks/model-net/fattree.c \
src/networks/model-net/loggp.c \ src/networks/model-net/loggp.c \
...@@ -198,6 +200,7 @@ bin_PROGRAMS += src/network-workloads/model-net-synthetic-custom-dfly ...@@ -198,6 +200,7 @@ bin_PROGRAMS += src/network-workloads/model-net-synthetic-custom-dfly
bin_PROGRAMS += src/network-workloads/model-net-synthetic-slimfly bin_PROGRAMS += src/network-workloads/model-net-synthetic-slimfly
bin_PROGRAMS += src/network-workloads/model-net-synthetic-fattree bin_PROGRAMS += src/network-workloads/model-net-synthetic-fattree
bin_PROGRAMS += src/network-workloads/model-net-synthetic-dfly-plus bin_PROGRAMS += src/network-workloads/model-net-synthetic-dfly-plus
bin_PROGRAMS += src/network-workloads/model-net-synthetic-dally-dfly
src_workload_codes_workload_dump_SOURCES = \ src_workload_codes_workload_dump_SOURCES = \
...@@ -212,6 +215,7 @@ src_network_workloads_model_net_mpi_replay_CFLAGS = $(AM_CFLAGS) ...@@ -212,6 +215,7 @@ src_network_workloads_model_net_mpi_replay_CFLAGS = $(AM_CFLAGS)
src_network_workloads_model_net_synthetic_SOURCES = src/network-workloads/model-net-synthetic.c src_network_workloads_model_net_synthetic_SOURCES = src/network-workloads/model-net-synthetic.c
src_network_workloads_model_net_synthetic_custom_dfly_SOURCES = src/network-workloads/model-net-synthetic-custom-dfly.c src_network_workloads_model_net_synthetic_custom_dfly_SOURCES = src/network-workloads/model-net-synthetic-custom-dfly.c
src_network_workloads_model_net_synthetic_dfly_plus_SOURCES = src/network-workloads/model-net-synthetic-dfly-plus.c src_network_workloads_model_net_synthetic_dfly_plus_SOURCES = src/network-workloads/model-net-synthetic-dfly-plus.c
src_network_workloads_model_net_synthetic_dally_dfly_SOURCES = src/network-workloads/model-net-synthetic-dally-dfly.c
src_networks_model_net_topology_test_SOURCES = src/networks/model-net/topology-test.c src_networks_model_net_topology_test_SOURCES = src/networks/model-net/topology-test.c
#bin_PROGRAMS += src/network-workload/codes-nw-test #bin_PROGRAMS += src/network-workload/codes-nw-test
......
LPGROUPS
{
MODELNET_GRP
{
repetitions="1040";
# name of this lp changes according to the model
nw-lp="8";
# these lp names will be the same for dragonfly-custom model
modelnet_dragonfly_dally="8";
modelnet_dragonfly_dally_router="1";
}
}
PARAMS
{
# packet size in the network
packet_size="4096";
modelnet_order=( "dragonfly_dally","dragonfly_dally_router" );
# scheduler options
modelnet_scheduler="fcfs";
# chunk size in the network (when chunk size = packet size, packets will not be
# divided into chunks)
chunk_size="4096";
# modelnet_scheduler="round-robin";
num_router_rows="1";
# intra-group columns for routers
num_router_cols="16";
# number of groups in the network
num_groups="65";
# buffer size in bytes for local virtual channels
local_vc_size="16384";
#buffer size in bytes for global virtual channels
global_vc_size="16384";
#buffer size in bytes for compute node virtual channels
cn_vc_size="32768";
#bandwidth in GiB/s for local channels
local_bandwidth="2.0";
# bandwidth in GiB/s for global channels
global_bandwidth="2.0";
# bandwidth in GiB/s for compute node-router channels
cn_bandwidth="2.0";
# Number of row channels
num_row_chans="1";
# Number of column channels
num_col_chans="1";
# ROSS message size
message_size="656";
# number of compute nodes connected to router, dictated by dragonfly config
# file
num_cns_per_router="8";
# number of global channels per router
num_global_channels="8";
# network config file for intra-group connections
intra-group-connections="../src/network-workloads/conf/dragonfly-dally/dfdally_8k_intra";
# network config file for inter-group connections
inter-group-connections="../src/network-workloads/conf/dragonfly-dally/dfdally_8k_inter";
# routing protocol to be used
routing="prog-adaptive";
adaptive_threshold="131072";
minimal-bias="1";
df-dally-vc = "1";
}
LPGROUPS
{
MODELNET_GRP
{
repetitions="1040";
# name of this lp changes according to the model
nw-lp="8";
# these lp names will be the same for dragonfly-custom model
modelnet_dragonfly_dally="8";
modelnet_dragonfly_dally_router="1";
}
}
PARAMS
{
# packet size in the network
packet_size="4096";
modelnet_order=( "dragonfly_dally","dragonfly_dally_router" );
# scheduler options
modelnet_scheduler="fcfs";
# chunk size in the network (when chunk size = packet size, packets will not be
# divided into chunks)
chunk_size="4096";
# modelnet_scheduler="round-robin";
num_router_rows="1";
# intra-group columns for routers
num_router_cols="16";
# number of groups in the network
num_groups="65";
# buffer size in bytes for local virtual channels
local_vc_size="16384";
#buffer size in bytes for global virtual channels
global_vc_size="16384";
#buffer size in bytes for compute node virtual channels
cn_vc_size="32768";
#bandwidth in GiB/s for local channels
local_bandwidth="2.0";
# bandwidth in GiB/s for global channels
global_bandwidth="2.0";
# bandwidth in GiB/s for compute node-router channels
cn_bandwidth="2.0";
# Number of row channels
num_row_chans="1";
# Number of column channels
num_col_chans="1";
# ROSS message size
message_size="656";
# number of compute nodes connected to router, dictated by dragonfly config
# file
num_cns_per_router="8";
# number of global channels per router
num_global_channels="8";
# network config file for intra-group connections
intra-group-connections="../src/network-workloads/conf/dragonfly-dally/dfdally_8k_intra";
# network config file for inter-group connections
inter-group-connections="../src/network-workloads/conf/dragonfly-dally/dfdally_8k_inter";
# routing protocol to be used
routing="prog-adaptive";
adaptive_threshold="131072";
minimal-bias="1";
df-dally-vc = "1";
}
LPGROUPS
{
MODELNET_GRP
{
repetitions="1040";
# name of this lp changes according to the model
nw-lp="8";
# these lp names will be the same for dragonfly-custom model
modelnet_dragonfly_dally="8";
modelnet_dragonfly_dally_router="1";
}
}
PARAMS
{
# packet size in the network
packet_size="4096";
modelnet_order=( "dragonfly_dally","dragonfly_dally_router" );
# scheduler options
modelnet_scheduler="fcfs";
# chunk size in the network (when chunk size = packet size, packets will not be
# divided into chunks)
chunk_size="4096";
# modelnet_scheduler="round-robin";
num_router_rows="1";
# intra-group columns for routers
num_router_cols="16";
# number of groups in the network
num_groups="65";
# buffer size in bytes for local virtual channels
local_vc_size="16384";
#buffer size in bytes for global virtual channels
global_vc_size="16384";
#buffer size in bytes for compute node virtual channels
cn_vc_size="32768";
#bandwidth in GiB/s for local channels
local_bandwidth="2.0";
# bandwidth in GiB/s for global channels
global_bandwidth="2.0";
# bandwidth in GiB/s for compute node-router channels
cn_bandwidth="2.0";
# Number of row channels
num_row_chans="1";
# Number of column channels
num_col_chans="1";
# ROSS message size
message_size="656";
# number of compute nodes connected to router, dictated by dragonfly config
# file
num_cns_per_router="8";
# number of global channels per router
num_global_channels="8";
# network config file for intra-group connections
intra-group-connections="../src/network-workloads/conf/dragonfly-dally/dfdally_8k_intra";
# network config file for inter-group connections
inter-group-connections="../src/network-workloads/conf/dragonfly-dally/dfdally_8k_inter";
# routing protocol to be used
routing="prog-adaptive";
adaptive_threshold="131072";
minimal-bias="1";
df-dally-vc = "1";
}
...@@ -47,9 +47,9 @@ PARAMS ...@@ -47,9 +47,9 @@ PARAMS
# number of global channels per router # number of global channels per router
num_global_connections="16"; num_global_connections="16";
# network config file for intra-group connections # network config file for intra-group connections
intra-group-connections="/gpfs/u/home/SPNR/SPNRmcgl/barn/dfp-df-comparisons/experiments/network_configs/dfp_8k_intra"; intra-group-connections="../src/network-workloads/conf/dragonfly-plus/dfp_8k_intra";
# network config file for inter-group connections # network config file for inter-group connections
inter-group-connections="/gpfs/u/home/SPNR/SPNRmcgl/barn/dfp-df-comparisons/experiments/network_configs/dfp_8k_inter"; inter-group-connections="../src/network-workloads/conf/dragonfly-plus/dfp_8k_inter";
# routing protocol to be used - 'minimal', 'non-minimal-spine', 'non-minimal-leaf', 'prog-adaptive' # routing protocol to be used - 'minimal', 'non-minimal-spine', 'non-minimal-leaf', 'prog-adaptive'
routing="prog-adaptive"; routing="prog-adaptive";
# route scoring protocol to be used - options are 'alpha', 'beta', or 'delta' - 'gamma' has been deprecated # route scoring protocol to be used - options are 'alpha', 'beta', or 'delta' - 'gamma' has been deprecated
......
...@@ -2,61 +2,59 @@ LPGROUPS ...@@ -2,61 +2,59 @@ LPGROUPS
{ {
MODELNET_GRP MODELNET_GRP
{ {
repetitions="12"; repetitions="1056";
# name of this lp changes according to the model # name of this lp changes according to the model
nw-lp="4"; nw-lp="8";
# these lp names will be the same for dragonfly-custom model # these lp names will be the same for dragonfly-custom model
modelnet_dragonfly_plus="4"; modelnet_dragonfly_plus="8";
modelnet_dragonfly_plus_router="2"; modelnet_dragonfly_plus_router="1";
} }
} }
PARAMS PARAMS
{ {
# packet size in the network # packet size in the network
packet_size="1024"; packet_size="4096";
# order of LPs, mapping for modelnet grp
modelnet_order=( "dragonfly_plus","dragonfly_plus_router" ); modelnet_order=( "dragonfly_plus","dragonfly_plus_router" );
# scheduler options # scheduler options
modelnet_scheduler="fcfs"; modelnet_scheduler="fcfs";
# chunk size in the network (when chunk size = packet size, packets will not be # chunk size in the network (when chunk size = packet size, packets will not be divided into chunks)
# divided into chunks) chunk_size="4096";
chunk_size="1024"; # number of spine routers per group
# modelnet_scheduler="round-robin"; num_router_spine="16";
# number of routers within each group # number of leaf routers per group
# each router row corresponds to a chassis in Cray systems num_router_leaf="16";
num_router_spine="4"; # number of links connecting between group levels per router
# each router column corresponds to a slot in a chassis
num_router_leaf="4";
# number of links connecting between group levels per router
num_level_chans="1"; num_level_chans="1";
# number of groups in the network # number of groups in the network
num_groups="3"; num_groups="33";
# predefined threshold (T) deciding when to reassign packet to a lower priority queue
queue_threshold="50";
# buffer size in bytes for local virtual channels # buffer size in bytes for local virtual channels
local_vc_size="8192"; local_vc_size="32768";
#buffer size in bytes for global virtual channels # buffer size in bytes for global virtual channels
global_vc_size="16384"; global_vc_size="32768";
#buffer size in bytes for compute node virtual channels # buffer size in bytes for compute node virtual channels
cn_vc_size="8192"; cn_vc_size="32768";
#bandwidth in GiB/s for local channels # bandwidth in GiB/s for local channels
local_bandwidth="5.25"; local_bandwidth="25.0";
# bandwidth in GiB/s for global channels # bandwidth in GiB/s for global channels
global_bandwidth="1.5"; global_bandwidth="25.0";
# bandwidth in GiB/s for compute node-router channels # bandwidth in GiB/s for compute node-router channels
cn_bandwidth="8.0"; cn_bandwidth="25.0";
# ROSS message size # ROSS message size
message_size="608"; message_size="640";
# number of compute nodes connected to router, dictated by dragonfly config # number of compute nodes connected to router, dictated by dragonfly config file
# file num_cns_per_router="16";
num_cns_per_router="4";
# number of global channels per router # number of global channels per router
num_global_connections="4"; num_global_connections="16";
# network config file for intra-group connections # network config file for intra-group connections
intra-group-connections="../src/network-workloads/conf/dragonfly-plus/neil-intra"; intra-group-connections="../src/network-workloads/conf/dragonfly-plus/dfp_8k_intra";
# network config file for inter-group connections # network config file for inter-group connections
inter-group-connections="../src/network-workloads/conf/dragonfly-plus/neil-inter"; inter-group-connections="../src/network-workloads/conf/dragonfly-plus/dfp_8k_inter";
# routing protocol to be used # routing protocol to be used - 'minimal', 'non-minimal-spine', 'non-minimal-leaf', 'prog-adaptive'
routing="minimal"; routing="prog-adaptive";
# route scoring protocol to be used - options are 'alpha', 'beta', or 'delta' - 'gamma' has been deprecated
route_scoring_metric="delta";
# minimal route threshold before considering non-minimal paths
adaptive_threshold="131072"; #1/16 of 32768
} }
LPGROUPS
{
MODELNET_GRP
{
repetitions="1056";
# name of this lp changes according to the model
nw-lp="8";
# these lp names will be the same for dragonfly-custom model
modelnet_dragonfly_plus="8";
modelnet_dragonfly_plus_router="1";
}
}
PARAMS
{
# packet size in the network
packet_size="4096";
# order of LPs, mapping for modelnet grp
modelnet_order=( "dragonfly_plus","dragonfly_plus_router" );
# scheduler options
modelnet_scheduler="fcfs";
# chunk size in the network (when chunk size = packet size, packets will not be divided into chunks)
chunk_size="4096";
# number of spine routers per group
num_router_spine="16";
# number of leaf routers per group
num_router_leaf="16";
# number of links connecting between group levels per router
num_level_chans="1";
# number of groups in the network
num_groups="33";
# buffer size in bytes for local virtual channels
local_vc_size="32768";
# buffer size in bytes for global virtual channels
global_vc_size="32768";
# buffer size in bytes for compute node virtual channels
cn_vc_size="32768";
# bandwidth in GiB/s for local channels
local_bandwidth="25.0";
# bandwidth in GiB/s for global channels
global_bandwidth="25.0";
# bandwidth in GiB/s for compute node-router channels
cn_bandwidth="25.0";
# ROSS message size
message_size="640";
# number of compute nodes connected to router, dictated by dragonfly config file
num_cns_per_router="16";
# number of global channels per router
num_global_connections="16";
# network config file for intra-group connections
intra-group-connections="../src/network-workloads/conf/dragonfly-plus/dfp_8k_intra";
# network config file for inter-group connections
inter-group-connections="../src/network-workloads/conf/dragonfly-plus/dfp_8k_inter";
# routing protocol to be used - 'minimal', 'non-minimal-spine', 'non-minimal-leaf', 'prog-adaptive'
routing="prog-adaptive";
# route scoring protocol to be used - options are 'alpha', 'beta', or 'delta' - 'gamma' has been deprecated
route_scoring_metric="delta";
# minimal route threshold before considering non-minimal paths
adaptive_threshold="131072"; #1/16 of 32768
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -108,6 +108,11 @@ static void handle_sched_next_rc( ...@@ -108,6 +108,11 @@ static void handle_sched_next_rc(
tw_bf *b, tw_bf *b,
model_net_wrap_msg * m, model_net_wrap_msg * m,
tw_lp * lp); tw_lp * lp);
static void model_net_commit_event(
model_net_base_state * ns,
tw_bf *b,
model_net_wrap_msg * m,
tw_lp * lp);
/* ROSS function pointer table for this LP */ /* ROSS function pointer table for this LP */
tw_lptype model_net_base_lp = { tw_lptype model_net_base_lp = {
...@@ -115,12 +120,23 @@ tw_lptype model_net_base_lp = { ...@@ -115,12 +120,23 @@ tw_lptype model_net_base_lp = {
(pre_run_f) NULL, (pre_run_f) NULL,
(event_f) model_net_base_event, (event_f) model_net_base_event,
(revent_f) model_net_base_event_rc, (revent_f) model_net_base_event_rc,
(commit_f) NULL, (commit_f) model_net_commit_event,
(final_f) model_net_base_finalize, (final_f) model_net_base_finalize,
(map_f) codes_mapping, (map_f) codes_mapping,
sizeof(model_net_base_state), sizeof(model_net_base_state),
}; };
static void model_net_commit_event(model_net_base_state * ns, tw_bf *b, model_net_wrap_msg * m, tw_lp * lp)
{
if(m->h.event_type == MN_BASE_PASS)
{
void * sub_msg;
sub_msg = ((char*)m)+msg_offsets[ns->net_id];
if(ns->sub_type->commit != NULL)
ns->sub_type->commit(ns->sub_state, b, sub_msg, lp);
}
}
/* setup for the ROSS event tracing /* setup for the ROSS event tracing
*/ */
void mn_event_collect(model_net_wrap_msg *m, tw_lp *lp, char *buffer, int *collect_flag) void mn_event_collect(model_net_wrap_msg *m, tw_lp *lp, char *buffer, int *collect_flag)
...@@ -375,6 +391,10 @@ void model_net_base_configure(){ ...@@ -375,6 +391,10 @@ void model_net_base_configure(){
offsetof(model_net_wrap_msg, msg.m_dfly_plus); offsetof(model_net_wrap_msg, msg.m_dfly_plus);
msg_offsets[DRAGONFLY_PLUS_ROUTER] = msg_offsets[DRAGONFLY_PLUS_ROUTER] =
offsetof(model_net_wrap_msg, msg.m_dfly_plus); offsetof(model_net_wrap_msg, msg.m_dfly_plus);
msg_offsets[DRAGONFLY_DALLY] =
offsetof(model_net_wrap_msg, msg.m_dally_dfly);
msg_offsets[DRAGONFLY_DALLY_ROUTER] =
offsetof(model_net_wrap_msg, msg.m_dally_dfly);
msg_offsets[SLIMFLY] = msg_offsets[SLIMFLY] =
offsetof(model_net_wrap_msg, msg.m_slim); offsetof(model_net_wrap_msg, msg.m_slim);
msg_offsets[FATTREE] = msg_offsets[FATTREE] =
...@@ -386,6 +406,7 @@ void model_net_base_configure(){ ...@@ -386,6 +406,7 @@ void model_net_base_configure(){
msg_offsets[EXPRESS_MESH_ROUTER] = msg_offsets[EXPRESS_MESH_ROUTER] =
offsetof(model_net_wrap_msg, msg.m_em); offsetof(model_net_wrap_msg, msg.m_em);
// perform the configuration(s) // perform the configuration(s)
// This part is tricky, as we basically have to look up all annotations that // This part is tricky, as we basically have to look up all annotations that
// have LP names of the form modelnet_*. For each of those, we need to read // have LP names of the form modelnet_*. For each of those, we need to read
...@@ -532,7 +553,7 @@ void model_net_base_event( ...@@ -532,7 +553,7 @@ void model_net_base_event(
tw_lp * lp){