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

Installing OpenFoam 2.1.1 on OS X 10.8.2 (Mountain Lion)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 2, 2012, 13:36
Question Installing OpenFoam 2.1.1 on OS X 10.8.2 (Mountain Lion)
  #1
New Member
 
Thomas Becker
Join Date: Dec 2012
Posts: 5
Rep Power: 14
TomGEO is on a distinguished road
Dear all,

I'm running into some problem installing OF in the operating system mentioned in the title. I followed the description at http://openfoamwiki.net/index.php/Ho...enFOAM_v21_Mac, and until now it looked like the installation process will work. But... NO.

When I call
Code:
sudo ./Allwmake > make.log 2>&1
the log-file reads:

./Allwmake: line 4: wmakeCheckPwd: command 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 started completely from scratch... Installing macports, Xcode and all the other things. Don't know if there have to be some adjustments done to openmpi or not.

which $WM_CC brings /opt/local/bin/gcc-mp-4.6
which $WM_CXX brings /opt/local/bin/g++-mp-4.6

I simply have no clue what to do with the error message and hope you can help.

Thanks in advance,
Thomas
TomGEO is offline   Reply With Quote

Old   December 2, 2012, 14:16
Default
  #2
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
Greetings Thomas and welcome to the forum!

Well, you're not following the instructions to the letter
In section 2.6 it does not tell you to run Allwmake with sudo! That's why it's not working.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   December 2, 2012, 17:16
Default
  #3
New Member
 
Thomas Becker
Join Date: Dec 2012
Posts: 5
Rep Power: 14
TomGEO is on a distinguished road
Hi Bruno,

thanks for the welcome and the fast reply. Unfortunately it's the same error message when I try without sudo.

Cheers Thomas
TomGEO is offline   Reply With Quote

Old   December 3, 2012, 16:53
Default
  #4
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
Hi Thomas,

Try running:
Code:
. $HOME/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc
./Allwmake > make.log 2>&1
If it also doesn't work, check if things are where they should be. In other words, the following commands:
Code:
ls -l $HOME/OpenFOAM
ls -l $HOME/OpenFOAM/OpenFOAM-2.1.1
Should show on the first one, the folders "OpenFOAM-2.1.1" and "ThirdParty-2.1.1"; on the second one, it should show a folder structure similar to the one shown here: https://github.com/OpenFOAM/OpenFOAM-2.1.x

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   December 4, 2012, 06:08
Default
  #5
New Member
 
Thomas Becker
Join Date: Dec 2012
Posts: 5
Rep Power: 14
TomGEO is on a distinguished road
Hi Bruno,
Code:
. $HOME/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc
runs without any error message or other response
./Allwmake > make.log 2>&1
./Allwmake: line 4: wmakeCheckPwd: command 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.
/Users/Tom/OpenFOAM/OpenFOAM-2.1.1/make.log (END) 
Code:
ls -l $HOME/OpenFOAM
lrwxr-xr-x  1 Tom  staff  24 Dec  2 17:02 /Users/Tom/OpenFOAM -> /Volumes/OpenFOAM-v2.1.1
ls -l $HOME/OpenFOAM/OpenFOAM-2.1.1
s -l $HOME/OpenFOAM/OpenFOAM-2.1.1
total 526704
-rwxr-xr-x@  1 Tom  staff        923 May 24  2012 Allwmake
-rw-r--r--@  1 Tom  staff      35647 May 24  2012 COPYING
-rw-rw-rw-@  1 Tom  staff       4174 Jan  1  2012 OpenFOAM-2.1.x-Mac-gcc46.patch
-rw-rw-rw-@  1 Tom  staff      37974 Jan  1  2012 OpenFOAM-2.1.x-Mac.patch
-rw-rw-rw-@  1 Tom  staff      16264 Jan  1  2012 OpenFOAM-2.1.x-gcc42.patch
-rw-r--r--@  1 Tom  staff       6522 May 24  2012 README.html
-rw-r--r--@  1 Tom  staff       1585 May 24  2012 README.org
-rw-r--r--@  1 Tom  staff  269547520 Dec  2 14:38 ThirdParty-2.1.1.tar
drwxr-xr-x@  6 Tom  staff        204 May 24  2012 applications
drwxr-xr-x@ 63 Tom  staff       2142 Dec  2 15:58 bin
drwxr-xr-x@  8 Tom  staff        272 May 24  2012 doc
drwxr-xr-x@  9 Tom  staff        306 Dec  2 15:58 etc
-rw-r--r--   1 Tom  staff        237 Dec  2 22:13 make.log
drwxr-xr-x@ 33 Tom  staff       1122 May 24  2012 src
drwxr-xr-x@ 19 Tom  staff        646 May 24  2012 tutorials
drwxr-xr-x@ 23 Tom  staff        782 Dec  2 15:58 wmake
Looks to me like everything is there. So far I have all the folders in the virtual drive and have a link to that one as shown in the response of the first ls command. Did I miss something in the installation manual but I haven't seen anything about moving things out of the virtual drive and into my home directory. Do I have to copy the folders from the virtual drive in my home directory and then it runs? I thought the installation will be done by running Allwmake.

