CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

xifoam..floating point error..any interpretations?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 11, 2012, 11:01
Default xifoam..floating point error..any interpretations?
  #1
Member
 
achinta
Join Date: May 2010
Location: Sydney
Posts: 66
Rep Power: 7
achinta is on a distinguished road
Hello,
I am using a version of XiFoam and i get the following error:
-----------------------------
[2] #0 Foam::error:rintStack(Foam::Ostream&) in "/gt/home/h250241/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[2] #1 Foam::sigFpe::sigHandler(int) in "/gt/home/h250241/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[2] #2 __restore_rt at sigaction.c:0
[2] #3 Foam::sqrt(Foam::Field<double>&, Foam::UList<double> const&) in "/gt/home/h250241/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[2] #4 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::sqrt<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<doub le, Foam::fvPatchField, Foam::volMesh> > const&) in "/gt/home/h250241/OpenFOAM/h250241-2.1.1/platforms/linux64GccDPOpt/bin/myXiFoam1"
[2] #5 main in "/gt/home/h250241/OpenFOAM/h250241-2.1.1/platforms/linux64GccDPOpt/bin/myXiFoam1"
[2] #6 __libc_start_main in "/lib64/tls/libc.so.6"
[2] #7 _start in "/gt/home/h250241/OpenFOAM/h250241-2.1.1/platforms/linux64GccDPOpt/bin/myXiFoam1"
[cubad10290:01470] *** Process received signal ***
[cubad10290:01470] Signal: Floating point exception (8)
[cubad10290:01470] Signal code: (-6)
--------------------------------------------
Any idea what it means? Could anybody tell where the error is originating. The solver runs fine for 2500 time steps and then diverges showing this error!!!

Kind regards,
A V
achinta is offline   Reply With Quote

Old   July 11, 2012, 15:40
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,507
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings Achinta,

See the line in bold below?
Quote:
Originally Posted by achinta View Post
Code:
[2] #0  Foam::error::printStack(Foam::Ostream&) in "/gt/home/h250241/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[2] #1  Foam::sigFpe::sigHandler(int) in "/gt/home/h250241/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[2] #2  __restore_rt at sigaction.c:0
 [2] #3  Foam::sqrt(Foam::Field<double>&, Foam::UList<double> const&) in "/gt/home/h250241/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[2] #4  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::sqrt<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) in "/gt/home/h250241/OpenFOAM/h250241-2.1.1/platforms/linux64GccDPOpt/bin/myXiFoam1"
[2] #5  main in "/gt/home/h250241/OpenFOAM/h250241-2.1.1/platforms/linux64GccDPOpt/bin/myXiFoam1"
[2] #6  __libc_start_main in "/lib64/tls/libc.so.6"
[2] #7  _start in "/gt/home/h250241/OpenFOAM/h250241-2.1.1/platforms/linux64GccDPOpt/bin/myXiFoam1"
[cubad10290:01470] *** Process received signal ***
[cubad10290:01470] Signal: Floating point exception (8)
[cubad10290:01470] Signal code:  (-6)
It indicates that a square root operation tried to do something it shouldn't, such as the square root of a negative number or something like that.

If you want to isolate better the problem, you'll need to do a debug build. Here's an old thread on this subject: Debug version of OpenFOAM-1.6

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   July 16, 2012, 10:52
Default
  #3
Member
 
achinta
Join Date: May 2010
Location: Sydney
Posts: 66
Rep Power: 7
achinta is on a distinguished road
Thanks for the reply Bruno. Some some equations are giving wrong results i guess. I will check. Btw, when i use 'foamToVTK' command to covert OpenFoam files to VTK format, i get the following error
-----
Internal : "/gt/home/h250241/OpenFOAM/h250241-2.1.1/run/tub_sst_piso1/VTK/t ub_sst_piso1_500.vtk"
#0 Foam::error:rintStack(Foam::Ostream&) in "/gt/home/h250241/OpenFOAM/OpenFO AM-2.1.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/gt/home/h250241/OpenFOAM/OpenFOAM-2.1.1/p latforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 __restore_rt at sigaction.c:0
#3 Foam::writeFuns::insert(double, Foam:ynamicList<float, 0u, 2u, 1u>&) in "/ gt/home/h250241/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/bin/foamToVTK"
#4 void Foam::writeFuns::insert<double>(Foam::List<double> const&, Foam:ynami cList<float, 0u, 2u, 1u>&) in "/gt/home/h250241/OpenFOAM/OpenFOAM-2.1.1/platform s/linux64GccDPOpt/bin/foamToVTK"
#5 void Foam::writeFuns::write<double>(std:stream&, bool, Foam::GeometricFiel d<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::vtkMesh const&) in "/ gt/home/h250241/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/bin/foamToVTK"
#6 void Foam::internalWriter::write<double, Foam::fvPatchField, Foam::volMesh>( Foam::PtrList<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) in "/gt/home/h250241/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/b in/foamToVTK"
#7 main in "/gt/home/h250241/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/ bin/foamToVTK"
#8 __libc_start_main in "/lib64/tls/libc.so.6"
#9 _start in "/gt/home/h250241/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOp t/bin/foamToVTK"
Floating point exception
-------------------
Well, it seems some operations are bad. But, i am just converting files. I am not doing any calculations. Do you know why this error is happening?

Kind regards,
Achinta
achinta is offline   Reply With Quote

Old   July 16, 2012, 18:42
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,507
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Achinta,

I think that error implies that the saved fields are already contaminated with either NaN or inf values.
If the option in "controlDict" is to use "ascii", you can open the field files for the "500" folder and check if there are values that are not numbers. If you find those values, then it's only natural that you can't export them to VTK.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   July 17, 2012, 04:41
Default
  #5
Member
 
achinta
Join Date: May 2010
Location: Sydney
Posts: 66
Rep Power: 7
achinta is on a distinguished road
Hi Bruno,
I checked all the files of that folder and i didn't find any NaN or inf. I have paraFoam installed on my laptop and i can open those files using paraFoam.

But, i couldn't install paraFoam on my Desktop but I have paraview. So, to view the results on my desktop i have to use foamToVTK command. But it gives this error when i try to convert. In fact, foamToVTK converted the files of other cases, but it's causing problem with this specific case only. Do i have to change any setting in system folder or something?

Thanks again,

Kind regards,
Achinta
achinta is offline   Reply With Quote

Old   July 17, 2012, 05:39
Default
  #6
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,507
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Achinta,

OK, I would suggest the following ideas:
  • Try foamToVTK on the "400" time folder, instead of the "500". If it works, then you've got noise in the "500" folder.
  • Try running this before foamToVTK:
    Code:
    unset FOAM_SIGFPE
    unset FOAM_SETNAN
  • Or create a dummy file named "case.foam":
    Code:
    touch case.foam
    And use ParaView to open that file (ParaView 3.8.0 or above). It will use the internal reader for opening the OpenFOAM case.
  • Are you using a virtual machine by any chance? If so, are you running the case inside a shared folder?
    If you are, then don't. Copy/move the VTK folder to a shared folder instead of running directly in it.
Let us know which one of these solved your issue.

Good luck!
Bruno
wyldckat is offline   Reply With Quote

Old   July 31, 2012, 05:05
Default
  #7
Member
 
achinta
Join Date: May 2010
Location: Sydney
Posts: 66
Rep Power: 7
achinta is on a distinguished road
Hi Bruno,
Sorry for the late reply. Other issues with OpenFoam had kept me busy

btw, i tried your suggestions and here are the results:
Method 1) It was giving same error with other folders too!!
Method 2) It works!! when i post-process results, all the parameters were within reasonable limits. No idea why it was giving sigFpe error

i have a question related to:
unset FOAM_SIGFPE
unset FOAM_SETNAN

Does it allow OpenFoam to run even if there are NaNs or Infs? The solver gives similar sigFpe error related to mutWallFunction with XiFoam and i would like the solver to run even if such error happens ( i guess few bad cells in my 'industrial' mesh are causing such errors and may not effect the overall solution. So i want to ignore such errors)

Thank you very much
Kind regards,
Achinta
achinta is offline   Reply With Quote

Old   July 31, 2012, 06:22
Default
  #8
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,507
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Achinta,

When FOAM_SIGFPE is turned on, it will not allow erroneous values to go around. But there are some situations where you can turn this off, at least until you can figure out the source of the problem.
It could even be an initialization that later on is dumped because new proper values are calculated.
This can be a fallacy, because you might be allowing crazy values to go into your simulation domain and wreck havoc sooner or later.
The right way to do this would be to diagnose where exactly the problem is and fix it properly.

As for FOAM_SETNAN, when turned on (not the default), I think it has to do with a method for initializing all fields with NAN, to help diagnose situations where non-initialized fields are being used and which can lead to crazy or unreproducible results.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
XiFoam floating point error..mut error? achinta OpenFOAM 8 July 31, 2012 04:48
error EOF in blockMesh Ahmed Khattab OpenFOAM Meshing & Mesh Conversion 7 May 17, 2012 00:37
MPI Error - simpleFoam - Floating Point Exception scott OpenFOAM Running, Solving & CFD 3 April 13, 2012 16:34
block-structured mesh for t-junction Robert@cfd ANSYS Meshing & Geometry 20 November 11, 2011 05:59
Gmsh and samplesurface touf Open Source Meshers: Gmsh, Netgen, CGNS, ... 2 December 10, 2007 03:27


All times are GMT -4. The time now is 06:32.