View Issue Details

IDProjectCategoryView StatusLast Update
0003436OpenFOAMBugpublic2020-01-24 23:02
ReportershadowfaxAssigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
PlatformLinuxOSUbuntuOS Version19.10
Product Versiondev 
Fixed in Version 
Summary0003436: buoyantPimpleFoam: hotRoom tutorial crash
DescriptionHello,

Running hotRoom tutorial with buoyantPimpleFoam solver results in Foam::error::printStack(Foam::Ostream&) error.
The problem seems to be related to setField utility as the temperature field is modified incorrectly.

The bousinesq version of this tutorial runs but the result is wrong due the incorrect setField modification.
This has been tested on clean compile OpenFOAM-dev:

commit f550db1a5f9a6bd348207d29679eed23bf80c785 (HEAD -> master, origin/master, origin/HEAD)
Author: Will Bainbridge <http://cfd.direct>
Date: Tue Jan 21 15:44:57 2020 +0000

    Scotch: Upgrade to 6.0.9
    
    This is to resolve a bug in the ptscotch rebalancing of the LES
    motorBike mesh when running with the new coupled patch ordering
Steps To Reproduce1- Navigate to the hotRoom tutorial case directory.
2- Run the case using the provided Allrun script.
TagsNo tags attached.

Activities

shadowfax

2020-01-24 14:17

reporter  

log.buoyantPimpleFoam (2,582 bytes)
log.setFields (1,306 bytes)
T (2,678 bytes)
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  dev
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    location    "0";
    object      T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 1 0 0 0];

internalField   uniform 300;

boundaryField
{
    floor
    {
        type            fixedValue;
        value           nonuniform List<scalar> 
400
(
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
1.4822e-323
1.4822e-323
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
1.4822e-323
1.4822e-323
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
)
;
    }
    ceiling
    {
        type            fixedValue;
        value           uniform 300;
    }
    fixedWalls
    {
        type            zeroGradient;
    }
}


// ************************************************************************* //
T (2,678 bytes)

henry

2020-01-24 17:35

manager   ~0011106

We are unable to reproduce this problem on either of the OSs we use: OpenSuSE or Ubuntu with any version of gcc we support or Clang. Maybe you have old versions of your own or other libraries which ldd is loading.

shadowfax

2020-01-24 18:10

reporter   ~0011107

Well I'm currently using Ubuntu 19.10 with gcc-9, can you confirm whether this configuration is supported or not?
The same issue happens with OpenFOAM.com version compiled with gcc-8.

Both versions are clean compiled to avoid any conflict.
Would you please provide the gcc version that you are currently using on your system?

Also I have attached the build log.

log.make (13,000 bytes)

henry

2020-01-24 19:26

manager   ~0011108

> Well I'm currently using Ubuntu 19.10 with gcc-9, can you confirm whether this configuration is supported or not?

Yes

> Would you please provide the gcc version that you are currently using on your system?

Generally I am using the system compiler on OpenSuSE Tumbleweed which is currently gcc-9.1.1 but also test with

gcc-4.8.5 gcc-4.9.4 gcc-5.5.0 gcc-6.1.0 gcc-6.5.0 gcc-7.2.0 gcc-7.3.0 gcc-7.4.0 gcc-8.1.0 gcc-8.2.0

which I compile from sources.

I also test clang-7.0.1 and icpc-19.0.4

shadowfax

2020-01-24 21:23

reporter   ~0011109

In order to clean compile with gcc-7, I completely removed my OpenFOAM-dev local repository.
Unfortunately, the problem is still there after recompiling the source.

Further investigating the issue, I can say that there is no problem with buoyantPimpleFoam solver. In fact, setField utility writes wrong values instead of the provided value defined by setFieldDict. In this case, It writes 1.4822e-323 instead of 600 for the temperature field and this cause floating point exception. Manually replacing all the occurrence of 1.4822e-323 with 600 and the solver runs just fine.

Also tried running the damBreak case with interFoam and while the case runs normally, for some reasons my text editor can not open the 0/alpha file after setField modification. It just crash...

I have tried both cases with OpenFOAM-2.4.0 and foam-extend-4.1 and there is no problem.

shadowfax

2020-01-24 23:02

reporter   ~0011110

sorry for the typo in my last note, I meant recompiling with gcc-8.
Now I have tried with gcc-7 and the problem is fixed.

The problem occurs when compiling with gcc-8 or gcc-9.

Issue History

Date Modified Username Field Change
2020-01-24 14:17 shadowfax New Issue
2020-01-24 14:17 shadowfax File Added: log.buoyantPimpleFoam
2020-01-24 14:17 shadowfax File Added: log.setFields
2020-01-24 14:17 shadowfax File Added: T
2020-01-24 17:35 henry Note Added: 0011106
2020-01-24 18:10 shadowfax File Added: log.make
2020-01-24 18:10 shadowfax Note Added: 0011107
2020-01-24 19:26 henry Note Added: 0011108
2020-01-24 21:23 shadowfax Note Added: 0011109
2020-01-24 23:02 shadowfax Note Added: 0011110