CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   openfoam-1.6-ext on Ubuntu 10.10 Maverick (https://www.cfd-online.com/Forums/openfoam-installation/83771-openfoam-1-6-ext-ubuntu-10-10-maverick.html)

PeterII May 15, 2011 16:49

of15dev
 
Thank you Bruno, I recive this message in the terminal window
khaled@khaled-laptop:~$ of15dev

bash: /opt/OpenFOAM-1.5-dev/bin/foamCleanPath: Aucun fichier ou dossier de ce type

bash: /opt/OpenFOAM-1.5-dev/bin/foamCleanPath: Aucun fichier ou dossier de ce type

bash: /opt/OpenFOAM-1.5-dev/bin/foamCleanPath: Aucun fichier ou dossier de ce type

bash: /opt/OpenFOAM-1.5-dev/etc/settings.sh: Aucun fichier ou dossier de ce type

bash: /opt/OpenFOAM-1.5-dev/etc/aliases.sh: Aucun fichier ou dossier de ce type

bash: /opt/OpenFOAM-1.5-dev/etc/apps/ensightFoam/bashrc: Aucun fichier ou dossier de ce type

bash: /opt/OpenFOAM-1.5-dev/bin/foamCleanPath: Aucun fichier ou dossier de ce type

bash: /opt/OpenFOAM-1.5-dev/bin/foamCleanPath: Aucun fichier ou dossier de ce type

bash: /opt/OpenFOAM-1.5-dev/bin/foamCleanPath: Aucun fichier ou dossier de ce type

khaled@khaled-laptop:~$

wyldckat May 20, 2011 14:59

Isolate and conquer a rogue OpenFOAM environment :)
 
Hi Khaled,

Sorry for taking so long to answer you, but this week has been hectic for me...

