diff --git a/src/network-workloads/README_synthetic.txt b/src/network-workloads/README_synthetic.txt index 7c08dc4a7bef2b195d5f37f56bd4ac5eff574150..a49a32070225f3f43915437bee0f3a10a1c2f46f 100644 --- a/src/network-workloads/README_synthetic.txt +++ b/src/network-workloads/README_synthetic.txt @@ -8,6 +8,18 @@ This pattern performs better with non-minimal and adaptive routing algorithms. - Nearest neighbor traffic: it sends traffic to the next node, potentially connected to the same router. + +SAMPLING: + - The modelnet_enable_sampling function takes a sampling interval "t" and + an end time. Over this end time, dragonfly model will collect compute + node and router samples after every "t" simulated nanoseconds. The + sampling output files can be specified in the config file using + cn_sample_file and rt_sample_file arguments. An example utility that + reads the binary files and translates it into text can be found at + src/networks/model-net/read-dragonfly-sample.c (Note that the router + radix aka RADIX needs to be tuned with the dragonfly configuration + in the utility to enable continguous array allocation). + HOW TO RUN: ROSS optimistic mode: diff --git a/src/network-workloads/conf/modelnet-synthetic-dragonfly.conf b/src/network-workloads/conf/modelnet-synthetic-dragonfly.conf index 82ea7f04e20788ef75ef9313dfe98150a13b04a2..a4c5c7719318197c4a66250a6313b398f7ece35f 100644 --- a/src/network-workloads/conf/modelnet-synthetic-dragonfly.conf +++ b/src/network-workloads/conf/modelnet-synthetic-dragonfly.conf @@ -5,13 +5,13 @@ LPGROUPS repetitions="264"; server="4"; modelnet_dragonfly="4"; - dragonfly_router="1"; + modelnet_dragonfly_router="1"; } } PARAMS { packet_size="512"; - modelnet_order=( "dragonfly" ); + modelnet_order=( "dragonfly", "dragonfly_router" ); # scheduler options modelnet_scheduler="fcfs"; chunk_size="32"; @@ -25,5 +25,5 @@ PARAMS global_bandwidth="4.7"; cn_bandwidth="5.25"; message_size="512"; - routing="nonminimal"; + routing="adaptive"; } diff --git a/src/networks/model-net/dragonfly.c b/src/networks/model-net/dragonfly.c index 1797839befd3d6fc72631d98a47e0e1f3090f754..37c0d29c142fd6bd428a2125bd1de1653eddaf63 100644 --- a/src/networks/model-net/dragonfly.c +++ b/src/networks/model-net/dragonfly.c @@ -2001,7 +2001,7 @@ void dragonfly_rsample_fin(router_state * s, int j = 0; int size_sample = sizeof(tw_lpid) + p->radix * (sizeof(int64_t) + sizeof(tw_stime)) + sizeof(tw_stime); - FILE * fp = fopen(cn_fn, "wa"); + FILE * fp = fopen(cn_fn, "a"); fseek(fp, sample_rtr_bytes_written, SEEK_SET); for(; i < s->op_arr_size; i++) @@ -2145,12 +2145,12 @@ void dragonfly_sample_fin(terminal_state * s, fclose(fp); } char rt_fn[MAX_NAME_LENGTH]; - if(strncmp(router_sample_file, "", 10) == 0) + if(strncmp(cn_sample_file, "", 10) == 0) sprintf(rt_fn, "dragonfly-cn-sampling-%ld.bin", g_tw_mynode); else sprintf(rt_fn, "%s-%ld.bin", cn_sample_file, g_tw_mynode); - FILE * fp = fopen(rt_fn, "wa"); + FILE * fp = fopen(rt_fn, "a"); fseek(fp, sample_bytes_written, SEEK_SET); fwrite(s->sample_stat, sizeof(struct dfly_cn_sample), s->op_arr_size, fp); fclose(fp); diff --git a/src/networks/model-net/read-dragonfly-sample.c b/src/networks/model-net/read-dragonfly-sample.c index 9f36669cec54668cad9af62eedc020f9bb1df403..8fe7ca137aacf6c3f58ca2e4c8c740ff8cab78e6 100644 --- a/src/networks/model-net/read-dragonfly-sample.c +++ b/src/networks/model-net/read-dragonfly-sample.c @@ -53,7 +53,7 @@ int main( int argc, char** argv ) char buffer_read[64]; char buffer_write[64]; - sprintf(buffer_read, "dragonfly-cn-sampling-%d.bin", my_rank); + sprintf(buffer_read, "dragonfly-sample-ur-%d.bin", my_rank); pFile = fopen(buffer_read, "r+"); struct stat st; @@ -90,7 +90,7 @@ int main( int argc, char** argv ) char buffer_rtr_read[64]; char buffer_rtr_write[64]; - sprintf(buffer_rtr_read, "dragonfly-router-sampling-%d.bin", my_rank); + sprintf(buffer_rtr_read, "dragonfly-router-ur-%d.bin", my_rank); pFile = fopen(buffer_rtr_read, "r+"); struct stat st2; diff --git a/tests/conf/modelnet-test-dragonfly.conf b/tests/conf/modelnet-test-dragonfly.conf index ae49e1c14b7b02216e4ccc686ca7b27f7cff3c8c..7c754a9283ed53095e6f9941a11906429a7a9556 100644 --- a/tests/conf/modelnet-test-dragonfly.conf +++ b/tests/conf/modelnet-test-dragonfly.conf @@ -25,6 +25,4 @@ PARAMS cn_bandwidth="5.25"; message_size="368"; routing="nonminimal"; - cn_sample_file = "dragonfly-sample-ur"; - rt_sample_file = "dragonfly-router-ur"; }