|
[Sponsors] |
OpenFOAM 1.6.x, 1.7.0 and 1.7.x are not fully prepared to work with gcc-4.5.x |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 7, 2010, 19:01 |
[SOLVED]OpenFOAM 1.6.x, 1.7.0 and 1.7.x are not fully prepared to work with gcc-4.5.x
|
#1 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Dear OpenFOAM developers,
After various trial-and-errors with various distros and gcc 4.5.x versions, I've come to the conclusion that OpenFOAM's 1.6.x, 1.7.0 and 1.7.x versions (at least until today's 12pm UTC) have serious problems with the gcc 4.5 series. List of distros/builds tested (all double precision):
The pitzDailyExptInlet case failed when running simpleFoam, quitting with a "DTRIS2 - Fatal error!" message (and respective stack dump); checkMesh doesn't give any indications that the mesh is flawed. Additionally, I've seen another bug report made a few days ago that points to another issue that I didn't detect (since the applications didn't crash with that tutorial case), but it should also be because of OpenSUSE's 11.3 gcc 4.5.0: porousSimpleFoam bug in 1.7.x So, in the short run, I suggest that you add a note in the source/git pages warning about gcc 4.5! Because I remember that when OpenFOAM 1.6 was released, it simply didn't build with gcc 4.4, so that refrained most users from aimlessly using it and simply switched to the custom gcc 4.3.3 build. But in this case, it's seriously worse: OpenFOAM 1.6.x-1.7.x do build with gcc 4.5 and have no explicit warning (that I've seen) indicating that OpenFOAM might not work properly! Side note for OpenSUSE 11.3 users: you can install gcc 4.3.4 in YaST, thus avoiding the need to do a custom gcc build. Best regards, Bruno EDIT: see post #10 for the fix for OpenFOAM 1.6.x and 1.7.0. OpenFOAM 1.7.x is now fixed.
__________________
Last edited by wyldckat; August 19, 2010 at 12:19. Reason: added prerelease date for gcc-4.5.1; now SOLVED. |
|
August 8, 2010, 03:29 |
|
#2 |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
I can confirm this problem. The meshes generated in the test cases you listed are not valid, and the solver fails before performing the first iteration. This happens on openSUSE 11.3 - gcc 4.5.0 20100604 [gcc-4_5-branch revision 160292] - 64 bit.
The problem with simpleFoam on pitzDailyExptInlet seems of different origin, and related to a segFault(int) in the timeVaryingMappedFixedValueFvPatchField boundary condition. Thanks for reporting this, even if they're not good news, since I have to validate a code again, since I wrote and developed it only with gcc 4.5 on openSUSE 11.3. :-(
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. |
|
August 9, 2010, 09:52 |
|
#3 |
New Member
Claus H. Ibsen
Join Date: Mar 2009
Location: Denmark
Posts: 6
Rep Power: 17 |
I have tested that porousSimpleFoam gives correct result when compiling 1.7.x with gcc 4.3.4 in openSUSE 11.3
Thanks, Claus. |
|
August 9, 2010, 11:04 |
|
#4 |
New Member
Andrew Heather
Join Date: Mar 2009
Posts: 16
Rep Power: 17 |
Thanks for the report - we will look into it.
Andy |
|
August 9, 2010, 11:19 |
|
#5 |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
Results are fine also with gcc 4.5.x, so it seems a limited problem :-)
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. |
|
August 9, 2010, 13:01 |
|
#6 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quote:
Alberto, could you please you specify if 4.5.x>=4.5.1 or 4.5.x>4.5.1? Best regards, Bruno
__________________
|
||
August 9, 2010, 13:24 |
|
#7 |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
No, I cannot confirm 4.5.x, with x >= 1, since I use 4.5.0 (fcc version 4.5.0 20100604 [gcc-4_5-branch revision 160292] (SUSE Linux)) in openSUSE 11.3. What I meant is that in general, code works, and results are reliable, but I can reproduce the problems you reported. The problem seems limited to a few parts of the code however.
Best,
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. |
|
August 17, 2010, 04:50 |
|
#8 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
I've done a bit of digging and see problems running valgrind on blockMesh for the potentialFoam/cylinder tutorial. It somewhere calls arcEdge:osition(..) and this seems to reference an uninitialised location in the coordinate system. I cannot see anything wrong in the code. If I compile all of the relevant code with -O0 or -O1 it runs through fine so my current guess is that there is an optimiser bug in 4.5.
This is gcc-4.5.0 release, 64bit on Ubuntu. Can someone try using -O1? (change in $WM_DIR/rules/$WM_ARCH$WM_COMPILER/c++Opt) |
|
August 17, 2010, 08:00 |
|
#9 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
On my local blockMesh compilation I can trigger the uninitialised location problem by adding -fstrict-aliasing to -O1 compilation. So it works with plain -O1 but not anymore if I add the -fstrict-aliasing optimisation (this is one of the optimisations switched on by -O2).
|
|
August 17, 2010, 19:37 |
Problem Solved?!
|
#10 | ||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
Quote:
I've only tested with 32 bit builds so far:
Code:
cd $WM_DIR/rules cp -r linuxGcc linuxGcc45 cp -r linux64Gcc linux64Gcc45 for file in linux64Gcc45/c++Opt linux64Gcc45/cOpt linuxGcc45/c++Opt linuxGcc45/cOpt do sed -i -e 's=-O3=-O3 -fno-strict-aliasing=' $file done NOTE2: I think I overdid it in adding it to cOpt too... I also changed the WM_COMPILER option in "$WM_PROJECT_DIR/etc/bashrc" from Gcc to Gcc45, so these new rules could be used. So, if more people can confirm this, then I can edit the title in the first post to add [SOLVED] to it Side note: I've got the impression that the "-Wno-strict-aliasing" option in "c++WARN", which is in the local "c++" rule file, is what has been hiding this issue with gcc 4.5.x... but I haven't tested removing that option, because I've got a feeling that a lot of warnings are going to pop up during Allwmake... Side note 2: Mattijs, you mentioned that something got broken in gcc 4.5.0... here is the release note associated to this flag: Quote:
Bruno
__________________
Last edited by wyldckat; August 17, 2010 at 19:42. Reason: added "Side note 2" |
|||
August 18, 2010, 02:07 |
|
#11 |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
I can reproduce what observed by Bruno on my openSUSE 11.3.
Best,
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. |
|
August 18, 2010, 10:18 |
|
#12 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
Thanks. It seems to be the aliasing in Tensor.H. I think I've got the fix. Will push once tested.
|
|
August 19, 2010, 12:12 |
|
#13 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
I've pushed a fix into 1.7.x. It will force a full rebuild. The problem was that we were slicing a Tensor into three vectors and this works only under some circumstances.
Changes: - Tensor::x(), y() etc. return a (const) vector, not a const reference. (the returned vector is const for now to catch illegal use) - There are no more non-const x(), y(),z() functions to inplace modify vectors of the tensor. You'll have to create a new tensor and assign. There is a new construct-from-vectors constructor for tensors. - Fed through these changes (return copy, not reference) into coordinateSystem,coordinateRotation - removed the Wno-strict-aliasing warning suppression Thanks all for reporting, Mattijs |
|
August 21, 2010, 18:19 |
|
#14 |
Member
Paulo Bufacchi
Join Date: Jun 2010
Posts: 50
Rep Power: 16 |
guys,
I couldn't be more confused. I'm using Suse 11.3 and tried to rollback to gcc 4.3.4 and recompile OF 1.7.x. It was a total disaster. Are you going to deliver the OF 1.7.x code ready for gcc 4.5.0? If yes, do you have a delivery date? Thanks, Paulo |
|
August 21, 2010, 18:56 |
|
#15 |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
It has already been delivered, as per Mattijs post above you.
Simply run 'git pull' in your OpenFOAM/OpenFOAM-1.7.x and then rebuild it with ./Allwmake Best,
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. |
|
October 19, 2010, 14:51 |
OF-1.6 and OpenSUSE 11.3
|
#16 |
Member
|
Dear colleagues!
I have a problem with OF-1.6 installation on OpenSUSE-11.3. All third party software have installed ok, but OF itself - not. I've tried to change the wmake rules as you advise, but that didn't help. Did anyone try to install OF-1.6 on Suse 11.3? Please, help! Best regards, Aleksey. |
|
October 19, 2010, 15:11 |
|
#17 |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
I would suggest to use 1.7.1 or 1.7.x, since it works out of the box on openSUSE 11.3.
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. |
|
October 19, 2010, 19:23 |
|
#18 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Greetings to all! Aleksey,
Quote:
So, if you really need OpenFOAM 1.6 working on your OpenSUSE 11.3, then follow these instructions for building gcc 4.3.3: "Installation" page on openfoamwiki.net - section "2.3.5.2 Building" It also explains on how to use gcc 4.3.3 with OpenFOAM 1.6 Best regards, Bruno
__________________
Last edited by wyldckat; October 19, 2010 at 19:24. Reason: "greetings" typo... |
||
October 21, 2010, 06:51 |
|
#19 |
Member
|
All my solvers have been successfully compiled in OF1.7.1. So, I don't need OF-1.6 any more :-)
Thanks for help, gentlemen! |
|
Tags |
gcc-4.5.0, gcc-4.5.?, gcc-4.5.x |
|
|