Commit 92ea64e4 authored by Caitlin Ross's avatar Caitlin Ross

Merge branch 'master' into analysis-lp

parents 71b1dd55 b8df46df
http://www.mcs.anl.gov/projects/codes/
# CODES Discrete-event Simulation Framework
CODES is a set of models and utilities to aid in building parallel discrete
event simulations, on top of the ROSS simulation framework
(https://github.com/carothersc/ROSS).
https://xgitlab.cels.anl.gov/codes/codes/wikis/home
Documentation can be found in the doc subdirectory. Particularly,
doc/BUILD\_STEPS documents the build process and doc/GETTING\_STARTED documents
library features at a high level.
Discrete event driven simulation of HPC system architectures and subsystems has emerged as a productive and cost-effective means to evaluating potential HPC designs, along with capabilities for executing simulations of extreme scale systems. The goal of the CODES project is use highly parallel simulation to explore the design of exascale storage/network architectures and distributed data-intensive science facilities.
Our simulations build upon the Rensselaer Optimistic Simulation System (ROSS), a discrete event simulation framework that allows simulations to be run in parallel, decreasing the simulation run time of massive simulations to hours. We are using ROSS to explore topics including large-scale storage systems, I/O workloads, HPC network fabrics, distributed science systems, and data-intensive computation environments.
The CODES project is a collaboration between the Mathematics and Computer Science department at Argonne National Laboratory and Rensselaer Polytechnic Institute. We collaborate with researchers at University of California at Davis to come up with novel methods for analysis and visualizations of large-scale event driven simulations. We also collaborate with Lawrence Livermore National Laboratory for modeling HPC interconnect systems.
Documentation can be found in the wiki:
https://xgitlab.cels.anl.gov/codes/codes/wikis/home
\ No newline at end of file
......@@ -69,6 +69,7 @@ struct recorder_params
struct dumpi_trace_params {
char file_name[MAX_NAME_LENGTH_WKLD];
int num_net_traces;
int nprocs;
#ifdef ENABLE_CORTEX_PYTHON
char cortex_script[MAX_NAME_LENGTH_WKLD];
char cortex_class[MAX_NAME_LENGTH_WKLD];
......@@ -162,6 +163,7 @@ struct codes_workload_op
double end_time;
double sim_start_time;
int64_t sequence_id;
/* parameters for each operation type */
union
{
......@@ -198,7 +200,7 @@ struct codes_workload_op
int16_t data_type; /* MPI data type to be matched with the recv */
int count; /* number of elements to be received */
int tag; /* tag of the message */
int req_id;
unsigned int req_id;
} send;
struct {
/* TODO: not sure why source rank is here */
......@@ -208,7 +210,7 @@ struct codes_workload_op
int16_t data_type; /* MPI data type to be matched with the send */
int count; /* number of elements to be sent */
int tag; /* tag of the message */
int req_id;
unsigned int req_id;
} recv;
/* TODO: non-stub for other collectives */
struct {
......@@ -216,14 +218,14 @@ struct codes_workload_op
} collective;
struct {
int count;
int* req_ids;
unsigned int* req_ids;
} waits;
struct {
int req_id;
unsigned int req_id;
} wait;
struct
{
int req_id;
unsigned int req_id;
}
free;
}u;
......
......@@ -32,6 +32,7 @@ extern void free_tmp(void * ptr);
typedef struct message_list message_list;
struct message_list {
//CHANGE: add message types for new networks here
union {
terminal_message dfly_msg;
em_message em_msg;
......
......@@ -4,6 +4,7 @@
*
*/
//CHANGE: modify to match you header file name
#ifndef EXPRESS_MESH_H
#define EXPRESS_MESH_H
......@@ -13,76 +14,67 @@ extern "C" {
#include <ross.h>
//CHANGE: modify to match the struct
typedef struct net_message net_message;
//CHANGE: modify the struct name - add to message_list union in common-net.h
typedef struct em_message em_message;
struct em_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 */
tw_lpid dest_terminal_id;
int dest_terminal;
/* source terminal ID */
tw_lpid src_terminal_id;
short saved_channel;
short my_N_hop;
short hops[8];
//common entries:
int magic; /* magic number */
short type; /* event type of the flit */
/* Intermediate LP ID from which this message is coming */
unsigned int intm_lp_id;
short saved_vc;
short dim_change;
/* last hop of the message, can be a terminal, local router or global router */
int last_hop;
/* For routing */
uint64_t chunk_id;
uint64_t packet_size;
uint64_t message_id;
uint64_t total_size;
tw_stime travel_start_time; /* flit travel start time*/
unsigned long long packet_ID; /* packet ID of the flit */
char category[CATEGORY_NAME_MAX]; /* category: comes from codes */
int saved_remote_esize;
int remote_event_size_bytes;
int local_event_size_bytes;
tw_lpid final_dest_gid; /* final destination LP ID, this comes from codes can be a server or any other LP type*/
tw_lpid sender_lp; /*sending LP ID from CODES, can be a server or any other LP type */
tw_lpid sender_mn_lp; // source modelnet id (think NIC)
tw_lpid src_terminal_id; /* source terminal ID - mostly same as sender_mn_lp */
tw_lpid dest_terminal_id; /* destination modelnet id */
int dest_terminal; /* logical id of destination modelnet id */
// For buffer message
int vc_index;
int output_chan;
model_net_event_return event_rc;
/* packet/message identifier and status */
uint64_t chunk_id; //which chunk of packet I am
uint64_t packet_size; //what is the size of my packet
uint64_t message_id; //seq number at message level - NIC specified
uint64_t total_size; //total size of the message
int remote_event_size_bytes; // data size for target event at destination
int local_event_size_bytes; // data size for event at source
int is_pull;
uint64_t pull_size;
tw_stime msg_start_time;
/* for reverse computation */
//info for path traversal
short my_N_hop; /* hops traversed so far */
short hops[8]; /* can be used for storing different types of hops */
unsigned int intm_lp_id; /* Intermediate LP ID that sent this packet */
int last_hop; /* last hop of the message, can be a terminal, local router or global router */
int vc_index; /* stores port info */
int output_chan; /* virtual channel within port */
//info for reverse computation
short saved_channel;
short saved_vc;
model_net_event_return event_rc;
tw_stime saved_available_time;
tw_stime saved_avg_time;
tw_stime saved_rcv_time;
tw_stime saved_busy_time;
tw_stime saved_busy_time;
tw_stime saved_total_time;
tw_stime saved_hist_start_time;
tw_stime saved_sample_time;
tw_stime msg_start_time;
int saved_hist_num;
int saved_occupancy;
//CHANGE: info for specific networks
short dim_change;
};
#ifdef __cplusplus
}
#endif
#endif
#endif
/*
* Copyright (C) 2014 University of Chicago.
* See COPYRIGHT notice in top-level directory.
*
*/
//CHANGE: modify to match you header file name
#ifndef NET_TEMPLATE_H
#define NET_TEMPLATE_H
#ifdef __cplusplus
extern "C" {
#endif
#include <ross.h>
//CHANGE: modify to match the struct
typedef struct net_message net_message;
//CHANGE: modify the struct name - add to message_list union in common-net.h
struct net_message
{
//common entries:
int magic; /* magic number */
short type; /* event type of the flit */
tw_stime travel_start_time; /* flit travel start time*/
unsigned long long packet_ID; /* packet ID of the flit */
char category[CATEGORY_NAME_MAX]; /* category: comes from codes */
tw_lpid final_dest_gid; /* final destination LP ID, this comes from codes can be a server or any other LP type*/
tw_lpid sender_lp; /*sending LP ID from CODES, can be a server or any other LP type */
tw_lpid sender_mn_lp; // source modelnet id (think NIC)
tw_lpid src_terminal_id; /* source terminal ID - mostly same as sender_mn_lp */
tw_lpid dest_terminal_id; /* destination modelnet id */
int dest_terminal; /* logical id of destination modelnet id */
/* packet/message identifier and status */
uint64_t chunk_id; //which chunk of packet I am
uint64_t packet_size; //what is the size of my packet
uint64_t message_id; //seq number at message level - NIC specified
uint64_t total_size; //total size of the message
int remote_event_size_bytes; // data size for target event at destination
int local_event_size_bytes; // data size for event at source
int is_pull;
uint64_t pull_size;
tw_stime msg_start_time;
//info for path traversal
short my_N_hop; /* hops traversed so far */
short hops[8]; /* can be used for storing different types of hops */
unsigned int intm_lp_id; /* Intermediate LP ID that sent this packet */
int last_hop; /* last hop of the message, can be a terminal, local router or global router */
int vc_index; /* stores port info */
int output_chan; /* virtual channel within port */
//info for reverse computation
short saved_channel;
short saved_vc;
model_net_event_return event_rc;
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_hist_start_time;
tw_stime saved_sample_time;
//CHANGE: add info for specific networks
};
#ifdef __cplusplus
}
#endif
#endif
......@@ -113,16 +113,15 @@ AC_SUBST(RECORDER_CPPFLAGS)
AC_ARG_WITH([dumpi],[AS_HELP_STRING([--with-dumpi@<:@=DIR@:>@],
[location of Dumpi installation])])
if test "x${with_dumpi}" != "x" ; then
AC_CHECK_FILE([${with_dumpi}/lib/libundumpi.la],
AM_CONDITIONAL(USE_DUMPI, true),
AC_MSG_ERROR(Could not find libundumpi.la))
CFLAGS="-I${with_dumpi}/include"
LIBS="-L${with_dumpi}/lib/ -lundumpi"
AC_CHECK_LIB([undumpi],
[undumpi_open], [], [AC_MSG_ERROR(Could not find dumpi)])
AM_CONDITIONAL(USE_DUMPI, true)
DUMPI_CFLAGS="-I${with_dumpi}/include"
# DUMPI_CFLAGS+=" -I${with_dumpi}/include/dumpi/common"
# DUMPI_CFLAGS+=" -I${with_dumpi}/include/dumpi/libdumpi"
# DUMPI_CFLAGS+=" -I${with_dumpi}/include/dumpi/libundumpi"
DUMPI_LIBS="-L${with_dumpi}/lib/ -lundumpi"
AC_SUBST(DUMPI_LIBS)
AC_SUBST(DUMPI_CFLAGS)
AC_SUBST(DUMPI_LIBS)
AC_SUBST(DUMPI_CFLAGS)
else
AM_CONDITIONAL(USE_DUMPI, false)
fi
......
......@@ -30,8 +30,8 @@ intercon = open(sys.argv[3], "wb")
def router(group, row, col):
return group*96 + row*16 + col
numblack = np.zeros((864,864), dtype=np.int)
numblue = np.zeros((864,864), dtype=np.int)
numblack = np.zeros((960,960), dtype=np.int)
numblue = np.zeros((960,960), dtype=np.int)
with open(filename) as ofile:
matches = re.findall('c\d+-\dc\ds\d+a0l\d+\((\d+):(\d):(\d+)\).(\w+).->.c\d+-\dc\ds\d+a0l\d+\((\d+):(\d):(\d+)\)', ofile.read(), re.MULTILINE)
......
......@@ -72,8 +72,9 @@ enum svr_event
enum TRAFFIC
{
UNIFORM = 1, /* sends message to a randomly selected node */
NEAREST_GROUP = 2, /* sends message to the node connected to the neighboring router */
NEAREST_NEIGHBOR = 3 /* sends message to the next node (potentially connected to the same router) */
BISECTION = 2, /* sends messages to node established in bisection pairing*/
NEAREST_GROUP = 3, /* sends message to the node connected to the neighboring router */
NEAREST_NEIGHBOR = 4 /* sends message to the next node (potentially connected to the same router) */
};
struct svr_state
......@@ -174,7 +175,7 @@ void ft_svr_register_model_stats()
const tw_optdef app_opt [] =
{
TWOPT_GROUP("Model net synthetic traffic " ),
TWOPT_UINT("traffic", traffic, "UNIFORM RANDOM=1, NEAREST NEIGHBOR=2 "),
TWOPT_UINT("traffic", traffic, "UNIFORM RANDOM=1, BISECTION=2 "),
TWOPT_STIME("arrival_time", arrival_time, "INTER-ARRIVAL TIME"),
TWOPT_STIME("load", load, "percentage of terminal link bandiwdth to inject packets"),
TWOPT_END()
......@@ -284,16 +285,23 @@ static void handle_kickoff_event(
ns->start_ts = tw_now(lp);
codes_mapping_get_lp_info(lp->gid, group_name, &group_index, lp_type_name, &lp_type_index, anno, &rep_id, &offset);
int local_id = codes_mapping_get_lp_relative_id(lp->gid, 0, 0);
/* in case of uniform random traffic, send to a random destination. */
if(traffic == UNIFORM)
{
local_dest = tw_rand_integer(lp->rng, 0, num_nodes - 1);
}
if(traffic == BISECTION)
{
local_dest = (local_id + num_nodes/2) % num_nodes;
}
assert(local_dest < LLU(num_nodes));
global_dest = codes_mapping_get_lpid_from_relative(local_dest, group_name, lp_type_name, NULL, 0);
//printf("global_src:%d, local_src:%d, global_dest:%d, local_dest:%d num_nodes:%d \n",(int)lp->gid, local_id, (int)global_dest,(int)local_dest, num_nodes);
// If Destination is self, then generate new destination
if((int)global_dest == (int)lp->gid)
{
......@@ -301,14 +309,6 @@ static void handle_kickoff_event(
global_dest = codes_mapping_get_lpid_from_relative(local_dest, group_name, lp_type_name, NULL, 0);
}
int div1 = floor((int)lp->gid/11);
int mult1 = div1 * 4;
int mod1 = (int)lp->gid % 11;
int sum1 = mult1 + mod1;
// if((int)lp->gid == 3)
if((int)global_dest == (int)lp->gid)
printf("global_src:%d, local_src:%d, global_dest:%d, local_dest:%d\n",(int)lp->gid, sum1, (int)global_dest,(int)local_dest);
ns->msg_sent_count++;
model_net_event(net_id, "test", global_dest, PAYLOAD_SZ, 0.0, sizeof(svr_msg), (const void*)m_remote, sizeof(svr_msg), (const void*)m_local, lp);
......
......@@ -1231,7 +1231,7 @@ static void packet_generate(terminal_state * s, tw_bf * bf, terminal_custom_mess
nic_ts = g_tw_lookahead + (num_chunks * cn_delay) + tw_rand_unif(lp->rng);
msg->packet_ID = lp->gid + g_tw_nlp * s->packet_counter;
msg->packet_ID = s->packet_counter;
msg->my_N_hop = 0;
msg->my_l_hop = 0;
msg->my_g_hop = 0;
......@@ -1314,12 +1314,11 @@ static void packet_generate(terminal_state * s, tw_bf * bf, terminal_custom_mess
static void packet_send_rc(terminal_state * s, tw_bf * bf, terminal_custom_message * msg,
tw_lp * lp)
{
if(bf->c10)
s->last_buf_full[0] = msg->saved_busy_time;
if(bf->c1) {
s->in_send_loop = 1;
if(bf->c10)
s->last_buf_full[0] = msg->saved_busy_time;
return;
}
......@@ -1651,7 +1650,7 @@ static void packet_arrive(terminal_state * s, tw_bf * bf, terminal_custom_messag
assert(lp->gid == msg->dest_terminal_id);
if(msg->packet_ID == LLU(TRACK_PKT))
printf("\n Packet %llu arrived at lp %llu hops %d ", msg->packet_ID, LLU(lp->gid), msg->my_N_hop);
printf("\n Packet %d arrived at lp %llu hops %d ", msg->sender_lp, LLU(lp->gid), msg->my_N_hop);
tw_stime ts = g_tw_lookahead + s->params->credit_delay + tw_rand_unif(lp->rng);
......@@ -2364,14 +2363,14 @@ static vector<int> get_intra_router(router_state * s, int src_router_id, int des
/* If no direct connection exists then find an intermediate connection */
if(curMap.find(dest_rel_id) == curMap.end())
{
/*int src_col = src_rel_id % s->params->num_router_cols;
int src_col = src_rel_id % s->params->num_router_cols;
int src_row = src_rel_id / s->params->num_router_cols;
int dest_col = dest_rel_id % s->params->num_router_cols;
int dest_row = dest_rel_id / s->params->num_router_cols;
//row first, column second
int choice1 = src_row * s->params->num_router_cols + dest_col;
/*int choice1 = src_row * s->params->num_router_cols + dest_col;
int choice2 = dest_row * s->params->num_router_cols + src_col;
intersection.push_back(offset + choice1);
intersection.push_back(offset + choice2);*/
......@@ -2479,8 +2478,8 @@ get_next_stop(router_state * s,
//printf("\n Dest router id %d %d !!! ", dest_router_id, msg->intm_rtr_id);
if(s->router_id == msg->saved_src_dest)
{
//dest_lp = connectionList[dest_group_id][my_grp_id][msg->saved_src_chan];
dest_lp = interGroupLinks[s->router_id][dest_group_id][0].dest;
dest_lp = connectionList[dest_group_id][my_grp_id][msg->saved_src_chan];
//dest_lp = interGroupLinks[s->router_id][dest_group_id][0].dest;
}
else
{
......@@ -2958,6 +2957,8 @@ router_packet_receive( router_state * s,
cur_chunk->msg.path_type = routing; /*defaults to the routing algorithm if we
don't have adaptive or progressive adaptive routing here*/
// printf("\n Packet %llu source %d arrived at router %d ", msg->packet_ID, msg->src_terminal_id, s->router_id);
/* Set the default route as minimal for prog-adaptive */
if(routing == PROG_ADAPTIVE && cur_chunk->msg.last_hop == TERMINAL)
cur_chunk->msg.path_type = MINIMAL;
......
This diff is collapsed.
This diff is collapsed.
......@@ -39,7 +39,6 @@
#define MAX_LENGTH_FILE 512
#define MAX_OPERATIONS 32768
#define DUMPI_IGNORE_DELAY 100
#define RANK_HASH_TABLE_SIZE 400
/* This variable is defined in src/network-workloads/model-net-mpi-replay.c */
extern struct codes_jobmap_ctx *jobmap_ctx;
......@@ -55,7 +54,7 @@ typedef struct rank_mpi_context
int my_app_id;
// whether we've seen an init op (needed for timing correctness)
int is_init;
int num_reqs;
unsigned int num_reqs;
unsigned int num_ops;
int64_t my_rank;
double last_op_time;
......@@ -153,7 +152,7 @@ static void* dumpi_init_op_data()
assert(tmp);
tmp->op_array = malloc(MAX_OPERATIONS * sizeof(struct codes_workload_op));
assert(tmp->op_array);
tmp->op_arr_ndx = 0;
tmp->op_arr_ndx = 0;
tmp->op_arr_cnt = MAX_OPERATIONS;
return (void *)tmp;
......@@ -197,7 +196,7 @@ static void dumpi_roll_back_prev_op(void * mpi_op_array)
{
dumpi_op_data_array *array = (dumpi_op_data_array*)mpi_op_array;
array->op_arr_ndx--;
assert(array->op_arr_ndx >= 0);
//assert(array->op_arr_ndx >= 0);
}
/* removes the next operation from the array */
static void dumpi_remove_next_op(void *mpi_op_array, struct codes_workload_op *mpi_op,
......@@ -207,13 +206,16 @@ static void dumpi_remove_next_op(void *mpi_op_array, struct codes_workload_op *m
dumpi_op_data_array *array = (dumpi_op_data_array*)mpi_op_array;
//printf("\n op array index %d array count %d ", array->op_arr_ndx, array->op_arr_cnt);
if (array->op_arr_ndx == array->op_arr_cnt)
if (array->op_arr_ndx >= array->op_arr_cnt)
{
mpi_op->op_type = CODES_WK_END;
mpi_op->sequence_id = array->op_arr_ndx;
array->op_arr_ndx++;
}
else
{
struct codes_workload_op *tmp = &(array->op_array[array->op_arr_ndx]);
tmp->sequence_id = array->op_arr_ndx;
*mpi_op = *tmp;
array->op_arr_ndx++;
}
......@@ -347,7 +349,7 @@ int handleDUMPIWaitsome(const dumpi_waitsome *prm, uint16_t thread,
wrkld_per_rank.op_type = CODES_WK_WAITSOME;
wrkld_per_rank.u.waits.count = prm->count;
wrkld_per_rank.u.waits.req_ids = (int*)malloc(prm->count * sizeof(int));
wrkld_per_rank.u.waits.req_ids = (unsigned int*)malloc(prm->count * sizeof(unsigned int));
for( i = 0; i < prm->count; i++ )
wrkld_per_rank.u.waits.req_ids[i] = prm->requests[i];
......@@ -372,7 +374,7 @@ int handleDUMPIWaitany(const dumpi_waitany *prm, uint16_t thread,
wrkld_per_rank.op_type = CODES_WK_WAITANY;
wrkld_per_rank.u.waits.count = prm->count;
wrkld_per_rank.u.waits.req_ids = (int*)malloc(prm->count * sizeof(int));
wrkld_per_rank.u.waits.req_ids = (unsigned int*)malloc(prm->count * sizeof(unsigned int));
for( i = 0; i < prm->count; i++ )
wrkld_per_rank.u.waits.req_ids[i] = prm->requests[i];
......@@ -398,7 +400,7 @@ int handleDUMPIWaitall(const dumpi_waitall *prm, uint16_t thread,
wrkld_per_rank.op_type = CODES_WK_WAITALL;
wrkld_per_rank.u.waits.count = prm->count;
wrkld_per_rank.u.waits.req_ids = (int*)malloc(prm->count * sizeof(int));
wrkld_per_rank.u.waits.req_ids = (unsigned int*)malloc(prm->count * sizeof(unsigned int));
for( i = 0; i < prm->count; i++ )
wrkld_per_rank.u.waits.req_ids[i] = prm->requests[i];
......@@ -546,7 +548,6 @@ int handleDUMPISendrecv(const dumpi_sendrecv* prm, uint16_t thread,
update_times_and_insert(&wrkld_per_rank, wall, myctx);
}
/* issue a blocking receive */
{
struct codes_workload_op wrkld_per_rank;
......@@ -575,6 +576,7 @@ int handleDUMPISendrecv(const dumpi_sendrecv* prm, uint16_t thread,
myctx->num_reqs++;
}
return 0;
}
......@@ -781,9 +783,10 @@ int dumpi_trace_nw_workload_load(const char* params, int app_id, int rank)
if(rank >= dumpi_params->num_net_traces)
return -1;
int hash_size = (dumpi_params->num_net_traces / dumpi_params->nprocs) + 1;
if(!rank_tbl)
{
rank_tbl = qhash_init(hash_rank_compare, quickhash_64bit_hash, RANK_HASH_TABLE_SIZE);
rank_tbl = qhash_init(hash_rank_compare, quickhash_64bit_hash, hash_size);
if(!rank_tbl)
return -1;
}
......
......@@ -31,6 +31,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-em.sh \
tests/modelnet-test-slimfly.sh \
tests/modelnet-test-dragonfly-synthetic.sh \
tests/modelnet-test-dragonfly-custom-synthetic.sh \
......@@ -66,6 +67,7 @@ EXTRA_DIST += tests/download-traces.sh \
tests/modelnet-test-dragonfly-traces.sh \
tests/modelnet-test-dragonfly-custom-synthetic.sh \
tests/modelnet-test-dragonfly-custom-traces.sh \
tests/modelnet-test-em.sh \
tests/modelnet-test-fattree-synthetic.sh \
tests/modelnet-test-slimfly.sh \
tests/modelnet-test-slimfly-synthetic.sh \
......
LPGROUPS
{
MODELNET_GRP
{
repetitions="64";
server="3";
modelnet_express_mesh="3";
modelnet_express_mesh_router="1";
}
}
PARAMS
{
message_size="512";
packet_size="4096";
chunk_size="4096";
modelnet_order=( "express_mesh", "express_mesh_router" );
#modelnet_scheduler="fcfs";
modelnet_scheduler="round-robin";
n_dims="3";
dim_length="4,4,4";
gap="1";
num_cn="3";
num_vcs="1";
link_bandwidth="12.5";
cn_bandwidth="12.5";
vc_size="65536";
cn_vc_size="65536";
routing="static";
soft_delay="0";
router_delay="90";
}
#!/bin/bash
tests/modelnet-test --sync=1 -- tests/conf/modelnet-test-em.conf
......@@ -187,8 +187,14 @@ int main(
{
strcpy(router_name, "slimfly_router");
}
if(net_id == EXPRESS_MESH)
{
strcpy(router_name, "modelnet_express_mesh_router");
}
if(net_id == SLIMFLY || net_id == DRAGONFLY)
if(net_id == SLIMFLY || net_id == DRAGONFLY || net_id == EXPRESS_MESH)
{
num_routers = codes_mapping_get_lp_count("MODELNET_GRP", 0,
router_name, NULL, 1);
......@@ -356,11 +362,8 @@ static void handle_kickoff_event(
int opt_offset = 0;
int total_lps = num_servers * 2 + num_routers;
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;
if((net_id == DRAGONFLY || net_id == SLIMFLY || net_id == EXPRESS_MESH) && (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;
......@@ -451,12 +454,9 @@ static void handle_ack_event(
// printf("\n m->src %d lp->gid %d ", m->src, lp->gid);
int opt_offset = 0;
if(net_id == DRAGONFLY && (lp->gid % lps_per_rep == num_servers_per_rep - 1))
if((net_id == DRAGONFLY || net_id == SLIMFLY || net_id == EXPRESS_MESH) && (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;
tw_lpid dest_id = (lp->gid + offset + opt_offset)%(num_servers*2 + num_routers);
/* in the "pull" case, src should actually be self */
......@@ -512,12 +512,9 @@ static void handle_req_event(
// 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))
if((net_id == DRAGONFLY || net_id == SLIMFLY || net_id == EXPRESS_MESH) && (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 */
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