Commit 642d84d5 authored by Misbah Mubarak's avatar Misbah Mubarak

Merging slimfly with codes master

parents db56bd38 a2f3680b
......@@ -22,6 +22,7 @@ extern "C" {
#include "model-net.h"
#include "model-net-sched.h"
#include "net/dragonfly.h"
#include "net/slimfly.h"
#include "net/loggp.h"
#include "net/simplenet-upd.h"
#include "net/simplep2p.h"
......@@ -120,12 +121,13 @@ typedef struct model_net_base_msg {
typedef struct model_net_wrap_msg {
msg_header h;
union {
model_net_base_msg m_base; // base lp
terminal_message m_dfly; // dragonfly
loggp_message m_loggp; // loggp
sn_message m_snet; // simplenet
sp_message m_sp2p; // simplep2p
nodes_message m_torus; // torus
model_net_base_msg m_base; // base lp
terminal_message m_dfly; // dragonfly
slim_terminal_message m_slim; // slimfly
loggp_message m_loggp; // loggp
sn_message m_snet; // simplenet
sp_message m_sp2p; // simplep2p
nodes_message m_torus; // torus
// add new ones here
} msg;
} model_net_wrap_msg;
......
......@@ -60,6 +60,7 @@ typedef struct mn_stats mn_stats;
X(SIMPLENET, "modelnet_simplenet", "simplenet", &simplenet_method)\
X(SIMPLEP2P, "modelnet_simplep2p", "simplep2p", &simplep2p_method)\
X(TORUS, "modelnet_torus", "torus", &torus_method)\
X(SLIMFLY, "modelnet_slimfly", "slimfly", &slimfly_method)\
X(DRAGONFLY, "modelnet_dragonfly", "dragonfly", &dragonfly_method)\
X(DRAGONFLY_ROUTER, "modelnet_dragonfly_router", "dragonfly_router", &dragonfly_router_method)\
X(LOGGP, "modelnet_loggp", "loggp", &loggp_method)\
......
/*
* Copyright (C) 2014 University of Chicago.
* See COPYRIGHT notice in top-level directory.
*
*/
#ifndef SLIMFLY_H
#define SLIMFLY_H
#include <ross.h>
typedef struct slim_terminal_message slim_terminal_message;
/* this message is used for both dragonfly compute nodes and routers */
struct slim_terminal_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];
/* 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;
/* local LP ID to calculate the radix of the sender node/router */
unsigned int local_id;
/* message originating router id */
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;
/* Intermediate LP ID from which this message is coming */
unsigned int intm_lp_id;
short new_vc;
short saved_vc;
/* last hop of the message, can be a terminal, local router or global router */
short last_hop;
/* For routing */
int intm_group_id;
int intm_router_id;
int chunk_id;
uint64_t packet_size;
uint64_t message_id;
uint64_t total_size;
int saved_remote_esize;
int remote_event_size_bytes;
int local_event_size_bytes;
// For buffer message
short vc_index;
int sender_radix;
int output_chan;
model_net_event_return event_rc;
int is_pull;
uint64_t pull_size;
/* for reverse computation */
short path_type;
tw_stime saved_available_time;
tw_stime saved_avg_time;
tw_stime saved_credit_time;
tw_stime saved_collective_init_time;
tw_stime saved_hist_start_time;
tw_stime msg_start_time;
short saved_completed_chunks;
int saved_hist_num;
int saved_occupancy;
/* for reverse computation of a node's fan in*/
int saved_fan_nodes;
tw_lpid sender_svr;
/* LP ID of the sending node, has to be a network node in the dragonfly */
tw_lpid sender_node;
tw_lpid next_stop;
struct sfly_qhash_entry * saved_hash;
};
#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
*/
......@@ -80,6 +80,7 @@ nobase_include_HEADERS = \
codes/model-net-sched.h \
codes/model-net-inspect.h \
codes/net/dragonfly.h \
codes/net/slimfly.h \
codes/net/loggp.h \
codes/net/simplenet-upd.h \
codes/net/simplep2p.h \
......@@ -139,6 +140,7 @@ src_libcodes_a_SOURCES = \
src/networks/model-net/simplenet-upd.c \
src/networks/model-net/torus.c \
src/networks/model-net/dragonfly.c \
src/networks/model-net/slimfly.c \
src/networks/model-net/loggp.c \
src/networks/model-net/simplep2p.c \
src/networks/model-net/model-net-lp.c \
......@@ -148,6 +150,7 @@ src_libcodes_a_SOURCES = \
src/network-workloads/model-net-mpi-wrklds.c \
src/network-workloads/model-net-mpi-replay.c \
src/network-workloads/model-net-synthetic.c \
src/network-workloads/model-net-synthetic-slimfly.c \
src/network-workloads/model-net-dumpi-traces-dump.c
......@@ -169,6 +172,7 @@ bin_PROGRAMS += src/network-workloads/model-net-mpi-replay
bin_PROGRAMS += src/network-workloads/model-net-mpi-wrklds
bin_PROGRAMS += src/network-workloads/model-net-dumpi-traces-dump
bin_PROGRAMS += src/network-workloads/model-net-synthetic
bin_PROGRAMS += src/network-workloads/model-net-synthetic-slimfly
src_workload_codes_workload_dump_SOURCES = \
......@@ -178,6 +182,7 @@ src_network_workloads_model_net_mpi_replay_SOURCES = src/network-workloads/model
src_network_workloads_model_net_mpi_wrklds_SOURCES = src/network-workloads/model-net-mpi-wrklds.c
src_network_workloads_model_net_synthetic_SOURCES = src/network-workloads/model-net-synthetic.c
src_network_workloads_model_net_synthetic_slimfly_SOURCES = src/network-workloads/model-net-synthetic-slimfly.c
src_network_workloads_model_net_dumpi_traces_dump_SOURCES = src/network-workloads/model-net-dumpi-traces-dump.c
#bin_PROGRAMS += src/network-workload/codes-nw-test
......
LPGROUPS
{
MODELNET_GRP
{
repetitions="50";
server="3";
modelnet_slimfly="3";
slimfly_router="1";
}
}
PARAMS
{
packet_size="256";
modelnet_order=( "slimfly" );
# scheduler options
modelnet_scheduler="fcfs";
chunk_size="256";
# modelnet_scheduler="round-robin";
num_vcs="4";
num_routers="5";
num_terminals="3";
global_channels="5";
local_channels="2";
generator_set_X=("1","4"); # : Subgraph 0 generator set
generator_set_X_prime=("2","3"); # : Subgraph 1 generator set
local_vc_size="25600";
global_vc_size="25600";
cn_vc_size="25600";
local_bandwidth="9.0";
global_bandwidth="9.0";
cn_bandwidth="9.0";
router_delay="0";
link_delay="0";
message_size="512";
routing="minimal";
}
This diff is collapsed.
......@@ -257,6 +257,8 @@ void model_net_base_configure(){
// note: dragonfly router uses the same event struct
msg_offsets[DRAGONFLY_ROUTER] =
offsetof(model_net_wrap_msg, msg.m_dfly);
msg_offsets[SLIMFLY] =
offsetof(model_net_wrap_msg, msg.m_slim);
msg_offsets[LOGGP] =
offsetof(model_net_wrap_msg, msg.m_loggp);
......
......@@ -21,6 +21,7 @@ extern struct model_net_method simplenet_method;
extern struct model_net_method simplep2p_method;
extern struct model_net_method torus_method;
extern struct model_net_method dragonfly_method;
extern struct model_net_method slimfly_method;
extern struct model_net_method dragonfly_router_method;
extern struct model_net_method loggp_method;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -12,7 +12,7 @@ check_PROGRAMS += tests/lp-io-test \
tests/concurrent-msg-recv tests/modelnet-simplep2p-test \
tests/modelnet-test-collective \
tests/modelnet-prio-sched-test \
tests/modelnet-test-dragonfly
tests/modelnet-test-dragonfly
TESTS += tests/lp-io-test.sh \
tests/workload/codes-workload-test.sh \
......@@ -26,6 +26,7 @@ TESTS += tests/lp-io-test.sh \
tests/modelnet-test-torus.sh \
tests/modelnet-test-loggp.sh \
tests/modelnet-test-dragonfly.sh \
tests/modelnet-test-slimfly.sh \
tests/modelnet-p2p-bw-loggp.sh \
tests/modelnet-prio-sched-test.sh
......@@ -48,6 +49,7 @@ EXTRA_DIST += tests/lp-io-test.sh \
tests/modelnet-test-torus.sh \
tests/modelnet-test-loggp.sh \
tests/modelnet-test-dragonfly.sh \
tests/modelnet-test-slimfly.sh \
tests/modelnet-p2p-bw-loggp.sh \
tests/modelnet-prio-sched-test.sh \
tests/conf/concurrent_msg_recv.conf \
......@@ -57,6 +59,7 @@ EXTRA_DIST += tests/lp-io-test.sh \
tests/conf/modelnet-test-bw-tri.conf \
tests/conf/modelnet-test.conf \
tests/conf/modelnet-test-dragonfly.conf \
tests/conf/modelnet-test-slimfly.conf \
tests/conf/modelnet-test-loggp.conf \
tests/conf/modelnet-test-simplep2p.conf \
tests/conf/modelnet-test-latency.conf \
......
LPGROUPS
{
MODELNET_GRP
{
repetitions="50";
server="3";
modelnet_slimfly="3";
slimfly_router="1";
}
}
PARAMS
{
packet_size="512";
modelnet_order=( "slimfly");
# scheduler options
modelnet_scheduler="fcfs";
chunk_size="256";
# modelnet_scheduler="round-robin";
num_vcs="4";
num_routers="5";
num_terminals="3";
global_channels="5";
local_channels="2";
generator_set_X=("1","4");
generator_set_X_prime=("2","3");
local_vc_size="25600";
global_vc_size="25600";
cn_vc_size="25600";
local_bandwidth="9.0";
global_bandwidth="9.0";
cn_bandwidth="9.0";
link_delay = "0";
message_size="368";
routing="minimal";
}
#!/bin/bash
tests/modelnet-test --sync=1 -- tests/conf/modelnet-test-slimfly.conf
......@@ -42,6 +42,8 @@ static int lps_per_rep = 0;
typedef struct svr_msg svr_msg;
typedef struct svr_state svr_state;
char router_name[MAX_NAME_LENGTH];
/* types of events that will constitute triton requests */
enum svr_event
{
......@@ -174,10 +176,21 @@ int main(
num_servers = codes_mapping_get_lp_count("MODELNET_GRP", 0, "server",
NULL, 1);
if(net_id == DRAGONFLY)
{
strcpy(router_name, "modelnet_dragonfly_router");
}
if(net_id == SLIMFLY)
{
strcpy(router_name, "slimfly_router");
}
if(net_id == SLIMFLY || net_id == DRAGONFLY)
{
num_routers = codes_mapping_get_lp_count("MODELNET_GRP", 0,
"modelnet_dragonfly_router", NULL, 1);
router_name, NULL, 1);
offset = 1;
}
......@@ -335,7 +348,7 @@ static void handle_kickoff_event(
num_servers_per_rep = codes_mapping_get_lp_count("MODELNET_GRP", 1,
"server", NULL, 1);
num_routers_per_rep = codes_mapping_get_lp_count("MODELNET_GRP", 1,
"modelnet_dragonfly_router", NULL, 1);
router_name, NULL, 1);
lps_per_rep = num_servers_per_rep * 2 + num_routers_per_rep;
......@@ -344,6 +357,9 @@ static void handle_kickoff_event(
if(net_id == DRAGONFLY && (lp->gid % lps_per_rep == num_servers_per_rep - 1))
opt_offset = num_servers_per_rep + num_routers_per_rep; /* optional offset due to dragonfly mapping */
if(net_id == SLIMFLY && (lp->gid % lps_per_rep == num_servers_per_rep -1))
opt_offset = num_servers_per_rep + num_routers_per_rep;
/* each server sends a request to the next highest server */
int dest_id = (lp->gid + offset + opt_offset)%total_lps;
......@@ -435,7 +451,10 @@ static void handle_ack_event(
int opt_offset = 0;
if(net_id == DRAGONFLY && (lp->gid % lps_per_rep == num_servers_per_rep - 1))
opt_offset = num_servers_per_rep + num_routers_per_rep; /* optional offset due to dragonfly mapping */
opt_offset = num_servers_per_rep + num_routers_per_rep; /* optional offset due to dragonfly mapping */
if(net_id == SLIMFLY && (lp->gid % lps_per_rep == num_servers_per_rep -1))
opt_offset = num_servers_per_rep + num_routers_per_rep;
tw_lpid dest_id = (lp->gid + offset + opt_offset)%(num_servers*2 + num_routers);
......@@ -491,9 +510,13 @@ static void handle_req_event(
/* safety check that this request got to the right server */
// printf("\n m->src %d lp->gid %d ", m->src, lp->gid);
int opt_offset = 0;
if(net_id == DRAGONFLY && (m->src % lps_per_rep == num_servers_per_rep - 1))
opt_offset = num_servers_per_rep + num_routers_per_rep; /* optional offset due to dragonfly mapping */
opt_offset = num_servers_per_rep + num_routers_per_rep; /* optional offset due to dragonfly mapping */
if(net_id == SLIMFLY && (m->src % lps_per_rep == num_servers_per_rep -1))
opt_offset = num_servers_per_rep + num_routers_per_rep;
assert(lp->gid == (m->src + offset + opt_offset)%(num_servers*2 + num_routers));
ns->msg_recvd_count++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment