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

Inconsistency in gcc component versions

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 16, 2013, 10:58
Default Inconsistency in gcc component versions
  #1
Member
 
P.A.
Join Date: Mar 2009
Location: Germany
Posts: 83
Rep Power: 17
blaise is on a distinguished road
Hi Foamers,

I am trying to install OF2.2.x from the git source on CentOS6.4 64bit (from march 12th) in a virtual box container on an openSuSe12.3 host, for testing purposes. CentOS6.4 comes with a slightly outdated version of gcc (4.4.7) which is not sufficient for OF2.2.x. (Beside this, the cmake version from the CentOS repo is also way too old for the included ParaView). Anyway, I made my way through the essentials of the ThirdParty stuff, but got stuck in the OpenFOAM compilation because of an error with a "triad::... " class definition (which was already comprehensively commented on by wyldckat (thank you for that!) in http://www.cfd-online.com/Forums/ope...edhat-el5.html). I concluded I had to use a more recent version of gcc. So I run the
makeGcc47
script in ThirdParty and had to download gcc and the well known additions with the following versions:
gmp-5.0.2
mpfr-3.0.1
mpc-0.9
gcc-4.7.1

I had to add the configure option --disable-multilib in makeGcc47, and gcc-4.7.1 compiled.

In OpenFOAM-2.2.x/etc/config/settings.sh I set
foamCompiler=ThirdParty
and
export WM_COMPILER=Gcc47

However, when I run Allwmake in OpenFOAM-2.2.x with this newly compiled gcc-4.7.1, the script stops because gcc version 4.7.2 (not 4.7.1 as in the ThirdParty section) is expected due to the default settings in etc/config/settings.sh. Along with this, it also expects

gmp_version=gmp-5.0.4
mpfr_version=mpfr-3.1.0
mpc_version=mpc-0.9

So the whole OF2.2.x package as drawn from the git repo needs 2 compilers?

Am I the only one who runs into this inconsistency? Why is it there?

As a solution I simply altered the version numbers in the respective section of settings.sh to the ones I have in ThirdParty, and everything seems to compile fine (still running).

I hope someone can shed some light on this, and perhaps my findings may help someone else too.

Best regards,

Pascal.
blaise is offline   Reply With Quote

Old   May 16, 2013, 17:19
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
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
Greetings Pascal,

You can choose the version when building Gcc 4.7 like this:
Code:
./makeGcc47 gcc-4.7.2
What probably happened was that the script was adapted from makeGcc46 soon after 4.7.1 was released, but later they changed in OpenFOAM's "settings.sh" to 4.7.2 for some reason. More specifically, probably to emphasise the version of Gcc 4.7 they've used for testing.

And since the makeGcc47 script allows for defining the version at runtime, they probably didn't bother changing the version number. And/or who made the package for the ThirdParty folder didn't have the latest scripts...

Either way, you can report this at OpenFOAM's bug tracker: http://www.openfoam.org/mantisbt/my_view_page.php

edit: By the way, this isn't the first time this happens... if you check the other "makeGcc*" scripts and compare to "settings.sh", you'll see that the versions don't always match up...

Best regards,
Bruno
__________________

Last edited by wyldckat; May 16, 2013 at 17:21. Reason: see "edit:" and changed "bashrc" to "settings.sh"
wyldckat is offline   Reply With Quote

Old   May 17, 2013, 08:09
Default
  #3
Member
 
P.A.
Join Date: Mar 2009
Location: Germany
Posts: 83
Rep Power: 17
blaise is on a distinguished road
Hello Bruno,

thank you for the quick response! That makes things clearer. I must admit, I didn't look closely enough at the option parsing capability of makeGcc47. If I understand this right, one could circumvent the problems by giving the following options according to what is set for the respective gcc version in settings.sh? E.g. for gcc-4.7.2:
./makeGcc47 gmp-5.0.4 mpfr-3.1.0 mpc-0.9 gcc-4.7.2

That should do the trick, right?

I will try to make my first bug report with this issue, as you recommended.

Regards,

Pascal.
blaise is offline   Reply With Quote

Old   May 17, 2013, 17:37
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
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
Hi Pascal,

Quote:
Originally Posted by blaise View Post
E.g. for gcc-4.7.2:
./makeGcc47 gmp-5.0.4 mpfr-3.1.0 mpc-0.9 gcc-4.7.2

That should do the trick, right?
Yes, that's the idea!

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Momentum source coefficient, cylindrical coordinates, circumferential component? polakse CFX 15 January 18, 2016 02:40
Patches for OpenFOAM 1.7 on MacOS X gschaider OpenFOAM Installation 101 September 21, 2011 05:37
Gerris software installation mer Main CFD Forum 2 November 12, 2005 08:50
Diffusion component at inlet Balaji FLUENT 2 August 8, 2005 07:37
UDF component in Cyliderical Velocity? Hongchan Kim FLUENT 3 April 24, 2001 12:20


All times are GMT -4. The time now is 16:59.