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-dev-1.5 from CAE Team PPA (https://www.cfd-online.com/Forums/openfoam-installation/83121-openfoam-dev-1-5-cae-team-ppa.html)

vaina74 December 15, 2010 07:13

OpenFOAM-dev-1.5 from CAE Team PPA
 
Hi everybody.

Today I tried to install OF-dev-1.5 from CAE Team PPA and I followed the openfoamwiki instructions. Something went wrong because when I launch OFdev (this is my alias) I obtain:·
Code:

bash: /opt/OpenFOAM-1.5-dev/bin/foamCleanPath: Nessun file o directory
bash: /opt/OpenFOAM-1.5-dev/bin/foamCleanPath: Nessun file o directory
bash: /opt/OpenFOAM-1.5-dev/bin/foamCleanPath: Nessun file o directory
bash: /opt/OpenFOAM-1.5-dev/etc/settings.sh: Nessun file o directory
bash: /opt/OpenFOAM-1.5-dev/etc/apps/ensightFoam/bashrc: Nessun file o directory
bash: /opt/OpenFOAM-1.5-dev/bin/foamCleanPath: Nessun file o directory
bash: /opt/OpenFOAM-1.5-dev/bin/foamCleanPath: Nessun file o directory
bash: /opt/OpenFOAM-1.5-dev/bin/foamCleanPath: Nessun file o directory

The terminal is obviously right. I checked the folders above and they don't exist. How can I fix this trouble? Is it a package problem?
Thanks for your attention.

Regards,

Maurizio

vaina74 December 20, 2010 11:34

Any idea? :(

wyldckat December 20, 2010 16:46

Hi Maurizio,

I haven't tried to replicate your steps, but it seems pretty simple. In the wiki link you posted, it talks about:
Code:

alias startOF15dev="source /usr/lib/OpenFOAM-1.5-dev/etc/bashrc"
But the error messages you posted indicate that "/usr/lib/OpenFOAM-1.5-dev/etc/bashrc" doesn't have the proper definition for the variable "foamInstall", which in this case should be:
Code:

foamInstall=/usr/lib
So, you can edit the file by running:
Code:

gksu gedit /usr/lib/OpenFOAM-1.5-dev/etc/bashrc
It will ask for the user password, because for editing that file, root powers are going to be needed"

In case it already has the proper folder path, then it's another OpenFOAM environment that has been started prior to the alias call you do, because OpenFOAM's "bashrc" script will use the previously defined variable, rather than overwriting the value.
In other words, make sure all OpenFOAM environments are made only via alias; also make sure that you start a new terminal before calling the desired alias.

Best regards,
Bruno

vaina74 December 22, 2010 04:27

Thank you very much, Bruno.

I checked /usr/lib/OpenFOAM-1.5-dev/etc/bashrc and the variable foamInstall is defined properly. Then I sourced OpenFOAM-1.5-dev and it worked. What happened? In the meantime I already created an alias for OpenFOAM-1.7 (I installed it before OpenFOAM-1.5-dev and I didn't use alias):
Code:

# OpenFOAM 1.7
alias OF17="source /opt/openfoam171/etc/bashrc"
alias OFdev="source /usr/lib/OpenFOAM-1.5-dev/etc/bashrc"

but I didn't reload bashrc - a newbie error.
Now I have another trivial question about my OpenFOAM-1.5-dev installation. I have an OpenFOAM folder in home and it contains 2 folders: OpenFOAM-1.7.1 (with subdirectory run) and OpenFOAM-1.5-dev (with subdirectories application/bin and lib). I think that's a mistake (maybe I created them when sourcing was wrong), so I'm going to delete all OpenFOAM-1.5-dev subdirectories and make only one new folder run. Am I correct?

wyldckat December 22, 2010 18:42

Hi Maurizio,
Quote:

Originally Posted by vaina74 (Post 288095)
Now I have another trivial question about my OpenFOAM-1.5-dev installation. I have an OpenFOAM folder in home and it contains 2 folders: OpenFOAM-1.7.1 (with subdirectory run) and OpenFOAM-1.5-dev (with subdirectories application/bin and lib). I think that's a mistake (maybe I created them when sourcing was wrong), so I'm going to delete all OpenFOAM-1.5-dev subdirectories and make only one new folder run. Am I correct?

Well, I would first check if the folders "$HOME/OpenFOAM/OpenFOAM-1.*/applications/bin" have anything in them. Because if they have nothing, then you can erase them. And check if the other versions you installed in "/opt" and "/usr/lib", to see if they have source code in them.
There is a slight possibility that you might have a custom installation designed to make things easier for users to modify OpenFOAM code... but I doubt this is the situation.

Best regards,
Bruno

vaina74 December 23, 2010 04:36

Hi, Bruno. Thanks for your explanations. I installed OpenFOAM-1.5-dev (from CAE Team PPA) in another computer - it already included OpenFOAM-1.7.1. I correctly sourced both versions of OpenFOAM, I didn't mess anything up. I see again the two subdirectories $HOME/OpenFOAM/OpenFOAM-1.5-dev/applications/bin and $HOME/OpenFOAM/OpenFOAM-1.5-dev/lib and they are empty, so I agree with you:
Quote:

There is a slight possibility that you might have a custom installation designed to make things easier for users to modify OpenFOAM code
Anyway, I simply add a run folder.
Thanks for your help :)

aljaz December 29, 2010 03:08

Hi Maurizio!
I have the same problem as you, however I lost track at post #4. I added both aliases (OF15dev and OF17 - installed previously, worked ok) to .bashrc and reloaded it. But I still got the same response:
Code:

$ OF15dev
bash: /opt/OpenFOAM-1.5-dev/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.5-dev/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.5-dev/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.5-dev/etc/settings.sh: No such file or directory
bash: /opt/OpenFOAM-1.5-dev/etc/apps/ensightFoam/bashrc: No such file or directory
bash: /opt/OpenFOAM-1.5-dev/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.5-dev/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.5-dev/bin/foamCleanPath: No such file or directory

Did I miss some steps or is there anything else I should do?
Btw, I still have only previously existing ~/OpenFOAM/...-1.7.1/ directory.

Best regards,
Aljaz

aljaz December 29, 2010 04:13

Hi!
Just a short note from me:
I checked http://www.tfd.chalmers.se/~hani/kur...OwnLaptop.html
about OpenFOAM-dev-1.5 installation and there's a note "Note that the aliases will not work with this installation."
Any comments on this one?
Best regards,
Aljaz

wyldckat December 29, 2010 08:29

Greetings Aljaz,

Quote:

Originally Posted by aljaz (Post 288763)
Just a short note from me:
I checked http://www.tfd.chalmers.se/~hani/kurser/OS_CFD/OpenFOAMonYourOwnLaptop.html
about OpenFOAM-dev-1.5 installation and there's a note "Note that the aliases will not work with this installation."
Any comments on this one?

That's absolute nonsense :D What I think it might mean is that there are alias commands made in the official OpenFOAM that don't work in the -dev version. For example, if you run the command "foam", it will go to the base folder of the installed "OpenFOAM-1.xxx". Run "alias" and you will see the pseudo-commands that you have available :)

I believe the problem you are having is the same that Maurizio had at first - there is still a line lying around in the "~/.bashrc" with something just like this:
Code:

. /opt/openfoam171/etc/bashrc
Note that it doesn't have an alias in that line.
Then, you need to start a new terminal or console window/tab for the environment to be properly clean and devoid of remnants of previous OpenFOAM definitions.
To be sure that the environment is clean, try this:
Code:

export | grep -i -e "foam"
If anything is shown after this command is executed, then there is still some remnants lying around in "~/.bashrc". Remove them (the remnants), save the file and start another tab/window of the terminal/console.

Best regards,
Bruno

aljaz December 30, 2010 02:04

Thanks,
There was indeed such line that I overlooked before. Commenting solved the problem.
Best regards!

aljaz December 30, 2010 03:29

Adding one more ...
 
Hi!
I was interested if the same procedure worked for OF1.6-ext so I tried to install it too. This time it seemed all went smoothly, however at the end after calling alias of16ext, no directory for 1.6-ext has been created.
I created it manually, then I tried some tutorials and they worked fine.

With best regards,
Aljaz

vaina74 June 28, 2011 06:11

Dear Bruno (I hope you'll read this thread),

I'm sorry to annoy you again about the same, old problems. I just downloaded openFOAM 1.5-dev and 1.6-ext from CAE Team PPA and (automatically) installed all packages in /usr/lib64. Then I edited ~/.bashrc
Code:

alias OF15dev="source /usr/lib64/OpenFOAM-1.5-dev/etc/bashrc"
and sourced it, edited bashrc
Code:

foamInstall=/usr/lib64
in /usr/lib64/OpenFOAM-1.5-dev/etc.
When I launch the foamInstallationTest script in /usr/lib64/OpenFOAM-1.5-dev/bin, I get the following error
Code:

FATAL ERROR: OpenFOAM environment not configured.

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

What's wrong with my settings? Thanks for your attention.

UPDATE

Anyway, if anyone can suggests alternative ways to easily download and install an OpenFOAM 1.5-dev version (I don't know if the CAE Team packages are old)... :-)

elvis June 28, 2011 07:32

Hi,

I think the OF1.5-dev packages were made for the 2010 Gothenburg, Sweden Openfoam Workshop
So you might want to try the LiveDVD http://rcc.its.psu.edu/ofw6/ofw6_v8.iso for this years Openfoam Workshop with OF1.6-dev and 1.7.x installed side by side.

I found the LiveDVD very useful and made a permanent installation on my harddisc

vaina74 June 28, 2011 10:21

Hi, Elvis.
Thanks for your reply, but I can't download anything from your link. Anyway, any idea about the problem described before? I'm quite sure it's something quite stupid about settings (folders and so on) in some files in CAE Team packages, but I can't find it.

wyldckat June 28, 2011 18:44

Hi Maurizio,

I'm sorry, but:
Quote:

Originally Posted by vaina74 (Post 313861)
edited bashrc
Code:

foamInstall=/usr/lib64

why did you do this :confused:

I currently don't have the latest Ubuntu 11.04 64bit at hand, but my Ubuntu 10.10 64bit uses a symbolic link to do this:
Code:

ll /usr/lib64
lrwxrwxrwx 1 root root 3 20xx-xx-xx xx:xx /usr/lib64 -> lib

In other words, the installation should have worked as intended without further modifications.


But OK, assuming that the symbolic link does not exist - by the description you made:
Quote:

Originally Posted by vaina74 (Post 313861)
and sourced it, edited bashrc

You did it in the wrong order. You should have edited first (then save and close) and then source it ;)

Try starting a new terminal window and run the desired alias again, namely OF15dev and see if it's working or not ;)

Best regards,
Bruno

vaina74 June 29, 2011 04:08

You're right, I didn't realize lib64 is a symbolic link - I also use Ubuntu 10.04 LTS 64bit. Now my bahsrc file in /usr/lib64/OpenFOAM-1.5-dev/etc includes the original
Code:

foamInstall=/usr/lib
Now I'm not sure if I must add in ~/.bashrc
Code:

alias OFdev="source /usr/lib/OpenFOAM-1.5-dev/etc/bashrc"
or
Code:

alias OFdev="source /usr/lib64/OpenFOAM-1.5-dev/etc/bashrc"
Anyway, I get the same error with foamInstallationTest.

PS there was a mistake in the previous post: first I edited, then I sourced :-)

wyldckat June 29, 2011 04:27

Hi Maurizio,

Mmm... which Ubuntu version are you using? 10.04, 10.10 or 11.04? Lucid, Maverick or Natty? Knowing that, I can install it in a VM and test this myself :)

