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

[OpenFOAM.org] Current directory is not $WM_PROJECT_DIR

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 2 Post By cdm
  • 2 Post By cdm
  • 1 Post By ordinary
  • 1 Post By Alisa_W

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 20, 2014, 06:36
Default Current directory is not $WM_PROJECT_DIR
  #1
Member
 
zohreh imani nejad
Join Date: Feb 2014
Location: gonabad
Posts: 55
Rep Power: 12
imani is on a distinguished road
hi formers
i have of2.1.1
but now i want to install of2.3.0
i do all steps in the openFoam.com site
but i have this error

./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.

i read the page

http://www.cfd-online.com/Forums/ope...oject_dir.html


but i canot solve my problem
thanks
imani is offline   Reply With Quote

Old   July 22, 2014, 05:32
Default
  #2
Member
 
zohreh imani nejad
Join Date: Feb 2014
Location: gonabad
Posts: 55
Rep Power: 12
imani is on a distinguished road
no one can help me?
imani is offline   Reply With Quote

Old   July 23, 2014, 18:51
Default
  #3
cdm
Member
 
Join Date: May 2013
Location: Canada
Posts: 32
Rep Power: 13
cdm is on a distinguished road
Check what value is stored in the $WM_PROJECT_DIR.

Code:
echo $WM_PROJECT_DIR
If it is not the installation directory for openfoam230 (for e.g., /home/user/openfoam230/) then you need to source the openfoam230 bashrc.

Make sure you do not have the line

Code:
source $HOME/openfoam211/etc/bashrc
in your local bashrc file ($HOME/.bashrc).

If you do, you should change it to

Code:
alias foam211='source $HOME/openfoam211/etc/bashrc'
and add

Code:
alias foam230='source $HOME/openfoam230/etc/bashrc'
Then when you open a terminal, source the version you want to use by typing either foam211 or foam230.

Once this is set up, you can run ./Allwmake after sourcing the openfoam230 bashrc.

(The above assumes you installed OpenFOAM v2.3.0 in your user $HOME directory.)

Hope that helps.
ali_atrian and Shitiz like this.
cdm is offline   Reply With Quote

Old   July 24, 2014, 01:39
Default
  #4
Member
 
zohreh imani nejad
Join Date: Feb 2014
Location: gonabad
Posts: 55
Rep Power: 12
imani is on a distinguished road
hi
thanks for your attention
when i run
echo $WM_PROJECT_DIR

i dont have any output in terminal .... just a blank line !!!! like bellow

dell@ubuntu:~$ echo $WM_PROJECT_DIR

dell@ubuntu:~$

i dont understand your meaning about local bashrc file
i have two bashrc file : one in openFoam2.1.1 file and other in openFoam2.3.0 file
in these basrc files i change end of it to :
alias of230='source $HOME/openfoam230/etc/bashrc'
alias of211='source $HOME/openfoam211/etc/bashrc'
when i put ./Allwmake in terminal

dell@ubuntu:~/OpenFOAM/OpenFOAM-2.3.0$ ./Allwmake

i have this output :

./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.
imani is offline   Reply With Quote

Old   July 24, 2014, 11:28
Default
  #5
cdm
Member
 
Join Date: May 2013
Location: Canada
Posts: 32
Rep Power: 13
cdm is on a distinguished road
You need to add

Code:
alias of230='source $HOME/openfoam230/etc/bashrc'
alias of211='source $HOME/openfoam211/etc/bashrc'
in the file $HOME/.bashrc and not in the OpenFOAM etc/bashrc files. $HOME/.bashrc is your local bashrc file (for sourcing all scripts and environment variables, not just for OpenFOAM). If you don't have a .bashrc file, it may be under a different name depending on your Linux distribution. Google search should help you there.

Then, open a new terminal, type of230, and run ./Allwmake in the openfoam230 directory.
irwin and SHUBHAM9595 like this.
cdm is offline   Reply With Quote

Old   July 24, 2014, 14:35
Default
  #6
Member
 
zohreh imani nejad
Join Date: Feb 2014
Location: gonabad
Posts: 55
Rep Power: 12
imani is on a distinguished road
tanks alot
i found that bashrc file
imani is offline   Reply With Quote

