CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   patchMassFlow segfault (http://www.cfd-online.com/Forums/openfoam/80263-patchmassflow-segfault.html)

 pit September 21, 2010 04:49

patchMassFlow segfault

Hi,

I have a problem with the simpleFunctionObjects in my OF 1.7. I installed step by step descriped by the wiki and add the function in the controlDict.
Code:

```functions (       massFlow   {     type patchMassFlow;     functionObjectLibs ("libsimpleFunctionObjects.so");     verbose true;     patches     (       //inlet_1       //inlet_2       //inlet_3       outlet     );     //factor 19.7363;   } );```
But I get only a segfault
Code:

```Reading field p_rgh Starting time loop #0  Foam::error::printStack(Foam::Ostream&) in ".../OpenFOAM-1.7.0/lib/linux64GccDPOpt/libOpenFOAM.so" #1  Foam::sigSegv::sigSegvHandler(int) in ".../OpenFOAM-1.7.0/lib/linux64GccDPOpt/libOpenFOAM.so" #2  __restore_rt at sigaction.c:0 #3  ?? in "/home/user/OpenFOAM/user-1.7.0/lib/linux64GccDPOpt/libsimpleFunctionObjects.so" Segmentation fault!```
I didn't get the errormessages every time and if I uncomment the function the error is gone.
Any ideas regarding source of error?

 gschaider September 22, 2010 10:36

Quote:
 Originally Posted by pit (Post 275950) Hi, I have a problem with the simpleFunctionObjects in my OF 1.7. I installed step by step descriped by the wiki and add the function in the controlDict. Code: ```functions (       massFlow   {     type patchMassFlow;     functionObjectLibs ("libsimpleFunctionObjects.so");     verbose true;     patches     (       //inlet_1       //inlet_2       //inlet_3       outlet     );     //factor 19.7363;   } );``` But I get only a segfault Code: ```Reading field p_rgh Starting time loop #0  Foam::error::printStack(Foam::Ostream&) in ".../OpenFOAM-1.7.0/lib/linux64GccDPOpt/libOpenFOAM.so" #1  Foam::sigSegv::sigSegvHandler(int) in ".../OpenFOAM-1.7.0/lib/linux64GccDPOpt/libOpenFOAM.so" #2  __restore_rt at sigaction.c:0 #3  ?? in "/home/user/OpenFOAM/user-1.7.0/lib/linux64GccDPOpt/libsimpleFunctionObjects.so" Segmentation fault!``` I didn't get the errormessages every time and if I uncomment the function the error is gone. Any ideas regarding source of error?
Just to be sure: which solver are you using? The patch outlet is definitly there, is it? Is this happening at the end of the first time-step or at the end?

Bernhard

 pit September 22, 2010 12:13

Hi Bernhard, solver was: buoyantSimpleFoam But i tried also a simple tube with simpleFoam with the same result (segfault). The error turn up before the first time-step. It is in order how I quoted. The patch 'outlet' is definetly there.

 gschaider September 22, 2010 12:42

Quote:
 Originally Posted by pit (Post 276203) Hi Bernhard, solver was: buoyantSimpleFoam But i tried also a simple tube with simpleFoam with the same result (segfault). The error turn up before the first time-step. It is in order how I quoted. The patch 'outlet' is definetly there.
Strange. Could you please post a report plus a small example-case to the OF-extend-Mantis and I'll have a look

 pit September 22, 2010 13:18

Thank you for the help. I will do it tomorrow at work. But I'm not sure what you mean with OF-extend-Mantis? To prevent some mistake. I'm not using the full OF-extend package. I have only download the 'simpleFunctionsObjects' and added them to my local OF-1.7.0 (CentFOAM) Installation.

 pit September 23, 2010 04:32

[code]
user@xxx simple_rohr\$ simpleFoam
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7.0 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 1.7.0-5773603db906
Exec : simpleFoam
Date : Sep 23 2010
Time : 10:04:44
Host : W71C-FRGHC0010
PID : 18166
Case : /workDir/simple_rohr
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting RAS turbulence model SpalartAllmaras
SpalartAllmarasCoeffs
{
sigmaNut 0.66666;
kappa 0.41;
Cb1 0.1355;
Cb2 0.622;
Cw2 0.3;
Cw3 2;
Cv1 7.1;
Cv2 5;
}

Starting time loop

Speicherzugriffsfehler
[\code]
Speicherzugriffsfehler = segfault

I have report it at OF-extend-Mantis with the simplest case. I hope the informations are enough.

 pit September 24, 2010 08:34

update

Hi Bernhard,

because of newer knowledge I'm 'sure' that the 'simpleFunctionObjects'-package is NOT the problem. It seems that my installation/wmake work not correctly.