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   June 4, 2012, 10:48
Default Can't get the thing compiled
  #81
New Member
 
Mark Storrings
Join Date: May 2012
Posts: 2
Rep Power: 0
mstorrings is on a distinguished road
I've attached a copy of the compile log.

Despite following the instructions, I'm still getting errors about openmpi versions and scortch.

Any help would be greatly appreciated.
Attached Files
File Type: gz make.log.tar.gz (77.2 KB, 14 views)
mstorrings is offline   Reply With Quote

Old   June 4, 2012, 11:15
Default Compiling thirdparty
  #82
New Member
 
William Case
Join Date: Sep 2011
Posts: 6
Rep Power: 15
wrcase is on a distinguished road
Dear Mark

I see in you compile log that you have:
================================================== ==========================
== Configuring Open MPI
================================================== ==========================

*** Startup tests
checking build system type... i386-apple-darwin10.8.0
checking host system type... i386-apple-darwin10.8.0
checking target system type... i386-apple-darwin10.8.0
checking for gcc... gcc
checking whether the C compiler works... no
================================================== ==========================

I don't think the Openmpi compile likes your gcc compiler. I had a similar problem. Even though I was using gcc-mp-4.6 and g++-mp-4.6 for OpenFOAM compiling, the thirdparty compile used the system default gcc (which was not gcc-mp-4.6). The way I overcame this was to ensure gcc pointed to gcc-mp-4.6 and g++ pointed to g++-mp-4.6. Thus when I type in gcc -v it returns a 4.6 version of gcc instead of some legacy version. Note, I did the same with gfortran as well, which may not be necessary.

I hope this helps,
Bill
wrcase is offline   Reply With Quote

Old   June 6, 2012, 20:48
Default
  #83
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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!

I didn't notice this before (because I don't have a Mac ), but I've written the proper fix for this in the following section: http://openfoamwiki.net/index.php/Ho...hes_and_tweaks - see the new point 3, which indicates that the code:
Code:
export WM_CC='gcc-mp-4.6'
export WM_CXX='g++-mp-4.6'
should be placed at the end of OpenFOAM's "bashrc" file.

Best regards,
Bruno
arman3939 likes this.
__________________
wyldckat is offline   Reply With Quote

Old   June 7, 2012, 19:32
Default
  #84
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
Greetings to all!

I didn't notice this before (because I don't have a Mac ), but I've written the proper fix for this in the following section: http://openfoamwiki.net/index.php/Ho...hes_and_tweaks - see the new point 3, which indicates that the code:
Code:
export WM_CC='gcc-mp-4.6'
export WM_CXX='g++-mp-4.6'
should be placed at the end of OpenFOAM's "bashrc" file.

Best regards,
Bruno
Thank you Bruno. You're one of the major contributors to this thread. My guess is that your motive is to embarrass us MacHeads, right?
Seriously: thanks
arman3939 likes this.
gschaider is offline   Reply With Quote

Old   June 8, 2012, 09:27
Default
  #85
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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 Bernhard,

You're welcome!

Quote:
Originally Posted by gschaider View Post
My guess is that your motive is to embarrass us MacHeads, right?
Well, there's always that
But the main objectives are:
  • Minimize/neutralize posts here on the forum about "I can't install OpenFOAM on Mac, please help".
  • I like a good challenge There is little comparable to debugging a machine that one doesn't have access to .
  • Since my skills with CFD+OpenFOAM are far inferior to my skills in installing OpenFOAM, I still try to help/document as much as I can. Everyone shall be able to install OpenFOAM
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   July 7, 2012, 07:19
Default OpenFOAM 2.1.x Installation fails
  #86
hjg
New Member
 
Heinz-Jürgen Geurtz
Join Date: Mar 2009
Location: Althengstett-Neuhengstett, Baden-Württemberg, Deutschland
Posts: 10
Rep Power: 17
hjg is on a distinguished road
Dear All,

well, after reading a lot of threads I feel frustrated. My OpenFOAM-Installations fail with various settings (and I tried it often). Also following the instructions is not successful. (!!??) It seems that I'm the only one without success...

My system is OS-X 10.7.4 together with Xcode and macports openmpi +gcc46 and try to build with SYTEMOPENMPI.

When making OpenFOAM receive the following final error-message.
Quote:
OpenFOAM/OpenFOAM-2.1.x/platforms/darwinIntel64Gcc46DPOpt/bin/twoPhaseEulerFoam
make[1]: Target `application' not remade because of errors.
make: *** [multiphase] Error 2
make: Target `application' not remade because of errors.
When i start building OpenFOAM I get multiple messages saying that files couldn't be found...
Quote:
Note: ignore spurious warnings about missing mpicxx.h headers