Old   September 1, 2018, 11:02
Default
  #7
Member
 
王莹
Join Date: May 2017
Posts: 51
Rep Power: 9
Alisa_W is on a distinguished road
Hello, when I type ofv30(my second version), it said that cannot find that command. Could you help me ?
Quote:
Originally Posted by imani View Post
tanks alot
i found that bashrc file
Alisa_W is offline   Reply With Quote

Old   September 1, 2018, 15:43
Default
  #8
Member
 
Emre
Join Date: Nov 2015
Location: Izmir, Turkey
Posts: 97
Rep Power: 11
ordinary is on a distinguished road
I think you have to first check your .bashrc file in your home folder. It is a hidden file so you should enable 'Show hidden files' button if you use window manager. The file named .bashrc must have an ending like @cdm said:
Quote:
Originally Posted by cdm View Post
Code:
alias of230='source $HOME/openfoam230/etc/bashrc'
 alias of211='source $HOME/openfoam211/etc/bashrc'
wyldckat likes this.
ordinary is offline   Reply With Quote

Old   September 1, 2018, 18:33
Default
  #9
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Adding to Emre's answer:
wyldckat is offline   Reply With Quote

Old   September 2, 2018, 02:20
Default
  #10
Member
 
王莹
Join Date: May 2017
Posts: 51
Rep Power: 9
Alisa_W is on a distinguished road
Thank you Emre, actually I have added the lines to my .bashrc file as cdm suggested.

alias ofdev='source $HOME/OpenFOAM/OpenFOAM-dev/etc/bashrc'
alias ofv30='source $HOME/OpenFOAM/OpenFOAM-v3.0+/etc/bashrc'

But it still failed. When I typed 'alias' in terminal, it showed two aliases above haven't been defined...

When I type 'echo $WM_PROJECT_DIR', my dir is still $HOME/openfoam/openfoam-dev(The version I have installed).

There is a strange thing: I have install openfoam-dev in my computer before, but in the ending of my .bashrc files, no "source $HOME/OpenFOAM/OpenFOAM-dev/etc/bashrc" existed at first...
Quote:
Originally Posted by ordinary View Post
I think you have to first check your .bashrc file in your home folder. It is a hidden file so you should enable 'Show hidden files' button if you use window manager. The file named .bashrc must have an ending like @cdm said:
Alisa_W is offline   Reply With Quote

Old   September 2, 2018, 02:38
Default
  #11
Member
 
王莹
Join Date: May 2017
Posts: 51
Rep Power: 9
Alisa_W is on a distinguished road
Thank you Bruno, I have done things as cdm and Emre suggested:
“alias ofdev='source $HOME/OpenFOAM/OpenFOAM-dev/etc/bashrc'
alias ofv30='source $HOME/OpenFOAM/OpenFOAM-v3.0+/etc/bashrc'”
was added to my ./bashrc file. But it still failed.
When I typed 'alias' in terminal, it showed two aliases above haven't been defined...In the link you gave me, I cannot find how to solve this problem.
Here is some information I get after I added two aliases in ./bashrc
1.When I type 'echo $WM_PROJECT_DIR', my dir is still $HOME/openfoam/openfoam-dev (The version I have installed).
2.There is a strange thing: I have installed openfoam-dev in my computer before, but at the very beginning, no "source $HOME/OpenFOAM/OpenFOAM-dev/etc/bashrc" existed in the ending of my .bashrc files...

Quote:
Originally Posted by wyldckat View Post
Adding to Emre's answer:
Alisa_W is offline   Reply With Quote

Old   September 2, 2018, 10:23
Default
  #12
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer:
  1. Run the following command:
    Code:
    grep -i "openfoam" ~/.bash*
    It will reveal the majority of the environments being loaded-in automatically. It might tell you that there is more than one file with lines referring to OpenFOAM.
  2. After you modify the ".bash*" files to all use alias, then start a new terminal and try checking again.
wyldckat is offline   Reply With Quote

Old   September 2, 2018, 10:32
Smile
  #13
Member
 
