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

OF 1.9 (aka OF 2.1) on Mac OS X

Register Blogs Community New Posts Updated Threads Search

Like Tree25Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 23, 2012, 12:58
Default
  #101
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 gpeng View Post
I did every steps before building the openfoam, but the compiling job has been running for the whole day and still not finish....is that normal?
Depends on your machine .... Is it still "moving" (occasional messages of the compiler) and is still using CPU?
gschaider is offline   Reply With Quote

Old   August 24, 2012, 10:23
Default Mountain Lion 10.8
  #102
Member
 
sushant's Avatar
 
Join Date: Mar 2009
Location: Switzerland
Posts: 40
Rep Power: 17
sushant is on a distinguished road
Thanks once again Bernhard for the patches. (Almost) everything works like a charm on Mountain Lion 10.8.

For some reason however, I don't see Gcc46 being used while compiling openmpi-1.5.3 (and later on, ptscotch and the gang, and ultimately Pstream). Maybe it was something I did (applied both gcc42/46 patches), but I kept getting this a lot:

Code:
+ Pstream/Allwmake
+ wmake libso dummy
+ case "$WM_MPLIB" in
+ set +x
make[2]: mpicc: No such file or directory
In file included from PstreamGlobals.C:26:0:
PstreamGlobals.H:39:17: fatal error: mpi.h: No such file or directoryUOPwrite.C:29:17: fatal error: mpi.h: No such file or directory

compilation terminated.
compilation terminated.
UIPread.C:29:17: fatal error: mpi.h: No such file or directory
compilation terminated.
UPstream.C:26:17: fatal error: mpi.h: No such file or directory
compilation terminated.
make: *** [Make/darwinIntel64GccDPOptOPENMPI/UPstream.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Make/darwinIntel64GccDPOptOPENMPI/PstreamGlobals.o] Error 1
make: *** [Make/darwinIntel64GccDPOptOPENMPI/UIPread.o] Error 1
make: *** [Make/darwinIntel64GccDPOptOPENMPI/UOPwrite.o] Error 1
For those who get this (remember there is no system MPICC from the days of OS X 10.7), it can be worked around by manually doing a configure/make/make install within the openmpi-1.5.3 folder, make sure you copy the configure arguments from the ThirdParty Allwmake script. This time for me the configure script picked up gcc-mp-46. I also removed the --disable-mpi-cxx for something else (did that do it? )

For reference, I did not do anything with gcc_select or port select gcc or the like. Clean slate.

Anyway, the only things that fail to build are multiphaseEulerFoam and R (utilities/postProcessing/turbulence), guessing due to a change in the sourcecode after the patches were released.
__________________
If you only have a hammer, you tend to see every problem as a nail.
sushant is offline   Reply With Quote

Old   August 25, 2012, 06:46
Default
  #103
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 to all!

Quote:
Originally Posted by sushant View Post
For some reason however, I don't see Gcc46 being used while compiling openmpi-1.5.3 (and later on, ptscotch and the gang, and ultimately Pstream).
Did you add this to the end of OpenFOAM's "etc/bashrc"?
Code:
export WM_CC='gcc-mp-4.6'
export WM_CXX='g++-mp-4.6'
This was on step #3 in at http://openfoamwiki.net/index.php/Ho...hes_and_tweaks

And mpicc is missing apparently because Open-MPI wasn't built properly You can confirm by running these commands:
  • Check if mpicc exists:
    Code:
    which mpicc
  • Check if any binary exists where Open-MPI is meant to be installed:
    Code:
    ls -l $MPI_ARCH_PATH
  • Check where mpirun is located:
    Code:
    which mpirun

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   August 25, 2012, 09:54
Default
  #104
New Member
 
Max
Join Date: Aug 2012
Posts: 6
Rep Power: 14
gpeng is on a distinguished road
Quote:
Originally Posted by gschaider View Post
Depends on your machine .... Is it still "moving" (occasional messages of the compiler) and is still using CPU?
Yeah, it was and I waited for like 24hrs lol anyway, it's all good now...but another problem arises, I don't know how to edit the file ~/.alias, could you please explain in detail?

