Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Elsa Gonsiorowski
codes
Commits
1099d429
Commit
1099d429
authored
Apr 09, 2015
by
Misbah Mubarak
Browse files
cleaning up torus network code, fixing message size in loggp test config
parent
c240b8b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/models/networks/model-net/torus.c
View file @
1099d429
...
...
@@ -378,12 +378,11 @@ static void torus_init( nodes_state * s,
int
id
=
configuration_get_annotation_index
(
anno
,
anno_map
);
s
->
params
=
&
all_params
[
id
];
}
int
dim_N
[
s
->
params
->
n_dims
+
1
];
// shorthand
const
torus_param
*
p
=
s
->
params
;
dim_N
[
0
]
=
mapping_rep_id
+
mapping_offset
;
int
intm_dim
=
mapping_rep_id
+
mapping_offset
;
s
->
neighbour_minus_lpID
=
(
int
*
)
malloc
(
p
->
n_dims
*
sizeof
(
int
));
s
->
neighbour_plus_lpID
=
(
int
*
)
malloc
(
p
->
n_dims
*
sizeof
(
int
));
...
...
@@ -411,9 +410,9 @@ static void torus_init( nodes_state * s,
// calculate my torus co-ordinates
for
(
i
=
0
;
i
<
p
->
n_dims
;
i
++
)
{
s
->
dim_position
[
i
]
=
dim_N
[
i
]
%
p
->
dim_length
[
i
];
s
->
dim_position
[
i
]
=
intm_dim
%
p
->
dim_length
[
i
];
//printf(" dim position %d ", s->dim_position[i]);
dim_N
[
i
+
1
]
=
(
dim_N
[
i
]
-
s
->
dim_position
[
i
]
)
/
p
->
dim_length
[
i
];
intm_dim
=
(
intm_dim
-
s
->
dim_position
[
i
]
)
/
p
->
dim_length
[
i
];
}
//printf("\n");
...
...
@@ -749,10 +748,10 @@ static void dimension_order_routing( nodes_state * s,
int
*
dim
,
int
*
dir
)
{
int
dim_N
[
s
->
params
->
n_dims
],
dest
[
s
->
params
->
n_dims
],
int
dest
[
s
->
params
->
n_dims
],
i
,
dest_id
=
0
;
dest_id
=
0
,
intm_dim
;
/* dummys - check later */
*
dim
=
-
1
;
...
...
@@ -760,13 +759,13 @@ static void dimension_order_routing( nodes_state * s,
//TODO: be annotation-aware
codes_mapping_get_lp_info
(
*
dst_lp
,
grp_name
,
&
mapping_grp_id
,
NULL
,
&
mapping_type_id
,
NULL
,
&
mapping_rep_id
,
&
mapping_offset
);
dim_N
[
0
]
=
mapping_rep_id
+
mapping_offset
;
intm_dim
=
mapping_rep_id
+
mapping_offset
;
// find destination dimensions using destination LP ID
for
(
i
=
0
;
i
<
s
->
params
->
n_dims
;
i
++
)
{
dest
[
i
]
=
dim_N
[
i
]
%
s
->
params
->
dim_length
[
i
];
dim_N
[
i
+
1
]
=
(
dim_N
[
i
]
-
dest
[
i
]
)
/
s
->
params
->
dim_length
[
i
];
dest
[
i
]
=
intm_dim
%
s
->
params
->
dim_length
[
i
];
intm_dim
=
(
intm_dim
-
dest
[
i
]
)
/
s
->
params
->
dim_length
[
i
];
}
for
(
i
=
0
;
i
<
s
->
params
->
n_dims
;
i
++
)
...
...
tests/conf/modelnet-p2p-bw-loggp.conf
View file @
1099d429
...
...
@@ -10,7 +10,7 @@ LPGROUPS
PARAMS
{
packet_size
=
"2147483648"
;
message_size
=
"2
16
"
;
message_size
=
"2
24
"
;
modelnet_order
=(
"loggp"
);
# scheduler options
modelnet_scheduler
=
"fcfs"
;
...
...
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