|
|
|
|
|
by shepherdjerred
278 days ago
|
|
> For scientific simulations, I almost always want invalid state to immediately result in a program crash. If you have actually made invalid states unrepresentable, then it is _impossible_ for your program to transition into an invalid state at runtime. Otherwise, you're just talking about failing fast |
|
Not the case for scientific computing/HPC. Often HPC codebases will use numerical schemes which are mathematically proven to 'blow up' (produce infs/nans) under certain conditions even with a perfect implementation - see for instance the CFL condition [1].
The solution to that is typically changing to a numerical scheme more suited for your problem or tweaking the current scheme's parameters (temporal step size, mesh, formula coefficients...). It is not trivial to find what the correct settings will be before starting. Encountering situations like a job which runs fine for 2 days and then suddenly blows up is not particularly rare.
[1] https://en.m.wikipedia.org/wiki/Courant%E2%80%93Friedrichs%E...