Is it just typing ~/.alias in the terminal? I tried but nothing happened..

Thanks again for helping.
gpeng is offline   Reply With Quote

Old   August 25, 2012, 17:08
Wink Help
  #105
New Member
 
David Young
Join Date: Aug 2012
Posts: 3
Rep Power: 14
discodave is on a distinguished road
Hi and greetings to all

This thread has been great and helped with a lot of the errors I have faced but I have now been going round in circles for over a week.

I am pretty new to Unix and could do with some pointers in the right direction.

The errors I am seeing are like the following

gcc=mp-4.6 -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_RENAME_PARSER -Drestrict=__restrict -DSCOTCH_VERSION=5 -DSCOTCH_RELEASE=1 -DSCOTCH_PATCHLEVEL=10 dummysizes.c -o dummysizes -lz -lm -lrt

mpicc -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_RENAME_PARSER -Drestrict=__restrict -DSCOTCH_PTSCOTCH -DSCOTCH_VERSION=5 -DSCOTCH_RELEASE=1 -DSCOTCH_PATCHLEVEL=10 dummysizes.c -o dummysizes -lz -lm -lrt
Cannot open configuration file /Users/davidyoung/OpenFOAM/ThirdParty-2.1.0/platforms/darwinIntel64Gcc46/openmpi-1.5.3/share/openmpi/mpicc-wrapper-data.txt
Error parsing data file mpicc: Not found

Log file attached. Any

Any help would be appreciated
Attached Files
File Type: gz make.log.tar.gz (6.1 KB, 3 views)
discodave is offline   Reply With Quote

Old   August 26, 2012, 08:20
Default
  #106
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
@gpeng:
Quote:
Originally Posted by gpeng View Post
Yeah, it was and I waited for like 24hrs lol anyway, it's all good now...but another problem arises, I don't know how to edit the file ~/.alias, could you please explain in detail?
I've updated this section: http://openfoamwiki.net/index.php/Ho...using_ParaView
Quote:
Edit the file ~/.alias (e. g. Text Wrangler, pico or nano) and add the following two lines:
Code:
alias paraview="/Applications/ParaView\ 3.14.0-RC2.app/Contents/MacOS/paraview"
alias parax="touch case.foam && paraview --data=case.foam &"
Note: Adapt the first line to the real path of your ParaView installation!
Underlined is the example I've copy-pasted from a previous occurrence in that wiki page.




__________________________________________________ ______
@discodave:
Quote:
Originally Posted by discodave View Post
This thread has been great and helped with a lot of the errors I have faced but I have now been going round in circles for over a week.

I am pretty new to Unix and could do with some pointers in the right direction.

The errors I am seeing are like the following

gcc=mp-4.6 -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_RENAME_PARSER -Drestrict=__restrict -DSCOTCH_VERSION=5 -DSCOTCH_RELEASE=1 -DSCOTCH_PATCHLEVEL=10 dummysizes.c -o dummysizes -lz -lm -lrt
Edit the file "OpenFOAM-2.1.0/etc/bashrc" and check if you have these two lines:
Code:
export WM_CC='gcc-mp-4.6'
export WM_CXX='g++-mp-4.6'
Because according to the output you've got, it looks like you have this instead:
Code:
export WM_CC='mp-4.6'
export WM_CXX='mp-4.6'
__________________
wyldckat is offline   Reply With Quote

Old   August 26, 2012, 18:51
Default
  #107
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 discodave View Post
Hi and greetings to all

This thread has been great and helped with a lot of the errors I have faced but I have now been going round in circles for over a week.

I am pretty new to Unix and could do with some pointers in the right direction.

The errors I am seeing are like the following

gcc=mp-4.6 -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_RENAME_PARSER -Drestrict=__restrict -DSCOTCH_VERSION=5 -DSCOTCH_RELEASE=1 -DSCOTCH_PATCHLEVEL=10 dummysizes.c -o dummysizes -lz -lm -lrt

