booksim / booksim2

BookSim 2.0
http://nocs.stanford.edu/booksim.html
Other
255 stars 158 forks source link

Certain sample_period might cause deadlock? #8

Closed shavvn closed 8 years ago

shavvn commented 8 years ago

Hi,

I just started with booksim and tried to run a few simulations. I found that booksim behaves very differently if it's given different sample_period value. For example, here's my config file:

num_vcs=3;
sw_allocator=separable_input_first;
sim_power=1;
vc_allocator=separable_input_first;
injection_rate_uses_flits=0;
input_speedup=1;
vc_alloc_delay=1;
latency_thres={1000000,1000000,1000000,1000000};
packet_size=5;
priority=none;
sim_count=1;
wait_for_tail_credit = 0;
sw_alloc_delay=1;
alloc_iters=1;
routing_function=dim_order;
injection_rate =0.2;
routing_delay=0;
traffic=uniform;
credit_delay=2;
output_speedup=1;
sample_period=100;
st_final_delay=1;
topology=torus;
warmup_periods=3;
c=1;
internal_speedup=1.0;
watch_out=-;
k=10;
n=2;
vc_buf_size=8;
use_noc_latency=0;
tech_file=techfile.txt;

The sample period of 100 could finish almost instantaneously, however, if I change it to 200, 400, or 1000, it would take really really long. When I looked at those output logs, it seemed that the "Measured flits" remained unchanged for a lot of iterations.

Any idea how that could happen?

Thanks!

shavvn commented 8 years ago

After waiting a long period of time it finally gets to a "simulation unstable" error...

shavvn commented 8 years ago

after a few runs with different parameters, it turns out there're many factors that could lead to this problem such as num of vcs, vc buffer size, ect. So the params needs to be carefully tuned to avoid this deadlock situation.