CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM Installation

Two different version of OF in the same machine

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   August 22, 2012, 07:05
Default Two different version of OF in the same machine
  #1
Member
 
Gitesh
Join Date: Jan 2010
Location: Finland
Posts: 60
Rep Power: 6
Gitesh P is on a distinguished road
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
Gitesh P is offline   Reply With Quote

Old   August 22, 2012, 11:08
Default
  #2
New Member
 
Join Date: Mar 2012
Posts: 18
Rep Power: 4
anton_lias is on a distinguished road
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.
anton_lias is offline   Reply With Quote

Old   August 23, 2012, 06:43
Default
  #3
Member
 
Gitesh
Join Date: Jan 2010
Location: Finland
Posts: 60
Rep Power: 6
Gitesh P is on a distinguished road
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
Attached Files
File Type: txt bashrc.txt (3.5 KB, 8 views)
Gitesh P is offline   Reply With Quote

Old   August 23, 2012, 07:36
Default
  #4
New Member
 
Join Date: Mar 2012
Posts: 18
Rep Power: 4
anton_lias is on a distinguished road
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.
Attached Files
File Type: txt bashrc.txt (3.5 KB, 4 views)
anton_lias is offline   Reply With Quote

Old   September 4, 2012, 06:49
Default
  #5
Member
 
Gitesh
Join Date: Jan 2010
Location: Finland
Posts: 60
Rep Power: 6
Gitesh P is on a distinguished road
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
Gitesh P is offline   Reply With Quote

Old   September 4, 2012, 16:31
Default
  #6
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,518
Blog Entries: 33
Rep Power: 74
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
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
wyldckat is offline   Reply With Quote

Old   September 10, 2012, 11:28
Default
  #7
Member
 
Gitesh
Join Date: Jan 2010
Location: Finland
Posts: 60
Rep Power: 6
Gitesh P is on a distinguished road
Now it is working ...!!!

Thank you for your help

With regards,
Gitesh
Gitesh P is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM on cluster: version GLIBCXX_3.4.9 and GLIBCXX_3.4.11 not found ovie OpenFOAM 9 October 15, 2012 02:59
wmake error zxj160 OpenFOAM 0 March 26, 2012 11:52
paraview installation woes vex OpenFOAM Installation 15 January 30, 2011 08:11
bubbleFoam validation case balkrishna OpenFOAM Running, Solving & CFD 24 August 30, 2010 05:37
Problem with paraFoam on a linux-64 bit bunni OpenFOAM Paraview & paraFoam 4 April 14, 2010 21:55


All times are GMT -4. The time now is 12:40.