|
[Sponsors] |
November 22, 2011, 17:29 |
How to install OF DP and SP in parallel?
|
#1 |
Senior Member
Klaus
Join Date: Mar 2009
Posts: 281
Rep Power: 22 |
Hello,
I installed OpenFoam-2.0.1 with standard double precision (DP) on my computer. Works fine! In addition to that I'd like to install as single precision (SP) version on the same computer for different purposes. The DP version is installed in /OpenFOAM/OpenFOAM-2.0.1 I use the current version of Linux Mint. When I tried to install an additional SP version some time ago, I messed the existing DP installation up and was not able to fix it afterwards. This time I'd like to avoid that, hence some questions: My idea is: 1. Create a new directory $HOME/OpenFOAMSP/OpenFOAM-2.0.1 2. Update $HOME/.bashrc change 'source $HOME/OpenFOAM/OpenFOAM-2.0.1/etc/bashrc' to 'source $HOME/OpenFOAMSP/OpenFOAM-2.0.1/etc/bashrc' 3. In the bashrc file in $HOME/OpenFOAMSP/OpenFOAM-2.0.1/etc/bashrc change 'export WM_PROJECT=OpenFOAM' to 'export WM_PROJECT=OpenFOAMSP' and change 'export WM_PRECISION_OPTION=DP' to 'export WM_PRECISION_OPTION=SP' Is there anything else to think about to be able to install and run the two version on one computer independently (but not at the same time)? Regards, Klaus |
|
November 22, 2011, 17:48 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings Klaus,
I understand you wanting to make sure that they are separate, but the following method makes it perfectly safe to have both builds in the same OpenFOAM folder:
Code:
of201D <run the commands you want> wmUNSET of201S But if you still want to have 2 fully separate installations, the key variable is "FOAM_INST_DIR", as shown here: http://www.openfoam.org/git.php#x3-9000 Stuffing those 3 lines into an alias can be done with adding ";": Code:
alias of201D='export FOAM_INST_DIR=$HOME/OpenFOAM/ ; foamDotFile=$FOAM_INST_DIR/OpenFOAM-2.0.1/etc/bashrc ; [ -f $foamDotFile ] && . $foamDotFile' alias of201S='export FOAM_INST_DIR=$HOME/OpenFOAMSP/ ; foamDotFile=$FOAM_INST_DIR/OpenFOAM-2.0.1/etc/bashrc ; [ -f $foamDotFile ] && . $foamDotFile WM_PRECISION_OPTION=SP' Bruno
__________________
|
|
November 27, 2011, 11:02 |
This doesn't work...
|
#3 |
Senior Member
Klaus
Join Date: Mar 2009
Posts: 281
Rep Power: 22 |
Hello Bruno,
background: I need two separate versions as it's not just about SP/DP, there are more changes. I've just setup the SP version for installation but for some reason, the path stuff in .bashrc and bashrc of the installation is messed up. Note there is a perfectly working DP installation in $HOME/OpenFOAM... The SP version needs to be installed in/the sources are in $HOME/OpenFOAMSP/OpenFOAMSP-2.0.1 The .bashrc entry is: source $HOME/OpenFOAMSP/OpenFOAMSP-2.0.1/etc/bashrc The bashrc in the installation directory (it's attached renamed bashrc.txt) I changed export WM_PROJECT=OpenFOAM to: export WM_PROJECT=OpenFOAMSP When I try to run the installation ./Allwmake, the pwd check fails and source .bashrc results in the following errors: source .bashrc bash: Error: Datei oder Verzeichnis nicht gefunden bash: :: Datei oder Verzeichnis nicht gefunden bash: unknown/unsupported: Datei oder Verzeichnis nicht gefunden bash: naming: Datei oder Verzeichnis nicht gefunden bash: convention: Datei oder Verzeichnis nicht gefunden bash: Error: Datei oder Verzeichnis nicht gefunden bash: :: Datei oder Verzeichnis nicht gefunden bash: unknown/unsupported: Datei oder Verzeichnis nicht gefunden bash: naming: Datei oder Verzeichnis nicht gefunden bash: convention: Datei oder Verzeichnis nicht gefunden bash: Error: Datei oder Verzeichnis nicht gefunden bash: :: Datei oder Verzeichnis nicht gefunden bash: unknown/unsupported: Datei oder Verzeichnis nicht gefunden bash: naming: Datei oder Verzeichnis nicht gefunden bash: convention: Datei oder Verzeichnis nicht gefunden bash: Error: Datei oder Verzeichnis nicht gefunden bash: :: Datei oder Verzeichnis nicht gefunden bash: unknown/unsupported: Datei oder Verzeichnis nicht gefunden bash: naming: Datei oder Verzeichnis nicht gefunden bash: convention: Datei oder Verzeichnis nicht gefunden What's wrong with my settings? klaus |
|
November 27, 2011, 14:42 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Klaus,
The OpenFOAM code, although designed for easy project renaming for situations where the project could be forked, isn't always tested to check how compatible it is with fast forking. In other words: do not change the WM_PROJECT variable unless you know what you are doing! What you can do is make the following changes to these two variables: Code:
export WM_PROJECT_VERSION=2.0.1-SP foamInstall=$HOME/${WM_PROJECT}SP By what I've seen, it seems that if you do want to change the WM_PROJECT variable, you'll have to at least change every occurrence of the word "OpenFOAM" to "OpenFOAMSP" in the file "bin/foamEtcFile". Good luck! Bruno
__________________
|
|
November 27, 2011, 18:43 |
Nearly there -ThirdParty-2.0.1-SP not found
|
#5 |
Senior Member
Klaus
Join Date: Mar 2009
Posts: 281
Rep Power: 22 |
Hello Bruno,
thank you for your feedback! Things are getting better but I get a compilation error: no ThirdParty sources found - skipping They are in: $HOME/OpenFOAMSP/ThirdParty-2.0.1-SP Any idea what's the problem? Klaus |
|
November 28, 2011, 17:14 |
|
#6 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Klaus,
Quote:
My guess is that since you might have renamed the ThirdParty folder only after you edited OpenFOAM's "etc/bashrc" file, which might leave some essential variables not properly defined until you start a new terminal. Best regards, Bruno
__________________
|
||
January 7, 2012, 19:40 |
solved
|
#7 |
Senior Member
Klaus
Join Date: Mar 2009
Posts: 281
Rep Power: 22 |
step-by-step: I use the git version on Linux Mint
1. unpack the new version + ThirdParty in $Home/OpenFoam as usual 2. Update .bashrc in $HOME to match the new version 3. The differentiator is the entry: export WM_PROJECT_VERSION=2.0.1-SP in the $HOME/OpenFoam/OpenFoam-new_version/etc/bashrc DON'T try to change export WM_PROJECT=OpenFOAM, as that can cause a lot of problems. Klaus |
|
|
|