mpicc -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_RENAME_PARSER -Drestrict=__restrict -DSCOTCH_PTSCOTCH -DSCOTCH_VERSION=5 -DSCOTCH_RELEASE=1 -DSCOTCH_PATCHLEVEL=10 dummysizes.c -o dummysizes -lz -lm -lrt
Cannot open configuration file /Users/davidyoung/OpenFOAM/ThirdParty-2.1.0/platforms/darwinIntel64Gcc46/openmpi-1.5.3/share/openmpi/mpicc-wrapper-data.txt
Error parsing data file mpicc: Not found

Log file attached. Any

Any help would be appreciated
You're using a selfcompiled version of OpenMPI (the one in ThirdParty) right? Seems like that one is faulty. Try running mpicc on its own on some regular C-source and see what the problem is.

Can't reproduce the problem myself as I'm using the openmpi from MacPorts
gschaider is offline   Reply With Quote

Old   August 27, 2012, 12:17
Default
  #108
New Member
 
David Young
Join Date: Aug 2012
Posts: 3
Rep Power: 14
discodave is on a distinguished road
Thanks Bernard,

I had an error in the bashrc but I have corrected this and still see the same errors.

I will try your suggestion and let you know how I get on.

Thank you for your support


David
discodave is offline   Reply With Quote

Old   August 29, 2012, 18:05
Default
  #109
qzt
New Member
 
Join Date: Aug 2012
Posts: 10
Rep Power: 14
qzt is on a distinguished road
Hello,

I just uploaded the disk image (dmg file) of OpenFOAM-2.1.0 compiled on my macbookpro running lion (os 10.7).
Maybe someone having difficulty to compile or want to save some time can just use it.

http://bit.ly/QzxHFG

I think after mounting the disk image, one can try to source the bashrc and run the foamInstallationTest to see if it works on your mac.
qzt is offline   Reply With Quote

Old   September 9, 2012, 12:53
Default
  #110
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
For future reference and to complement qzt's post, I think the following instructions should help people use this image (personally I haven't tested them ):
__________________
wyldckat is offline   Reply With Quote

Old   September 19, 2012, 14:31
Default
  #111
BCD
New Member
 
Join Date: Sep 2012
Posts: 10
Rep Power: 14
BCD is on a distinguished road
Is it still necessary to install these patches when installing OF 2.1.1 on a Mac 10.6.8?
BCD is offline   Reply With Quote

Old   September 19, 2012, 17:26
Default
  #112
New Member
 
David Young
Join Date: Aug 2012
Posts: 3
Rep Power: 14
discodave is on a distinguished road
Bernhard / Bruno,

Sorry for the delay in getting back to you.

After trying many things and still failing and getting errors I installed mountain lion, latest version of Xcode and started again.

I am happy to say following all the instruction on this thread I now have a functional version of OpenFOAM.

Thank you for your help.
discodave is offline   Reply With Quote

Old   September 19, 2012, 17:30
Default
  #113
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 BCD View Post
Is it still necessary to install these patches when installing OF 2.1.1 on a Mac 10.6.8?
I'd think so. Yes (unless Mac support crept into the official release). They basically fix issues where headers are located differently on the Mac, the completely different dynamic linker and the completely different ABI (to allow tracebacks)
__________________
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   September 24, 2012, 03:19
Default blockMesh but no icoFOAM
  #114
BCD
New Member
 
Join Date: Sep 2012
Posts: 10
Rep Power: 14
BCD is on a distinguished road
So, I've tried compiling a few times now with increasing success but something is still eluding me.
I can run blockMesh on a copy of a tutorial case but the icoFOAM command is not found.
Does any of this make you laugh?
Thanks.

here's what I've done so far:

Running Mac 10.6.8
OpenFOAM 2.1.1
ThirdParty 2.1.1
gcc4.2.1
Open MPI 1.5.3

I've edited the patch name to
ThirdParty-2.1.1-Mac.patch
and deleted the seven lines at the end preceding the
\ No newline at end of file
and applied it within the ThirdParty-2.1.1 directory

