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
Nikhil
codes
Commits
6b825141
Commit
6b825141
authored
Dec 08, 2016
by
Misbah Mubarak
Browse files
Removing excessive qhash memory allocation from network models
parent
9f8cb764
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/network-workloads/conf/dragonfly-custom/modelnet-test-dragonfly-custom.conf
View file @
6b825141
...
...
@@ -49,9 +49,9 @@ PARAMS
# number of global channels per router
num_global_channels
=
"10"
;
# network config file for intra-group connections
intra
-
group
-
connections
=
"
/Users/mmubarak/Documents/software_development/dragonfly-cray/codes-conflict/scripts/gen-cray-topo
/intra-custom"
;
intra
-
group
-
connections
=
"
../src/network-workloads/conf/dragonfly-custom
/intra-custom"
;
# network config file for inter-group connections
inter
-
group
-
connections
=
"
/Users/mmubarak/Documents/software_development/dragonfly-cray/codes-conflict/scripts/gen-cray-topo
/inter-custom"
;
inter
-
group
-
connections
=
"
../src/network-workloads/conf/dragonfly-custom
/inter-custom"
;
# routing protocol to be used
routing
=
"prog-adaptive"
;
}
src/network-workloads/conf/dragonfly-custom/modelnet-test-dragonfly-edison.conf
View file @
6b825141
...
...
@@ -48,9 +48,9 @@ PARAMS
# number of global channels per router
num_global_channels
=
"10"
;
# network config file for intra-group connections
intra
-
group
-
connections
=
"
/Users/mmubarak/Documents/software_development/dragonfly-cray/codes-conflict/scripts/gen-cray-topo
/intra-edison"
;
intra
-
group
-
connections
=
"
../src/network-workloads/conf/dragonfly-custom
/intra-edison"
;
# network config file for inter-group connections
inter
-
group
-
connections
=
"
/Users/mmubarak/Documents/software_development/dragonfly-cray/codes-conflict/scripts/gen-cray-topo
/inter-edison"
;
inter
-
group
-
connections
=
"
../src/network-workloads/conf/dragonfly-custom
/inter-edison"
;
# routing protocol to be used
routing
=
"minimal"
;
}
src/network-workloads/conf/dragonfly-custom/modelnet-test-dragonfly-theta.conf
View file @
6b825141
...
...
@@ -48,9 +48,9 @@ PARAMS
# number of global channels per router
num_global_channels
=
"10"
;
# network config file for intra-group connections
intra
-
group
-
connections
=
"
/Users/mmubarak/Documents/software_development/test_versions/codes/scripts/gen-cray-topo
/intra-theta"
;
intra
-
group
-
connections
=
"
../src/network-workloads/conf/dragonfly-custom
/intra-theta"
;
# network config file for inter-group connections
inter
-
group
-
connections
=
"
/Users/mmubarak/Documents/software_development/test_versions/codes/scripts/gen-cray-topo
/inter-theta"
;
inter
-
group
-
connections
=
"
../src/network-workloads/conf/dragonfly-custom
/inter-theta"
;
# routing protocol to be used
routing
=
"adaptive"
;
}
src/networks/model-net/dragonfly-custom.C
View file @
6b825141
...
...
@@ -22,7 +22,7 @@
#define DUMP_CONNECTIONS 0
#define CREDIT_SIZE 8
#define DFLY_HASH_TABLE_SIZE
262144
#define DFLY_HASH_TABLE_SIZE
5000
// debugging parameters
#define TRACK -1
...
...
@@ -834,11 +834,8 @@ terminal_custom_init( terminal_state * s,
s
->
vc_occupancy
[
i
]
=
0
;
}
s
->
rank_tbl
=
qhash_init
(
dragonfly_rank_hash_compare
,
dragonfly_hash_func
,
DFLY_HASH_TABLE_SIZE
);
if
(
!
s
->
rank_tbl
)
tw_error
(
TW_LOC
,
"
\n
Hash table not initialized! "
);
s
->
rank_tbl
=
NULL
;
s
->
terminal_msgs
=
(
terminal_custom_message_list
**
)
malloc
(
s
->
num_vcs
*
sizeof
(
terminal_custom_message_list
*
));
s
->
terminal_msgs_tail
=
...
...
@@ -1479,6 +1476,9 @@ static void packet_arrive(terminal_state * s, tw_bf * bf, terminal_custom_messag
// NIC aggregation - should this be a separate function?
// Trigger an event on receiving server
if
(
!
s
->
rank_tbl
)
s
->
rank_tbl
=
qhash_init
(
dragonfly_rank_hash_compare
,
dragonfly_hash_func
,
DFLY_HASH_TABLE_SIZE
);
struct
dfly_hash_key
key
;
key
.
message_id
=
msg
->
message_id
;
key
.
sender_id
=
msg
->
sender_lp
;
...
...
@@ -2026,8 +2026,10 @@ dragonfly_custom_terminal_final( terminal_state * s,
//if(s->packet_gen != s->packet_fin)
// printf("\n generated %d finished %d ", s->packet_gen, s->packet_fin);
if
(
s
->
rank_tbl
)
qhash_finalize
(
s
->
rank_tbl
);
qhash_finalize
(
s
->
rank_tbl
);
rc_stack_destroy
(
s
->
st
);
free
(
s
->
vc_occupancy
);
free
(
s
->
terminal_msgs
);
...
...
src/networks/model-net/dragonfly.c
View file @
6b825141
...
...
@@ -33,7 +33,7 @@
#define COLLECTIVE_COMPUTATION_DELAY 5700
#define DRAGONFLY_FAN_OUT_DELAY 20.0
#define WINDOW_LENGTH 0
#define DFLY_HASH_TABLE_SIZE
262144
#define DFLY_HASH_TABLE_SIZE
5000
// debugging parameters
#define TRACK -1
...
...
@@ -757,11 +757,8 @@ terminal_init( terminal_state * s,
s
->
vc_occupancy
[
i
]
=
0
;
}
s
->
rank_tbl
=
qhash_init
(
dragonfly_rank_hash_compare
,
dragonfly_hash_func
,
DFLY_HASH_TABLE_SIZE
);
if
(
!
s
->
rank_tbl
)
tw_error
(
TW_LOC
,
"
\n
Hash table not initialized! "
);
s
->
rank_tbl
=
NULL
;
s
->
terminal_msgs
=
(
terminal_message_list
**
)
malloc
(
1
*
sizeof
(
terminal_message_list
*
));
s
->
terminal_msgs_tail
=
...
...
@@ -1491,6 +1488,9 @@ static void packet_arrive(terminal_state * s, tw_bf * bf, terminal_message * msg
// NIC aggregation - should this be a separate function?
// Trigger an event on receiving server
if
(
!
s
->
rank_tbl
)
s
->
rank_tbl
=
qhash_init
(
dragonfly_rank_hash_compare
,
dragonfly_hash_func
,
DFLY_HASH_TABLE_SIZE
);
struct
dfly_hash_key
key
;
key
.
message_id
=
msg
->
message_id
;
key
.
sender_id
=
msg
->
sender_lp
;
...
...
@@ -2363,8 +2363,10 @@ dragonfly_terminal_final( terminal_state * s,
//if(s->packet_gen != s->packet_fin)
// printf("\n generated %d finished %d ", s->packet_gen, s->packet_fin);
if
(
s
->
rank_tbl
)
qhash_finalize
(
s
->
rank_tbl
);
qhash_finalize
(
s
->
rank_tbl
);
rc_stack_destroy
(
s
->
st
);
free
(
s
->
vc_occupancy
);
free
(
s
->
terminal_msgs
);
...
...
src/networks/model-net/fattree.c
View file @
6b825141
...
...
@@ -17,7 +17,7 @@
#define MEAN_PROCESS 1.0
#define TERMINAL_GUID_PREFIX ((uint64_t)(64) << 32)
#define FTREE_HASH_TABLE_SIZE
262144
#define FTREE_HASH_TABLE_SIZE
5000
// debugging parameters
#define TRACK_PKT -1
...
...
@@ -965,9 +965,9 @@ void ft_terminal_init( ft_terminal_state * s, tw_lp * lp )
s
->
in_send_loop
=
0
;
s
->
issueIdle
=
0
;
s
->
rank_tbl
=
qhash_init
(
fattree_rank_hash_compare
,
fattree_hash_func
,
FTREE_HASH_TABLE_SIZE
)
;
if
(
!
s
->
rank_tbl
)
tw_error
(
TW_LOC
,
"
\n
Hash table not initialized! "
);
s
->
rank_tbl
=
NULL
;
//
if(!s->rank_tbl)
//
tw_error(TW_LOC, "\n Hash table not initialized! ");
s
->
params
->
num_terminals
=
codes_mapping_get_lp_count
(
lp_group_name
,
0
,
LP_CONFIG_NM
,
s
->
anno
,
0
);
...
...
@@ -2381,6 +2381,8 @@ void ft_packet_arrive_rc(ft_terminal_state * s, tw_bf * bf, fattree_message * ms
void
ft_packet_arrive
(
ft_terminal_state
*
s
,
tw_bf
*
bf
,
fattree_message
*
msg
,
tw_lp
*
lp
)
{
if
(
!
s
->
rank_tbl
)
s
->
rank_tbl
=
qhash_init
(
fattree_rank_hash_compare
,
fattree_hash_func
,
FTREE_HASH_TABLE_SIZE
);
//Establish msg hash keys
struct
ftree_hash_key
key
;
key
.
message_id
=
msg
->
message_id
;
...
...
src/networks/model-net/slimfly.c
View file @
6b825141
...
...
@@ -25,7 +25,7 @@
#define MEAN_PROCESS 1.0
/* collective specific parameters */
#define DFLY_HASH_TABLE_SIZE
65536
#define DFLY_HASH_TABLE_SIZE
5000
// debugging parameters
#define TRACK 4
...
...
@@ -840,10 +840,9 @@ void slim_terminal_init( terminal_state * s,
s
->
vc_occupancy
[
i
]
=
0
;
}
s
->
rank_tbl
=
qhash_init
(
slimfly_rank_hash_compare
,
slimfly_hash_func
,
DFLY_HASH_TABLE_SIZE
);
if
(
!
s
->
rank_tbl
)
tw_error
(
TW_LOC
,
"
\n
Hash table not initialized! "
);
s
->
rank_tbl
=
NULL
;
// if(!s->rank_tbl)
// tw_error(TW_LOC, "\n Hash table not initialized! ");
s
->
terminal_msgs
=
(
slim_terminal_message_list
**
)
malloc
(
1
*
sizeof
(
slim_terminal_message_list
*
));
...
...
@@ -1664,6 +1663,9 @@ void slim_packet_arrive(terminal_state * s, tw_bf * bf, slim_terminal_message *
// NIC aggregation - should this be a separate function?
// Trigger an event on receiving server
if
(
!
s
->
rank_tbl
)
s
->
rank_tbl
=
qhash_init
(
slimfly_rank_hash_compare
,
slimfly_hash_func
,
DFLY_HASH_TABLE_SIZE
);
tw_stime
ts
=
g_tw_lookahead
+
s
->
params
->
credit_delay
+
tw_rand_unif
(
lp
->
rng
);
if
(
msg
->
packet_ID
==
TRACK
)
...
...
@@ -1996,7 +1998,9 @@ void slimfly_terminal_final( terminal_state * s,
if
(
s
->
terminal_msgs
[
0
]
!=
NULL
)
// printf("[%lu] leftover terminal messages \n", lp->gid);
qhash_finalize
(
s
->
rank_tbl
);
if
(
s
->
rank_tbl
)
qhash_finalize
(
s
->
rank_tbl
);
rc_stack_destroy
(
s
->
st
);
free
(
s
->
vc_occupancy
);
free
(
s
->
terminal_msgs
);
...
...
tests/Makefile.subdir
View file @
6b825141
...
...
@@ -12,6 +12,7 @@ check_PROGRAMS += tests/lp-io-test \
src/network-workloads/model-net-synthetic
\
src/network-workloads/model-net-synthetic-fattree
\
src/network-workloads/model-net-synthetic-slimfly
\
src/network-workloads/model-net-synthetic-custom-dfly
\
tests/concurrent-msg-recv tests/modelnet-simplep2p-test
\
tests/modelnet-test-collective
\
tests/modelnet-prio-sched-test
\
...
...
@@ -31,6 +32,7 @@ TESTS += tests/lp-io-test.sh \
tests/modelnet-test-dragonfly.sh
\
tests/modelnet-test-slimfly.sh
\
tests/modelnet-test-dragonfly-synthetic.sh
\
tests/modelnet-test-dragonfly-custom-synthetic.sh
\
tests/modelnet-test-fattree-synthetic.sh
\
tests/modelnet-test-slimfly-synthetic.sh
\
tests/modelnet-p2p-bw-loggp.sh
\
...
...
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