CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Segmentation fault (core dumped) error in new solver

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 29, 2021, 06:20
Default Segmentation fault (core dumped) error in new solver
  #1
Member
 
Bushra Rasheed
Join Date: Dec 2020
Posts: 97
Rep Power: 5
B_R_Khan is on a distinguished road
Hi Foamers!

I wanted to use this opensource solver https://gitlab.com/Jose_Moreno/openfoam_dom
I have compiled it successfully on openfoam7 but when I try to use it for an application, I get this error:

/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 7
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
Build : 7-1ff648926f77
Exec : MultiRegionRadiationFoam
Date : Oct 29 2021
Time : 14:25:46
Host : "CFD"
PID : 909686
I/O : uncollated
Case : /home/cfd/openfoam7/tutorials/heatTransfer/MultiRegionRadiationFoam
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

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

Create fluid mesh for region air for time = 0

*** Reading fluid radiation properties for region air

Selecting radiationModel DORT
Selecting phase Function Model HenyeyGreenteinsPhaseFunction
Selecting extintionModel greyConstExt
Solving optics...
quadrature : Allocated 16 rays with average orientation:
ray0 : omega : 0.785398 dir : (0.19509 0.980785 6.12323e-17)
ray1 : omega : 0.785398 dir : (0.55557 0.83147 6.12323e-17)
ray2 : omega : 0.785398 dir : (0.83147 0.55557 6.12323e-17)
ray3 : omega : 0.785398 dir : (0.980785 0.19509 6.12323e-17)
ray4 : omega : 0.785398 dir : (0.980785 -0.19509 6.12323e-17)
ray5 : omega : 0.785398 dir : (0.83147 -0.55557 6.12323e-17)
ray6 : omega : 0.785398 dir : (0.55557 -0.83147 6.12323e-17)
ray7 : omega : 0.785398 dir : (0.19509 -0.980785 6.12323e-17)
ray8 : omega : 0.785398 dir : (-0.19509 -0.980785 6.12323e-17)
ray9 : omega : 0.785398 dir : (-0.55557 -0.83147 6.12323e-17)
ray10 : omega : 0.785398 dir : (-0.83147 -0.55557 6.12323e-17)
ray11 : omega : 0.785398 dir : (-0.980785 -0.19509 6.12323e-17)
ray12 : omega : 0.785398 dir : (-0.980785 0.19509 6.12323e-17)
ray13 : omega : 0.785398 dir : (-0.83147 0.55557 6.12323e-17)
ray14 : omega : 0.785398 dir : (-0.55557 0.83147 6.12323e-17)
ray15 : omega : 0.785398 dir : (-0.19509 0.980785 6.12323e-17)

Time = 0.0005


Solving for fluid region air
#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::sigSegv::sigHandler(int) at ??:?
#2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::radiation::blackBodyEmissionRev::EbDeltaLamb daT(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::Vector2D<double> const&) const at ??:?
#4 Foam::radiation::blackBodyEmissionRev::correct(int , Foam::Vector2D<double> const&) at ??:?
#5 Foam::radiation:ORT::calculate() at ??:?
#6 ? in "/home/cfd/OpenFOAM/cfd-7/platforms/linux64GccDPInt32Opt/bin/MultiRegionRadiationFoam"
#7 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#8 ? in "/home/cfd/OpenFOAM/cfd-7/platforms/linux64GccDPInt32Opt/bin/MultiRegionRadiationFoam"
Segmentation fault (core dumped)

I have tried to copy a sample solver ,renamed it and used it in a tutorial to see if the error is reproduced with every new solver but the error could not be reproduced for the copied openfoam solvers.

Please help me find the source of error.

Thanks!
B_R_Khan is offline   Reply With Quote

Old   November 8, 2021, 15:08
Default
  #2
Member
 
MNM
Join Date: Aug 2017
Posts: 67
Rep Power: 8
SHUBHAM9595 is on a distinguished road
The second line of your error gives you some hint
Quote:
Foam::sigSegv::sigHandler(int) at ??:?
and google can further help you to decipher its meaning SigSegV means a signal for memory access violation,.

The next few lines of the error gives you the idea about the EXACT locations within the code where this might be happening

Quote:
Foam::radiation::blackBodyEmissionRev::EbDeltaLamb daT(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::Vector2D<double> const&) const at ??:?
#4 Foam::radiation::blackBodyEmissionRev::correct(int , Foam::Vector2D<double> const&) at ??:?
#5 Foam::radiation:ORT::calculate() at ??:?
Hope this helps...
SHUBHAM9595 is offline   Reply With Quote

Old   November 9, 2021, 02:30
Default
  #3
Member
 
Bushra Rasheed
Join Date: Dec 2020
Posts: 97
Rep Power: 5
B_R_Khan is on a distinguished road
Quote:
Originally Posted by SHUBHAM9595 View Post
The second line of your error gives you some hint
and google can further help you to decipher its meaning SigSegV means a signal for memory access violation,.

The next few lines of the error gives you the idea about the EXACT locations within the code where this might be happening



Hope this helps...
Hi!

I have seen the original location of error. It points out to the following piece of code in blackBodyEmissionsRev.C:

Code:
Foam::tmp<Foam::volScalarField>
Foam::radiation::blackBodyEmissionRev::EbDeltaLambdaT
(
    const volScalarField& T,
    const Vector2D<scalar>& band
) const
{
    tmp<volScalarField> Eb
    (
        volScalarField::New
        (
            "Eb",
            physicoChemical::sigma*pow4(T)
        )
    );

    if (band != Vector2D<scalar>::one)
    {
        scalarField& Ebif = Eb.ref();

        forAll(T, i)
        {
            Ebif[i] *= fLambdaT(band[1]*T[i]) - fLambdaT(band[0]*T[i]);
        }

        volScalarField::Boundary& EbBf = Eb.ref().boundaryFieldRef();

        forAll(EbBf, patchi)
        {
            fvPatchScalarField& EbPf = EbBf[patchi];

            if (!EbPf.coupled())
            {
                const scalarField& Tpf = T.boundaryField()[patchi];

                forAll(EbPf, facei)
                {
                    const scalar T1 = fLambdaT(band[1]*Tpf[facei]);
                    const scalar T2 = fLambdaT(band[0]*Tpf[facei]);

                    EbPf[facei] *= T1 - T2;
                }
            }
        }
    }

    return Eb;
}
Unfortunately, I'm not very good at programming and can't comprehend which parameter is out of the list that is causing the segmentation error. I don't think the problem is with temperature boundary conditions or in radiation properties file
B_R_Khan is offline   Reply With Quote

Reply

Tags
dort, radiation fvdom, radiation model, segmentation fault, solver crash


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Segmentation fault (core dumped) Kummi OpenFOAM Programming & Development 0 April 23, 2021 10:28
Floating point exception (core dumped), running a new solver Mahyar Javidi OpenFOAM Running, Solving & CFD 6 April 7, 2018 12:43
Segmentation fault when running dieselFoam or dieselEngineFoam in parallel francesco OpenFOAM Bugs 4 May 2, 2017 21:59
Floating point exception (core dumped) for GAMG solver yuhou1989 OpenFOAM Running, Solving & CFD 2 March 24, 2015 19:28
solving a conduction problem in FLUENT using UDF Avin2407 Fluent UDF and Scheme Programming 1 March 13, 2015 02:02


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