Best regards,
Thomas

Last edited by TomGEO; December 4, 2012 at 06:53.
TomGEO is offline   Reply With Quote

Old   December 4, 2012, 06:19
Default
  #6
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by TomGEO View Post
Hi Bruno,
Code:
. $HOME/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc
./Allwmake > make.log 2>&1
Doesn't work since things aren't where they are supposed to be.
Code:
ls -l $HOME/OpenFOAM
lrwxr-xr-x  1 Tom  staff  24 Dec  2 17:02 /Users/Tom/OpenFOAM -> /Volumes/OpenFOAM-v2.1.1
ls -l $HOME/OpenFOAM/OpenFOAM-2.1.1
ls: /Users/Tom/OpenFOAM/OpenFOAM-2.1.1: No such file or directory
So far I have all the folders in the virtual drive and have a link to that one as shown in the response of the first ls command. I guess I missed something in the installation manual but I haven't seen anything about moving things out of the virtual drive and into my home directory. Does this mean that I simply copy the folders from the virtual drive in my home directory and then it runs?

Best regards,
Thomas
Don't copy. Your home folder is probably not on a case-sensitive drive. That's why you do a symbolic link (http://en.wikipedia.org/wiki/Symbolic_link). Because it looks like the folder is in your home when in fact it is on a case-sensitive filesystem.

Anyway: about your problem: what does

ls $HOME/OpenFOAM/

say (with the slash)? And what is the output of

ls /Volumes/OpenFOAM-v2.1.1

(my guess is that the symbolic link points to Nirvana OR that the OF-folder on the drive is named differently)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   December 4, 2012, 06:58
Default
  #7
New Member
 
Thomas Becker
Join Date: Dec 2012
Posts: 5
Rep Power: 14
TomGEO is on a distinguished road
Quote:
Originally Posted by gschaider View Post
(my guess is that the symbolic link points to Nirvana OR that the OF-folder on the drive is named differently)
You are absolutely right... I just re-phrased my response but you picked it up faster then I could press save!

The stuff is all there. I restarted the computer and forgot in the first place to mount the virtual drive the symbolic link is pointing to. Hence, Nirvana was the right address I suppose.

Cheers Thomas
TomGEO is offline   Reply With Quote

Old   December 4, 2012, 09:20
Default
  #8
New Member
 
Thomas Becker
Join Date: Dec 2012
Posts: 5
Rep Power: 14
TomGEO is on a distinguished road
Hi, I just went a bit further in the installation manual and edited etc/bashrc with respect to openmpi. Since I installed it from macports I edited the line export WM_MPLIB=OPENMPI to export WM_MPLIB=SYSTEMOPENMPI.

Thought give it a try again and ran
Code:
. $HOME/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc
-bash: mpicc: command not found
-bash: mpicc: command not found
I did overcome the problem with export PATH=$PATH:/opt/local/lib/openmpi/bin/

And I'm getting another error:
Code:
. $HOME/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc
Cannot open configuration file /Users/Tom/OpenFOAM/ThirdParty-2.1.1/platforms/darwinIntel64Gcc46/openmpi-1.5.3/share/openmpi/mpicc-wrapper-data.txt
Nothing to argue with that... there is no directory platforms in ThirdParty-2.1.1! So I'm missing the whole lot of platforms/darwinIntel64Gcc46/openmpi-1.5.3/share/openmpi/mpicc-wrapper-data.txt.

Did somebody else had the same problem and what did you do to solve the issue?

Cheers Thomas

Last edited by TomGEO; December 4, 2012 at 10:36. Reason: solved one problem
TomGEO is offline   Reply With Quote

Old   December 4, 2012, 17:25
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
Hi Thomas and Bernhard,

I can only guess on this one... but a quick search lead to the following solutions:
  1. http://www.underworldproject.org/doc...IDownload.html - looks like you need to define where the library is installed:
    Code:
    export MPI_DIR=/opt/local/lib/openmpi
  2. I didn't move this thread to the main one before, because things are getting a bit long on it... but on http://www.cfd-online.com/Forums/ope...tml#post390020 post #153 you can find this:
    Quote:
    Originally Posted by Nicrheo View Post
    I have been working out the problem trying to update the release of my openmpi and flex, consulting here
    He basically made a custom installation of Open-MPI.
    But I'm guessing the first solution should do the trick.
  3. Yet another possibility is that you needed to start a new terminal after installing Open-MPI, so that the environment would be up-to-date and the related variables would be up and running by default...
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   December 4, 2012, 19:34
Default
  #10
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by wyldckat View Post
Hi Thomas and Bernhard,

I can only guess on this one... but a quick search lead to the following solutions:
  1. http://www.underworldproject.org/doc...IDownload.html - looks like you need to define where the library is installed:
    Code:
    export MPI_DIR=/opt/local/lib/openmpi
  2. I didn't move this thread to the main one before, because things are getting a bit long on it... but on http://www.cfd-online.com/Forums/ope...tml#post390020 post #153 you can find this:
    He basically made a custom installation of Open-MPI.
    But I'm guessing the first solution should do the trick.
  3. Yet another possibility is that you needed to start a new terminal after installing Open-MPI, so that the environment would be up-to-date and the related variables would be up and running by default...
Best regards,
Bruno
And to be sure check whether OPAL_PREFIX is being set and unset it (some configurations set it and this makes openmpi look for files in a different location)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   December 11, 2012, 07:38
Default Files not updated after re-compilation
  #11
Member
 
sushant's Avatar
 
Join Date: Mar 2009
Location: Switzerland
Posts: 40
Rep Power: 17
sushant is on a distinguished road
(This might belong in another thread; but I experience it only on Mac OS X)

I have OF 2.1.x on Mountain Lion and it works fine. When I change/add something in src/lagrangian/intermediate/submodels/Kinematic/InjectionModels/ConeNozzleInjection/ConeNozzleInjection.C, and do a

wmake libso .

in src/lagrangian, it says everything is already up to date. I can force it by

wclean all; wmake libso .

in the same folder, and the library is compiled afresh. But when I run sprayFoam on a case with ConeNozzleInjection the changes I made to the code are not reflected. I can, for instance, see debug output that I added in ConeNozzleInjection, even after I remove it from the code and recompile lagrangian.

I give up after repeated attempts and just do an ./Allwmake in OpenFOAM-2.1.x and it works (i.e. updates are reflected) -- not immediately, but after a few hours. Is something being cached somewhere?

What is the correct way to update the lagrangian library without having to compile OpenFOAM afresh?

Regards,
Sushant

P.S. Same behaviour on mlion + 2.1.x and lion + 2.0.x

Last edited by sushant; December 11, 2012 at 07:47. Reason: platform info
sushant is offline   Reply With Quote

Old   December 11, 2012, 12:08
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 reply:
  1. Look at "ConeNozzleInjection.H": https://github.com/OpenFOAM/OpenFOAM...zleInjection.H
  2. Notice the "NoRepository" near the end? Don't know what it is?
  3. Googling "NoRepository"... very first hit I got: http://www.cfd-online.com/Forums/ope...epository.html
  4. In essence: "ConeNozzleInjection" is a template class. Templates by default are not actual classes, they merely outline a basis for classes. This means that "ConeNozzleInjection.C" is not actually inside the library where the code is, it's only present inside the classes that actually are created from them.
  5. Solution: Look for which libraries and applications do have classes that implement "ConeNozzleInjection". Those are the ones that do need to be rebuilt!
__________________
wyldckat 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
Installing OpenFOAM 2.1.1 and ParaView 3.12.0 on Ubuntu 12.10 wyldckat OpenFOAM Installation 14 February 12, 2013 05:43
Is OpenFOAM 2.1.1 Heat Transfer applications working? fontania OpenFOAM Running, Solving & CFD 0 September 21, 2012 00:15
solver icoFsiFoam on OpenFOAM 2.1.1 orman05 OpenFOAM 3 August 5, 2012 11:31
probes function not working in Openfoam 2.1.1 nandiganavishal OpenFOAM 7 July 26, 2012 12:06
OpenFOAM 2.1.1 Installation Errors on RHEL 6.3 tgvosk OpenFOAM Installation 15 July 5, 2012 19:43


All times are GMT -4. The time now is 19:06.