|
[Sponsors] |
[foam-extend.org] Having difficulties using more than one OpenFOAM/foam-extend installation |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 24, 2018, 08:11 |
Having difficulties using more than one OpenFOAM/foam-extend installation
|
#1 | |
New Member
Join Date: Mar 2017
Posts: 28
Rep Power: 9 |
Quote:
"After you modify the ".bash*" files to all use alias, " what is means? what should I do ? Please tell me the details [Moderator note: Moved this post and the one below to a new thread, given that they were both on the same topic, for different versions.] Last edited by wyldckat; October 24, 2018 at 17:37. Reason: replaced with the correct quote and added a moderator note |
||
October 24, 2018, 08:44 |
Same problem can't be solved
|
#2 | |
New Member
Join Date: Mar 2017
Posts: 28
Rep Power: 9 |
Quote:
Code:
source /home/yy/OpenFOAM/OpenFOAM-v1806/etc/bashrc source /opt/openfoam6/etc/bashrc source /home/yy/foam/foam-extend-4.0/etc/bashrc alias of18='source $HOME/OpenFOAM/OpenFOAM-v1806/etc/bashrc $FOAM_SETTINGS' alias of6='source /opt/openfoam6/etc/bashrc $FOAM_SETTINGS' alias fe40='source $HOME/foam/foam-extend-4.0/etc/bashrc $FOAM_SETTINGS' Code:
bash: /opt/foam-extend-4.0/bin/foamGetSystemInfo: No such file or directory bash: /opt/foam-extend-4.0/bin/foamCleanPath: No such file or directory bash: /opt/foam-extend-4.0/bin/foamCleanPath: No such file or directory bash: /opt/foam-extend-4.0/bin/foamCleanPath: No such file or directory bash: /opt/foam-extend-4.0/etc/settings.sh: No such file or directory bash: /opt/foam-extend-4.0/etc/aliases.sh: No such file or directory bash: /opt/foam-extend-4.0/bin/foamCleanPath: No such file or directory bash: /opt/foam-extend-4.0/bin/foamCleanPath: No such file or directory bash: /opt/foam-extend-4.0/bin/foamCleanPath: No such file or directory NOTE: when I key in Terminal these, and I get the message Code:
echo $WM_PROJECT_DIR /opt/foam-extend-4.0 Last edited by wyldckat; October 24, 2018 at 17:30. Reason: Added [CODE][/CODE] markers |
||
October 24, 2018, 17:27 |
|
#3 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Quick answer: Oh, OK, so you are almost there... you need to remove the first 3 lines, namely to change this
Code:
source /home/yy/OpenFOAM/OpenFOAM-v1806/etc/bashrc source /opt/openfoam6/etc/bashrc source /home/yy/foam/foam-extend-4.0/etc/bashrc alias of18='source $HOME/OpenFOAM/OpenFOAM-v1806/etc/bashrc $FOAM_SETTINGS' alias of6='source /opt/openfoam6/etc/bashrc $FOAM_SETTINGS' alias fe40='source $HOME/foam/foam-extend-4.0/etc/bashrc $FOAM_SETTINGS' Code:
alias of18='source $HOME/OpenFOAM/OpenFOAM-v1806/etc/bashrc' alias of6='source /opt/openfoam6/etc/bashrc' alias fe40='source $HOME/foam/foam-extend-4.0/etc/bashrc' Make sure you saved the modified file in the text editor. Then start a new terminal window (or tab) and run this command: Code:
echo $WM_PROJECT_DIR
---- The quick answer I had originally written for the first post: In this page: https://openfoamwiki.net/index.php/I...with_the_Shell - detailed instructions are given in section Using aliases to help manage multiple OpenFOAM versions Last edited by wyldckat; October 24, 2018 at 17:37. Reason: edited my answer |
|
October 24, 2018, 21:46 |
|
#4 | |
New Member
Join Date: Mar 2017
Posts: 28
Rep Power: 9 |
Quote:
bash: export: `1': not a valid identifier bash: /home/yy/foam/foam-extend-4.0/ThirdParty/packages/gcc-4.9.2/platforms/linux64Gcc49DPOpt/etc/gcc-4.9.2.sh: No such file or directory Warning in /home/yy/foam/foam-extend-4.0/etc/settings.sh: Cannot find /home/yy/foam/foam-extend-4.0/ThirdParty/packages/gcc-4.9.2/platforms/linux64Gcc49DPOpt installation. Please install this compiler version or if you wish to use the system compiler, change the 'compilerInstall' setting to 'System' in this file NOTE: the system is Ubuntu 16.04 THANK YOU FOR YOUR REPLYING ------------------------------------------------ I read some your past reply, and that may be useful for me. How to install foam-extend 4.0 in UBUNTU 18.04 NOW, the foam-extend is compiling... waiting for the result~~~ |
||
October 25, 2018, 09:06 |
|
#5 |
Senior Member
mauricio
Join Date: Jun 2011
Posts: 172
Rep Power: 17 |
Hi, Saatt.
For an version of OF to work you must set the environment variables accordingly. Say you have 3 versions: assume that you compiled/installed all the files at $HOME/OpenFOAM/OpenFOAM-v1/ $HOME/OpenFOAM/OpenFOAM-v2/ $HOME/OpenFOAM/OpenFOAM-v3/ Each installation has its own variables to work with. Since many commands are similar among the distributions you need to do as wyldckat said. Using my folder and naming hypothesis, edit your $HOME/.bashrc to include the aliases: Code:
alias ofv1='source $HOME/OpenFOAM/OpenFOAM-v1/etc/bashrc' alias ofv2='source $HOME/OpenFOAM/OpenFOAM-v2/etc/bashrc' alias ofv3='source $HOME/OpenFOAM/OpenFOAM-v3/etc/bashrc' So, say you wanna use the v1 version, when you open a terminal, then if you did the right thing, you must type Code:
ofv1 Say now you wanna run the same tutorial with version v2. You can either type Code:
ofv2 What the regular installation steps tell you to do is to add this line Code:
source $HOME/OpenFOAM/OpenFOAM-v1/etc/bashrc NOTE: make sure you install all versions under the same user. Do use the root user because each user has its own bashrc file so when you change users throughout the installation you will almost always bump into errors. Hope it helps
__________________
Best Regards /calim "Elune will grant us the strength" |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[foam-extend.org] A problem about installation of open foam extend 3.1 | Toalchemist | OpenFOAM Installation | 1 | May 31, 2018 08:58 |
Sig Density Based Solver installation with FOAM Extend 3.2 | qjh888 | OpenFOAM Bugs | 0 | September 21, 2016 08:16 |
[foam-extend.org] Foam extend 3.2 wrong installation directory | geop | OpenFOAM Installation | 0 | May 11, 2016 05:52 |
ParaView-4.0.1 did not compile for foam extend 3.0 installation | mhkenergy | OpenFOAM Installation | 8 | June 4, 2014 02:26 |
Difficulties using parafoam, one critical error in installation of OpenFOAM-1.6 | PeterNaa | OpenFOAM Installation | 4 | April 9, 2010 08:48 |