Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions astra-sim-alibabacloud/astra-sim/network_frontend/ns3/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ uint64_t link_down_time = 0;
uint32_t link_down_A = 0, link_down_B = 0;

uint32_t enable_trace = 1;
uint32_t trace_node = 0;

uint32_t buffer_size = 16;

Expand Down Expand Up @@ -658,6 +659,8 @@ bool ReadConf(string network_topo,string network_conf) {
conf >> pint_log_base;
} else if (key.compare("PINT_PROB") == 0) {
conf >> pint_prob;
} else if (key.compare("TRACE_NODE") == 0) {
conf >> trace_node;
}
fflush(stdout);
}
Expand Down Expand Up @@ -981,13 +984,13 @@ void SetupNetwork(void (*qp_finish)(FILE *, Ptr<RdmaQueuePair>),void (*send_fini
}

NodeContainer trace_nodes;
for (uint32_t i = 0; i < trace_num; i++) {
uint32_t nid;
tracef >> nid;
if (nid >= n.GetN()) {
continue;
}
trace_nodes = NodeContainer(trace_nodes, n.Get(nid));
// The following code loops through all the nodes and writes them to the trajectory file.
// for (uint32_t i = 0; i < node_num; i++) {
// trace_nodes = NodeContainer(trace_nodes, n.Get(i));
// }
// The following code retrieves the trajectory data for the specified node.
if (trace_node < node_num) {
trace_nodes = NodeContainer(trace_nodes, n.Get(trace_node));
}

FILE *trace_output = fopen(trace_output_file.c_str(), "w");
Expand Down
3 changes: 2 additions & 1 deletion astra-sim-alibabacloud/inputs/config/SimAI.conf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ ACK_HIGH_PRIO 0
LINK_DOWN 0 0 0

ENABLE_TRACE 1
TRACE_NODE 0

KMAX_MAP 6 25000000000 400 50000000000 800 100000000000 1600 200000000000 1200 400000000000 3200 1600000000000 2400
KMIN_MAP 6 25000000000 100 50000000000 200 100000000000 400 200000000000 300 400000000000 800 1600000000000 600
Expand All @@ -62,4 +63,4 @@ MON_START 0
MON_END 20000
QP_MON_INTERVAL 100
QLEN_MON_INTERVAL 10000
BW_MON_INTERVAL 10000
BW_MON_INTERVAL 10000