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

[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch

Register Blogs Community New Posts Updated Threads Search

Like Tree8Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 3, 2015, 23:00
Default
  #141
New Member
 
Andre Mas
Join Date: Jan 2015
Location: Montreal, Canada
Posts: 18
Rep Power: 11
ajmas is on a distinguished road
I have created a fork here, with the patches applied:

https://github.com/ajmas/OpenFOAM-2....-forum-patched

That eliminates one step.

I did also patch the etc/bashrc file to handle paths with spaces in it, but other tools also fail with spaces in the the path, so best avoid spaces in path names.

Edit: if you have changes with regards to the Mac code, maybe the best thing to do is make a fork and the submit a pull request? Changes should not break the Linux build.

Last edited by ajmas; February 5, 2015 at 16:11.
ajmas is offline   Reply With Quote

Old   February 5, 2015, 15:38
Default
  #142
New Member
 
Jonathan
Join Date: Jan 2015
Posts: 20
Rep Power: 11
jjstickel is on a distinguished road
Quote:
Originally Posted by ajmas View Post
I have created a fork here, with the patches applied:

https://github.com/ajmas/OpenFOAM-2....-forum-patched

<snip>

Edit: if you have changes with regards to the Mac code, maybe the best thing to do is make a fork and the submit a pull request? Changes should not break the Linux build.
This should be helpful. Note that patches specific to Mac (macports even) are already included in that patch; see, e.g., /etc/config/settings.sh.

It would be helpful to include the changes recommended in comment #82 of this thread.

I suggest modifying readme.html to indicate how this branch is different from the main branch.

I am making progress on working out my own installation. Once I have things better figured out, I will try to contribute.

Thanks!
jjstickel is offline   Reply With Quote

Old   February 5, 2015, 17:15
Default
  #143
New Member
 
Andre Mas
Join Date: Jan 2015
Location: Montreal, Canada
Posts: 18
Rep Power: 11
ajmas is on a distinguished road
Current status update on my efforts:
- https://github.com/ajmas/OpenFOAM-2.3.x master branch includes most of the changes available in this thread
- I have created a build script, attached to this post that should make building much easier. Doing the following:
-- Creating and mounting case-sensitive HFS+ disk image
-- Getting the necessary MacPorts (if you use another tool, please contribute changes)
-- Cloning the git repository (uses mine, since it is already patched)
-- Configuring bashrc
-- initiating the build
-- Ensuring the build is outputted to log

Please let me know if this helps you and please provide any pull-requests or change suggestions.

Note, I still waiting for my current build to finish, so will see if it is successful.

Edit: updated build file 2015-03-07
Attached Files
File Type: txt build-macosx-macports.sh.txt (4.0 KB, 8 views)

Last edited by ajmas; March 7, 2015 at 15:01.
ajmas is offline   Reply With Quote

Old   February 9, 2015, 14:58
Default
  #144
New Member
 
Jonathan
Join Date: Jan 2015
Posts: 20
Rep Power: 11
jjstickel is on a distinguished road
Quote:
Originally Posted by ajmas View Post
Code:
Note: ignore spurious warnings about missing mpicxx.h headers

wmake libso mpi
ld: warning: directory not found for option '-L/Volumes/OpenFOAM-Development-2.3.x/OpenFOAM-2.3.x/platforms/darwinIntel64Gcc46DPOptMACPORTMPICH/lib'
ld: library not found for -lpmpich
I partly resolved that by making a symlink from darwinIntel64Gcc46DPOptMACPORTMPICH to darwinIntel64Gcc46DPOpt, but I am still getting the 'ld: library not found for -lpmpich' error. I went back through this thread, but I don't seem to have missed anything - at least not from what I could see. Additionally, the 'wcleanAll' command may need tweaking, as the '/usr/bin/xargs' command does not support the '-i' option on the Mac.

I should note I haven't yet been able to build successfully, but hopefully the Git fork and the script I have attached, should help provide a common baseline to work around, so we 'know' we are looking at the same thing.
I am using openmpi (not mpich) via macports, and it seems to be working.
jjstickel is offline   Reply With Quote

Old   February 9, 2015, 15:10
Default
  #145
New Member
 
Jonathan
Join Date: Jan 2015
Posts: 20
Rep Power: 11
jjstickel is on a distinguished road
Following from reply #137, those uploaded errors occurred when building with gcc-4.7. I found that using built-in (Apple) clang-5.1 avoided the errors. However, I prefer to use gcc via macports, and made another attempt with gcc-4.9. Similar errors resulted, but I was able to get past them by applying the attached patch. It is just additional '#include "vector.H"' lines in several files; it is a hack at best and is probably not the best approach. I presume that this will help with building with gcc-4.7 and 4.8 also, but I have not tested.
Attached Files
File Type: patch gcc47plus_patches.patch (11.1 KB, 6 views)
jjstickel is offline   Reply With Quote

Old   February 14, 2015, 11:46
Default
  #146
New Member
 
Andre Mas
Join Date: Jan 2015
Location: Montreal, Canada
Posts: 18
Rep Power: 11
ajmas is on a distinguished road
Does anyone know how to resolve this issue:

Code:
ld: library not found for -lpmpich
I tried only building 'src/Pstream', since that seems to be a common dependency. I looked in the /opt/local/lib/mpich-* folders and they all seem to have the same type of contents with now pmpich. For example:

Code:
bash-3.2$ ls -1 /opt/local/lib/mpich-gcc47
libfmpich.dylib
libmpi.12.dylib
libmpi.a
libmpi.dylib
libmpich.dylib
libmpichcxx.dylib
libmpichf90.dylib
libmpicxx.12.dylib
libmpicxx.a
libmpicxx.dylib
libmpifort.12.dylib
libmpifort.a
libmpifort.dylib
libmpl.dylib
libopa.dylib
libpmpi.12.dylib
libpmpi.a
libpmpi.dylib
pkgconfig
BTW If anyone is located near Montreal in Canada, let me know, since it may help with collaboration.

Last edited by ajmas; February 19, 2015 at 08:31.
ajmas is offline   Reply With Quote

Old   February 26, 2015, 11:20
Default
  #147
Member
 
Davide D.
Join Date: Oct 2012
Location: Birmingham (UK)
Posts: 44
Rep Power: 13
dav.dap83 is on a distinguished road
Tried to compile OpenFoam 2.3.1 on MacBook Air Yosemite. Gcc46 used.
The compilation fails several times, the first of which while building multiphaseSystem libraries.
I am attaching the log file.

Thank you in advance
Attached Files
File Type: zip log.txt.zip (96.9 KB, 4 views)
dav.dap83 is offline   Reply With Quote

Old   February 26, 2015, 13:32
Default
  #148
Member
 
Peter
Join Date: Feb 2015
Location: New York
Posts: 73
Rep Power: 11
opedrofunk is on a distinguished road
Have a look at this guide:

http://openfoamwiki.net/index.php/In...OpenFOAM_2.3.x
opedrofunk is offline   Reply With Quote

Old   February 27, 2015, 11:37
Default
  #149
Member
 
Davide D.
Join Date: Oct 2012
Location: Birmingham (UK)
Posts: 44
Rep Power: 13
dav.dap83 is on a distinguished road
Quote:
Originally Posted by opedrofunk View Post
Hi,

Thank you for the link. I followed the guide, but I still have errors. Here is a link to my logfile.
https://www.dropbox.com/s/mu02hr4nxa...xt.tar.gz?dl=0
dav.dap83 is offline   Reply With Quote

Old   February 27, 2015, 13:36
Default
  #150
Member
 
Peter
Join Date: Feb 2015
Location: New York
Posts: 73
Rep Power: 11
opedrofunk is on a distinguished road
Hi,

Had a look at your log. A couple of questions:

1) Are you sure you are compiling the git repository version? If you try to use the guide with the release version, you're gonna have a bad time...

