Commit bf7e98c
authored
Fix bug in stalling of the GPUs when running out of hitslots (#460)
This fixes a bug in the stalling of the GPU in case the hitBuffer is
overflowing. Since the calculation of `nextStepMightFail` is based on
unsigned int parameters, the subtraction was causing false negatives in
case of wraparounds if `hitBufferSafetyFactor * maxInFlight ` was larger
than ` gpuState.fHitScoring->HitCapacity() / numThread`. By changing the
condition to an addition
```
bool nextStepMightFail = gpuState.stats->hitBufferOccupancy + hitBufferSafetyFactor * maxInFlight >=
gpuState.fHitScoring->HitCapacity() / numThreads;
```
this is safely resolved.
Furthermore, as a track can cause multiple (3) hits per track, (one for
each secondary, one for the energy it deposits itself), the previous
hardcoded hitBufferSafetyFactor of 1.5 was dangerous, so now it is an UI
parameter. It doesn't make sense to hardcode a higher (safe) value, as
it would slow down the settings where a lower factor is safe.
Furthermore, two printouts that are per track are increased to a higher
verbosity, as those render larger simulations useless, but other
printouts (e.g., whether the hitbuffer is copied) were at the same
level.1 parent 8a5bcb7 commit bf7e98c
File tree
6 files changed
+35
-15
lines changed- include/AdePT
- core
- integration
- src
6 files changed
+35
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| 85 | + | |
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
| |||
108 | 110 | | |
109 | 111 | | |
110 | 112 | | |
| 113 | + | |
111 | 114 | | |
112 | 115 | | |
113 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
912 | 912 | | |
913 | 913 | | |
914 | 914 | | |
915 | | - | |
| 915 | + | |
| 916 | + | |
916 | 917 | | |
917 | 918 | | |
918 | 919 | | |
| |||
1624 | 1625 | | |
1625 | 1626 | | |
1626 | 1627 | | |
1627 | | - | |
1628 | | - | |
1629 | | - | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
1630 | 1633 | | |
1631 | 1634 | | |
1632 | 1635 | | |
| |||
1777 | 1780 | | |
1778 | 1781 | | |
1779 | 1782 | | |
1780 | | - | |
| 1783 | + | |
1781 | 1784 | | |
1782 | 1785 | | |
1783 | 1786 | | |
| |||
1793 | 1796 | | |
1794 | 1797 | | |
1795 | 1798 | | |
1796 | | - | |
| 1799 | + | |
| 1800 | + | |
1797 | 1801 | | |
1798 | 1802 | | |
1799 | 1803 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
81 | 83 | | |
82 | 84 | | |
83 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
| 104 | + | |
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| |||
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
160 | | - | |
| 161 | + | |
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
| |||
317 | 318 | | |
318 | 319 | | |
319 | 320 | | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
325 | 327 | | |
326 | 328 | | |
327 | 329 | | |
| |||
412 | 414 | | |
413 | 415 | | |
414 | 416 | | |
415 | | - | |
| 417 | + | |
416 | 418 | | |
417 | 419 | | |
418 | 420 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
95 | 100 | | |
96 | 101 | | |
97 | 102 | | |
| |||
155 | 160 | | |
156 | 161 | | |
157 | 162 | | |
| 163 | + | |
158 | 164 | | |
159 | 165 | | |
160 | 166 | | |
| |||
202 | 208 | | |
203 | 209 | | |
204 | 210 | | |
| 211 | + | |
| 212 | + | |
205 | 213 | | |
206 | 214 | | |
207 | 215 | | |
| |||
0 commit comments