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

Building OpenFOAM-2.2.x with Gcc-4.7.3 from scratch

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 16, 2013, 09:40
Default Building OpenFOAM-2.2.x with Gcc-4.7.3 from scratch
  #1
Member
 
Ferdinand Pfender
Join Date: May 2013
Location: Berlin, Germany
Posts: 40
Rep Power: 12
FerdiFuchs is on a distinguished road
Hi!

Im trying to install OpenFOAM with the gcc-4.7.3. Everything is done on scratch, i also dont have su/sudo permissions.

I changed the following lines in the ../OpenFOAM/etc/bashrc:

foamInstall=/disk1/users/fpfender/OF/$WM_PROJECT
export WM_COMPILER_DIR =/disk1/users/fpfender/OF/bin/gcc-4.7.3
export WM_NCOMPROCS=48
export WM_COMPILER=Gcc47

everything else is set on standard values.

When i start with ./Allwmake everything works fine, excepting a few errors, but my real problem is, it is still building with the (systemwide installed) Gcc-4.4.5 instead of my Gcc-4.7.3 from scratch.

Does anyone know how to solve this? If you need certain information, please let me know.

thanks,
FerdiFuchs

Last edited by FerdiFuchs; May 16, 2013 at 10:08.
FerdiFuchs is offline   Reply With Quote

Old   May 16, 2013, 17:12
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
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 FerdiFuchs and welcome to the forum!

From your description, I would guess that you are using CentOS or RHEL or SL 6.x.

A few weeks ago I wrote about how to build OpenFOAM 2.2.0 on CentOS 6.4, including instructions on how to build a custom Gcc 4.5: http://openfoamwiki.net/index.php/In...HEL#CentOS_6.4

You'll have to adapt the instructions accordingly to the version of Gcc you are trying to build, along with taking into account you're trying to build OepnFOAM 2.2.x .

edit: this thread may help you a bit as well: http://www.cfd-online.com/Forums/ope...-versions.html

Best regards,
Bruno
__________________

Last edited by wyldckat; May 16, 2013 at 17:13. Reason: see "edit:"
wyldckat is offline   Reply With Quote

Old   May 16, 2013, 17:23
Default
  #3
Member
 
Ferdinand Pfender
Join Date: May 2013
Location: Berlin, Germany
Posts: 40
Rep Power: 12
FerdiFuchs is on a distinguished road
hi wyldckat,

thanks for your help; but i think i already found a walkthrough.
im not quite sure, i think its a debian system.
the gcc-4.7.3 is already built, but ./Allwmake doesnt accept it from bashrc. i changed paths and version of the gcc in the OpenFOAM-2.2.x/etc/config/settings.sh and it works. Im also not sure if this was the right way to solve the problem. but it works.

edit: something is still strange: compiling takes very long, also with 48 processors.

Thanks a lot!
FerdiFuchs is offline   Reply With Quote

Old   May 16, 2013, 17:47
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
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 FerdiFuchs,

I forgot to mention that you should scale down to using only 8 cores, instead of 48. Otherwise, your machine is spending more time playing around with files, than doing actual compiling work

With 8 cores, it should take around 30-40 minutes. If it's taking longer than that, make sure you run the script to send (pipe) the output into a single file, like this:
Code:
./Allwmake > make.log 2>&1
This way it wont loose (as much) time outputting stuff onto the screen, which can get slow on machines with (very) old graphics card GPUs.

Another detail is that if I remember correctly, building OpenFOAM 2.2 with Gcc 4.7 gives a lot more warnings than building with Gcc 4.6 or 4.5. It might have been psychological on my part, but the warnings were so many, that it seemed to take longer to build...

Best regards,
Bruno
__________________
wyldckat 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
OpenFOAM vs Ubuntu 10.10 64 bit (and gcc 4.4.5) vkrastev OpenFOAM Bugs 0 February 17, 2011 06:27
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 wyldckat OpenFOAM Announcements from Other Sources 3 September 8, 2010 06:25
Experience in building OpenFOAM on LinuxIA64 Nils Smeds (Smeds) OpenFOAM Installation 43 July 25, 2010 09:09
New building machine for OpenFoam gerbervdgraaf OpenFOAM Installation 23 December 9, 2009 02:39
Building OpenFoAm on SGI Altix 64bits anne OpenFOAM Installation 8 June 15, 2006 09:27


All times are GMT -4. The time now is 17:06.