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

[OpenFOAM.org] OpenFOAM-dev on CentOS 7.9: Segmentation Fault when executing any application

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 1 Post By hendriks
  • 3 Post By wyldckat
  • 1 Post By funnyspell22

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 22, 2022, 05:26
Default OpenFOAM-dev on CentOS 7.9: Segmentation Fault when executing any application
  #1
Senior Member
 
JNSN's Avatar
 
Jan
Join Date: Jul 2009
Location: Hamburg
Posts: 144
Rep Power: 20
JNSN is on a distinguished road
Dear all,


I am facing a problem with a self compiled OpenFOAM-dev installation on a cluster running CentOS7.9:
As soon as there is any #include directive within the function list of the controlDict, every OpenFOAM application immediately exits with Segmentation fault (core dumped), as soon as it is called, even e.g. blockMesh -help

Compilation runs without any errror message. I used gcc7.3.1 from SCL devtoolset7, as the system gcc is verison 4.8.5, which does not support the c++14 option. I also tried clang version 7.0.1, with same result.

Does anyone have an idea? Of course I can avoid using includes, but thats not very convenient, and also I would like to understand, what's going on.


Thanks and best regards,
Jan
JNSN is offline   Reply With Quote

Old   March 18, 2022, 13:28
Default
  #2
New Member
 
Hendrik Söhnholz
Join Date: Sep 2020
Location: Braunschweig, Germany
Posts: 2
Rep Power: 0
hendriks is on a distinguished road
Hello Jan,

I had the same problem recently.

I tried to compile OpenFOAM-9 on CentOS 7 with GCC 7.3.1 from
devtoolset-7. I also tried with GCC 9 and Clang from the RHEL package
llvm-toolset-7. In all cases I got segmentation faults.

I solved this by compiling GCC 5.5.0 and using this to compile
OpenFOAM-9.

Unfortunately, the OpenFOAM developers don't specify which compilers
they use or have tested. The information on the website is outdated.

Best wishes,
Hendrik
JNSN likes this.
hendriks is offline   Reply With Quote

Old   March 21, 2022, 11:01
Default
  #3
Senior Member
 
JNSN's Avatar
 
Jan
Join Date: Jul 2009
Location: Hamburg
Posts: 144
Rep Power: 20
JNSN is on a distinguished road
Hi Hendrik,


thanks a lot for your reply! As soon as I find the time, I will compile GCC 5.5.0 and use it for building OF.


Best regards,
Jan
JNSN is offline   Reply With Quote

Old   October 7, 2022, 12:18
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
FYI: Solution for this specific problem reported here, in order to be able to use SCL's GCC builds: https://bugs.openfoam.org/view.php?id=3898


In a nutshell:
  1. Edit the file "src/OpenFOAM/db/dictionary/entry/entryIO.C"
  2. Go to line 159:
    Code:
                     && functionName == functionEntries::inputSyntaxEntry::typeName
  3. Change to this:
    Code:
                      && functionName == functionEntries::inputSyntaxEntry::typeName_()
  4. Save and close.
  5. Build OpenFOAM, no cleaning required, simply run Allwmake as per installation instructions.
hswzzz, Raphael_Santos and czzz like this.
__________________
wyldckat is offline   Reply With Quote

Old   February 21, 2023, 14:37
Default
  #5
New Member
 
Oliver stone
Join Date: Feb 2023
Posts: 3
Rep Power: 3
poltushima is on a distinguished road
That segmentation fault issue is frustrating, especially when you're trying to include directives in the controlDict. I've seen similar issues before and usually, and it's usually due to compatibility issues between different compilers. Have you tried reaching out to the OpenFOAM community for help? They might have some insights into what's causing the issue.
Also, CentOS 7 is reaching its end of life soon, so it'll stop receiving security updates and bug fixes. You may consider upgrading to a newer version with Extended Lifecycle Support (ELS).
poltushima is offline   Reply With Quote

Old   April 15, 2023, 17:58
Smile
  #6
New Member
 
Matt
Join Date: Aug 2020
Posts: 1
Rep Power: 0
funnyspell22 is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
FYI: Solution for this specific problem reported here, in order to be able to use SCL's GCC builds: https://bugs.openfoam.org/view.php?id=3898


In a nutshell:
  1. Edit the file "src/OpenFOAM/db/dictionary/entry/entryIO.C"
  2. Go to line 159:
    Code:
                     && functionName == functionEntries::inputSyntaxEntry::typeName
  3. Change to this:
    Code:
                      && functionName == functionEntries::inputSyntaxEntry::typeName_()
  4. Save and close.
  5. Build OpenFOAM, no cleaning required, simply run Allwmake as per installation instructions.
Finally, had spent two days compiling different gcc and mpi versions of OpenFOAM 9 on CentOS7 and this is what fixed everything. Thanks so much!
Raphael_Santos likes this.
funnyspell22 is offline   Reply With Quote

Old   October 2, 2023, 14:52
Default
  #7
New Member
 
Raphael Santos
Join Date: Oct 2013
Posts: 20
Rep Power: 13
Raphael_Santos is on a distinguished road
Thank you very much! It worked!
Raphael_Santos is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Frequently Asked Questions about Installing OpenFOAM wyldckat OpenFOAM Installation 3 November 14, 2023 12:58
Segmentation fault when running dieselFoam or dieselEngineFoam in parallel francesco OpenFOAM Bugs 4 May 2, 2017 22:59
Is Playstation 3 cluster suitable for CFD work hsieh OpenFOAM 9 August 16, 2015 15:53
'Segmentation fault: 11' on running application in parallel ulfaslak OpenFOAM Running, Solving & CFD 2 November 27, 2013 08:57
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 07:55


All times are GMT -4. The time now is 10:03.