王莹
Join Date: May 2017
Posts: 51
Rep Power: 9
Alisa_W is on a distinguished road
Thanks so much, Bruno! Now I have solved my problem and of v3.0+ is compiling in my book ^_^.

Quote:
Originally Posted by wyldckat View Post
Quick answer:
  1. Run the following command:
    Code:
    grep -i "openfoam" ~/.bash*
    It will reveal the majority of the environments being loaded-in automatically. It might tell you that there is more than one file with lines referring to OpenFOAM.
  2. After you modify the ".bash*" files to all use alias, then start a new terminal and try checking again.
wyldckat likes this.
Alisa_W is offline   Reply With Quote

Old   July 10, 2020, 11:30
Default
  #14
New Member
 
Join Date: Jul 2020
Posts: 1
Rep Power: 0
pointdipole is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick answer:
  1. Run the following command:
    Code:
    grep -i "openfoam" ~/.bash*
    It will reveal the majority of the environments being loaded-in automatically. It might tell you that there is more than one file with lines referring to OpenFOAM.
  2. After you modify the ".bash*" files to all use alias, then start a new terminal and try checking again.
Bruno, thanks for your replies on this thread! I have the same issue as the above posters, except that I only have one OF installation (2.3.1) and therefore only one alias. GCC 5.4.0, CUDA 8.0, Ubuntu 16.04.
The specific error message is below. Thank you for your help!
Quote:
Error: Current directory is not /root/OpenFOAM/OpenFOAM-2.3.1
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.
pointdipole is offline   Reply With Quote

Old   July 11, 2020, 03:48
Default
  #15
New Member
 
bestucan's Avatar
 
Tu Can
Join Date: Jul 2017
Location: China
Posts: 16
Rep Power: 9
bestucan is on a distinguished road
"~" is a syombol refer to "$HOME"
and "$HOME" is home directory of a user.


"echo $HOME" will show what it is.



mostly, "$HOME" refer to "/home/<your user name>/"
specially, when user name is "root", "$HOME" refer to "/root/"


seems like you are using "sudo" or login as root. It's not recommend.
bestucan is offline   Reply With Quote

Old   August 25, 2020, 04:42
Default
  #16
Senior Member
 
Ali Shayegh
Join Date: Oct 2015
Posts: 131
Rep Power: 11
amuzeshi is on a distinguished road
What does WM mean in the beginning of WM_PROJECT_DIR at all? Is it abbreviation for wmake?
amuzeshi is offline   Reply With Quote

Old   September 6, 2020, 04:10
Default 3.2.2.5 wmake environment variables
  #17
Member
 
Rahul Vadrabade
Join Date: Apr 2018
Posts: 46
Rep Power: 8
Rvadrabade is on a distinguished road
Yes, More information is available at

https://cfd.direct/openfoam/user-gui...x10-730003.2.2

3.2.2.5 wmake environment variables
Rvadrabade is offline   Reply With Quote

Old   September 6, 2020, 09:19
Default
  #18
Senior Member
 
Ali Shayegh
Join Date: Oct 2015
Posts: 131
Rep Power: 11
amuzeshi is on a distinguished road
Quote:
Originally Posted by Rvadrabade View Post
Yes, More information is available at

https://cfd.direct/openfoam/user-gui...x10-730003.2.2

3.2.2.5 wmake environment variables
Thanks, but I want to know where does WM name originated from; what is the rational behind it? I have heard that this is abbreviated for "Weller Make"!
amuzeshi 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
[swak4Foam] Installation Problem with OF 6 version Aurel OpenFOAM Community Contributions 14 November 18, 2020 17:18
Ansys Licence Serve on Ubuntu 16.04 LTS david.pasquale ANSYS 2 January 20, 2017 12:52
Error: Current directory is not $WM_THIRD_PARTY_DIR lapsednun OpenFOAM Installation 1 August 30, 2014 11:46
Re : Problem Installing OpenFOAM on Centos -5.3 mohanphy OpenFOAM Installation 1 February 7, 2010 20:09
Problem installing on Ubuntu 9.10 -> 'Cannot open : No such file or directory' mfiandor OpenFOAM Installation 2 January 25, 2010 10:50


All times are GMT -4. The time now is 14:16.