wmake libso mpi
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file UOPwrite.C
Making dependency list for source file UIPread.C
could not open file omp.h for source file UOPwrite.C
For more information I attached the log file.

Any hint ...???...
Thank you for your trouble....
Attached Files
File Type: gz make.log.tar.gz (77.9 KB, 7 views)
__________________
Live long and prosper ...

Glückauf
HJG
hjg is offline   Reply With Quote

Old   July 7, 2012, 08:08
Default
  #87
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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 HJG,

As the message begins to say:
Code:
Note: ignore spurious warnings about missing mpicxx.h headers

wmake libso mpi
Which means you can ignore error messages such as:
Code:
could not open file ompi/mpi/cxx/op.h for source file UIPread.C
The real errors are more near the end, namely:
  • Code:
    Undefined symbols for architecture x86_64:
      "Foam::incompressible::turbulenceModel::typeName", 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/heinzjuergengeurtz/OpenFOAM/OpenFOAM-2.1.x/platforms/darwinIntel64Gcc46DPOpt/bin/R] Error 1
    make[2]: *** [R] Error 2
  • Code:
    Undefined symbols for architecture x86_64:
      "Foam::incompressible::turbulenceModel::typeName", referenced from:
          _main in multiphaseEulerFoam.o
    ld: symbol(s) not found for architecture x86_64
    collect2: ld returned 1 exit status
    make[2]: *** [/Users/heinzjuergengeurtz/OpenFOAM/OpenFOAM-2.1.x/platforms/darwinIntel64Gcc46DPOpt/bin/multiphaseEulerFoam] Error 1
    make[1]: *** [multiphaseEulerFoam] Error 2
This probably was because you used too many cores when building and a couple of files where damaged in the process.


Try the following commands for fixing this (assuming you have a working terminal with OpenFOAM environment active):
Code:
foam
cd applications/utilities/postProcessing/turbulence/R/
wclean
wmake


cd -
cd applications/solvers/multiphase/multiphaseEulerFoam
wclean all

wmake all
These two code blocks shouldn't show any error messages. The difference between wmake and wmake all is that the second one will call local Allwmake files if they exist.

Finally, run Allwmake in OpenFOAM's main folder once again to make sure everything is perfect

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   July 7, 2012, 12:05
Default
  #88
hjg
New Member
 
Heinz-Jürgen Geurtz
Join Date: Mar 2009
Location: Althengstett-Neuhengstett, Baden-Württemberg, Deutschland
Posts: 10
Rep Power: 17
hjg is on a distinguished road
Hello Bruno,
good idea.
I tried to build with WM_NCOMPPROCS=1. But, both "R" and "multiphaseEulerFoam" returned with exit status by collect2 (see attached files).

Quote:
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: *** [/Users/heinzjuergengeurtz/OpenFOAM/OpenFOAM-2.1.x/platforms/darwinIntel64Gcc46DPOpt/bin/R] Error 1

Quote:
Undefined symbols for architecture x86_64:
"Foam::incompressible::turbulenceModel::typeNa me", referenced from:
_main in multiphaseEulerFoam.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [/Users/heinzjuergengeurtz/OpenFOAM/OpenFOAM-2.1.x/platforms/darwinIntel64Gcc46DPOpt/bin/multiphaseEulerFoam] Error 1
I also tried to build it complete with Allwmake. F... !!!

I'm confused ...

Thank You in advance ....
Attached Files
File Type: gz make_R.log.tar.gz (864 Bytes, 3 views)
File Type: gz make_mpEF.log.tar.gz (1.6 KB, 1 views)
__________________
Live long and prosper ...

Glückauf
HJG
hjg is offline   Reply With Quote

Old   July 7, 2012, 16:35
Default
  #89
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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
Ah, OK, now I get it. The problem is due to a missing library! But it's strange... why hasn't that surfaced before?!

Anyway, the fixes are as follows:
  • Edit the file "applications/utilities/postProcessing/turbulence/R/Make/options". You should see these last lines:
    Code:
        -lfiniteVolume \
        -lgenericPatchFields
    Replace the last line and add another like this:
    Code:
        -lfiniteVolume \
        -lgenericPatchFields \
        -lincompressibleTurbulenceModel
  • Edit the file "applications/solvers/multiphase/multiphaseEulerFoam/Make/options" and replace these lines:
    Code:
        -linterfaceProperties \
        -lincompressibleTransportModels \
        -lcompressibleMultiphaseEulerianInterfacialModels \
    For these lines:
    Code:
        -linterfaceProperties \
        -lincompressibleTransportModels \
        -lincompressibleTurbulenceModel \
        -lcompressibleMultiphaseEulerianInterfacialModels \