Best regards,
Bruno

vaina74 June 29, 2011 04:35

Thanks for your attention, Bruno.
I forgot to say I use Ubuntu 10.04 LTS 64bit - I quickly edited the previous message but I wasn't enough fast :-)

wyldckat June 29, 2011 16:50

Hi Maurizio,

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.

So here's what is going on:
  1. The variable $WM_THIRD_PARTY_DIR is not set, this is why both versions won't allow foamInstallationTest to proceed peacefully.
  2. The ThirdParty folder does not exist literally in these installations because the third party applications used are installed by Ubuntu (actually, by apt-get ;)) from other repositories.
  3. 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
    Code:

    mkdir -p $FOAM_RUN
    cp -r $FOAM_TUTORIALS $FOAM_RUN
    cd $FOAM_RUN/tutorials/incompressible/icoFoam/cavity
    blockMesh
    icoFoam
    paraFoam


Have fun ;) Best regards,
Bruno

vaina74 June 30, 2011 05:14

Thanks for your hint, I couldn't stop laughing for your educated quote :D

You're right, everything is OK with OpenFOAM 1.5-dev and OpenFOAM 1.6-ext from CAE Team PPA.
Now I'd like to change my settings, so I can use the last ParaView version. I tried to follow your great guide, but my case is slightly different. I already installed OpenFoam 2.0 via Ubuntu/Debian pack installation, so I followed your steps from point 7. I substituted .OpenFOAM with .foam in $WM_PROJECT_DIR/bin/paraFoam, but I can't find
Code:

