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

Two OpenFOAM installations in parallel? (DP + SP)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 1, 2011, 17:29
Default Two OpenFOAM installations in parallel? (DP + SP)
  #1
Senior Member
 
Klaus
Join Date: Mar 2009
Posts: 281
Rep Power: 22
klausb will become famous soon enough
Hello,

I've OpenFOAM with double precision installed as recommended in /home/user/OpenFOAM.

I need a single precision installation as well (with some add-ons) - the plan is to build/install it in /home/user/OpenFOAMSP

I don't want to spoil the existing double precision installation.

Are the following steps suficient to avoid problems?

1. Add . $HOME/OpenFOAMSP/OpenFOAM-1.7.x/etc/bashrc to $HOME/.bashrc
2. Change FOAM_INST_DIR to /home/user/OpenFOAMSP and $WM_PROJECT_DIR to /home/user/OpenFOAMSP/OpenFOAM-1.7.x

Klaus
klausb is offline   Reply With Quote

Old   May 2, 2011, 03:11
Default
  #2
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22
Bernhard is on a distinguished road
I think sourcing both /bashrc files in ~/.bashrc will cause problems.

If you put it like this
Code:
alias startFoam='source $HOME/OpenFOAM/OpenFOAM-1.7.x/etc/bashrc'
alias startFoamSP='source $HOME/OpenFOAM/OpenFOAM-1.7.xSP/etc/bashrc'
You can type startFoam in your shell when you want to use your original install, and startFoamSP for the single precision version.

Best way to change the install, is to change the variable foamInstall in bashrc. Furthermore, you probably don't recompile the ThirdParty software, so you have that variable in you bashrc as well.
Bernhard is offline   Reply With Quote

Old   May 2, 2011, 04:04
Default
  #3
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by klausb View Post
Hello,

I've OpenFOAM with double precision installed as recommended in /home/user/OpenFOAM.

I need a single precision installation as well (with some add-ons) - the plan is to build/install it in /home/user/OpenFOAMSP

I don't want to spoil the existing double precision installation.

Are the following steps suficient to avoid problems?

1. Add . $HOME/OpenFOAMSP/OpenFOAM-1.7.x/etc/bashrc to $HOME/.bashrc
2. Change FOAM_INST_DIR to /home/user/OpenFOAMSP and $WM_PROJECT_DIR to /home/user/OpenFOAMSP/OpenFOAM-1.7.x

Klaus

I don't see why you'd want or need to have a separate installation directory. There is absolutely no problem having different compiler/precision combinations in the same FOAM_INST_DIR. The only thing you need to do is have the correct variables set.

For a "once-of", simply use the "wmSP" or "wmDP" aliases set the corresponding variables.
For a more permanent switch, the easiest is to simpy copy the etc/bashrc. For example,
Code:
cp etc/bashrc etc/bashrc-sp
cp etc/bashrc etc/bashrc-dp
As hard-code the WM_PRECISION_OPTION.

You can use the same idea if you are using a different compiler (type or version).
olesen is offline   Reply With Quote

Old   May 2, 2011, 04:08
Default
  #4
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22
Bernhard is on a distinguished road
Good point, what I posted can be used if you want to keep different version of OpenFOAM seperate (e.g. 1.6-ext and 1.7)
Bernhard 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
Large test case for running OpenFoam in parallel fhy OpenFOAM Running, Solving & CFD 23 April 6, 2019 10:55
OpenFoam parallel scalability hpc_benchmark OpenFOAM Running, Solving & CFD 26 October 30, 2012 06:29
Parallel cluster solving with OpenFoam? P2P Cluster? hornig OpenFOAM Programming & Development 8 December 5, 2010 17:06
Modified OpenFOAM Forum Structure and New Mailing-List pete Site News & Announcements 0 June 29, 2009 06:56
OpenFOAM Training and Workshop Zagreb 2628Jan2006 hjasak OpenFOAM 1 February 2, 2006 22:07


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