|
[Sponsors] |
[OpenFOAM.org] How to install OpenFoam from its folder |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 22, 2015, 07:32 |
How to install OpenFoam from its folder
|
#1 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
I executed this command for modifying gnuplot:
Code:
sudo apt-get install libx11-dev libxt-dev libreadline-gplv2-dev glib-2.0 but now that I want to install it by ./Allwmake this error is shown: Code:
ehsan@ehsan-N56JK:~/openfoam240$ ./Allwmake ./Allwmake: 4: ./Allwmake: wmakeCheckPwd: not found Error: Current directory is not $WM_PROJECT_DIR The environment variables are inconsistent with the installation. Check the OpenFOAM entries in your dot-files and source them. Code:
. /home/ehsan/openfoam240/etc/bashrc Code:
ehsan@ehsan-N56JK:~/openfoam240$ echo $WM_PROJECT_DIR /opt/openfoam240 thanks.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. Last edited by immortality; June 22, 2015 at 09:46. |
|
June 27, 2015, 08:33 |
|
#2 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
I would appreciate of your comments. it seems that the value of
WM_PROJECT_DIR should be changed to the address of the folder containing OpenFOAM. is it true? how? thanks.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
June 28, 2015, 04:48 |
|
#3 |
New Member
Regis
Join Date: Jan 2012
Posts: 24
Rep Power: 14 |
If you’re looking for recompiling OpenFOAM by using Allwmake, then you are correct, you should change some variables in OpenFOAM’s bashrc file.
Check lines 45—48 and see if your $foamInstall is correct. Then you can comment line 58 out and add Code:
export FOAM_INST_DIR=$foamInstall Keep in mind, though, that your directory is not “2.4.0”, but rather “240” so you may need to adjust that as well. |
|
June 28, 2015, 12:10 |
|
#4 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
thanks dear Regis, I changed the the lines to it:
Code:
# foamInstall=/opt # foamInstall=~$WM_PROJECT # foamInstall=/opt/$WM_PROJECT # foamInstall=/usr/local/$WM_PROJECT foamInstall=/home/ehsan # # END OF (NORMAL) USER EDITABLE PART ################################################################################ # # These are the defaults for this version which should generally be # overridden from the prefs.sh file or from command-line specification # #- note the location for later use (eg, in job scripts) # : ${FOAM_INST_DIR:=$foamInstall}; export FOAM_INST_DIR export FOAM_INST_DIR=$foamInstall what then I have to do in next stage? because the same message is shown again. thanks a lot.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
June 29, 2015, 15:23 |
|
#5 |
New Member
Regis
Join Date: Jan 2012
Posts: 24
Rep Power: 14 |
Ehsan,
I suggest you stick with the default directory structure, which goes like this: OpenFOAM directory within your $HOME, then OpenFOAM-x.y.z, ThirdParty-x.y.z and an user folder inside the OpenFOAM directory. From the directory you listed in your first post it looks like you're not following this, and unless you're doing the appropriate modifications it won't work. You can still do that if you want to, but you'll need to make sure the variables in OpenFOAM's bashrc are consistent. I wouldn't suggest that. You can use foamInstall=$HOME/$WM_PROJECT, or, if you really need the version number, use foamInstall=$HOME/$WM_PROJECT$WM_PROJECT_VERSION. |
|
June 30, 2015, 06:22 |
|
#6 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
dear Regis I performed what suggested as below:
Code:
# Location of the OpenFOAM installation # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # foamInstall=/opt # foamInstall=~$WM_PROJECT # foamInstall=/opt/$WM_PROJECT # foamInstall=/usr/local/$WM_PROJECT foamInstall=$HOME/$WM_PROJECT # # END OF (NORMAL) USER EDITABLE PART Code:
ehsan@ehsan-N56JK:~/Desktop/openfoam240$ ./Allwmake ./Allwmake: 4: ./Allwmake: wmakeCheckPwd: not found Error: Current directory is not $WM_PROJECT_DIR The environment variables are inconsistent with the installation. Check the OpenFOAM entries in your dot-files and source them. does it matter where the primary folder that we want to install OF from it is? or anywhere it be it will install in $HOME/$WM_PROJECT like Windows? thanks a lot.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
June 30, 2015, 17:56 |
|
#7 |
New Member
Regis
Join Date: Jan 2012
Posts: 24
Rep Power: 14 |
Follow the instructions for compiling from source. Yes, it does matter where the primary folder is. It can be anywhere, as long as you make the appropriate modification of paths in OpenFOAM’s bashrc.
Also, these errors are telling you what’s wrong: the current directory is not $WM_PROJECT_DIR. If you don’t what directory is this, use echo $WM_PROJECT_DIR. Remember to source the bashrc when you make changes. |
|
July 1, 2015, 08:46 |
|
#8 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
it shows nothing for the address of $WM_PROJECT_DIR
Code:
ehsan@ehsan-N56JK:~$ echo $WM_PROJECT_DIR ehsan@ehsan-N56JK:~$ echo $WM_PROJECT thanks.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
July 5, 2015, 15:47 |
|
#9 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quick answer: Detailed instructions for Ubuntu 14.04 and OpenFOAM 2.4.0 has been available at openfoamwiki.net since the 13th of June 2015: http://openfoamwiki.net/index.php/In...M-2.4.0/Ubuntu
|
|
August 5, 2015, 06:06 |
|
#10 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
I tried the page but the problem didn't solve. the OF folder exists but doesn't install
clearly saying I want to install Debian package of OF offline, not the source package online. appreciate helps.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
August 8, 2015, 13:22 |
|
#11 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
I think the previous installation of OF still uses the environmental variables, it's why echo command dosn't show anything.
now how can I uninstall it completely?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
August 8, 2015, 16:16 |
|
#12 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi Ehsan,
Not sure what is your current folder structure, but assuming the previous posts are still valid:
If you still have problems with installing packages via apt-get, then you will have to also have to install aptitude: Code:
sudo apt-get install aptitude Code:
sudo aptitude install build-essential Bruno
__________________
|
|
August 9, 2015, 12:20 |
|
#13 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
Thank you very much. the problem resolved and both installed properly.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM.com] Docker OpenFOAM install error on Mac OS X | dersh | OpenFOAM Installation | 10 | May 6, 2016 13:49 |
[OpenFOAM.org] A Mac OS X of23x Development Environment Using Docker | rt08 | OpenFOAM Installation | 1 | February 28, 2016 20:00 |
Suggestion for a new sub-forum at OpenFOAM's Forum | wyldckat | Site Help, Feedback & Discussions | 20 | October 28, 2014 10:04 |
Install openFOAM from with proxy server | Dhruval | OpenFOAM Installation | 3 | October 18, 2014 16:38 |
[waves2Foam] trying to install the waves2Foam toolbox with OpenFoam 2.3.0 | andr5w5 | OpenFOAM Community Contributions | 4 | July 5, 2014 10:47 |