CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Two different version of OF in the same machine (http://www.cfd-online.com/Forums/openfoam-installation/106216-two-different-version-same-machine.html)

Gitesh P August 22, 2012 06:05

Two different version of OF in the same machine
 
Hello everyone,

I have already OF 1.7.x running in my machine. Now I want to install OF 2.1.0 version in the same machine.

I need both version on the same machine.

Can anyone suggest me how to do that ?

With best regards,
GP

anton_lias August 22, 2012 10:08

Hello Gitesh,

I do not think, that there will be any problems. Just install it and write into your “~/.bashrc” something like that

Code:

alias startOF210='source /opt/openfoam210/etc/bashrc'
alias startOF17x='source /opt/openfoam17x/etc/bashrc'

If you want to work with Openfoam17x run “startOF17x”, and if you want to work with OF210 run “startOF210”

I do not know, if the path for bashrc in “startOF17x” is right.

Gitesh P August 23, 2012 05:43

1 Attachment(s)
Hello Anton,

Thank you for quick reply !

Here I attach my bashrc file. Where I have added last line for running OF 1.7.x.

But as you suggest the two lines to add at bashrc file, but I am not getting where exactly to add those lines. Please check the file and guide me.

With regards,
Gitesh

anton_lias August 23, 2012 06:36

1 Attachment(s)
Hello Gitesh,

you should delete the last line (line 109: source $HOME/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc). Then insert this lines.
Code:

# OpenFOAM
alias startOF17x='source $HOME/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc'
alias startOF210='source /opt/openfoam210/etc/bashrc'

It does not matter where, but I would write it at the bottom of the file. The attached file is yours, with the lines added.

Gitesh P September 4, 2012 05:49

Hello Anton,

Thank you for your reply.
As you said, I have to modify the following lines in ./bashrc file.

alias startOF17x='source $HOME/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc'
alias startOF210='source /opt/openfoam210/etc/bashrc'

But, OF 1.7.x and OF 2.1.x both are at the same location (i.e., $HOME/OpenFOAM/ ...) in my computer.

So do I need to change the second line for OF 2.1.x ...?

What you say ?

With regards,
GP

wyldckat September 4, 2012 15:31

Greetings to all!

@Gitesh: You can have any alias you want! Here are some additional examples:
Code:

alias startOF21x='source $HOME/OpenFOAM/OpenFOAM-2.1.x/etc/bashrc'

alias OF20x='source $HOME/OpenFOAM/OpenFOAM-2.0.x/etc/bashrc'

alias of201='source /opt/openfoam200/etc/bashrc'

Best regards,
Bruno

Gitesh P September 10, 2012 10:28

Now it is working ...!!!

Thank you for your help :)

With regards,
Gitesh


All times are GMT -4. The time now is 02:55.