applicationskeleton / Skeleton

a tool to generate skeleton applications that mimic a real applications' parallel or distributed performance at a task level
MIT License
13 stars 2 forks source link

experimental branch: gauss distribution returns negative numbers for task.length #11

Closed mturilli closed 9 years ago

mturilli commented 9 years ago

Example. In the file skeleton.conf I have:

Task_Length = gauss [60, 1800]

Here a snipped of the length returned by task.length:

DEBUG: task Stage_1_119 length: 1781.33
DEBUG: task Stage_1_120 length: -410.15
DEBUG: task Stage_1_121 length: -1834.68
DEBUG: task Stage_1_122 length: 167.32
DEBUG: task Stage_1_123 length: 1403.63
DEBUG: task Stage_1_124 length: -919.14
DEBUG: task Stage_1_125 length: -54.4
DEBUG: task Stage_1_126 length: -1193.91
DEBUG: task Stage_1_127 length: -681.89
danielskatz commented 9 years ago

Hi Matteo,

I think what you meant to do is Task_Length = gauss [1800, 60]

But in any case, there is always a chance of negative task lengths with any distribution (though it will be amazingly small with the 1800, 60 version). What do you think the correct behavior should be?

  1. Keep going, but change task lengths below zero to zero, in which case, everything will work, but the distribution will be a bit "off" from what it should be.
  2. Kick it back to the user and halt
  3. Something else

Dan

mturilli commented 9 years ago

Hi Dan,

The arguments of gauss were indeed specified in the wrong order, thank you and apologies.

I think negative values for task length makes little sense but I have to agree that there is no way out of getting negative numbers with a gaussian distribution. Looking at the probability of negative numbers for properly specified (average, stdev), I would go for option 1. We would be introducing a minimal - irrelevant? - relative error but we would keep consistent the semantic of 'task.length'.

Matteo

danielskatz commented 9 years ago

Mike, when you do the merge of this branch into the master branch, can you also add code that turns any negative task lengths into zero task lengths? Thanks, Dan

danielskatz commented 9 years ago

fixed in commit a8b9729b0962174510c57d389d63aea23fe70ba2