paraview3=`$WM_PROJECT_DIR/bin/foamEtcFile apps/paraview3/bashrc` \
    && _foamSource $paraview3
unset paraview3

in $WM_PROJECT_DIR/etc/bashrc. I think I should edit something else in the file (maybe in $WM_PROJECT_DIR/etc/apps/ensightFoam/bashrc?), can you help me again please?

Best regards and THANKS.

wyldckat June 30, 2011 18:00

Hi Maurizio,

Check my blog post again! :) I have now updated the post to teach how to modify both OpenFOAM 1.7 and 2.0 :cool:

Best regards,
Bruno

vaina74 July 4, 2011 05:38

1 Attachment(s)
Hi, Bruno.

I think there was a misunderstanding - or maybe I was not able to get the right infos from your guide about ParaView. Anyway, today I'm not working with OpenFOAM 1.5-dev and the same computer as in last days (I have it back in one week), but I've just installed OpenFOAM 1.6-ext via CAE Team PPA on a new computer and I guess the procedure could be similar - from what I need for OpenFOAM 1.5-dev on the first one. In other words, $WM_PROJECT_DIR/etc/bashrc contains this rem lines (I'm talking about OpenFOAM 1.6-ext):
Code:

# Source user setup files for optional packages
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# _foamSource $WM_PROJECT_DIR/etc/apps/paraview/bashrc
# _foamSource $WM_PROJECT_DIR/etc/apps/paraview3/bashrc
#_foamSource $WM_PROJECT_DIR/etc/apps/ensight/bashrc

Besides that, $WM_PROJECT_DIR/bin/paraFoam doesn't include any .OpenFOAM or .foam (I attach the original file). Which editing am I supposed to do with both files? As you can see, there are some differences and I'm afraid to make a mistake. My aim is a 'link' between OpenFOAM 1.6-ext (or 1.5-dev) and the last ParaView version (installed with OpenFOAM 2.0 Debian/Ubuntu packages).
Thanks again for your help and pardon for my ignorance about linux and OpenFOAM :-/

wyldckat July 4, 2011 19:34

Hi Maurizio,

I'm sorry, I got lost in my own train of thought back then :(

OK, modifying paraFoam in 1.5-dev and 1.6-ext is not necessary at all :eek:! It's a script originally named pvFoam, it's not the original paraFoam script ;) So it will open .foam by default :D Says so on the line:
Code:

ext=foam
Now, be careful, because the next steps might blow your mind:
  • Install both Deb packages for OpenFOAM 2.0.0 and ParaView 3.10.1 from www.openfoam.com.
  • Then edit the bashrc files of 1.5-dev and 1.6-ext and change the line:
    Code:

    _foamSource $WM_PROJECT_DIR/etc/apps/paraview3/bashrc
    to:
    Code:

    _foamSource /opt/openfoam200/etc/config/paraview.sh
  • Start new terminals and/or run the desired alias name(s).
  • Go to the case your already ran.
  • Run paraFoam. Don't worry, it will run and exit, because this script is designed to allow the user to continue having access to the terminal window, while ParaView does its thing on the back/foreground.
    A few seconds later ParaView will pop up on the foreground or in the background and ready to show you the case!
And so there you have it: the details that had gotten lost in my train of thought :D

Best regards,
Bruno

vaina74 July 6, 2011 08:19

Hi Bruno,

now my $WM_PROJECT_DIR/etc/bashrc (OpenFOAM 1.6-ext via CAE Team PPA) includes
Code:

# Source user setup files for optional packages
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# _foamSource $WM_PROJECT_DIR/etc/apps/paraview/bashrc
# _foamSource $WM_PROJECT_DIR/etc/apps/paraview3/bashrc
#_foamSource $WM_PROJECT_DIR/etc/apps/ensight/bashrc
_foamSource /opt/openfoam200/etc/config/paraview.sh

The test case is OK and I don't see ParaView run and exit - maybe it's very fast :-D
Thank you, thank you very much for your help. I owe you a dinner, when you're in Venice or Trieste (Italy) :-)

wyldckat July 6, 2011 19:10

Hi Maurizio,

Quote:

Originally Posted by vaina74 (Post 314921)
The test case is OK and I don't see ParaView run and exit - maybe it's very fast :-D

Well, with me it was paraFoam that started and exited right away, while ParaView took a while starting in the background.

Quote:

Originally Posted by vaina74 (Post 314921)
Thank you, thank you very much for your help. I owe you a dinner, when you're in Venice or Trieste (Italy) :-)

You're very welcome :) I'm glad it's finally working! And thank you for the dinner offer :) I have no clue when I might go to Italy, but I'll try to keep in mind to ring you up when I do go to Italy ;)

Best regards,
Bruno


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