2) Are you sure you followed the guide completely (i.e., are using the macports gcc48 compiler, and the openmpi-gcc48 package)? Installing the packages is not enough, you must also run:

Code:
$ sudo port select --set gcc mp-gcc48
and

Code:
$ sudo port select --set mpi openmpi-gcc48-fortran

You can test this with:

Code:
$ which mpicc
and

Code:
$ which gcc
which should point to your binaries in your /opt directory, and be version 4.8 (I noticed you were trying to compile with gcc46 before - I know others have had success with that, but this guide uses version 4.8)

Also, could you run:

Code:
$ port select --summary
and

Code:
$ mpicc --version
And paste the output?


Cheers,
Peter
opedrofunk is offline   Reply With Quote

Old   February 27, 2015, 18:46
Default
  #151
Member
 
Davide D.
Join Date: Oct 2012
Location: Birmingham (UK)
Posts: 44
Rep Power: 13
dav.dap83 is on a distinguished road
Hi, thank you again. Unfortunately I still have errors.

Quote:
Originally Posted by opedrofunk View Post
Hi,
Are you sure you are compiling the git repository version?
Now yes

As regards the other suggestions, yes, I installed the macports and run port select command:
Code:
$ port select --summary
Name    Selected               Options
====    ========               =======
db      db48                   db48 none
gcc     mp-gcc48               mp-gcc46 mp-gcc48 mp-gcc49 none
llvm    mp-llvm-3.5            mp-llvm-3.3 mp-llvm-3.5 none
mpi     openmpi-gcc48-fortran  mpich-mp-fortran openmpi-gcc46-fortran openmpi-gcc48-fortran openmpi-mp-fortran none
python  python27               python26-apple python27 python27-apple none
Code:
$ which mpicc
/opt/local/bin/mpicc
Code:
$ which gcc
/opt/local/bin/gcc
Code:
$ which mpicc
$ mpicc --version
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.1.0
Thread model: posix
Here is the new log file:
https://www.dropbox.com/s/vuw0bdepo3...-2.tar.gz?dl=0