I don't know if you've already managed to fix this issue, but here's what I suggest you do:
  1. Start a new terminal and do not activate any OpenFOAM environment (i.e., don't run of15dev or any other one aliases).
  2. Now run this command:
    Code:

    echo $WM_PROJECT_DIR
    • If it echoes something like:
      Code:

      /opt/openfoam171
      Then it means that there is a line in your "~/.bashrc" file that is contaminating the environment.
    • On the other hand, if it doesn't echo anything at all, then the environment should be clean. If so, skip the next points and try running of15dev.
  3. So, if it echoes a path to some OpenFOAM installation, then lets try and isolate where the problem is coming from. Edit your "~/.bashrc" file and comment out every single line after this (if I'm not mistaken):
    Code:

    # enable programmable completion features (you don't need to enable
    # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
    # sources /etc/bash.bashrc).
    if [ -f /etc/bash_completion ]; then
        . /etc/bash_completion
    fi

    Commenting out means that you should place a # before the line starts, like this:
    Code:

    # . /opt/openfoam171/etc/bashrc
    # alias of171='source /opt/openfoam171/etc/bashrc'
    # alias startOF16ext="source /usr/lib/OpenFOAM-1.6-ext/etc/bashrc"
    # alias startOF15dev="source /usr/lib/OpenFOAM-1.5-dev/etc/bashrc"

  4. Save and close the file.
  5. Start a new terminal. Try point 2 again. If it still shows the very same path from before, then you'll have to look even further back for any suspicious lines, thus repeating the same points from 3 and onward.
When you finally have isolated the line to be blamed, either remove it or create an alias for it, as shown before!

Then uncomment the lines you've commented, while testing any suspicious commands in the mean time... in other words, go back some of the changes you've made, while keeping an eye out for suspicious lines!


And don't forget that one shouldn't try to change the OpenFOAM environment to a different version on the same terminal that one is working on, unless one knows what one is doing! ;)
Or in other words: minimum of 1 terminal window/tab per OpenFOAM version!

Best regards and good luck!
Bruno

PeterII May 21, 2011 08:24

thank very much
 
Thank you bruno so much for this help. It's been a month since I'm stuck in this step. I find the suspect sentence . /opt/openfoam171/etc/bashrc in /etc/bash.bashrc file. After Commenting it and verifing that I do not recive in the terminal window /opt/openfoam171 when I run the command echo $WM_PROJECT_DIR, I added three aliases in bashrc file. It seem now that the three versions of OpenFOAM (1.7.1/1.5-dev/1.6-ext) works.
thank you again for this valuable assistance

gascortado July 20, 2011 07:41

OF-1.6-ext
 
Wyldckat you seem to be my only hope right now!

I have read countless forums and instructions trying to install OF-1.6-ext and I still cannot get it to work after 3 weeks of painful work.

I have Ubuntu 10.10 installed and OpenFOAM 1.6 is working fine. However I need OF-1.6-ext in order to use iciFsiFoam. I want to install it along side OF-1.6.

I followed the procedure using the Synaptic Manager. When I run foamInstallationTest I get the following error:

Third party software
-------------------------------------------------------------------------------
Software Version Location
-------------------------------------------------------------------------------
WARNING: gcc version does not match gcc supplied with this release of OpenFOAM
Supplied version: 4.3.3
User version : 4.4.5
Minimum required: 4.3.1

gcc 4.4.5
WARNING: Conflicting installations:
OpenFOAM settings : /home/santiago/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux/bin/gcc
current path : /usr/bin/gcc
CRITICAL ERROR

gzip 1.3.12 /bin/gzip
tar 1.23 /bin/tar
icoFoam /usr/lib/OpenFOAM-1.6-ext/applications/bin/icoFoam
-------------------------------------------------------------------------------


Summary
-------------------------------------------------------------------------------
Base configuration ok.

The foam installation contains 1 critical error(s).


This happens when my bashrc looks like this:

alias startOF16ext='source /usr/lib/OpenFOAM-1.6-ext/etc/bashrc'
. $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc

I also tried changing : ${WM_COMPILER:=Gcc43}; export WM_COMPILER at OpenFoam-1.6-ext/bashrc and hit ./Allwmake but I can never get this thing to compile without errors:

the errors are something like this one:

/usr/bin/ld: cannot find -lreactionThermophysicalModels
/usr/bin/ld: cannot find -lbasicThermophysicalModels
collect2: ld returned 1 exit status
make[2]: *** [/home/santiago/OpenFOAM/OpenFOAM-1.6-ext/applications/bin/linuxGccDPOpt/chemkinToFoam] Error 1
make[1]: *** [chemkinToFoam] Error 2


I would greatly appreciate any help. Thanks

wyldckat July 20, 2011 08:12

Hi Santiago,

OK, you've got this:
Quote:

Originally Posted by gascortado (Post 316762)
This happens when my bashrc looks like this:

alias startOF16ext='source /usr/lib/OpenFOAM-1.6-ext/etc/bashrc'
. $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc

Change it to this:
Code:

alias startOF16ext='source /usr/lib/OpenFOAM-1.6-ext/etc/bashrc'
alias startOF16='. $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc'

Save the file and start a new terminal window.

Now, whenever you start a new terminal, run either startOF16ext or startOF16, depending on the version you want. If you then want the other version, start it on another terminal! This way you won't have these problems with one environment contaminating the other one.

Last but not least, the 1.6-ext version you installed doesn't need further modifications. It should work right after you install it via Synaptic. If you modified it, then go to Synaptic, right click on the 1.6-ext packages and pick "re-install". Additionally, you should also install the openfoam-1.6-ext-dev package, since it gives you the development files for building other solvers!

Good luck!
Bruno

gascortado July 20, 2011 20:18

Thanks so much for answering this post. I changed the bashrc file as you said. I also re-installed all three packages: openfoam-1.6-ext, openfoam-1.6-ext-dev and openfoam-1.6-ext-doc using Synaptic. The installation shows no error.

When I run foamInstallationTest for OF-1.6 everything is cool, but when I switch using StartOF-1.6-ext (in a brand new terminal) I get this message:

Executing /usr/lib/OpenFOAM-1.6-ext/bin/foamInstallationTest:


Checking basic setup...
-------------------------------------------------------------------------------

FATAL ERROR: OpenFOAM environment not configured.

Please refer to the installation section of the README file:
<OpenFOAM installation dir>/OpenFOAM-1.6-ext/README
to source the OpenFOAM environment.

What should I do now? I really appreciate your help man.

wyldckat July 21, 2011 04:06

Hi Santiago,

I'm starting to hate foamInstallationTest... OK, maybe not hate, simply maybe disdain... :rolleyes:

I'm going to quote myself once again :)
Quote:

Originally Posted by wyldckat (Post 314122)
I don't know if you've ever seen or read the story about the "Wizard of Oz", but there is a scene where Oz says something like this:
Quote:

Originally Posted by http://www.youtube.com/watch?v=YWyCCJ6B2WE
Pay no attention to that man behind the curtain!

In this case, Oz is foamInstallationTest.

(...)

This script is not intended to be used when installing with .deb packages! If you want to test if it works, you simply take it for a spin, i.e. run the cavity tutorial from the User Guide :D Just like the official version states:
Quote:

Originally Posted by http://www.openfoam.com/download/ubuntu.php#x3-10000
mkdir -p $FOAM_RUN
cp -r $FOAM_TUTORIALS $FOAM_RUN
cd $FOAM_RUN/tutorials/incompressible/icoFoam/cavity
blockMesh
icoFoam
paraFoam


Have fun!
Bruno

gascortado July 21, 2011 06:41

YOU ARE THE MAN! You are right! I tested the cavity case and it works no problem! I can't tell you how much I appreciate your help! Have a great day!:):):):):):)

gascortado July 21, 2011 07:04

Oops, there is one problem that I just noticed. When I use OF-1.6-ext everything is fine. When I switch to OF-1.6 in a new terminal and I execute paraFoam, I get this error:


/home/santiago/OpenFOAM/ThirdParty-1.6/paraview-3.6.1/platforms/linuxGcc/bin/paraview-real: error while loading shared libraries: libQtAssistantClient.so.4: cannot open shared object file: No such file or directory


Any idea of what to do?

wyldckat July 21, 2011 16:03

Hi Santiago,

If you can install OpenFOAM 2.0 for Ubuntu, here's what you can do: http://www.cfd-online.com/Forums/ope...tml#post314692 post #23.
Well, in that post I explain how to make 1.5-dev and 1.6-ext use OF-2.0 version of ParaView. You simply have to adapt for your OF-1.6!

Best regards,
Bruno

gascortado July 26, 2011 13:20

Hi again Wyldckat.

Thanks so much for your help so far. The main reason why I need OF-1.6-ext is to be able to use icoFsiFoam. However, when I try to use the solver as it comes (by installing it form the Synaptic Package manger) it does not work. When I try to run icoFsiFoam i get this error: http://www.cfd-online.com/Forums/ope...tml#post317273

I checked and the files that are listed to be missing are actually present.
http://www.cfd-online.com/Forums/ope...tml#post317474

As I mentioned to you in another post, I also tried to compile icoFsiFoam and I get the following:

http://www.cfd-online.com/Forums/ope...tml#post317475

Again, when I checked for the missing files (tetMatrices stuff) they are present in OpenFOAM-1.6-ext/SRC/tetDecompositionFiniteElement/tetFemMatrix.

I'm starting to think that the compiler is not looking into the right place (I have OF-1.6 and OF-1.5-dev installed in my system as well). Do you have any idea or suggestion on how to proceed? Thanks in advance

wyldckat July 26, 2011 18:41

Hi Santiago,

:eek: 3 threads to choose from... I'll simply reply here what I did to get it working:
  1. Installed OpenFOAM-1.6-ext from the CAE Linux PPA.
  2. Got a snapshot of the mentioned tutorial from here: http://openfoam-extend.git.sourcefor...089684e;sf=tgz
  3. Then got the RunFunctions script from here: http://openfoam-extend.git.sourcefor...483fd9b2cf5f1e
  4. Unpacked the snapshot tarball.
  5. Went into the folder flappingConsoleSmall and edited the file Allrun, by changing the line:
    Code:

    . $WM_PROJECT_DIR/bin/tools/RunFunctions
    To this:
    Code:

    . ./RunFunctions
    Saved and closed the editor.
  6. Copied the RunFunctions file into the folder flappingConsoleSmall.
  7. Finally ran:
    Code:

    ./Allrun
    And there it went on cooking a part of the CPU :D
Then I stopped it at around 7 min and over 110000 lines in log.icoFsiFoam in the fluid folder. I stopped it because it was proven to be working and I have no idea what this solver does :(

Best regards,
Bruno

gascortado July 27, 2011 09:23

Thanks man, you saved me again! It worked. For some reason the RunFunctions are not found at $WM_PROJECT_DIR/bin/tools/RunFunctions, so I did what you proposed. I did have to modify the Allrun file as indicated here http://www.cfd-online.com/Forums/ope...tml#post309684 though.

Thanks again:D

wyldckat July 27, 2011 09:39

Quote:

Originally Posted by gascortado (Post 317711)
I did have to modify the Allrun file as indicated here http://www.cfd-online.com/Forums/ope...tml#post309684 though.

Thanks again:D

Ah, I did say that I only let it partially test the fluid part and that was all :) So I didn't trigger that problem with the solid part :)

You're welcome! And I'm glad I didn't have to build 1.6-ext either, because by what I've seen on the forum, it's a doozy to build the 3rd Party folder :(

gascortado July 28, 2011 07:37

Hi again Wyldckat

I think I'm starting to understand what the problem really is:

As of now, I have OF-1.6-ext installed using the Synaptic Manager into the usr/lib folder. Now, I also downloaded the binary files and those are at $HOME/OpenFOAM/OpenFOAM-1.6-ext.

I need to be able to compile some of the solvers since I need to modify them. For that I guess i need to use the binary files and therefore I need to compile OF-1.6-ext binaries.

I'm trying to source the bashrc by using

alias startOF16='. $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc'
alias startOF16ext ='. $HOME/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc


however that does not work since I get :

bash: alias: startOF16ext: not found
bash: alias: =. $HOME/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc: not found


What should I include in to .bashrc?

any idea of what to do?

PD: it seems that some of the folders required to compile some of the solvers are missing in the OF-1.6-ext version that I installed using Synaptic

wyldckat July 28, 2011 08:56

Hi Santiago,

Quote:

Originally Posted by gascortado (Post 317853)

alias startOF16ext='. $HOME/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc
'

You're missing an apostrophe at the end of that line! And there can't be any spaces between ext and "=".
When using Linux and OpenFOAM, one must pay very close attention to details! One wrong character somewhere and puff...

Anyway, if you installed both packages for OF 1.6-ext, namely openfoam-1.6-ext and openfoam-1.6-ext-dev, then you shouldn't need to build your own version of 1.6-ext. Nonetheless, if you do need the latest version of 1.6-ext then yes, you will need to build it yourself!

The following tutorial teaches (among other things) on how to create the solver for personal use, without the need to put it in the same folders as OpenFOAM's core code: http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam

The key details are:
  • Quote:

    Now go into the Make subdirectory and open the 'files' file with your favorite editor. Change it to read:
    Code:

    my_icoFoam.C
    EXE = $(FOAM_USER_APPBIN)/my_icoFoam


  • And for libraries, in the files file use FOAM_USER_LIBBIN.
This way you can even (try to) use your solvers and libraries with other OpenFOAM versions.

Best regards,
Bruno

gascortado July 29, 2011 22:16

Thanks again Bruno, as usual very thorough and clear.

I followed your direction regarding the creation of my_icoFoam and I it works no problem.

Now, I'm trying to compile a solver that can be downloaded here

http://www.cfd-online.com/Forums/ope...tml#post315130

When I run "wmake all" I get the following error:

santiago@santiago-laptop:~/OpenFOAM/santiago-1.6-ext/applications/solvers/testVorflexFoam$ wmake all

SOURCE=testVorflexFoam.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/usr/lib/OpenFOAM-1.6-ext/src/dynamicMesh/dynamicFvMesh/lnInclude -I/usr/lib/OpenFOAM-1.6-ext/src/dynamicMesh/dynamicMesh/lnInclude -I/usr/lib/OpenFOAM-1.6-ext/src/meshTools/lnInclude -I/usr/lib/OpenFOAM-1.6-ext/src/turbulenceModels/incompressible/turbulenceModel -I/usr/lib/OpenFOAM-1.6-ext/src/transportModels -I/usr/lib/OpenFOAM-1.6-ext/src/transportModels/incompressible/singlePhaseTransportModel -I/usr/lib/OpenFOAM-1.6-ext/src/finiteVolume/lnInclude -DFACE_DECOMP -I/usr/lib/OpenFOAM-1.6-ext/src/tetDecompositionFiniteElement/lnInclude -I/usr/lib/OpenFOAM-1.6-ext/src/dynamicMesh/meshMotion/tetDecompositionMotionSolver/lnInclude -IlnInclude -I. -I/usr/lib/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude -I/usr/lib/OpenFOAM-1.6-ext/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/testVorflexFoam.o
testVorflexFoam.C:41: fatal error: tetFemMatrices.H: No such file or directory
compilation terminated.
make: *** [Make/linuxGccDPOpt/testVorflexFoam.o] Error 1


Now, I was told here http://www.cfd-online.com/Forums/ope...tml#post317808 that the symbolic link to tetFemMatrices.H is missing. That is exactly the case. The whole lnInclude folder is missing in usr/lib/OpenFOAM-1.6-ext/src/tetDecompositionFiniteElement. I tried creating those links but when I try doing that I get "broken" links since I am "not the owner of the files and cannot change the permissions". In reality I am the owner of the system and I use my password every time I use "sudo"

Any suggestions or ideas of what to do?

Thanks again man, I really appreciate your help

wyldckat July 30, 2011 07:36

1 Attachment(s)
Hi Santiago,

:eek: I didn't know that 1.6-ext had so many rough edges..

OK, download the attached file and gunzip it. In my case, I put both packages on my user-1.6-ext folder and unpacked them both:
Code:

tar -xzf solverAndTestCaseFSI.tar.gz
gunzip SolverAndTestCaseFsi.patch.gz

And Yes, I advise to start it from scratch as well ;)

