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

[OpenFOAM.com] Installing different copies of the same OF release - possible?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 11, 2022, 23:37
Default Installing different copies of the same OF release - possible?
  #1
Senior Member
 
TWB
Join Date: Mar 2009
Posts: 414
Rep Power: 19
quarkz is on a distinguished road
Hi,

I know it's possible to install OF 2006, 2112 on the same system.

However, is it possible to install different copies of the same OF on the same system? So I would like to have:

1. OF 2206 using system C + MPI compiler

2. OF 2206 using self installed newer version of C + MPI compiler

I tried once a while ago by using a different install dir but I can't remember the exact details. I think part of my earlier installation got overwrite.

If anyone has experience, pls let me know if it's possible.

Thanks.
quarkz is offline   Reply With Quote

Old   November 25, 2022, 23:10
Default
  #2
Senior Member
 
TWB
Join Date: Mar 2009
Posts: 414
Rep Power: 19
quarkz is on a distinguished road
Hi,

I have personally tested it and what I do is:

1. instead of /home/user/OpenFOAM/OpenFOAM-v2112, use

/home/user/OpenFOAM_new/OpenFOAM-v2112

2. If you are compiling codes, it is better to edit the etc/bashrc:

export WM_COMPILER=Gcc

to

export WM_COMPILER=Gcc_new

This is because your new lib will then be in different dir:

/home/user/OpenFOAM/tsltaywb-v2112/platforms/linux64GccDPInt32Opt/lib/

to

/home/user/OpenFOAM/tsltaywb-v2112/platforms/linux64Gcc_newDPInt32Opt/lib/

So the libraries will not overwrite the different versions.

Hope this helps.
quarkz is offline   Reply With Quote

Old   December 8, 2022, 11:08
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 quarkz View Post
Hi,

I know it's possible to install OF 2006, 2112 on the same system.

However, is it possible to install different copies of the same OF on the same system? So I would like to have:

1. OF 2206 using system C + MPI compiler

2. OF 2206 using self installed newer version of C + MPI compiler

I tried once a while ago by using a different install dir but I can't remember the exact details. I think part of my earlier installation got overwrite.

If anyone has experience, pls let me know if it's possible.

Thanks.

We do this all of the time. It is no problem, but you will want to adjust the compilation names to avoid overwriting the same locations. Here is my default setup (saved as etc/prefs.sh)
Code:
# -*- sh -*- 
# Preferences for system clang-xxx, label-size=32 
export WM_COMPILER_TYPE=system 

export WM_COMPILER=Clang140 
export WM_COMPILE_CONTROL="version=14.0 +lld" 

export WM_LABEL_SIZE=32 

## Use system openmpi
export WM_MPLIB=SYSTEMOPENMPI

## Use system openmpi4 
# export WM_MPLIB=SYSTEMOPENMPI4
For comparison, I also have a gcc-system file of preferences
Code:
# -*- sh -*- 
# Preferences for system gcc, label-size=32 
export WM_COMPILER_TYPE=system 
export WM_COMPILER=Gcc 
unset  WM_COMPILE_CONTROL

export WM_LABEL_SIZE=32
as well as a for a third-party compilation of gcc-4.8.5 (the most ancient compiler currently still usable):
Code:
# -*- sh -*- 
# Preferences for third-party Gcc48, label-size=32 
export WM_COMPILER_TYPE=ThirdParty 

# export WM_CONFIG=gcc48 
export WM_COMPILER=Gcc48 
export WM_LABEL_SIZE=32 

unset WM_COMPILE_CONTROL
To use one instead of the other. Either swap out with the prefs.sh file, or source on the command line. For example,
Code:
source etc/bashrc  gcc-system


source etc/bashrc gcc48
I usually dump the extra config files under my ~/.OpenFOAM directory, where they can be found for different versions.


In the regular prefs example, you will see there is a version number in the WM_COMPILE_CONTROL. This means it will compile with clang++-14.0
olesen 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
SU2-7.0.1 on ubuntu 18.04 hyunko SU2 Installation 7 March 16, 2020 05:37
Heat Release vs. Apparent Heat Release // Comparison with GT Power MFGT CONVERGE 10 August 17, 2016 03:38
[foam-extend.org] Installing old release OpenFOAM 1.5-dev Lorenzo92 OpenFOAM Installation 0 May 26, 2016 13:15
Openfoam Ubuntu 12.04 Unmet dependencies slls33 OpenFOAM Installation 10 April 9, 2013 05:16
Installing 2.1.x (Repository Release) on RHEL 6.2 socon009 OpenFOAM Installation 9 May 19, 2012 12:38


All times are GMT -4. The time now is 01:34.