Thank you,
Davide
dav.dap83 is offline   Reply With Quote

Old   February 27, 2015, 22:06
Default
  #152
Member
 
Peter
Join Date: Feb 2015
Location: New York
Posts: 73
Rep Power: 11
opedrofunk is on a distinguished road
Hi Davide,
It seems that something is amiss in your environment regarding which mpicc and mpicxx you are using.

When you run:

Code:
$ mpicc --version
gcc-mp-4.8 (MacPorts gcc48 4.8.4_0) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
and

Code:
$ mpicxx --version
g++-mp-4.8 (MacPorts gcc48 4.8.4_0) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
it should point to the MacPorts version. Yours is running the Apple version, i.e.:

Code:
$ mpicc --version
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.1.0
Thread model: posix
This is what "port select --set mpi" is meant to handle (but judging by your output, seems to be off).


You can "manually" correct this by appending this to the openfoam/etc/bashrc:

Code:
echo "WM_CC=mpicc-openmpi-gcc48" >> /path/to/OpenFOAM-2.3.x/etc/bashrc
echo "WM_CXX=mpicxx-openmpi-gcc48" >> /path/to/OpenFOAM-2.3.x/etc/bashrc
instead of:

Code:
echo "WM_CC=mpicc" >> /path/to/OpenFOAM-2.3.x/etc/bashrc
echo "WM_CXX=mpicxx" >> /path/to/OpenFOAM-2.3.x/etc/bashrc
opedrofunk is offline   Reply With Quote

Old   February 28, 2015, 06:41
Default
  #153
Member
 
Davide D.
Join Date: Oct 2012
Location: Birmingham (UK)
Posts: 44
Rep Power: 13
dav.dap83 is on a distinguished road
Quote:
Originally Posted by opedrofunk View Post
You can "manually" correct this by appending this to the openfoam/etc/bashrc:

Code:
echo "WM_CC=mpicc-openmpi-gcc48" >> /path/to/OpenFOAM-2.3.x/etc/bashrc
echo "WM_CXX=mpicxx-openmpi-gcc48" >> /path/to/OpenFOAM-2.3.x/etc/bashrc
instead of:

Code:
echo "WM_CC=mpicc" >> /path/to/OpenFOAM-2.3.x/etc/bashrc
echo "WM_CXX=mpicxx" >> /path/to/OpenFOAM-2.3.x/etc/bashrc
I tried to do so, but I got the following error message very early:
Code:
Cannot open configuration file /opt/local/share/openmpi-mp/openmpi/mpicc-openmpi-gcc48-wrapper-data.txt
Error parsing data file mpicc-openmpi-gcc48: Not found
make: *** [<OpenFOAM directory>/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/dirToString] Error 243
I checked the content of the involved folder and I got:
Code:
$ ls -l /opt/local/share/openmpi-mp/openmpi/mpicc-*
lrwxr-xr-x  1 root  admin   22 Feb 27 09:40 /opt/local/share/openmpi-mp/openmpi/mpicc-openmpi-mp-wrapper-data.txt@ -> mpicc-wrapper-data.txt
-rw-r--r--  1 root  admin  598 Feb 27 09:40 /opt/local/share/openmpi-mp/openmpi/mpicc-vt-wrapper-data.txt
-rw-r--r--  1 root  admin  938 Feb 27 09:40 /opt/local/share/openmpi-mp/openmpi/mpicc-wrapper-data.txt
dav.dap83 is offline   Reply With Quote

Old   February 28, 2015, 07:24
Default OpenFOAM Installation Error
  #154
New Member
 
Paolo
Join Date: Feb 2015
Posts: 9
Rep Power: 11
Petru is on a distinguished road
Hi,
I'm new here, and I have no experiences with these kind of things.
I'm trying to install OpenFOAM on my Mac OS X 10.10.1 since some days without any result.
I also tried to run different installation process, but everytime there are some errors.
As I told you, I can not figure out where is the problem. Hope some of you can help me.

Here is the first error I found in the log.Allwmake (apparently this is the most important):

Quote:

+ wmake
Making dependency list for source file incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.C
Making dependency list for source file compressibleTurbulenceModels.C
Making dependency list for source file driftFluxFoam.C
SOURCE=incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.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 -IincompressibleTwoPhaseInteractingMixture -ImixtureViscosityModels/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/finiteVolume/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/meshTools/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/sampling/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/fvOptions/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/transportModels -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/transportModels/twoPhaseMixture/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/transportModels/incompressible/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/transportModels/interfaceProperties/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/TurbulenceModels/turbulenceModels/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/TurbulenceModels/compressible/lnInclude -I./relativeVelocityModels/lnInclude -IlnInclude -I. -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64GccDPOpt/incompressibleTwoPhaseInteractingMixture.o
SOURCE=compressibleTurbulenceModels.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 -IincompressibleTwoPhaseInteractingMixture -ImixtureViscosityModels/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/finiteVolume/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/meshTools/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/sampling/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/fvOptions/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/transportModels -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/transportModels/twoPhaseMixture/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/transportModels/incompressible/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/transportModels/interfaceProperties/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/TurbulenceModels/turbulenceModels/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/TurbulenceModels/compressible/lnInclude -I./relativeVelocityModels/lnInclude -IlnInclude -I. -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64GccDPOpt/compressibleTurbulenceModels.o
SOURCE=driftFluxFoam.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 -IincompressibleTwoPhaseInteractingMixture -ImixtureViscosityModels/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/finiteVolume/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/meshTools/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/sampling/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/fvOptions/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/transportModels -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/transportModels/twoPhaseMixture/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/transportModels/incompressible/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/transportModels/interfaceProperties/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/TurbulenceModels/turbulenceModels/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/TurbulenceModels/compressible/lnInclude -I./relativeVelocityModels/lnInclude -IlnInclude -I. -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64GccDPOpt/driftFluxFoam.o
In file included from driftFluxFoam.C:81:0:
/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/finiteVolume/lnInclude/alphaControls.H: In function 'int main(int, char**)':
/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/finiteVolume/lnInclude/alphaControls.H:18:8: warning: unused variable 'icAlpha' [-Wunused-variable]
scalar icAlpha
^
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 -IincompressibleTwoPhaseInteractingMixture -ImixtureViscosityModels/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/finiteVolume/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/meshTools/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/sampling/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/fvOptions/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/transportModels -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/transportModels/twoPhaseMixture/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/transportModels/incompressible/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/transportModels/interfaceProperties/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/TurbulenceModels/turbulenceModels/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/TurbulenceModels/compressible/lnInclude -I./relativeVelocityModels/lnInclude -IlnInclude -I. -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -lpthread -L/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/platforms/darwinIntel64GccDPOpt/lib/openmpi-macport-mp -lPstream Make/darwinIntel64GccDPOpt/incompressibleTwoPhaseInteractingMixture.o Make/darwinIntel64GccDPOpt/compressibleTurbulenceModels.o Make/darwinIntel64GccDPOpt/driftFluxFoam.o -L/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/platforms/darwinIntel64GccDPOpt/lib \
-ldriftFluxTransportModels -ldriftFluxRelativeVelocityModels -lfiniteVolume -lmeshTools -lsampling -lfvOptions -lincompressibleTransportModels -lturbulenceModels -lcompressibleTurbulenceModels -lOpenFOAM -ldl -lpthread -lm -o /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/platforms/darwinIntel64GccDPOpt/bin/driftFluxFoam
Undefined symbols for architecture x86_64:
"Foam::twoPhaseMixture::twoPhaseMixture(Foam::fvMe sh const&, Foam::dictionary const&)", referenced from:
Foam::incompressibleTwoPhaseInteractingMixture::in compressibleTwoPhaseInteractingMixture(Foam::Geome tricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) in incompressibleTwoPhaseInteractingMixture.o
Foam::incompressibleTwoPhaseInteractingMixture::in compressibleTwoPhaseInteractingMixture(Foam::Geome tricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) in incompressibleTwoPhaseInteractingMixture.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[2]: *** [/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/platforms/darwinIntel64GccDPOpt/bin/driftFluxFoam] Error 1
make[1]: *** [driftFluxFoam] Error 2
Thank you again.
Petru is offline   Reply With Quote

Old   February 28, 2015, 12:29
Default
  #155
Member
 
Peter
Join Date: Feb 2015
Location: New York
Posts: 73
Rep Power: 11
opedrofunk is on a distinguished road
Hi Davide,

So, there are still some inconsistencies in your environment. I suspect that it has something to do with the fact that you have both the "default" openmpi and the openmpi-gcc48 variant (and a whole bunch of others) installed. It is looking for the "mpicc-openmpi-gcc48-wrapper-data.txt" file in the "openmpi-mp" directory (which is where the "default" macports openmpi package lives), when it should be looking here:

Code:
/opt/local/share/openmpi-gcc48/openmpi/
So, I would suggest that the simplest way to do this (though, not the most elegant) would be to:

1) Remove all installed ports to get a "clean" environment (probably a good idea anyway, since you have so many variants installed), i.e.:

Code:
$ sudo port uninstall installed
2) Install only the packages needed as per the guide, i.e.:

Code:
sudo port install gcc48 
sudo port select --set gcc mp-gcc48 
sudo port install openmpi-gcc48
sudo port select --set mpi openmpi-gcc48-fortran
sudo port install boost +openmpi
sudo port install cgal
sudo port install ccache
sudo port install flex
sudo port install scotch -mpich +gcc48 +openmpi
sudo port install metis +gcc48
3) Attempt to compile openfoam as per the rest of the guide.

Hope this will do the trick!
Peter
opedrofunk is offline   Reply With Quote

Old   February 28, 2015, 12:36
Default
  #156
Member
 
Peter
Join Date: Feb 2015
Location: New York
Posts: 73
Rep Power: 11
opedrofunk is on a distinguished road
Petru,
I don't know which guide you are following. I tried several without success. In the end, this is what worked for me:

http://openfoamwiki.net/index.php/In...OpenFOAM_2.3.x

To avoid issues with your environment, especially if you've made multiple attempts using different packages and/or package managers (MacPorts/Homebrew/Fink/etc...), I suggest you remove all previously installed (possibly conflicting) variants of packages.

Good luck,
Peter
opedrofunk is offline   Reply With Quote

Old   February 28, 2015, 18:52
Default
  #157
Member
 
Davide D.
Join Date: Oct 2012
Location: Birmingham (UK)
Posts: 44
Rep Power: 13
dav.dap83 is on a distinguished road
Hi Peter,

I removed all the ports to get a clean environment, and then attempted to re-install all the packages. Now I have the correct output for the select command:
Code:
$ port select --summary
Name    Selected               Options
====    ========               =======
db      db48                   db48 none
gcc     mp-gcc48               mp-gcc48 none
llvm    mp-llvm-3.5            mp-llvm-3.5 none
mpi     openmpi-gcc48-fortran  openmpi-gcc48-fortran none
python  python27               python26-apple python27 python27-apple none
Code:
$ port installed | grep openmpi
  openmpi-gcc48 @1.7.5_3+fortran (active)
However, when I install boost and scotch package, macports tries to install the default version of the openmpi (and also gcc49), even if the string is correct and the openmpi-gcc48-fortran port is active!

I circumvented the issue at the boost installation by adding the -openmpi-default string:
Code:
sudo port install boost +gcc48 +openmpi-gcc48-fortran -openmpi-default
However this trick did not work with scotch:
Code:
sudo port install scotch -mpich +gcc48 +openmpi-gcc48-fortran -openmpi-default -gcc49
--->  Fetching archive for scotch
Warning: Your DNS servers incorrectly claim to know the address of nonexistent hosts. This may cause checksum mismatches for some ports. See this page for more information: <https://trac.macports.org/wiki/MisbehavingServers>
--->  Attempting to fetch scotch-6.0.0_0.darwin_14.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/scotch
--->  Attempting to fetch scotch-6.0.0_0.darwin_14.x86_64.tbz2 from http://lil.fr.packages.macports.org/scotch
--->  Attempting to fetch scotch-6.0.0_0.darwin_14.x86_64.tbz2 from http://nue.de.packages.macports.org/macports/packages/scotch
--->  Fetching distfiles for scotch
Error: org.macports.fetch for port scotch returned: must set at least one mpi variant
Please see the log file for port scotch for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_scotch/scotch/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port scotch failed
I am enclosing the macport commands log files.

Thank you,
Davide
Attached Files
File Type: gz logs.tar.gz (3.2 KB, 0 views)
dav.dap83 is offline   Reply With Quote

Old   March 1, 2015, 13:13
Default
  #158
New Member
 
Paolo
Join Date: Feb 2015
Posts: 9
Rep Power: 11
Petru is on a distinguished road
Hi Peter,

Thank you for you answer. I tried to apply your suggests, but I still have an Error.

Code:
mpicc -m64 -fsignaling-nans  -ftrapping-math  -Wall -O2   -fPIC -Ddarwin dirToString.c -o /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/dirToString
dyld: Library not loaded: /usr/local/lib/libopen-pal.6.dylib
  Referenced from: /usr/local/bin/mpicc
  Reason: Incompatible library version: mpicc requires version 9.0.0 or later, but libopen-pal.6.dylib provides version 8.0.0
make: *** [/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/dirToString] Trace/BPT trap: 5
no ThirdParty sources found - skipping
+ wmakePrintBuild -check
version changed from previous build
+ /bin/rm -f 'OpenFOAM/Make/*/global.?'
+ wmakeLnInclude OpenFOAM
wmakeLnInclude: linking include files to OpenFOAM/lnInclude
+ wmakeLnInclude OSspecific/POSIX
wmakeLnInclude: linking include files to OSspecific/POSIX/lnInclude
+ Pstream/Allwmake
+ wmake libso dummy
wmakeLnInclude: linking include files to ./lnInclude
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
SOURCE=UPstream.C ;  mpicxx -m64 -fsignaling-nans  -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2  -DNoRepository -ftemplate-depth-100  -IlnInclude -I. -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OSspecific/POSIX/lnInclude   -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64GccDPOpt/UPstream.o
dyld: Library not loaded: /usr/local/lib/libopen-pal.6.dylib
  Referenced from: /usr/local/bin/mpicxx
  Reason: Incompatible library version: mpicxx requires version 9.0.0 or later, but libopen-pal.6.dylib provides version 8.0.0
/bin/sh: line 1: 79047 Trace/BPT trap: 5       mpicxx -m64 -fsignaling-nans -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2 -DNoRepository -ftemplate-depth-100 -IlnInclude -I. -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64GccDPOpt/UPstream.o
make: *** [Make/darwinIntel64GccDPOpt/UPstream.o] Error 133
+ case "$WM_MPLIB" in
+ set +x

Note: ignore spurious warnings about missing mpicxx.h headers

wclean mpi
wmake libso mpi
wmakeLnInclude: linking include files to ./lnInclude
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
SOURCE=UOPwrite.C ;  mpicxx -m64 -fsignaling-nans  -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2  -DNoRepository -ftemplate-depth-100 -DOMPI_SKIP_MPICXX -I/opt/local/include/openmpi-mp -IlnInclude -I. -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OSspecific/POSIX/lnInclude   -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64GccDPOptMACPORTOPENMPI/UOPwrite.o
dyld: Library not loaded: /usr/local/lib/libopen-pal.6.dylib
  Referenced from: /usr/local/bin/mpicxx
  Reason: Incompatible library version: mpicxx requires version 9.0.0 or later, but libopen-pal.6.dylib provides version 8.0.0
/bin/sh: line 1: 79134 Trace/BPT trap: 5       mpicxx -m64 -fsignaling-nans -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2 -DNoRepository -ftemplate-depth-100 -DOMPI_SKIP_MPICXX -I/opt/local/include/openmpi-mp -IlnInclude -I. -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64GccDPOptMACPORTOPENMPI/UOPwrite.o
make: *** [Make/darwinIntel64GccDPOptMACPORTOPENMPI/UOPwrite.o] Error 133
+ OSspecific/POSIX/Allwmake
wmakeLnInclude: linking include files to ./lnInclude
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
/bin/sh: /Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/wmake/platforms/darwinIntel64Gcc/wmkdep: No such file or directory
SOURCE=signals/sigFpe.C ;  mpicxx -m64 -fsignaling-nans  -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2  -DNoRepository -ftemplate-depth-100  -IlnInclude -I. -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OSspecific/POSIX/lnInclude   -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64GccDPOpt/sigFpe.o
dyld: Library not loaded: /usr/local/lib/libopen-pal.6.dylib
  Referenced from: /usr/local/bin/mpicxx
  Reason: Incompatible library version: mpicxx requires version 9.0.0 or later, but libopen-pal.6.dylib provides version 8.0.0
/bin/sh: line 1: 79294 Trace/BPT trap: 5       mpicxx -m64 -fsignaling-nans -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2 -DNoRepository -ftemplate-depth-100 -IlnInclude -I. -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude -I/Users/Paolo/OpenFOAM/OpenFOAM-2.3.x/src/OSspecific/POSIX/lnInclude -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64GccDPOpt/sigFpe.o
make: *** [Make/darwinIntel64GccDPOpt/sigFpe.o] Error 133
This is the first part of the log.Allwake.
I can't understand where is the problem, but maybe it is due to the sudo port installation:

Code:
port select --summary

Name     Selected               Options
====     ========               =======
db       db48                   db48 none
gcc      mp-gcc48               mp-gcc48 mp-gcc49 none
ipython  none                   none
llvm     none                   mp-llvm-3.5 none
mpi      openmpi-gcc48-fortran  openmpi-gcc48-fortran openmpi-mp-fortran none
python   python27               python26-apple python27 python27-apple none
I can't set mp-llvm-3.5 for llvm, cause this error:

Code:
Selecting 'mp-llvm-3.5' for 'llvm' failed: symlink: /opt/local/etc/select/llvm/current -> mp-llvm-3.5: file already exists
Maybe this is the problem.
Do you have any ideas?

Thank you again, for your time

Paolo
Petru is offline   Reply With Quote

Old   March 5, 2015, 08:59
Default
  #159
Senior Member
 
Join Date: Mar 2015
Posts: 250
Rep Power: 12
KateEisenhower is on a distinguished road
Hello guys,

I have some problems installing OpenFOAM 2.3.1 on an MacBook Pro running Yosemite. I've followed the recommended guide for installing 2.2.2 (http://openfoamwiki.net/index.php/In....2#Final_Steps) and somehow it did'nt work.
I think about starting from scratch again but I don't really understand some of the notes in the readme file from gschaider(http://sourceforge.net/p/openfoam-ex...acPatch/README).

Quote:
Some notes:
- The =ThirdParty=-directory is not necessary.
Does this mean I don't have to do step 4.2.5 from the 2.2.2 guide?
Quote:
All necessary
packages are available in =MacPort=. Install them before compiling
with
: port install cgal scotch metis
I assume I have to enter ": port install cgal scotch metis" in the terminal right before compiling. Is this right?
Quote:
- Choose one of the MPI-implementations with
: port select -set mpi
Recommended is a =openmpi= that fits your compiler
- Set =WM_COMPILER= to the compiler you want to use (it has to be
installed). Possible values are (=XX= is the version number)
- GccXX :: the =gcc=-compiler
- ClangXX :: the LLVM-compiler
- DragoneggXX :: =gcc=-frontend with LLVM-backend
Recommended is =Gcc46= (there are minor issues with =Gcc47= and
=Gcc48=)
I don't understand this part. How do I know which =openmpi= fits my compiler? What code do I have to enter and when?
Quote:
- Tracebacks only work if =XCode= is installed properly
I installed XCode via the App Store so I guess itīs okay.

I would really appreciate an explanation.

Cheers,

Kate
KateEisenhower is offline   Reply With Quote

Old   March 13, 2015, 16:42
Default
  #160
New Member
 
Andre Mas
Join Date: Jan 2015
Location: Montreal, Canada
Posts: 18
Rep Power: 11
ajmas is on a distinguished road
Quote:
Originally Posted by ajmas View Post
Current status update on my efforts:
- https://github.com/ajmas/OpenFOAM-2.3.x master branch includes most of the changes available in this thread
- I have created a build script, attached to this post that should make building much easier. Doing the following:
-- Creating and mounting case-sensitive HFS+ disk image
-- Getting the necessary MacPorts (if you use another tool, please contribute changes)
-- Cloning the git repository (uses mine, since it is already patched)
-- Configuring bashrc
-- initiating the build
-- Ensuring the build is outputted to log
For anyone using MacPorts be sure to check your PATH environment variable. Be sure to put /opt/local/bin at the start, to avoid MacOS X versions of commands taking precedence.

I found this due issues resulting from the using of the version of flex at /usr/bin/flex. The MacOS X default version will fail in certain cases.

I have also now put the script for the build script on GitHub: https://github.com/ajmas/scripts-et-...sx-macports.sh

And with all this it all builds

Last edited by ajmas; March 13, 2015 at 23:17.
ajmas 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
[Other] dynamicTopoFVMesh and pointDisplacement RandomUser OpenFOAM Meshing & Mesh Conversion 6 April 26, 2018 07:30
Near wall treatment in k-omega SST Arnoldinho OpenFOAM Running, Solving & CFD 38 March 8, 2017 13:48
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
createPatch Segmentation Fault (CORE DUMPED) sam.ho OpenFOAM Pre-Processing 2 April 21, 2014 02:01
[Gmsh] Import gmsh msh to Foam adorean OpenFOAM Meshing & Mesh Conversion 24 April 27, 2005 08:19


All times are GMT -4. The time now is 09:26.