CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   [swak4Foam] segmentation faults when using the debug switch "ExpressionResult" (https://www.cfd-online.com/Forums/openfoam-solving/166930-swak4foam-segmentation-faults-when-using-debug-switch-expressionresult.html)

Astrodan February 19, 2016 11:12

[swak4Foam] segmentation faults when using the debug switch "ExpressionResult"
 
1 Attachment(s)
Hello there,

I just tried to use the expressionToFace function of the swakTopoSources Library. Since I made (several) mistakes it didn't work, so I checked for DebugFlags and found ExpressionResult.

However, everytime I combine this debug flag and (at least) libgroovyBC.so in my controlDict, every single OpenFOAM tool ends with a segmentation fault, although most of them perform their job normally.

I by now figured I can solve the problem by using the debug flag to correct my expression, and then running the simulation without the flag, but this would not be possible when the expression is actively used in the simulation, since the simulation itself does not abort when the debug flag is active.

The segmentation fault can easily be reproduced when adding the lines
Code:

DebugSwitches
{
    ExpressionResult    1; 
}

libs
(
    "libgroovyBC.so"
);

to the controlDict of e.g. the cavity case (no further changes necessary, just add and run blockMesh). Although here apparently the solver works.. maybe it's a problem in my case, I attached my solver log.

Has anyone else come over this problem?
And yes, I'm aware that this is kind of a bug report, but the swak4Foam report site demands a registration, and I'm kind of annoyed of having to register at every bloody side.

wyldckat February 21, 2016 16:29

Quick answer: If I remember correctly, debug switches in swak4Foam are a bit different.
Go into the folder "swak4Foam/Examples" and run the following command:
Code:

grep -ir "debug" *
this will give several examples on how to use the debug system that swak4Foam uses.

In the folder "swak4Foam/Documentation" you will also find more details about the debug switches available in swak4Foam.


All times are GMT -4. The time now is 02:12.