Commit 074fb9f1 authored by Philip Carns's avatar Philip Carns

convert loggp and tests to read in params

parent c5fbf4e1
......@@ -71,4 +71,4 @@ AC_CONFIG_FILES([tests/modelnet-test-dragonfly.sh],[chmod +x tests/modelnet-test
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_CONFIG_FILES([tests/modelnet-p2p-bw-loggp.sh],[chmod +x tests/modelnet-p2p-bw-loggp.sh])
AC_OUTPUT([maint/codes-net.pc])
AC_OUTPUT(maint/codes-net.pc tests/modelnet-p2p-bw-loggp.conf tests/modelnet-test-loggp.conf)
......@@ -54,6 +54,24 @@ struct loggp_message
tw_stime net_recv_next_idle_saved;
};
/* loggp parameters for a given msg size, as reported by netgauge */
struct param_table_entry
{
int size;
int n;
double PRTT_10s;
double PRTT_n0s;
double PRTT_nPRTT_10ss;
double L;
double o_s;
double o_r;
double g;
double G;
double lsqu_gG;
};
struct param_table_entry param_table[100];
static int param_table_size = 0;
/* TODO: temporarily hard coding these to just get this stub building;
* replace with real loggp parameters.
*/
......@@ -515,8 +533,52 @@ static void loggp_packet_event(
static void loggp_setup(const void* net_params)
{
/* loggp_param* loggp_params = (loggp_param*)net_params; */
loggp_param* loggp_params = (loggp_param*)net_params;
FILE *conf;
int ret;
char buffer[512];
int line_nr = 0;
/* TODO: update this to read on one proc and then broadcast */
printf("Loggp configured to use parameters from file %s\n", loggp_params->net_config_file);
conf = fopen(loggp_params->net_config_file, "r");
if(!conf)
{
perror("fopen");
assert(0);
}
while(fgets(buffer, 512, conf))
{
line_nr++;
if(buffer[0] == '#')
continue;
ret = sscanf(buffer, "%d %d %lf %lf %lf %lf %lf %lf %lf %lf %lf",
&param_table[param_table_size].size,
&param_table[param_table_size].n,
&param_table[param_table_size].PRTT_10s,
&param_table[param_table_size].PRTT_n0s,
&param_table[param_table_size].PRTT_nPRTT_10ss,
&param_table[param_table_size].L,
&param_table[param_table_size].o_s,
&param_table[param_table_size].o_r,
&param_table[param_table_size].g,
&param_table[param_table_size].G,
&param_table[param_table_size].lsqu_gG);
if(ret != 11)
{
fprintf(stderr, "Error: malformed line %d in %s\n", line_nr,
loggp_params->net_config_file);
assert(0);
}
param_table_size++;
}
printf("Parsed %d loggp table entries.\n", param_table_size);
fclose(conf);
/* TODO: implement logic here to read in parameter table */
return;
......
......@@ -12,5 +12,5 @@ PARAMS
packet_size="2147483648";
message_size="128";
modelnet="loggp";
net_config_file="logp-param-table.conf";
net_config_file="@abs_srcdir@/ng-mpi-tukey.dat";
}
......@@ -2,4 +2,4 @@
abs_srcdir=@abs_srcdir@
tests/modelnet-p2p-bw --sync=1 -- $abs_srcdir/modelnet-p2p-bw-loggp.conf
tests/modelnet-p2p-bw --sync=1 -- tests/modelnet-p2p-bw-loggp.conf
......@@ -12,5 +12,5 @@ PARAMS
packet_size="512";
message_size="256";
modelnet="loggp";
net_config_file="logp-param-table.conf";
net_config_file="@abs_srcdir@/ng-mpi-tukey.dat";
}
......@@ -2,4 +2,4 @@
abs_srcdir=@abs_srcdir@
tests/modelnet-test --sync=1 -- $abs_srcdir/modelnet-test-loggp.conf
tests/modelnet-test --sync=1 -- tests/modelnet-test-loggp.conf
# size n PRTT(1,0,s) PRTT(n,0,s) PRTT(n,PRTT(1,0,s),s) L o_s o_r g G lsqu(g,G)
# to get o: plot "./loggp.out" using 1:(($5-$3)/($2-1)-$3)
# to get g,G: plot "./loggp.out" using 1:($4-$3)/($2-1)
1 10 14.808012 23.333868 156.914438 7.404006 0.981590 1.141012 -nan -nan -nan
2 10 13.742155 22.383496 146.210875 7.404006 0.976591 1.098196 0.934486 0.012832 -nan
4 10 12.924765 21.973551 138.645390 7.404006 1.044193 1.095872 0.924681 0.019835 0.005241
8 10 11.384472 20.677225 123.314448 7.404006 1.052192 1.084834 0.940152 0.012321 0.013077
16 10 11.342977 21.071672 123.410935 7.404006 1.109018 1.130161 0.951884 0.008612 0.016655
32 10 11.457962 21.260646 124.747756 7.404006 1.129793 1.144713 0.973209 0.004386 0.032412
64 10 11.719927 21.659093 127.430396 7.404006 1.136792 1.170096 0.991259 0.002213 0.041169
128 10 11.804915 22.375497 129.049678 7.404006 1.222280 1.145099 1.001103 0.001512 0.041815
256 10 13.432197 23.105899 144.382620 7.404006 1.117850 1.093533 1.027014 0.000443 0.066552
512 10 8.763824 24.549705 103.596595 7.404006 1.773151 1.189402 0.991407 0.001280 0.102904
1024 10 15.899366 27.493310 170.216153 7.404006 1.246944 1.290923 1.054646 0.000445 0.185469
2048 10 19.003449 33.349524 203.059244 7.404006 1.447195 1.485973 1.075264 0.000294 0.184461
4096 10 22.441488 44.961965 240.784681 7.404006 1.818867 2.101015 1.064050 0.000339 0.178781
8192 10 36.238636 81.254594 385.212295 7.404006 2.536215 4.873412 1.011231 0.000455 0.234274
16384 10 46.691233 214.602195 635.162746 7.404006 18.694491 18.819061 0.586577 0.000960 1.371910
32768 10 61.253278 303.695737 855.563662 7.404006 27.003431 27.019775 0.783380 0.000834 1.476254
65536 10 93.797910 482.427246 1327.299844 7.404006 43.257860 43.283355 1.221707 0.000684 2.089341
131072 10 158.744693 840.460690 2269.619861 7.404006 75.796993 75.846122 1.724786 0.000592 2.722938
262144 10 288.637758 1556.380596 4155.473234 7.404006 141.010628 140.995320 1.011231 0.000455 0.234274
262144 10 288.637758 1556.380596 4155.473234 7.404006 141.010628 140.995320 10.644914 0.000497 0.017238
524288 10 549.248277 2988.072427 7933.336652 7.404006 271.205986 271.215606 10.663002 0.000497 0.024217
1048576 10 1070.331835 5852.195492 15487.185740 7.404006 531.540821 531.617631 10.664016 0.000497 0.021018
2097152 10 2112.284980 11578.275412 30589.163185 7.404006 1051.812599 1051.927087 10.687907 0.000496 0.043017
4194304 10 4196.219765 23031.642589 60798.076909 7.404006 2092.875474 2092.972381 10.699357 0.000496 0.044684
8388608 10 8378.002467 46010.836219 121412.269999 7.404006 4181.360592 4182.670389 10.167781 0.000497 1.111365
16777216 10 17433.712969 95761.253994 252648.489383 7.404006 8701.262189 8699.889137 -14.956107 0.000515 57.824706
33554432 10 34848.237013 191513.816154 505118.956661 7.404006 17404.065170 17400.277571 -23.546009 0.000519 58.593438
67108864 10 69644.583991 382900.477375 1009692.411541 7.404006 34805.174626 34805.581962 -25.120100 0.000519 55.747174
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