Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fig_3_16 dependency graph processing is doing x[i] calculations twice #18

Open
jnorwood opened this issue Jan 5, 2021 · 1 comment
Open

Comments

@jnorwood
Copy link

jnorwood commented Jan 5, 2021

I added logging to fig_3_16 dependency graph example and exercised it with several different block sizes. The block where it computes the x[i] values is sometimes being executed twice. Below is a log for block_size=1 and N=8 that shows the "calc" executions occurring twice. It also has multiple calc executions when block_size=2, so it isn't a block_size=1 issue.

r:c= calc x[0]=0,
r:c=0:1, calc x[1]=0.5,
r:c= calc x[1]=0.5,
r:c=0:2,
r:c=0:3,
r:c=0:4,
r:c=1:2, calc x[2]=0.5,
r:c=1:3,
r:c=0:5,
r:c=1:4,
r:c= calc x[2]=0.5,
r:c=0:6,
r:c=1:5,
r:c=2:3, calc x[3]=0.35,
r:c=1:6,
r:c=0:7,
r:c=2:4,
r:c=2:5,
r:c=2:6,
r:c= calc x[3]=0.35,
r:c=1:7,
r:c=2:7,
r:c=3:4, calc x[4]=0.261765,
r:c=3:5,
r:c=3:6,
r:c= calc x[4]=0.261765,
r:c=3:7,
r:c=4:5, calc x[5]=0.207805,
r:c= calc x[5]=0.207805,
r:c=4:6,
r:c=4:7,
r:c=5:6, calc x[6]=0.171998,
r:c=5:7,
r:c= calc x[6]=0.171998,
r:c=6:7, calc x[7]=0.146639,
r:c= calc x[7]=0.146639,

I'm attaching the modified fig_3_16 example with logging and random delays inserted.

fig_3_16.zip

@jnorwood
Copy link
Author

jnorwood commented Jan 6, 2021

In investigating this, I'm changing the initialization data to use non-zero values, since a 0 can hide processing errors. So, the question is why are x[i] values are computed twice. I'm logging for N=8 and for block_size values of 1, 2 ,4 and 8. I'm also fixing the r:c index order log in this version

r:c=0:0, calc x[0]=5, no ops
r:c=1:0, calc x[1]=0.5,
r:c=2:0,
r:c=1:1, calc x[1]=0.5, no ops
r:c=3:0,
r:c=2:1, calc x[2]=0.5,
r:c=4:0,
r:c=3:1,
r:c=5:0,
r:c=4:1,
r:c=6:0,
r:c=5:1,
r:c=2:2, calc x[2]=0.5, no ops
r:c=6:1,
r:c=3:2, calc x[3]=0.35,
r:c=7:0,
r:c=3:3, calc x[3]=0.35, no ops
r:c=7:1,
r:c=4:2,
r:c=5:2,
r:c=4:3, calc x[4]=0.261765,
r:c=6:2,
r:c=4:4, calc x[4]=0.261765, no ops
r:c=7:2,
r:c=5:3,
r:c=6:3,
r:c=5:4, calc x[5]=0.207805,
r:c=7:3,
r:c=5:5, calc x[5]=0.207805, no ops
r:c=6:4,
r:c=7:4,
r:c=6:5, calc x[6]=0.171998,
r:c=7:5,
r:c=6:6, calc x[6]=0.171998, no ops
r:c=7:6, calc x[7]=0.146639,
r:c=7:7, calc x[7]=0.146639, no ops
parallel_time block_count:1 == 0.172112 seconds
r:c=0:0, calc x[0]=5, calc x[1]=0.5,
r:c=2:0,2:1, calc x[2]=0.5, 3:0,3:1,
r:c=4:0,4:1,5:0,5:1,
r:c=2:2, calc x[2]=0.5, calc x[3]=0.35,
r:c=6:0,6:1,7:0,7:1,
r:c=4:2,4:3, calc x[4]=0.261765, 5:2,5:3,
r:c=4:4, calc x[4]=0.261765, calc x[5]=0.207805,
r:c=6:2,6:3,7:2,7:3,
r:c=6:4,6:5, calc x[6]=0.171998, 7:4,7:5,
r:c=6:6, calc x[6]=0.171998, calc x[7]=0.146639,
parallel_time block_count:2 == 0.0805095 seconds
r:c=0:0, calc x[0]=5, calc x[1]=0.5, 2:0,2:1, calc x[2]=0.5, 3:0,3:1,3:2, calc x[3]=0.35,
r:c=4:0,4:1,4:2,4:3, calc x[4]=0.261765, 5:0,5:1,5:2,5:3,6:0,6:1,6:2,6:3,7:0,7:1,7:2,7:3,
r:c=4:4, calc x[4]=0.261765, calc x[5]=0.207805, 6:4,6:5, calc x[6]=0.171998, 7:4,7:5,7:6, calc x[7]=0.146639,
parallel_time block_count:4 == 0.0131065 seconds
r:c=0:0, calc x[0]=5, calc x[1]=0.5, 2:0,2:1, calc x[2]=0.5, 3:0,3:1,3:2, calc x[3]=0.35, 4:0,4:1,4:2,4:3, calc x[4]=0.261765, 5:0,5:1,5:2,5:3,5:4, calc x[5]=0.207805, 6:0,6:1,6:2,6:3,6:4,6:5, calc x[6]=0.171998, 7:0,7:1,7:2,7:3,7:4,7:5,7:6, calc x[7]=0.146639,
parallel_time block_count:8 == 0.00705842 seconds

fig_3_16.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant