mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
ENH: add trapFpe and setNaN optimisationSwitch (issue #517)
- allows configuration without an environment variable. For compatibility still respect FOAM_SIGFPE and FOAM_SETNAN env-variables - The env-variables are now treated as true/false switch values. Previously there was just a check for env exists or not, but this can be fairly fragile for a user's environment.
This commit is contained in:
@ -79,6 +79,14 @@ OptimisationSwitches
|
||||
// global reduction, even if multi-pass is not needed)
|
||||
maxCommsSize 0;
|
||||
|
||||
// Trap floating point exception.
|
||||
// Can override with FOAM_SIGFPE (true|false)
|
||||
trapFpe 1;
|
||||
|
||||
// Initialization malloced memory to NaN.
|
||||
// Can override with FOAM_SETNAN (true|false)
|
||||
setNaN 0;
|
||||
|
||||
// Force dumping (at next timestep) upon signal (-1 to disable)
|
||||
writeNowSignal -1; // 10;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user