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

Two different version of OF in the same machine

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 22, 2012, 06:05
Default Two different version of OF in the same machine
  #1
Member
 
Gitesh
Join Date: Jan 2010
Location: Finland
Posts: 73
Rep Power: 16
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, 10:08
Default
  #2
New Member
 
Join Date: Mar 2012
Posts: 18
Rep Power: 14
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, 05:43
Default
  #3
Member
 
Gitesh
Join Date: Jan 2010
Location: Finland
Posts: 73
Rep Power: 16
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, 9 views)
Gitesh P is offline   Reply With Quote

Old   August 23, 2012, 06:36
Default
  #4
New Member
 
Join Date: Mar 2012
Posts: 18
Rep Power: 14
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, 5 views)
anton_lias is offline   Reply With Quote

Old   September 4, 2012, 05:49
Default
  #5
Member
 
Gitesh
Join Date: Jan 2010
Location: Finland
Posts: 73
Rep Power: 16
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, 15:31
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
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
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, 10:28
Default
  #7
Member
 
Gitesh
Join Date: Jan 2010
Location: Finland
Posts: 73
Rep Power: 16
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


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
OpenFOAM on cluster: version GLIBCXX_3.4.9 and GLIBCXX_3.4.11 not found ovie OpenFOAM 10 April 19, 2021 18:06
wmake error zxj160 OpenFOAM 0 March 26, 2012 10:52
paraview installation woes vex OpenFOAM Installation 15 January 30, 2011 07:11
bubbleFoam validation case balkrishna OpenFOAM Running, Solving & CFD 24 August 30, 2010 04:37
[OpenFOAM] Problem with paraFoam on a linux-64 bit bunni ParaView 4 April 14, 2010 20:55


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