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
Caitlin Ross
codes
Commits
d83c4ff2
Commit
d83c4ff2
authored
Jul 31, 2014
by
Jonathan Jenkins
Browse files
*_find_local_device functions now annotation-aware
parent
351a5de3
Changes
8
Hide whitespace changes
Inline
Side-by-side
codes/model-net-method.h
View file @
d83c4ff2
...
...
@@ -31,7 +31,10 @@ struct model_net_method
const
tw_lptype
*
(
*
mn_get_lp_type
)();
int
(
*
mn_get_msg_sz
)();
void
(
*
mn_report_stats
)();
tw_lpid
(
*
model_net_method_find_local_device
)(
tw_lp
*
sender
);
tw_lpid
(
*
model_net_method_find_local_device
)(
const
char
*
annotation
,
int
ignore_annotations
,
tw_lp
*
sender
);
void
(
*
mn_collective_call
)(
char
*
category
,
int
message_size
,
int
remote_event_size
,
const
void
*
remote_event
,
tw_lp
*
sender
);
void
(
*
mn_collective_call_rc
)(
int
message_size
,
tw_lp
*
sender
);
};
...
...
codes/model-net.h
View file @
d83c4ff2
...
...
@@ -173,7 +173,11 @@ void model_net_event(
*
* returns the LP id of the network card attached to the calling LP
*/
tw_lpid
model_net_find_local_device
(
int
net_id
,
tw_lp
*
sender
);
tw_lpid
model_net_find_local_device
(
int
net_id
,
const
char
*
annotation
,
int
ignore_annotations
,
tw_lp
*
sender
);
int
model_net_get_msg_sz
(
int
net_id
);
...
...
src/models/networks/model-net/dragonfly.c
View file @
d83c4ff2
...
...
@@ -1799,15 +1799,18 @@ static const tw_lptype* dragonfly_get_router_lp_type(void)
return
(
&
dragonfly_lps
[
1
]);
}
static
tw_lpid
dragonfly_find_local_device
(
tw_lp
*
sender
)
static
tw_lpid
dragonfly_find_local_device
(
const
char
*
annotation
,
int
ignore_annotations
,
tw_lp
*
sender
)
{
int
mapping_grp_id
,
mapping_rep_id
,
mapping_type_id
,
mapping_offset
;
tw_lpid
dest_id
;
codes_mapping_get_lp_info
(
sender
->
gid
,
lp_group_name
,
&
mapping_grp_id
,
NULL
,
&
mapping_type_id
,
NULL
,
&
mapping_rep_id
,
&
mapping_offset
);
codes_mapping_get_lp_id
(
lp_group_name
,
LP_CONFIG_NM
,
NULL
,
1
,
mapping_rep_id
,
mapping_offset
,
&
dest_id
);
codes_mapping_get_lp_id
(
lp_group_name
,
LP_CONFIG_NM
,
annotation
,
ignore_annotations
,
mapping_rep_id
,
mapping_offset
,
&
dest_id
);
return
(
dest_id
);
}
...
...
src/models/networks/model-net/loggp.c
View file @
d83c4ff2
...
...
@@ -115,7 +115,10 @@ static void loggp_packet_event_rc(tw_lp *sender);
static
void
loggp_report_stats
();
static
tw_lpid
loggp_find_local_device
(
tw_lp
*
sender
);
static
tw_lpid
loggp_find_local_device
(
const
char
*
annotation
,
int
ignore_annotations
,
tw_lp
*
sender
);
static
const
struct
param_table_entry
*
find_params
(
uint64_t
msg_size
,
...
...
@@ -695,7 +698,10 @@ static const struct param_table_entry* find_params(
return
(
&
params
->
table
[
i
]);
}
static
tw_lpid
loggp_find_local_device
(
tw_lp
*
sender
)
static
tw_lpid
loggp_find_local_device
(
const
char
*
annotation
,
int
ignore_annotations
,
tw_lp
*
sender
)
{
char
lp_group_name
[
MAX_NAME_LENGTH
];
int
mapping_grp_id
,
mapping_rep_id
,
mapping_type_id
,
mapping_offset
;
...
...
@@ -704,8 +710,8 @@ static tw_lpid loggp_find_local_device(tw_lp *sender)
//TODO: be annotation-aware
codes_mapping_get_lp_info
(
sender
->
gid
,
lp_group_name
,
&
mapping_grp_id
,
NULL
,
&
mapping_type_id
,
NULL
,
&
mapping_rep_id
,
&
mapping_offset
);
codes_mapping_get_lp_id
(
lp_group_name
,
LP_CONFIG_NM
,
NULL
,
1
,
mapping_rep_id
,
mapping_offset
,
&
dest_id
);
codes_mapping_get_lp_id
(
lp_group_name
,
LP_CONFIG_NM
,
annotation
,
ignore_annotations
,
mapping_rep_id
,
mapping_offset
,
&
dest_id
);
return
(
dest_id
);
}
...
...
src/models/networks/model-net/model-net.c
View file @
d83c4ff2
...
...
@@ -235,7 +235,7 @@ static void model_net_event_impl_base(
return
;
}
tw_lpid
mn_lp
=
model_net_find_local_device
(
net_id
,
sender
);
tw_lpid
mn_lp
=
model_net_find_local_device
(
net_id
,
NULL
,
1
,
sender
);
tw_stime
poffset
=
codes_local_latency
(
sender
);
if
(
in_sequence
){
tw_stime
tmp
=
mn_msg_offset
;
...
...
@@ -399,9 +399,14 @@ void model_net_report_stats(int net_id)
return
;
}
tw_lpid
model_net_find_local_device
(
int
net_id
,
tw_lp
*
sender
)
tw_lpid
model_net_find_local_device
(
int
net_id
,
const
char
*
annotation
,
int
ignore_annotations
,
tw_lp
*
sender
)
{
return
(
method_array
[
net_id
]
->
model_net_method_find_local_device
(
sender
));
return
(
method_array
[
net_id
]
->
model_net_method_find_local_device
(
annotation
,
ignore_annotations
,
sender
));
}
/*
...
...
src/models/networks/model-net/simplenet-upd.c
View file @
d83c4ff2
...
...
@@ -111,7 +111,10 @@ static void simplenet_packet_event_rc(tw_lp *sender);
static
void
sn_report_stats
();
static
tw_lpid
sn_find_local_device
(
tw_lp
*
sender
);
static
tw_lpid
sn_find_local_device
(
const
char
*
annotation
,
int
ignore_annotations
,
tw_lp
*
sender
);
/* data structure for model-net statistics */
struct
model_net_method
simplenet_method
=
...
...
@@ -618,7 +621,10 @@ static void simplenet_packet_event_rc(tw_lp *sender)
return
;
}
static
tw_lpid
sn_find_local_device
(
tw_lp
*
sender
)
static
tw_lpid
sn_find_local_device
(
const
char
*
annotation
,
int
ignore_annotations
,
tw_lp
*
sender
)
{
char
lp_group_name
[
MAX_NAME_LENGTH
];
int
mapping_rep_id
,
mapping_offset
,
dummy
;
...
...
@@ -627,8 +633,8 @@ static tw_lpid sn_find_local_device(tw_lp *sender)
// TODO: don't ignore annotations
codes_mapping_get_lp_info
(
sender
->
gid
,
lp_group_name
,
&
dummy
,
NULL
,
&
dummy
,
NULL
,
&
mapping_rep_id
,
&
mapping_offset
);
codes_mapping_get_lp_id
(
lp_group_name
,
LP_CONFIG_NM
,
NULL
,
1
,
mapping_rep_id
,
mapping_offset
,
&
dest_id
);
codes_mapping_get_lp_id
(
lp_group_name
,
LP_CONFIG_NM
,
annotation
,
ignore_annotations
,
mapping_rep_id
,
mapping_offset
,
&
dest_id
);
return
(
dest_id
);
}
...
...
src/models/networks/model-net/simplewan.c
View file @
d83c4ff2
...
...
@@ -141,7 +141,10 @@ static void simplewan_packet_event_rc(tw_lp *sender);
static
void
sw_report_stats
();
static
tw_lpid
sw_find_local_device
(
tw_lp
*
sender
);
static
tw_lpid
sw_find_local_device
(
const
char
*
annotation
,
int
ignore_annotations
,
tw_lp
*
sender
);
/* data structure for model-net statistics */
struct
model_net_method
simplewan_method
=
...
...
@@ -910,7 +913,10 @@ static void simplewan_packet_event_rc(tw_lp *sender)
return
;
}
static
tw_lpid
sw_find_local_device
(
tw_lp
*
sender
)
static
tw_lpid
sw_find_local_device
(
const
char
*
annotation
,
int
ignore_annotations
,
tw_lp
*
sender
)
{
char
lp_group_name
[
MAX_NAME_LENGTH
];
int
mapping_rep_id
,
mapping_offset
,
dummy
;
...
...
@@ -918,7 +924,8 @@ static tw_lpid sw_find_local_device(tw_lp *sender)
// TODO: don't ignore annotation
codes_mapping_get_lp_info
(
sender
->
gid
,
lp_group_name
,
&
dummy
,
NULL
,
&
dummy
,
NULL
,
&
mapping_rep_id
,
&
mapping_offset
);
codes_mapping_get_lp_id
(
lp_group_name
,
LP_CONFIG_NM
,
NULL
,
1
,
mapping_rep_id
,
mapping_offset
,
&
dest_id
);
codes_mapping_get_lp_id
(
lp_group_name
,
LP_CONFIG_NM
,
annotation
,
ignore_annotations
,
mapping_rep_id
,
mapping_offset
,
&
dest_id
);
return
(
dest_id
);
}
...
...
src/models/networks/model-net/torus.c
View file @
d83c4ff2
...
...
@@ -1306,15 +1306,18 @@ static const tw_lptype* torus_get_lp_type(void)
return
(
&
torus_lp
);
}
static
tw_lpid
torus_find_local_device
(
tw_lp
*
sender
)
static
tw_lpid
torus_find_local_device
(
const
char
*
annotation
,
int
ignore_annotations
,
tw_lp
*
sender
)
{
tw_lpid
dest_id
;
//TODO: be annotation-aware
codes_mapping_get_lp_info
(
sender
->
gid
,
grp_name
,
&
mapping_grp_id
,
NULL
,
&
mapping_type_id
,
NULL
,
&
mapping_rep_id
,
&
mapping_offset
);
codes_mapping_get_lp_id
(
grp_name
,
LP_CONFIG_NM
,
NULL
,
1
,
mapping_rep_id
,
mapping_offset
,
&
dest_id
);
codes_mapping_get_lp_id
(
grp_name
,
LP_CONFIG_NM
,
annotation
,
ignore_annotations
,
mapping_rep_id
,
mapping_offset
,
&
dest_id
);
return
(
dest_id
);
}
...
...
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