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

./Allwmake: 39: wmakeCheckPwd: not found

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   August 24, 2011, 09:37
Default ./Allwmake: 39: wmakeCheckPwd: not found
  #1
Member
 
Robert Ong
Join Date: Aug 2010
Posts: 45
Rep Power: 6
rob3rt 0ng is on a distinguished road
Hi All,

I am trying to install OF-2.0.x as outlined from here http://www.openfoam.org/git.php but when I tried to compile ./Allwmake it gave me error
PHP Code:
[I]./Allwmake39wmakeCheckPwdnot found
Error
Current directory is not $WM_THIRD_PARTY_DIR
    The environment variables are inconsistent with the installation
.
    
Check the OpenFOAM entries in your dot-files and source them.[/I
Before tried compiling I added source $HOME/OpenFOAM/OpenFOAM-2.0.x/etc/bashrc in my ~/.bashrc then when I source $HOME/.bashrc it gave me
PHP Code:
bash: /home/roberto/OpenFOAM/OpenFOAM-2.0.x/etc/bashrcNo such file or directory 
And when I deleted the source $HOME/OpenFOAM/OpenFOAM-2.0.x/etc/bashrc from ~/.bashrc and ran source $HOME/.bashrc, it was fine. But then it failed when I tried to compile as per aforementioned error about wmakeCheckPwd: not found.

Please help as this is getting quite frustated

Thanks and regards,
Robert
rob3rt 0ng is offline   Reply With Quote

Old   August 24, 2011, 16:29
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,223
Blog Entries: 32
Rep Power: 71
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Greetings Robert,

Does the folder even exist? Have you checked? Are you 100% certain that every single character is identical!? Keep in mind that "OpenFOAM" is not the same as "openFOAM"!

Anyway, you can check if the file really exists by running these commands:
Code:
ls -l $HOME/OpenFOAM/OpenFOAM-2.0.x/etc/bashrc
ls -l $HOME/OpenFOAM/OpenFOAM-2.0.x/etc/
ls -l $HOME/OpenFOAM/OpenFOAM-2.0.x/
ls -l $HOME/OpenFOAM/
These will check if:
  1. the aforementioned file does exist or not;
  2. If the folder where it should be does exist or not;
  3. then the parent folder...
  4. then the parent folder of the previous folder.
If none of these give you the files we are looking for, then you better check what you've been doing

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   August 27, 2011, 06:12
Default
  #3
Member
 
Robert Ong
Join Date: Aug 2010
Posts: 45
Rep Power: 6
rob3rt 0ng is on a distinguished road
Hi Bruno,

Thanks for your instant reply! I did mess up something before and got it fixed.

I've tried OF.2.0.x and found some compilation error for my solver which works fine in OF.1.6.x. AFAIK, things like readSIMPLECONTROLS.H and readPIMPLECONTROLS.H are no longer exist, so I think for now I will stick with OF1.6.x.

However, I encountered some discrepancy between Ubuntu Natty gcc version (4.5.2) with respect to OF1.6.x (4.3), thus I got errors in compiling it. Can you please guide me on how to solve this? or do I have to use an older Ubuntu version?

Thanks very much for your time.

Regards,
Robert
rob3rt 0ng is offline   Reply With Quote

Old   August 27, 2011, 06:28
Default
  #4
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 367
Rep Power: 13
l_r_mcglashan will become famous soon enough
There are a number of differences in OF2.0. In particular there are now classes such as simpleControl and pimpleControl that take the place of readSimpleControls.H. It's really not very difficult to change to the new classes.

As for compiler errors, you can post them up here!
__________________
Laurence R. McGlashan :: Website
l_r_mcglashan is offline   Reply With Quote

Old   August 27, 2011, 06:30
Default
  #5
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,223
Blog Entries: 32
Rep Power: 71
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Hi Robert,

Bad idea: do not try to build OpenFOAM 1.6.x with gcc 4.5!! It's not compatible, due to some stuff that changed between 4.4 and 4.5. Gcc 4.5 can be used with OpenFOAM 1.7.1 and above.

Go to the Synaptic Package Manager and search for "gcc-4.3-base" and/or "gcc-4.4-base". Install 4.4 or both, it's up to you. Install "g++-4.4" as well.
Then... I know I've explained this before somewhere... Ah, here we go, see post #2: OpenFOAM install on RHEL 5.5 - but instead of replacing with gcc44 and g++44, use gcc-4.4 and g++-4.4.

Best regards and good luck!
Bruno
wyldckat is offline   Reply With Quote

Old   August 27, 2011, 06:34
Default
  #6
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 367
Rep Power: 13
l_r_mcglashan will become famous soon enough
Quote:
Originally Posted by wyldckat View Post

Bad idea: do not try to build OpenFOAM 1.6.x with gcc 4.5!! It's not compatible, due to some stuff that changed between 4.4 and 4.5. Gcc 4.5 can be used with OpenFOAM 1.7.1 and above.
Really? Do you have a link to the issues?
__________________
Laurence R. McGlashan :: Website
l_r_mcglashan is offline   Reply With Quote

Old   August 27, 2011, 06:47
Default
  #7
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,223
Blog Entries: 32
Rep Power: 71
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Hi Laurence,
Quote:
Originally Posted by l_r_mcglashan View Post
Really? Do you have a link to the issues?
Of course I do : OpenFOAM 1.6.x, 1.7.0 and 1.7.x are not fully prepared to work with gcc-4.5.x

I didn't back up my claim immediately because I was feeling lazy and didn't seem very important

And I know I've got a link to the repo with the necessary changes somewhere here in the forum... odd, I can't find it... I'll keep looking and post back here

edit: This should be the commit that fixes the issue with gcc 4.5: 24257a08dc25c30946fb

Best regards,
Bruno

Last edited by wyldckat; August 27, 2011 at 06:52. Reason: see "edit:"
wyldckat is offline   Reply With Quote

Old   August 27, 2011, 06:55
Default
  #8
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 367
Rep Power: 13
l_r_mcglashan will become famous soon enough
Cheers, I was just curious, I don't remember it for some reason!
__________________
Laurence R. McGlashan :: Website
l_r_mcglashan is offline   Reply With Quote

Old   August 27, 2011, 12:44
Default
  #9
Member
 
Robert Ong
Join Date: Aug 2010
Posts: 45
Rep Power: 6
rob3rt 0ng is on a distinguished road
Thanks to both of you for taking time to reply

@Bruno: As you suggested, I downloaded gcc and g++ 4.4 from the synaptic manager then followed your instructions but it gave me the same compilation errors complaining about wmake error: file 'Make/linux64GccDPOpt/objectFiles' could not be created. Then I looked up in ~/OpenFOAM/OpenFOAM-1.6.x/wmake/rules and found only gcc 4.2 and 4.3 are listed. I tried to search for gcc and g++ 4.3 from synaptic, however, they are not longer there. Could you please give me a little bit more hints of what to do next?

@Laurence: I'd like to try out OF.2.0.x without having to re-adjust my solvers but thanks to your hints I think the changes are not very difficult to implement.

Regards,
Robert
rob3rt 0ng is offline   Reply With Quote

Old   August 27, 2011, 14:42
Default
  #10
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,223
Blog Entries: 32
Rep Power: 71
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Hi Robert,

Quote:
Originally Posted by rob3rt 0ng View Post
@Bruno: As you suggested, I downloaded gcc and g++ 4.4 from the synaptic manager then followed your instructions but it gave me the same compilation errors complaining about wmake error: file 'Make/linux64GccDPOpt/objectFiles' could not be created.
Mmm... I've got a feeling that you're not managing properly the various OpenFOAM versions you have.

To have more than one version available on your system, remove/comment any lines related to OpenFOAM that you have in the file "$HOME/.bashrc" and (for example) add these instead:
Code:
alias of16x='. $HOME/OpenFOAM/OpenFOAM-1.6.x/etc/bashrc'
alias of20x='. $HOME/OpenFOAM/OpenFOAM-2.0.x/etc/bashrc'
Then whenever you start a new terminal window or tab, you can choose which environment you want by running of16x or of20x.
Keep in mind that you cannot change OpenFOAM environments when on the same terminal window or tab; this means that if you want to run solvers from both versions at the same time, you'll need two separate terminal windows/tabs for running each one.

Quote:
Originally Posted by rob3rt 0ng View Post
Then I looked up in ~/OpenFOAM/OpenFOAM-1.6.x/wmake/rules and found only gcc 4.2 and 4.3 are listed. I tried to search for gcc and g++ 4.3 from synaptic, however, they are not longer there.
That's somewhat normal. The rules linuxGcc and linux64Gcc will work well with Gcc 4.4.

Quote:
Originally Posted by rob3rt 0ng View Post
Could you please give me a little bit more hints of what to do next?
Again, I still have the feeling that your shell environment is contaminated with more than one OpenFOAM environment. Nonetheless, here's what I suggest:
  1. What do these commands output:
    Code:
    echo $WM_CC
    echo $WM_CXX
    which $WM_CC
    which $WM_CXX
    They should show you where gcc-4.4 and g++-4.4 are.
  2. Restart the build with a clean start at OpenFOAM's 1.6.x project folder:
    Code:
    wcleanAll
    wcleanLnIncludeAll
    export WM_NCOMPPROCS=8
    ./Allwmake > make.log 2>&1
    8 is the number of cores/threads your machine has... well, change to the value that your machine has, since this will speed things up for the building part. The whole building process will be logged in the file make.log. This way it's easier to keep track of what's going on.
  3. In case this still don't build, edit make.log, search & replace any sensitive data; save and compress and attach the file in your next post.
Other than this, only with more information will I be able to figure out what's going on...

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   August 27, 2011, 23:21
Default
  #11
Member
 
Robert Ong
Join Date: Aug 2010
Posts: 45
Rep Power: 6
rob3rt 0ng is on a distinguished road
Hi Bruno,

I've only got OF-1.6.x now so there should not be any sourcing environment problems I hope.

These commands gave me
Code:
echo $WM_CC: gcc-4.4
echo $WM_CXX: g++-4.4
which $WM_CC: /usr/bin/gcc-4.4
which $WM_CXX: /usr/bin/g++-4.4
just as you predicted.
However it still gave me the same compilation error. Please find the attached for the make.log, bashrc and settings.sh. I'm not very sure what do you mean by search & replace sensitive data so I didn't do this I hope you don't mind

Thanks and regards,
Robert

stuffs.tar.gz
rob3rt 0ng is offline   Reply With Quote

Old   August 28, 2011, 07:27
Default OpenFOAM 1.6.x on Ubuntu 11.04 Natty
  #12
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,223
Blog Entries: 32
Rep Power: 71
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Hi Robert,

I installed Natty 64bit in a virtual machine and had a go at it with OpenFOAM 1.6.x. Here are my findings:

Well, there is a binary not very well known as "cpp" which pre-processes code for GNU code building applications. This is a very important binary and in your system there should also exist a version for gcc 4.4 named cpp-4.4:
Code:
which cpp-4.4
If not, install it!
So edit the file "wmake/rules/linux64Gcc/general" and change the line:
Code:
CPP        = cpp $(GFLAGS)
To:
Code:
CPP        = cpp-4.4 $(GFLAGS)
Another tool needed to be installed: bison
Code:
sudo apt-get install bison
It's necessary for libscotch.

edit: binutils-dev also has to be installed:
Code:
sudo apt-get install binutils-dev
Now we must do a full clean up (or almost full) to the ThirdParty-1.6.x folder:
Code:
foam3rdParty
wcleanLnIncludeAll
./Allclean
wclean libso scotch_5.1/src/libscotch
wclean libso metis-5.0pre2/GKlib
wclean libso metis-5.0pre2/libmetis
( cd ParMetis-3.1 && WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB && wclean libso METISLib && wclean libso ParMETISLib )
wclean libso ParMGridGen-1.0/MGridGen/IMlib
wclean libso ParMGridGen-1.0/MGridGen/Lib
Note: the first command will jump to the ThirdParty-1.6.x folder.

Now it's time to clean up the OpenFOAM-1.6.x folder as well and have ago at it once more (the first command will jump to there):
Code:
foam
wcleanAll
wcleanLnIncludeAll
./Allwmake > make.log 2>&1
Note: if you started on a new terminal, don't forget to set WM_NCOMPPROCS.

More notes: Ignore the errors related to "hoard" and "fsbmalloc": those are very outdated pieces of technology that are no longer supported... at least in OpenFOAM 1.7.x and 2.0.x.

It's still building on my virtual machine, so I don't know if there any more errors to come by...

Best regards,
Bruno

Last edited by wyldckat; August 28, 2011 at 07:44. Reason: edit: binutils-dev also has to be installed
wyldckat is offline   Reply With Quote

Old   August 29, 2011, 00:34
Default
  #13
Member
 
Robert Ong
Join Date: Aug 2010
Posts: 45
Rep Power: 6
rob3rt 0ng is on a distinguished road
Hi Bruno,

That solved it! Thanks very much for your time and sorry for the work/time you spent for this during the weekend

Kind Regards,
Robert
rob3rt 0ng is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM 1.7.1 installation problem on OpenSUSE 11.3 flakid OpenFOAM Installation 16 December 28, 2010 08:48
critical error during installation of openfoam Fabio88 OpenFOAM Installation 21 June 2, 2010 03:01
Problems in compiling paraview in Suse 10.3 platform chiven OpenFOAM Installation 3 December 1, 2009 07:21
OpenFOAM15 installables are incomplete problem with paraFoam tryingof OpenFOAM Bugs 17 December 7, 2008 04:41
Regarding FoamX running Kindly help out hariya03 OpenFOAM Pre-Processing 0 April 18, 2008 04:26


All times are GMT -4. The time now is 22:28.