View Issue Details

IDProjectCategoryView StatusLast Update
0003103OpenFOAMBugpublic2018-11-08 22:02
Reportersdorof Assigned Tohenry  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionno change required 
Platformx86_64OSUbuntuOS Version16.04
Summary0003103: Floating point exception when using sensibleInternalEnergy thermophysical model
DescriptionThe cases which uses sensibleInternalEnergy model do crashes with Floating point exception.
Steps To Reproducecd $FOAM_TUTORIALS/compressible/rhoPimpleFoam/RAS/angledDuct
./Allrun

will give:

#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::heThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::init() at ??:?
#4 Foam::heThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::heThermo(Foam::fvMesh const&, Foam::word const&) at ??:?
#5 Foam::fluidThermo::addfvMeshConstructorToTable<Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > > >::New(Foam::fvMesh const&, Foam::word const&) at ??:?
#6 Foam::autoPtr<Foam::fluidThermo> Foam::basicThermo::New<Foam::fluidThermo>(Foam::fvMesh const&, Foam::word const&) at ??:?
#7 Foam::fluidThermo::New(Foam::fvMesh const&, Foam::word const&) at ??:?
#8 ? at ??:?
#9 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10 ? at ??:?
Floating point exception (core dumped)
TagsNo tags attached.

Activities

Juho

2018-11-07 18:22

reporter   ~0010160

It runs fine on my installation and converges in 10 iterations. Did you try cleaning up before recompiling after updating?
https://openfoam.org/download/source/compiling-openfoam/

henry

2018-11-07 18:24

manager   ~0010161

That case runs fine here:
.
.
.
Courant Number mean: 6525.72 max: 11819.3
Time = 10

PIMPLE: Iteration 1
smoothSolver: Solving for Ux, Initial residual = 3.99979e-06, Final residual = 1.897e-07, No Iterations 1
smoothSolver: Solving for Uy, Initial residual = 3.96522e-06, Final residual = 1.81161e-07, No Iterations 1
smoothSolver: Solving for Uz, Initial residual = 8.57918e-05, Final residual = 2.88255e-06, No Iterations 1
smoothSolver: Solving for e, Initial residual = 9.57074e-06, Final residual = 1.92354e-07, No Iterations 2
DICPCG: Solving for p, Initial residual = 2.90941e-06, Final residual = 8.47911e-08, No Iterations 72
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 5.7088e-05, global = 2.03412e-06, cumulative = 0.00362039
smoothSolver: Solving for epsilon, Initial residual = 9.49246e-07, Final residual = 9.49246e-07, No Iterations 0
smoothSolver: Solving for k, Initial residual = 3.29477e-06, Final residual = 6.67786e-07, No Iterations 1
PIMPLE: Converged
        Doing final iteration
PIMPLE: Iteration 2
smoothSolver: Solving for Ux, Initial residual = 3.85943e-06, Final residual = 1.85107e-07, No Iterations 1
smoothSolver: Solving for Uy, Initial residual = 3.87135e-06, Final residual = 1.73049e-07, No Iterations 1
smoothSolver: Solving for Uz, Initial residual = 8.35103e-05, Final residual = 5.37013e-07, No Iterations 2
smoothSolver: Solving for e, Initial residual = 1.71957e-05, Final residual = 2.68226e-07, No Iterations 2
DICPCG: Solving for p, Initial residual = 2.9113e-06, Final residual = 9.98896e-08, No Iterations 75
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 6.7257e-05, global = 7.03963e-07, cumulative = 0.00362109
smoothSolver: Solving for epsilon, Initial residual = 1.06635e-06, Final residual = 1.72941e-07, No Iterations 1
smoothSolver: Solving for k, Initial residual = 2.90732e-06, Final residual = 6.03334e-07, No Iterations 1
PIMPLE: Converged in 2 iterations
ExecutionTime = 41.13 s ClockTime = 41 s

End

sdorof

2018-11-07 20:13

reporter   ~0010163

I recompiled the sources but the crash still occurs.

It is what I did:

cd /path/to/OpenFOAM-dev
git pull
wclean all
wcleanPlatform
./Allwmake -j

I use clang-6 compiler, if it important. I attached a compilation log.
log.wmake.zip (141,071 bytes)

henry

2018-11-07 20:18

manager   ~0010164

It looks like the clang optimizer is generating incorrect code, try lowering the optimization level or use gcc instead.

sdorof

2018-11-08 06:54

reporter   ~0010167

Yea, there is no crash with gcc.

henry

2018-11-08 22:02

manager   ~0010170

This appears to be a bug in the clang-6 optimizer.

Issue History

Date Modified Username Field Change
2018-11-07 17:44 sdorof New Issue
2018-11-07 18:22 Juho Note Added: 0010160
2018-11-07 18:24 henry Note Added: 0010161
2018-11-07 20:13 sdorof File Added: log.wmake.zip
2018-11-07 20:13 sdorof Note Added: 0010163
2018-11-07 20:18 henry Note Added: 0010164
2018-11-08 06:54 sdorof Note Added: 0010167
2018-11-08 22:02 henry Assigned To => henry
2018-11-08 22:02 henry Status new => closed
2018-11-08 22:02 henry Resolution open => no change required
2018-11-08 22:02 henry Note Added: 0010170