|
[Sponsors] |
February 1, 2010, 12:26 |
The infamous floating point exception
|
#1 |
Member
|
I tried to modify the sonicFoam solver and it went through wmake with no errors. When I run it, I get:
Code:
/*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 1.6-f802ff2d6c5a Exec : mhdSonicFoam Date : Feb 01 2010 Time : 16:22:49 Host : stokes PID : 22919 Case : /home/kay/OpenFOAM/OpenFOAM-1.6/my-projects/new-nozzle nProcs : 1 SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Reading thermophysical properties Selecting thermodynamics package ePsiThermo<pureMixture<constTransport<specieThermo<eConstThermo<perfectGas>>>>> Reading field T Reading field U Reading/calculating face flux field phi Creating turbulence model Selecting turbulence model type laminar Starting time loop Time = 1e-05 #0 Foam::error::printStack(Foam::Ostream&) in "/home/kay/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so" #1 Foam::sigFpe::sigFpeHandler(int) in "/home/kay/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so" #2 ?? in "/lib/libc.so.6" #3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/home/kay/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so" #4 void Foam::divide<Foam::fvsPatchField, Foam::surfaceMesh>(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) in "/home/kay/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/mhdSonicFoam" #5 Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> > Foam::operator/<Foam::fvsPatchField, Foam::surfaceMesh>(Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> > const&, Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> > const&) in "/home/kay/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/mhdSonicFoam" #6 main in "/home/kay/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/mhdSonicFoam" #7 __libc_start_main in "/lib/libc.so.6" #8 _start at /build/buildd/glibc-2.9/csu/../sysdeps/x86_64/elf/start.S:116 Floating point exception Any help will be greatly appreciated. |
|
February 4, 2010, 05:49 |
|
#2 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
Hi Costas
It is very hard to say, as it is a custom solver, however look at error #4, and your are explicitly told that it has something to do with the division operator. You are probably dividing by zero somewhere in the source. Bests, Niels |
|
June 4, 2012, 04:48 |
|
#3 |
New Member
Learner
Join Date: Nov 2011
Location: Ingolstadt
Posts: 27
Rep Power: 15 |
Hi every1,
any concrete solution to the above problem? I have almost a similar problem but a little different. I am posting the failure below.. Create time Create fluid mesh for region fluid for time = 0 Create solid mesh for region aluminium for time = 0 *** Reading fluid mesh thermophysical properties for region fluid Adding to thermoFluid Selecting thermodynamics package hsRhoThermo<pureMixture<constTransport<specieTherm o<hConstThermo<perfectGas>>>>> #0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam/OpenFOAM-2.0.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam/OpenFOAM-2.0.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #2 __restore_rt at sigaction.c:0 #3 Foam::hsRhoThermo<Foam:ureMixture<Foam::constTra nsport<Foam::specieThermo<Foam::hConstThermo<Foam: erfectGas> > > > >::calculate() in "/opt/openfoam/OpenFOAM-2.0.1/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so" #4 Foam::hsRhoThermo<Foam:ureMixture<Foam::constTra nsport<Foam::specieThermo<Foam::hConstThermo<Foam: erfectGas> > > > >::hsRhoThermo(Foam::fvMesh const&) in "/opt/openfoam/OpenFOAM-2.0.1/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so" #5 Foam::basicRhoThermo::addfvMeshConstructorToTable< Foam::hsRhoThermo<Foam:ureMixture<Foam::constTra nsport<Foam::specieThermo<Foam::hConstThermo<Foam: erfectGas> > > > > >::New(Foam::fvMesh const&) in "/opt/openfoam/OpenFOAM-2.0.1/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so" #6 Foam::basicRhoThermo::New(Foam::fvMesh const&) in "/opt/openfoam/OpenFOAM-2.0.1/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so" #7 main in "/opt/openfoam/OpenFOAM-2.0.1/platforms/linux64GccDPOpt/bin/chtMultiRegionSimpleFoam" #8 __libc_start_main in "/lib64/libc.so.6" #9 Foam::regIOobject::writeObject(Foam::IOstream::str eamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/opt/openfoam/OpenFOAM-2.0.1/platforms/linux64GccDPOpt/bin/chtMultiRegionSimpleFoam" Fließkommafehler I tried the 'unset' fro $FOAM_SIGFPE but doesnt seem to work at all. Any ideas? IS there a problem with the libraries or the installation? |
|
June 4, 2012, 05:58 |
|
#4 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Nevertheless when I look at the stacktrace my guess is that we're looking at the "YouCan'tHavePressureZeroInACompressibleCase"-problem (so it is a setup problem) So: start the compilation of a Debug-version. While that is compiling you'll have time to look at your initial conditions ... Last edited by gschaider; June 4, 2012 at 06:11. Reason: One paste too many |
||
June 4, 2012, 06:28 |
|
#5 |
New Member
Learner
Join Date: Nov 2011
Location: Ingolstadt
Posts: 27
Rep Power: 15 |
Thank you for your response Mr.gschaider .... I am not trying to write a sovler myself, nut unfortunately I am receivng the same error as the one stated above, one of the reasons why I posted my situation here.
I use chtMultiRegionSimpleFoam as the std solver without modifications and also I use an incompressible case. I will definitely try with the debug version |
|
June 4, 2012, 19:24 |
|
#6 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Your problem may look similar but is not the same as the other: the stack trace is not the problem but a tool to help find the location of the actual problem and your stack trace and the one of the original poster show totally different locations in the important frames #3 and #4 |
||
August 13, 2012, 17:08 |
|
#7 |
Member
ak
Join Date: May 2011
Posts: 64
Rep Power: 15 |
Hi raghu
were you able to get rid of the floating point exception? what was the problem? Thanks ak |
|
August 14, 2012, 03:01 |
|
#8 | |
New Member
Learner
Join Date: Nov 2011
Location: Ingolstadt
Posts: 27
Rep Power: 15 |
Quote:
if you are refering to the problem I stated (please have a look at the stack trace once again as suggested by gschaider), then the solution to that is to input the perfect boundary conditions for temperature (if constant wall heat flux doesnt work, try constant wall temperature) in 0 folder. And please make doubly sure how the thermophysical properties have to be used (the syntax too). And yes, my problem is solved by doing the above. If all the above does not work, try to reduce the under-relaxation factor for temp. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Floating point exception error | Alan | OpenFOAM Running, Solving & CFD | 11 | July 1, 2021 22:51 |
Floating point exception error with small DeltaT | rassilon | OpenFOAM Running, Solving & CFD | 19 | September 2, 2009 08:39 |
turbFoam floating point exception and k-epsilon | Hectux | OpenFOAM Running, Solving & CFD | 4 | April 28, 2009 08:10 |
movingConeTopo tutorial from 1.5-dev crashes with Floating Point Exception | jaswi | OpenFOAM Running, Solving & CFD | 2 | April 26, 2009 11:21 |
[Gmsh] Gmsh and samplesurface | touf | OpenFOAM Meshing & Mesh Conversion | 2 | December 10, 2007 03:27 |