CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Installing OpenFoam 2.1.1 on OS X 10.8.2 (Mountain Lion) (https://www.cfd-online.com/Forums/openfoam-installation/109992-installing-openfoam-2-1-1-os-x-10-8-2-mountain-lion.html)

TomGEO December 2, 2012 12:36

Installing OpenFoam 2.1.1 on OS X 10.8.2 (Mountain Lion)
 
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

wyldckat December 2, 2012 13:16

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

TomGEO December 2, 2012 16:16

Hi Bruno,

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

Cheers Thomas

wyldckat December 3, 2012 15:53

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

TomGEO December 4, 2012 05:08

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

gschaider December 4, 2012 05:19

Quote:

Originally Posted by TomGEO (Post 395659)
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)

TomGEO December 4, 2012 05:58

Quote:

Originally Posted by gschaider (Post 395661)
(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 December 4, 2012 08:20

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

wyldckat December 4, 2012 16:25

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 (Post 390020)
    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

gschaider December 4, 2012 18:34

Quote:

Originally Posted by wyldckat (Post 395778)
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)

sushant December 11, 2012 06:38

Files not updated after re-compilation
 
(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

wyldckat December 11, 2012 11:08

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!


All times are GMT -4. The time now is 08:07.