GitLab maintenance scheduled form Friday, 2021-06-18 5:00pm to Satursday, 2021-06-19 10:00pm CT - Services will be unavailable during this time.

Commit 2f527704 authored by Philip Carns's avatar Philip Carns

test harness for loggp stub method

also misc update to how loggp method plugs into modelnet
parent b6d5e9cb
......@@ -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 */
......
......@@ -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])
......@@ -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 ");
......
......@@ -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
......
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";
}
#!/bin/bash
abs_srcdir=@abs_srcdir@
tests/modelnet-test --sync=1 -- $abs_srcdir/modelnet-test-loggp.conf
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment