Commit 49d4681d authored by Misbah Mubarak's avatar Misbah Mubarak

Updating documentation for sampling, minor file open fixes

parent 7b80ed8a
......@@ -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:
......
......@@ -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";
}
......@@ -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);
......
......@@ -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;
......
......@@ -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";
}
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