View Issue Details

IDProjectCategoryView StatusLast Update
0003695OpenFOAMBugpublic2021-07-28 11:40
ReporterjcramerAssigned Towill 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionno change required 
PlatformGNU/LinuxOSOtherOS Version(please specify)
Product Versiondev 
Fixed in Version 
Summary0003695: pitzDaily tutorial crashes
DescriptionThe pitzDaily tutorial crashes with a floating point exception. It runs fine if the streamlines #includeFunc is commented out.

```
streamlines streamlines:
    automatic track length specified through number of sub cycles : 5

streamlines streamlines write:
    seeded 10 particles
#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 ? in "/usr/lib/libc.so.6"
#3 Foam::streamlinesParticle::move(Foam::streamlinesCloud&, Foam::streamlinesParticle::trackingData&, double) at ??:?
#4 void Foam::Cloud<Foam::streamlinesParticle>::move<Foam::streamlinesCloud>(Foam::streamlinesCloud&, Foam::streamlinesParticle::trackingData&, double) at ??:?
#5 Foam::functionObjects::streamlines::track() at ??:?
#6 Foam::functionObjects::streamlines::write() at ??:?
#7 Foam::functionObjects::timeControl::write() at ??:?
#8 Foam::functionObjectList::start() at ??:?
#9 Foam::Time::loop() at ??:?
#10 ? in "/home/james/Downloads/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/bin/simpleFoam"
#11 __libc_start_main in "/usr/lib/libc.so.6"
#12 ? in "/home/james/Downloads/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/bin/simpleFoam"
Floating point exception (core dumped)
```
Steps To Reproducerun the pitzDaily tutorial
TagsNo tags attached.

Relationships

related to 0003699 closedwill blockMesh fails in movingCone case 

Activities

henry

2021-07-19 16:49

manager   ~0012085

Unable to reproduce, the case runs fine for me.

jcramer

2021-07-19 17:15

reporter   ~0012086

Last edited: 2021-07-19 17:21

View 2 revisions

Forgot to mention, I'm running this on Manjaro linux (Arch-based), not sure if that could be causing some weird issue. It's strange that it runs when streamlines is commented out in controlDict.

Any thoughts on why it would crash like this on streamlines?

Thanks for checking it out,

James

henry

2021-07-19 17:22

manager   ~0012087

I don't have Manjaro linux, maybe someone else can test that.

You could try OpenFOAM-8.

henry

2021-07-19 17:48

manager   ~0012088

What C++ compiler are you using and which version?

jcramer

2021-07-19 19:46

reporter   ~0012089

g++ (GCC) 11.1.0

henry

2021-07-19 20:03

manager   ~0012090

There are serious bugs in the optimiser in gcc-11, you will either have to reduce the optimisation level to O2 or use gcc-10

jcramer

2021-07-19 22:47

reporter   ~0012091

That was it!

To test it out I changed "export WM_COMPILE_OPTION=Opt" to "export WM_COMPILE_OPTION=Debug". Next, I'll have to figure out how to trigger the -O1 or -O2 flag instead of -O3.

Thanks for your help Henry!

jcramer

2021-07-20 00:48

reporter   ~0012092

-O2 works fine as well

henry

2021-07-20 09:45

manager   ~0012093

-O3 -fno-tree-slp-vectorize

also works.

henry

2021-07-26 15:34

manager   ~0012112

Alternatively you could switch-off floating-point exception handling:

unset FOAM_SIGFPE

will

2021-07-28 11:40

manager   ~0012114

This is a bug in gcc-11.1. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101634. It is fixed in gcc-11.2, which is being released today. Upgrading when this version becomes available on your operating system should resolve the issue.

Issue History

Date Modified Username Field Change
2021-07-19 16:25 jcramer New Issue
2021-07-19 16:49 henry Note Added: 0012085
2021-07-19 17:15 jcramer Note Added: 0012086
2021-07-19 17:21 henry Note Edited: 0012086 View Revisions
2021-07-19 17:22 henry Note Added: 0012087
2021-07-19 17:48 henry Note Added: 0012088
2021-07-19 19:46 jcramer Note Added: 0012089
2021-07-19 20:03 henry Note Added: 0012090
2021-07-19 22:47 jcramer Note Added: 0012091
2021-07-20 00:48 jcramer Note Added: 0012092
2021-07-20 09:45 henry Note Added: 0012093
2021-07-26 15:33 henry Relationship added related to 0003699
2021-07-26 15:34 henry Note Added: 0012112
2021-07-28 11:40 will Assigned To => will
2021-07-28 11:40 will Status new => closed
2021-07-28 11:40 will Resolution open => no change required
2021-07-28 11:40 will Note Added: 0012114