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
2f527704
Commit
2f527704
authored
Oct 10, 2013
by
Philip Carns
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test harness for loggp stub method
also misc update to how loggp method plugs into modelnet
parent
b6d5e9cb
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
7 deletions
+35
-7
codes/model-net.h
codes/model-net.h
+3
-1
configure.ac
configure.ac
+1
-0
src/models/networks/model-net/model-net.c
src/models/networks/model-net/model-net.c
+8
-6
tests/Makefile.subdir
tests/Makefile.subdir
+2
-0
tests/modelnet-test-loggp.conf
tests/modelnet-test-loggp.conf
+16
-0
tests/modelnet-test-loggp.sh.in
tests/modelnet-test-loggp.sh.in
+5
-0
No files found.
codes/model-net.h
View file @
2f527704
...
...
@@ -26,7 +26,9 @@ enum NETWORKS
{
SIMPLENET
,
TORUS
,
DRAGONFLY
DRAGONFLY
,
LOGGP
,
MAX_NETS
,
/* sentinal value, this must be last in the enumeration */
};
/* data structure for tracking network statistics */
...
...
configure.ac
View file @
2f527704
...
...
@@ -69,4 +69,5 @@ AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([tests/modelnet-test.sh],[chmod +x tests/modelnet-test.sh])
AC_CONFIG_FILES([tests/modelnet-test-dragonfly.sh],[chmod +x tests/modelnet-test-dragonfly.sh])
AC_CONFIG_FILES([tests/modelnet-test-torus.sh],[chmod +x tests/modelnet-test-torus.sh])
AC_CONFIG_FILES([tests/modelnet-test-loggp.sh],[chmod +x tests/modelnet-test-loggp.sh])
AC_OUTPUT([maint/codes-net.pc])
src/models/networks/model-net/model-net.c
View file @
2f527704
...
...
@@ -12,7 +12,6 @@
#define STR_SIZE 16
#define PROC_TIME 10.0
#define NUM_NETS 2
extern
struct
model_net_method
simplenet_method
;
extern
struct
model_net_method
torus_method
;
...
...
@@ -164,7 +163,7 @@ void model_net_event(
num_packets
++
;
/* Handle the left out data if message size is not exactly divisible by packet size */
/*Determine the network name*/
if
(
net_id
<
0
||
net_id
>
NUM
_NETS
)
if
(
net_id
<
0
||
net_id
>
=
MAX
_NETS
)
{
fprintf
(
stderr
,
"Error: undefined network ID %d (Available options 0 (simplenet), 1 (torus) 2 (dragonfly) )
\n
"
,
net_id
);
exit
(
-
1
);
...
...
@@ -404,7 +403,7 @@ static int model_net_get_msg_sz(int net_id)
{
// TODO: Add checks on network name
// TODO: Add dragonfly and torus network models
if
(
net_id
<
0
||
net_id
>
NUM
_NETS
)
if
(
net_id
<
0
||
net_id
>
=
MAX
_NETS
)
{
printf
(
"%s Error: Uninitializied modelnet network, call modelnet_init first
\n
"
,
__FUNCTION__
);
exit
(
-
1
);
...
...
@@ -416,7 +415,7 @@ static int model_net_get_msg_sz(int net_id)
/* returns the packet size in the modelnet struct */
int
model_net_get_packet_size
(
int
net_id
)
{
if
(
net_id
<
0
||
net_id
>
NUM
_NETS
)
if
(
net_id
<
0
||
net_id
>
=
MAX
_NETS
)
{
fprintf
(
stderr
,
"%s Error: Uninitializied modelnet network, call modelnet_init first
\n
"
,
__FUNCTION__
);
exit
(
-
1
);
...
...
@@ -427,7 +426,7 @@ int model_net_get_packet_size(int net_id)
/* returns lp type for modelnet */
const
tw_lptype
*
model_net_get_lp_type
(
int
net_id
)
{
if
(
net_id
<
0
||
net_id
>
NUM
_NETS
)
if
(
net_id
<
0
||
net_id
>
=
MAX
_NETS
)
{
fprintf
(
stderr
,
"%s Error: Uninitializied modelnet network, call modelnet_init first
\n
"
,
__FUNCTION__
);
exit
(
-
1
);
...
...
@@ -440,7 +439,7 @@ const tw_lptype* model_net_get_lp_type(int net_id)
void
model_net_report_stats
(
int
net_id
)
{
if
(
net_id
<
0
||
net_id
>
NUM
_NETS
)
if
(
net_id
<
0
||
net_id
>
=
MAX
_NETS
)
{
fprintf
(
stderr
,
"%s Error: Uninitializied modelnet network, call modelnet_init first
\n
"
,
__FUNCTION__
);
exit
(
-
1
);
...
...
@@ -469,6 +468,9 @@ void model_net_add_lp_type(int net_id)
case
DRAGONFLY
:
lp_type_register
(
"modelnet_dragonfly"
,
model_net_get_lp_type
(
net_id
));
break
;
case
LOGGP
:
lp_type_register
(
"modelnet_loggp"
,
model_net_get_lp_type
(
net_id
));
break
;
default:
{
printf
(
"
\n
Invalid net_id specified "
);
...
...
tests/Makefile.subdir
View file @
2f527704
...
...
@@ -3,9 +3,11 @@ check_PROGRAMS += tests/modelnet-test
TESTS
+=
tests/modelnet-test.sh
\
tests/modelnet-test-torus.sh
\
tests/modelnet-test-loggp.sh
\
tests/modelnet-test-dragonfly.sh
EXTRA_DIST
+=
tests/modelnet-test.sh
\
tests/modelnet-test-torus.sh
\
tests/modelnet-test-loggp.sh
\
tests/modelnet-test-dragonfly.sh
testlib
=
src/libcodes-net.a
...
...
tests/modelnet-test-loggp.conf
0 → 100644
View file @
2f527704
LPGROUPS
{
MODELNET_GRP
{
repetitions
=
"16"
;
server
=
"1"
;
modelnet_loggp
=
"1"
;
}
}
PARAMS
{
packet_size
=
"512"
;
message_size
=
"256"
;
modelnet
=
"loggp"
;
net_config_file
=
"logp-param-table.conf"
;
}
tests/modelnet-test-loggp.sh.in
0 → 100755
View file @
2f527704
#!/bin/bash
abs_srcdir
=
@abs_srcdir@
tests/modelnet-test
--sync
=
1
--
$abs_srcdir
/modelnet-test-loggp.conf
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