Then applied the patch and built the thing:
Code:

cd solverAndTestCaseFSI/testVorflexFoam/
patch -p1 < ../../SolverAndTestCaseFsi.patch
chmod +x Allwmake
wmake all

Et voilą, the goose is cooked :D

Now all it's left is to apply the previous instructions to the testCase...

Have fun!
Bruno

gascortado August 1, 2011 13:08

Thanks Bruno.

I already solved the problem by modifying the "files" file in the Make folder. I added the path to each of the "missing" symbolic link to the actual file location. I did this manually for each file. It took a little bit of time but eventually it worked. So I was able to successfully compile the solver.

Thanks again

msbealo October 7, 2011 11:05

Hi Guys,

I've been using OpenFoam for a few months now and thought I'd like to change to the git version (more up to date) and install the extended version (more functionality). I'm using Ubuntu 11.04. I successfully installed OF-2.0.x using the git distribution and hoped that the extended version would be along similar lines.

I had problem after problem and eventually gave up and went for the cae-team package instead. That's just install and I assume it'll work fine.

My problem is: The cae-team package looks quite out of date. I might be wrong but maybe 10 months or so old, so my questions are:

1) Are there any clearer instructions on how to install OF-1.6-ext on Ubuntu 11.04 using the git distribution. The OF-2.0.x instructions were quite clear and worked. I'm struggling with the third-party part of OF-1.6-ext as it's got lots of rpm related scripts that keep failing (even though rpm is stalled)

2) If I install the cae-team version, can I update it using git and recompile the updated parts, or do I have to wait for someone else to update it.

Thanks in advance,

EDIT: I just came across this thread and the link to the tutorial for Ubuntu 11.04. I've not tried it yet but it might at least answer my first point. Apologies for not seeing this earlier.


Mark


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