Note: Be careful to not leave any spaces on the right of the backslash "\".

Then follow those two command blocks I wrote before.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   July 8, 2012, 03:46
Default
  #90
hjg
New Member
 
Heinz-Jürgen Geurtz
Join Date: Mar 2009
Location: Althengstett-Neuhengstett, Baden-Württemberg, Deutschland
Posts: 10
Rep Power: 17
hjg is on a distinguished road
Good morning Bruno,

HEUREKA

your hacks were very helpful. I modified the option-files according to your advice. Both applications were build without error-message.
Should I ignore messages like
Quote:
could not open file HashSet.H for source file R.C
???

I also performed ./Allwmake without error-message.

Now I will make a wcleanAll and wcleanLnIncludeAll and run ./Allwmake again to check if there are any side-effects. I will keep you updated ...

Thank you for your helpful assistance ....

Have a nice day ...
__________________
Live long and prosper ...

Glückauf
HJG
hjg is offline   Reply With Quote

Old   July 8, 2012, 06:52
Default
  #91
hjg
New Member
 
Heinz-Jürgen Geurtz
Join Date: Mar 2009
Location: Althengstett-Neuhengstett, Baden-Württemberg, Deutschland
Posts: 10
Rep Power: 17
hjg is on a distinguished road
Hello Bruno,

as mentioned I performed ./Allwmake on the cleaned system.
Everything worked fine as far as I could see. No aborts occurred during the build.

I'm happy ...

THNX

GREAT JOB.


Yours
HJ
__________________
Live long and prosper ...

Glückauf
HJG
hjg is offline   Reply With Quote

Old   July 19, 2012, 18:21
Default Issue in BlockMesh library
  #92
New Member
 
Join Date: Jul 2012
Posts: 1
Rep Power: 0
memnoch is on a distinguished road
Hi all,

I've just pulled the latest from the git repository. All compiling fine except this error here:

+ wmake libso blockMesh
SOURCE=blockMesh/blockMeshMerge.C ; g++ -m64 -fsignaling-nans -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2 -DNoRepository -ftemplate-depth-100 -I/Users/myuser/OpenFOAM/OpenFOAM-2.1.x/src/meshTools/lnInclude -I/Users/myuser/OpenFOAM/OpenFOAM-2.1.x/src/dynamicMesh/lnInclude -IlnInclude -I. -I/Users/myuser/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude -I/Users/myuser/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64GccDPOpt/blockMeshMerge.o
blockMesh/blockMeshMerge.C: In member function 'void Foam::blockMesh::calcMergeInfo()':
blockMesh/blockMeshMerge.C:120: error: call of overloaded 'boundBox(Foam:ointField)' is ambiguous
/Users/myuser/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/boundBox.H:96: note: candidates are: Foam::boundBox::boundBox(const Foam::tmp<Foam::Field<Foam::Vector<double> > >&, bool)
/Users/myuser/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/boundBox.H:92: note: Foam::boundBox::boundBox(const Foam::UList<Foam::Vector<double> >&, bool)
/Users/myuser/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/boundBox.H:56: note: Foam::boundBox::boundBox(const Foam::boundBox&)
make: *** [Make/darwinIntel64GccDPOpt/blockMeshMerge.o] Error 1

Using snow leopard Xcode gcc compiler (version 4.2)

Any ideas?
memnoch is offline   Reply With Quote

Old   July 20, 2012, 05:46
Default
  #93
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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 memnoch and welcome to the forum!

GCC 4.2 is too old for building OpenFOAM. Follow these instructions instead: http://openfoamwiki.net/index.php/Ho...enFOAM_v21_Mac

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   July 20, 2012, 15:43
Default
  #94
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
Greetings memnoch and welcome to the forum!

GCC 4.2 is too old for building OpenFOAM. Follow these instructions instead: http://openfoamwiki.net/index.php/Ho...enFOAM_v21_Mac

Best regards,
Bruno
That is not 100% correct. I added a patch in the original posting of this thread that allows compilation with 4.2 (the changes required are minor). Don't maintain the patch though (I use a more up-to-date compiler)
wyldckat likes this.
gschaider is offline   Reply With Quote

Old   August 22, 2012, 06:34
Default
  #95
qzt
New Member
 
Join Date: Aug 2012
Posts: 10
Rep Power: 14
qzt is on a distinguished road
Hello everyone,

I am trying to compile/install openFOAM 2.1.0 on my Mac by following the tutorial on openFOAM wiki "how to install OpenFOAM v21 on mac".
The compilation finished without forced exit due to error. But when I rerun the Allwmake to check the output, I saw an error message saying:

