Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
codes
codes
Commits
18ac8bbe
Commit
18ac8bbe
authored
Apr 22, 2017
by
Matthieu Dorier
Browse files
added support for Cortex topology in DUMPI workloads
parent
1f87f5ba
Changes
7
Hide whitespace changes
Inline
Side-by-side
codes/model-net.h
View file @
18ac8bbe
...
...
@@ -18,6 +18,11 @@ extern "C" {
#include <codes/codes-mapping-context.h>
#include <stdint.h>
#ifdef ENABLE_CORTEX
#include <cortex/cortex.h>
#include <cortex/topology.h>
#endif
#define PULL_MSG_SIZE 128
#define MAX_NAME_LENGTH 256
...
...
@@ -406,6 +411,11 @@ void model_net_print_stats(tw_lpid lpid, mn_stats mn_stats_array[]);
/* find model-net statistics */
mn_stats
*
model_net_find_stats
(
char
const
*
category
,
mn_stats
mn_stats_array
[]);
#ifdef ENABLE_CORTEX
/* structure that gives access to the topology functions */
extern
cortex_topology
model_net_topology
;
#endif
#ifdef __cplusplus
}
#endif
...
...
src/networks/model-net/dragonfly-custom.C
View file @
18ac8bbe
...
...
@@ -69,6 +69,12 @@ struct InterGroupLink {
int
src
,
dest
;
};
#ifdef ENABLE_CORTEX
/* This structure is defined at the end of the file */
extern
"C"
{
extern
cortex_topology
dragonfly_custom_cortex_topology
;
}
#endif
static
int
debug_slot_count
=
0
;
static
long
term_ecount
,
router_ecount
,
term_rev_ecount
,
router_rev_ecount
;
...
...
@@ -740,6 +746,9 @@ void dragonfly_custom_configure(){
if
(
anno_map
->
has_unanno_lp
>
0
){
dragonfly_read_config
(
NULL
,
&
all_params
[
anno_map
->
num_annos
]);
}
#ifdef ENABLE_CORTEX
model_net_topology
=
dragonfly_custom_cortex_topology
;
#endif
}
/* report dragonfly statistics like average and maximum packet latency, average number of hops traversed */
...
...
src/networks/model-net/dragonfly.c
View file @
18ac8bbe
...
...
@@ -54,6 +54,11 @@
#define LP_CONFIG_NM_ROUT (model_net_lp_config_names[DRAGONFLY_ROUTER])
#define LP_METHOD_NM_ROUT (model_net_method_names[DRAGONFLY_ROUTER])
#ifdef ENABLE_CORTEX
/* This structure is defined at the end of the file */
extern
cortex_topology
dragonfly_cortex_topology
;
#endif
int
debug_slot_count
=
0
;
long
term_ecount
,
router_ecount
,
term_rev_ecount
,
router_rev_ecount
;
long
packet_gen
=
0
,
packet_fin
=
0
;
...
...
@@ -604,6 +609,9 @@ static void dragonfly_configure(){
if
(
anno_map
->
has_unanno_lp
>
0
){
dragonfly_read_config
(
NULL
,
&
all_params
[
anno_map
->
num_annos
]);
}
#ifdef ENABLE_CORTEX
model_net_topology
=
dragonfly_cortex_topology
;
#endif
}
/* report dragonfly statistics like average and maximum packet latency, average number of hops traversed */
...
...
src/networks/model-net/fattree.c
View file @
18ac8bbe
...
...
@@ -39,6 +39,11 @@
#define LP_CONFIG_NM (model_net_lp_config_names[FATTREE])
#define LP_METHOD_NM (model_net_method_names[FATTREE])
#ifdef ENABLE_CORTEX
/* This structure is defined at the end of the file */
extern
cortex_topology
fattree_cortex_topology
;
#endif
#if DEBUG_RC
//Reverse Compute Debug Variables
long
long
packet_event_f
=
0
;
...
...
@@ -896,6 +901,9 @@ static void fattree_configure(){
if
(
anno_map
->
has_unanno_lp
>
0
){
fattree_read_config
(
NULL
,
&
all_params
[
anno_map
->
num_annos
]);
}
#ifdef ENABLE_CORTEX
model_net_topology
=
fattree_cortex_topology
;
#endif
}
/* initialize a fattree compute node terminal */
...
...
src/networks/model-net/model-net.c
View file @
18ac8bbe
...
...
@@ -14,6 +14,7 @@
#include "codes/codes.h"
#include <codes/codes_mapping.h>
#define STR_SIZE 16
#define PROC_TIME 10.0
...
...
@@ -637,6 +638,11 @@ tw_lpid model_net_find_local_device_mctx(
sender_gid
);
}
#ifdef ENABLE_CORTEX
/* structure that gives access to the topology functions */
cortex_topology
model_net_topology
;
#endif
/*
* Local variables:
* c-indent-level: 4
...
...
src/networks/model-net/torus.c
View file @
18ac8bbe
...
...
@@ -40,6 +40,11 @@
#define LP_CONFIG_NM (model_net_lp_config_names[TORUS])
#define LP_METHOD_NM (model_net_method_names[TORUS])
#ifdef ENABLE_CORTEX
/* This structure is defined at the end of the file */
extern
cortex_topology
torus_cortex_topology
;
#endif
static
double
maxd
(
double
a
,
double
b
)
{
return
a
<
b
?
b
:
a
;
}
/* Torus network model implementation of codes, implements the modelnet API */
...
...
@@ -385,6 +390,9 @@ static void torus_configure(){
if
(
anno_map
->
has_unanno_lp
>
0
){
torus_read_config
(
NULL
,
&
all_params
[
anno_map
->
num_annos
]);
}
#ifdef ENABLE_CORTEX
model_net_topology
=
torus_cortex_topology
;
#endif
}
/* helper functions - convert between flat ids and torus n-dimensional ids */
...
...
src/workload/methods/codes-dumpi-trace-nw-wrkld.c
View file @
18ac8bbe
...
...
@@ -14,6 +14,7 @@
#include "dumpi/libundumpi/libundumpi.h"
#include "codes/codes-workload.h"
#include "codes/quickhash.h"
#include "codes/model-net.h"
#if ENABLE_CORTEX
#include <cortex/cortex.h>
...
...
@@ -655,10 +656,7 @@ int dumpi_trace_nw_workload_load(const char* params, int app_id, int rank)
// TODO: call cortex_placement_set (from cortex/placement.h) to set the compute node id of
// each rank of the application
// TODO: call cortex_topology_set (from cortex/topology.h) to set the topology to one of
// the topologies defined in codes/cortex-topology.h depending on which network we are dealing with.
// Note: there might be a better we to do this, for instance by adding the cortex_topology inside
// the network's model_net_method structure?
cortex_topology_set
(
profile
,
&
model_net_topology
);
#else
profile
=
undumpi_open
(
file_name
);
#endif
...
...
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