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

c++ libraries and solver compiling

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   January 19, 2011, 19:07
Default
  #6
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 Maurizio,

About the PPA version, did you run this command?
Code:
sudo apt-get install openfoam-dev-1.5-dev
Notice that there are two "-dev"! Then you have to start a new terminal and activate the respective environment.



As for the 1.5-dev version you have in "/opt":
  • Well, "/opt" allegedly is only the default installation folder for when installing in shared computers or clusters, or when installing with a ".deb" or ".rpm" package. The pain with this kind of installation is that most people will build OpenFOAM with root permissions, so it can be automatically placed in the "/opt" folder, since it's the easiest way. It's also potentially the most dangerous way of doing this, since if something goes wrong in a path definition somewhere during the build process, you could damage the Linux installation.
  • Secondly, as far as I can figure it out, the problem you are having is that the 1.5-dev version was installed in its already built version, without gcc 4.3.1 in the ThirdParty folder for 1.5-dev. In other words, you can use that OpenFOAM 1.5-dev installation, with the symbolic links fix, but you cannot build applications with gcc 4.4.3 to work with the one built with 4.3.1. At least, it's what I've been able do deduce from the information you provided.
So, how to fix this crazy ordeal? The simplest way I can think of is to rebuild 1.5-dev with your Ubuntu's gcc 4.4.3:
  1. First of all, DO NOT CHANGE TO ROOT user. Run this command for enabling your user direct access to the OpenFOAM folder in "/opt":
    Code:
    sudo o+w -R /opt/OpenFOAM
  2. Edit the file "/opt/OpenFOAM/OpenFOAM-1.5-dev/etc/settings.sh" and change where it says:
    Code:
    : ${compilerInstall:=OpenFOAM}
    change it to:
    Code:
    : ${compilerInstall:=system}
    It might not be exactly this line, but what matters is changing "OpenFOAM" to "system".
    Save and close.
  3. Start a new terminal and activate the respective environment:
    Code:
    . /opt/OpenFOAM/OpenFOAM-1.5-dev/etc/bashrc
  4. Make sure you have allocated all of the processing power in your machine to be used for building OpenFOAM 1.5-dev:
    Code:
    export WM_NCOMPPROCS=$(egrep "^processor" /proc/cpuinfo | wc -l)
    Or simply, for example:
    Code:
    export WM_NCOMPPROCS=4
    if your machine has 4 cores/threads.
  5. Clean up and fully build OpenFOAM 1.5-dev:
    Code:
    cd $WM_PROJECT_DIR
    wcleanAll
    ./Allwmake > make.log 2>&1
    And wait a while... it takes about 20-30min on an i7 920, up-to 6h on a single core 2GHz machine...
    In the file "make.log" will be stored all of the messages for the whole build process.
  6. When it's done, run:
    Code:
    grep -e "Error " make.log | wc -l
    Notice the space between the word Error and the quote symbol. This command should give you the count of the number of errors that might have occurred during the build process:
    • If 0 is the resulting value, then all is well.
    • If a non zero value is returned, then something went very wrong Run:
      Code:
      tar -czf make.log.tar.gz make.log
      and attach the file on your next post.
  7. Finally, if all went well, reverse the first step:
    Code:
    sudo o-w -R /opt/OpenFOAM
And hopefully, you should be able to build any and all applications and libraries for OpenFOAM 1.5-dev. And remember that you should copy the desired tutorial case or the whole tutorials folder to your user folder, so you can keep the version in "/opt" untouched!

As for making the ParaView version from OpenFOAM 1.7 work with 1.5-dev... I'll try to explain that tomorrow I'm too tired today...

Best regards and good luck!
Bruno
__________________
wyldckat is offline   Reply With Quote

 


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
ANSYS Workbench on "Uncertified" Linux Distros hsr CFX 289 April 20, 2023 09:23
Compilation problem after modifying a solver. PetSul OpenFOAM Running, Solving & CFD 2 October 1, 2009 17:28
FEM Solver triggerfish OpenFOAM 1 April 27, 2009 10:31
Could you comare StarCD with CFX 5?Help, please... Suteh CFX 54 November 7, 2001 20:12
Mesh generator and CFD solver Gennady Kireyko Main CFD Forum 0 May 6, 2001 11:13


All times are GMT -4. The time now is 09:27.