Undefined symbols for architecture x86_64:
"Foam::incompressible::turbulenceModel::typeNa me", referenced from:
_main in wallShearStress.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[3]: *** [/Users/qzt/OpenFOAM/OpenFOAM-2.1.0/platforms/darwinIntel64Gcc46DPOpt/bin/wallShearStress] Error 1
make[2]: *** [wallShearStress] Error 2


It also seems to me that although it compiles, there is no installation which means I have to execute every command by typing the fullpath (e.g. /Volumes/OpenFOAM-v2.1/OpenFOAM-2.1.0/platforms/darwinIntel64Gcc46DPOpt/bin/icoFoam).
Is that normal ? Or I have to copy (or links) everything from that disk image by myself.

The output of compilation and installation test are attached.

Thanks for your help,

Zong
Translate
Attached Files
File Type: gz test.log.tar.gz (928 Bytes, 0 views)
File Type: gz make.log.tar.gz (4.8 KB, 0 views)
qzt is offline   Reply With Quote

Old   August 22, 2012, 06:47
Default
  #96
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 qzt View Post
Hello everyone,

I am trying to compile/install openFOAM 2.1.0 on my Mac by following the tutorial on openFOAM wiki "how to install OpenFOAM v21 on mac".
The compilation finished without forced exit due to error. But when I rerun the Allwmake to check the output, I saw an error message saying:

Undefined symbols for architecture x86_64:
"Foam::incompressible::turbulenceModel::typeNa me", referenced from:
_main in wallShearStress.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[3]: *** [/Users/qzt/OpenFOAM/OpenFOAM-2.1.0/platforms/darwinIntel64Gcc46DPOpt/bin/wallShearStress] Error 1
make[2]: *** [wallShearStress] Error 2


It also seems to me that although it compiles, there is no installation which means I have to execute every command by typing the fullpath (e.g. /Volumes/OpenFOAM-v2.1/OpenFOAM-2.1.0/platforms/darwinIntel64Gcc46DPOpt/bin/icoFoam).
Is that normal ? Or I have to copy (or links) everything from that disk image by myself.

The output of compilation and installation test are attached.

Thanks for your help,

Zong
Translate
Haven't looked at the logs but typically the problem here is that the linker in MacOSX does not implicitly link the general turbulence model just because the RAS/LES-library uses it. Go to the Make/options-file of the offending utility and add a line like this:

-lincompressibleTurbulenceModel \

(Typically this happens for utilities that were added after the patch was created)
gschaider is offline   Reply With Quote

Old   August 22, 2012, 08:14
Default
  #97
qzt
New Member
 
Join Date: Aug 2012
Posts: 10
Rep Power: 14
qzt is on a distinguished road
Quote:
Originally Posted by gschaider View Post
Haven't looked at the logs but typically the problem here is that the linker in MacOSX does not implicitly link the general turbulence model just because the RAS/LES-library uses it. Go to the Make/options-file of the offending utility and add a line like this:

-lincompressibleTurbulenceModel \

(Typically this happens for utilities that were added after the patch was created)
Thanks for the quick reply, gschaider.
Adding -lincompressibleTurbulenceModel \ does solve the problem.
Now it compiles without any error.

However, I still don't understand how should I treat those generate binaries. Should I manually copy/link them to the system's bin folder like /usr/bin or we have to mount this disk image everytime and work inside it ?
qzt is offline   Reply With Quote

Old   August 22, 2012, 08:23
Default
  #98
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 qzt View Post
Thanks for the quick reply, gschaider.
Adding -lincompressibleTurbulenceModel \ does solve the problem.
Now it compiles without any error.

However, I still don't understand how should I treat those generate binaries. Should I manually copy/link them to the system's bin folder like /usr/bin or we have to mount this disk image everytime and work inside it ?
You don't have to do anything: They are copied to a directory where they will be found if you sourced the bashrc
gschaider is offline   Reply With Quote

Old   August 22, 2012, 08:45
Default
  #99
qzt
New Member
 
Join Date: Aug 2012
Posts: 10
Rep Power: 14
qzt is on a distinguished road
Quote:
Originally Posted by gschaider View Post
You don't have to do anything: They are copied to a directory where they will be found if you sourced the bashrc
Thanks! I get it.
qzt is offline   Reply With Quote

Old   August 23, 2012, 11:46
Default compiling time
  #100
New Member
 
Max
Join Date: Aug 2012
Posts: 6
Rep Power: 14
gpeng is on a distinguished road
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?

Few bags of cookies could be consumed in this period instead of two...

Please help! Thanks!
gpeng 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 08:55.