Commit 24aced8c authored by Matthieu Dorier's avatar Matthieu Dorier

added new topology functions

parent 060f9674
......@@ -3225,6 +3225,16 @@ struct model_net_method dragonfly_custom_router_method =
#ifdef ENABLE_CORTEX
static int dragonfly_custom_get_number_of_compute_nodes(void* topo) {
// TODO
return -1;
}
static int dragonfly_custom_get_number_of_routers(void* topo) {
// TODO
return -1;
}
static double dragonfly_custom_get_router_link_bandwidth(void* topo, router_id_t r1, router_id_t r2) {
// TODO: handle this function for multiple cables between the routers.
// Right now it returns the bandwidth of a single cable only.
......@@ -3473,19 +3483,35 @@ static void dragonfly_custom_get_router_compute_node_list(void* topo, router_id_
nodes[i] = r * params->num_cn + i;
}
extern "C" {
cortex_topology dragonfly_custom_cortex_topology = {
.internal = NULL,
.get_router_link_bandwidth = dragonfly_custom_get_router_link_bandwidth,
.get_compute_node_bandwidth = dragonfly_custom_get_compute_node_bandwidth,
.get_router_neighbor_count = dragonfly_custom_get_router_neighbor_count,
.get_router_neighbor_list = dragonfly_custom_get_router_neighbor_list,
.get_router_location = dragonfly_custom_get_router_location,
.get_compute_node_location = dragonfly_custom_get_compute_node_location,
.get_router_from_compute_node = dragonfly_custom_get_router_from_compute_node,
.get_router_compute_node_count = dragonfly_custom_get_router_compute_node_count,
.get_router_compute_node_list = dragonfly_custom_get_router_compute_node_list,
// .internal =
NULL,
// .get_number_of_routers =
dragonfly_custom_get_number_of_routers,
// .get_number_of_compute_nodes =
dragonfly_custom_get_number_of_compute_nodes,
// .get_router_link_bandwidth =
dragonfly_custom_get_router_link_bandwidth,
// .get_compute_node_bandwidth =
dragonfly_custom_get_compute_node_bandwidth,
// .get_router_neighbor_count =
dragonfly_custom_get_router_neighbor_count,
// .get_router_neighbor_list =
dragonfly_custom_get_router_neighbor_list,
// .get_router_location =
dragonfly_custom_get_router_location,
// .get_compute_node_location =
dragonfly_custom_get_compute_node_location,
// .get_router_from_compute_node =
dragonfly_custom_get_router_from_compute_node,
// .get_router_compute_node_count =
dragonfly_custom_get_router_compute_node_count,
// .get_router_compute_node_list = dragonfly_custom_get_router_compute_node_list,
};
}
#endif
}
......@@ -3363,6 +3363,16 @@ struct model_net_method dragonfly_router_method =
#ifdef ENABLE_CORTEX
static int dragonfly_get_number_of_compute_nodes(void* topo) {
// TODO
return -1;
}
static int dragonfly_get_number_of_routers(void* topo) {
// TODO
return -1;
}
static double dragonfly_get_router_link_bandwidth(void* topo, router_id_t r1, router_id_t r2) {
// TODO
return -1.0;
......@@ -3408,6 +3418,8 @@ static void dragonfly_get_router_compute_node_list(void* topo, router_id_t r, cn
cortex_topology dragonfly_cortex_topology = {
.internal = NULL,
.get_number_of_routers = dragonfly_get_number_of_routers,
.get_number_of_compute_nodes = dragonfly_get_number_of_compute_nodes,
.get_router_link_bandwidth = dragonfly_get_router_link_bandwidth,
.get_compute_node_bandwidth = dragonfly_get_compute_node_bandwidth,
.get_router_neighbor_count = dragonfly_get_router_neighbor_count,
......
......@@ -2999,6 +2999,16 @@ struct model_net_method fattree_method =
#ifdef ENABLE_CORTEX
static int fattree_get_number_of_compute_nodes(void* topo) {
// TODO
return -1;
}
static int fattree_get_number_of_routers(void* topo) {
// TODO
return -1;
}
static double fattree_get_router_link_bandwidth(void* topo, router_id_t r1, router_id_t r2) {
// TODO
return -1.0;
......@@ -3044,6 +3054,8 @@ static void fattree_get_router_compute_node_list(void* topo, router_id_t r, cn_i
cortex_topology fattree_cortex_topology = {
.internal = NULL,
.get_number_of_compute_nodes = fattree_get_number_of_compute_nodes,
.get_number_of_routers = fattree_get_number_of_routers,
.get_router_link_bandwidth = fattree_get_router_link_bandwidth,
.get_compute_node_bandwidth = fattree_get_compute_node_bandwidth,
.get_router_neighbor_count = fattree_get_router_neighbor_count,
......
......@@ -2061,6 +2061,16 @@ int model_net_torus_get_flat_id(
#ifdef ENABLE_CORTEX
static int torus_get_number_of_compute_nodes(void* topo) {
// TODO
return -1;
}
static int torus_get_number_of_routers(void* topo) {
// TODO
return -1;
}
static double torus_get_router_link_bandwidth(void* topo, router_id_t r1, router_id_t r2) {
// TODO
return -1.0;
......@@ -2106,6 +2116,8 @@ static void torus_get_router_compute_node_list(void* topo, router_id_t r, cn_id_
cortex_topology torus_cortex_topology = {
.internal = NULL,
.get_number_of_compute_nodes = torus_get_number_of_compute_nodes,
.get_number_of_routers = torus_get_number_of_routers,
.get_router_link_bandwidth = torus_get_router_link_bandwidth,
.get_compute_node_bandwidth = torus_get_compute_node_bandwidth,
.get_router_neighbor_count = torus_get_router_neighbor_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