And applied these within the OpenFOAM-2.1.1 directory
OpenFOAM-2.1.x-Mac.patch
OpenFOAM-2.1.x-Mac-gcc46.patch

and finally I've edited the OpenFOAM-2.1.1>etc>bashrc file with:
export WM_COMPILER=Gcc46
ulimit -n 1024
export WM_NCOMPPROCS=2
and
just before the #-------- end of File
added
export WM_CC='gcc-mp-4.6'
export WM_CXX='g++-mp-4.6'
BCD is offline   Reply With Quote

Old   September 24, 2012, 11:13
Default
  #115
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
Did you check if gcc 4.6 is visible?
Code:
which gcc-mp-4.6
which g++-mp-4.6
__________________
wyldckat is offline   Reply With Quote

Old   September 24, 2012, 11:23
Default
  #116
BCD
New Member
 
Join Date: Sep 2012
Posts: 10
Rep Power: 14
BCD is on a distinguished road
Thanks Bruno,

from the prompt I get:

$ which gcc-mp-4.6
/opt/local/bin/gcc-mp-4.6


and


$ which g++-mp-4.6
/opt/local/bin/g++-mp-4.6


does this help?
BCD is offline   Reply With Quote

Old   September 24, 2012, 11:37
Default
  #117
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
Mmm... OK, so my hunch wasn't correct

OK, then I suggest following the instructions from section "2.6.1 Diagnosing problems ": http://openfoamwiki.net/index.php/Ho...osing_problems
__________________
wyldckat is offline   Reply With Quote

Old   September 24, 2012, 12:42
Default
  #118
BCD
New Member
 
Join Date: Sep 2012
Posts: 10
Rep Power: 14
BCD is on a distinguished road
here are some of the first error messages, which I read often hold the clues we need:

mkdir /Users/User7/OpenFOAM/ThirdParty-2.1.1/platforms/darwinIntel64Gcc46/scotch_5.1.11/include/openmpi-1.5.3
cp -f ../bin/[agm]* /Users/User7/OpenFOAM/ThirdParty-2.1.1/platforms/darwinIntel64Gcc46/scotch_5.1.11/bin
cp: ../bin/[agm]*: No such file or directory
make: [install] Error 1 (ignored)


Undefined symbols for architecture x86_64:
"Foam::incompressible::turbulenceModel::typeNa me", referenced from:
Foam::calc(Foam::argList const&, Foam::Time const&, Foam::fvMesh const&) in R.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[3]: *** [/Users/User7/OpenFOAM/OpenFOAM-2.1.1/platforms/darwinIntel64Gcc46DPOpt/bin/R] Error 1
make[2]: *** [R] Error 2
BCD is offline   Reply With Quote

Old   September 24, 2012, 12:47
Default
  #119
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
See post #87: http://www.cfd-online.com/Forums/ope...tml#post370219
__________________
wyldckat is offline   Reply With Quote

Old   September 24, 2012, 13:06
Default
  #120
BCD
New Member
 
Join Date: Sep 2012
Posts: 10
Rep Power: 14
BCD is on a distinguished road
Thanks Bruno,
I really appreciate your wisdom & tenacity here.

wmake failed, here's the log,
Attached Files
File Type: zip wmake log.txt.zip (1.1 KB, 9 views)
BCD is offline   Reply With Quote

Reply

Tags
compilation error


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
Extend Project 1.6-ext Binary Release for Mac OS X hjasak OpenFOAM Announcements from Other Sources 26 November 5, 2013 17:50
Openfoam mac: Compiling custom libraries atareen64 OpenFOAM 3 April 14, 2011 12:01
OpenFOAM-1.6 on Mac OS X 10.6.1 elvisjohndowson OpenFOAM 6 October 21, 2009 16:45
Mac Simple Install Request or Processing Assistance Help sjohnson OpenFOAM Installation 4 December 12, 2008 08:46
MAC + SOLA for free surface T Main CFD Forum 1 April 11, 2001 14:43


All times are GMT -4. The time now is 18:15.