Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
codes
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
38
Issues
38
List
Boards
Labels
Milestones
Merge Requests
8
Merge Requests
8
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
codes
codes
Commits
22b59638
Commit
22b59638
authored
Mar 16, 2017
by
Matthieu Dorier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added cortex topology functions
parent
6b3e29b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
131 additions
and
0 deletions
+131
-0
src/networks/model-net/dragonfly-custom.C
src/networks/model-net/dragonfly-custom.C
+66
-0
src/networks/model-net/torus.c
src/networks/model-net/torus.c
+65
-0
No files found.
src/networks/model-net/dragonfly-custom.C
View file @
22b59638
...
...
@@ -20,6 +20,11 @@
#include <vector>
#include <map>
#ifdef ENABLE_CORTEX
#include <cortex/cortex.h>
#include <cortex/topology.h>
#endif
#define DUMP_CONNECTIONS 0
#define CREDIT_SIZE 8
#define DFLY_HASH_TABLE_SIZE 4999
...
...
@@ -3216,4 +3221,65 @@ struct model_net_method dragonfly_custom_router_method =
(
init_f
)
dragonfly_custom_rsample_init
,
(
final_f
)
dragonfly_custom_rsample_fin
};
#ifdef ENABLE_CORTEX
static
double
dragonfly_get_router_link_bandwidth
(
void
*
topo
,
router_id_t
r1
,
router_id_t
r2
)
{
// TODO
return
-
1
.
0
;
}
static
double
dragonfly_get_compute_node_bandwidth
(
void
*
topo
,
cn_id_t
node
)
{
// TODO
return
-
1
.
0
;
}
static
int
dragonfly_get_router_neighbor_count
(
void
*
topo
,
router_id_t
r
)
{
// TODO
return
0
;
}
static
void
dragonfly_get_router_neighbor_list
(
void
*
topo
,
router_id_t
r
,
router_id_t
*
neighbors
)
{
// TODO
}
static
int
dragonfly_get_router_location
(
void
*
topo
,
router_id_t
r
,
int32_t
*
location
,
int
size
)
{
// TODO
return
0
;
}
static
int
dragonfly_get_compute_node_location
(
void
*
topo
,
cn_id_t
node
,
int32_t
*
location
,
int
size
)
{
// TODO
return
0
;
}
static
router_id_t
dragonfly_get_router_from_compute_node
(
void
*
topo
,
cn_id_t
node
)
{
// TODO
return
-
1
;
}
static
int
dragonfly_get_router_compute_node_count
(
void
*
topo
,
router_id_t
r
)
{
// TODO
return
0
;
}
static
void
dragonfly_get_router_compute_node_list
(
void
*
topo
,
router_id_t
r
,
cn_id_t
*
nodes
)
{
// TODO
}
cortex_topology
dragonfly_cortex_topology
=
{
.
internal
=
NULL
,
.
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
,
.
get_router_neighbor_list
=
dragonfly_get_router_neighbor_list
,
.
get_router_location
=
dragonfly_get_router_location
,
.
get_compute_node_location
=
dragonfly_get_compute_node_location
,
.
get_router_from_compute_node
=
dragonfly_get_router_from_compute_node
,
.
get_router_compute_node_count
=
dragonfly_get_router_compute_node_count
,
.
get_router_compute_node_list
=
dragonfly_get_router_compute_node_list
,
};
#endif
}
src/networks/model-net/torus.c
View file @
22b59638
...
...
@@ -17,6 +17,11 @@
#include "codes/net/torus.h"
#include "codes/rc-stack.h"
#ifdef ENABLE_CORTEX
#include <cortex/cortex.h>
#include <cortex/topology.h>
#endif
#define DEBUG 1
#define MEAN_INTERVAL 100
// type casts to make compiler happy
...
...
@@ -2054,6 +2059,66 @@ int model_net_torus_get_flat_id(
return
to_flat_id
(
ndims
,
dim_lens
,
dim_ids
);
}
#ifdef ENABLE_CORTEX
static
double
torus_get_router_link_bandwidth
(
void
*
topo
,
router_id_t
r1
,
router_id_t
r2
)
{
// TODO
return
-
1
.
0
;
}
static
double
torus_get_compute_node_bandwidth
(
void
*
topo
,
cn_id_t
node
)
{
// TODO
return
-
1
.
0
;
}
static
int
torus_get_router_neighbor_count
(
void
*
topo
,
router_id_t
r
)
{
// TODO
return
0
;
}
static
void
torus_get_router_neighbor_list
(
void
*
topo
,
router_id_t
r
,
router_id_t
*
neighbors
)
{
// TODO
}
static
int
torus_get_router_location
(
void
*
topo
,
router_id_t
r
,
int32_t
*
location
,
int
size
)
{
// TODO
return
0
;
}
static
int
torus_get_compute_node_location
(
void
*
topo
,
cn_id_t
node
,
int32_t
*
location
,
int
size
)
{
// TODO
return
0
;
}
static
router_id_t
torus_get_router_from_compute_node
(
void
*
topo
,
cn_id_t
node
)
{
// TODO
return
-
1
;
}
static
int
torus_get_router_compute_node_count
(
void
*
topo
,
router_id_t
r
)
{
// TODO
return
0
;
}
static
void
torus_get_router_compute_node_list
(
void
*
topo
,
router_id_t
r
,
cn_id_t
*
nodes
)
{
// TODO
}
cortex_topology
torus_cortex_topology
=
{
.
internal
=
NULL
,
.
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
,
.
get_router_neighbor_list
=
torus_get_router_neighbor_list
,
.
get_router_location
=
torus_get_router_location
,
.
get_compute_node_location
=
torus_get_compute_node_location
,
.
get_router_from_compute_node
=
torus_get_router_from_compute_node
,
.
get_router_compute_node_count
=
torus_get_router_compute_node_count
,
.
get_router_compute_node_list
=
torus_get_router_compute_node_list
,
};
#endif
/*
* Local variables:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment