Commit e6db7c9
authored
avoid NaN in maxParticleVelocity() (#6831)
This PR is an attempt to fix a random job hang that I've experienced
recently on Tuolumne.
I've tracked the hang down to `mypc->maxParticleVelocity()`, which is
called from `UpdateDtFromParticleSpeeds()` when using dynamic time
stepping. The code there does not guard against boxes with zero
particles, which eventually results in taking the sqrt of an
uninitialized value resulting in local `max_v = nan`. This PR avoids NaN
values.
With this fix, I have not yet observed any random job hanging.1 parent 6c54afa commit e6db7c9
1 file changed
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2331 | 2331 | | |
2332 | 2332 | | |
2333 | 2333 | | |
| 2334 | + | |
| 2335 | + | |
2334 | 2336 | | |
2335 | 2337 | | |
2336 | 2338 | | |
2337 | | - | |
| 2339 | + | |
2338 | 2340 | | |
2339 | 2341 | | |
2340 | 2342 | | |
2341 | 2343 | | |
| 2344 | + | |
| 2345 | + | |
| 2346 | + | |
| 2347 | + | |
| 2348 | + | |
2342 | 2349 | | |
2343 | 2350 | | |
2344 | 2351 | | |
2345 | 2352 | | |
2346 | | - | |
| 2353 | + | |
2347 | 2354 | | |
2348 | 2355 | | |
2349 | 2356 | | |
2350 | 2357 | | |
2351 | 2358 | | |
2352 | | - | |
| 2359 | + | |
2353 | 2360 | | |
2354 | 2361 | | |
2355 | 2362 | | |
| |||
0 commit comments