OpenFOAM 2.3.x on Mac OS X 10.10.1 Installation Errors
Hi,
I'm new here, and I have no experiences with these kind of things. I'm trying to install OpenFOAM 2.3.x 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 still some errors. Right now, I'm applying this process: http://openfoamwiki.net/index.php/In...OpenFOAM_2.3.x But I still can not install it, cause some errors. First of all, I can not correctly set mp-llvm-3.5 for llvm: Code:
port select --summary Code:
sudo port select --set llvm mp-llvm-3.5 Code:
Selecting 'mp-llvm-3.5' for 'llvm' failed: symlink: /opt/local/etc/select/llvm/current -> mp-llvm-3.5: file already exists 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 I hope that some of you can figure out where is the problem. Thank you, Paolo |
Hi,
Quote:
To diagnose your error, please provide output of the following commands:
The last command will expose certain information about OpenFOAM installation location, though according to initial message it is not a concern for you. |
Hi,
Thank you very much!! The first problem is solved, now mp-llvm-3.5 is selected. This is the answer code for the OF installation: Code:
MacBook-Pro-Petr:OpenFOAM-2.3.x Paolo$ which mpicc Paolo |
Something strange happened with OpenMPI installation (either it is Macports "feature", or you have got libopen-pal.6.dylib from elsewhere). Please, post output of
Code:
port contents openmpi-gcc48-fortran | grep /lib |
There is no answer to the command:
Code:
port contents openmpi-gcc48-fortran | grep /lib |
Looks like the "wrong" openmpi package is being selected? From your output:
Code:
declare -x FOAM_MPI="openmpi-macport-mp" 1) Uninstalling the openmpi-mp-fortran package, ie Code:
sudo port uninstall openmpi-mp-fortran Code:
sudo port select --set mpi none |
it can not be uninstalled:
Code:
MacBook-Pro-Petr:OpenFOAM-2.3.x Paolo$ sudo port uninstall openmpi-mp-fortran Code:
MacBook-Pro-Petr:OpenFOAM-2.3.x Paolo$ port select --summary Code:
export PATH=$PATH:/opt/local/bin |
1 Attachment(s)
Hi,
There is the ports list necessary for OpenFOAM . Maybe it could help in the understanding process. It is the output of this command: Code:
port list | grep -E '(mpi|scotch|metis|cgal|boost|cmake)' Paolo Attachment 37663 |
Hi,
As it was my errorneous suggestion I post corrected command variant here also: Code:
port installed | grep -E '(mpi|scotch|metis|cgal|boost|cmake)' |
1 Attachment(s)
Hello guys,
As Peter told me I have changed the path, in order to fix it. Now the new path is: Code:
Whatever, I runned again the installation process. And now it takes more time than before, and it gives to me different errors. There is the first part of the log.Allwmake file. I hope it can help us to find out the problem. Attachment 37736 Thanks again, Paolo |
OpenFOAM-v.2.3.x installation for OSX 10.10 Yosmite
Hi guys,
I am trying to set OpenFOAM-v2.3.x on my Mac which is OS X 10.10.5 Yosemite. I am following openfoamwiki.net/index.php/Installation/Mac_OS/OpenFOAM_2.3.x these instructions. I was trying to select db48. Code:
sudo port select --set db db48 Code:
Selecting 'db48' for 'db' failed: The configuration file '/opt/local/etc/select/db/base' could not be opened. Thank you. Kaan |
Me three
1 Attachment(s)
OS = 10.10.5
Trying to build 2.3.x based on instructions elsewhere in this forum. This time around I actually followed the directions as closely as possible. AFAICT I patched the source correctly. Running in bash. Oh, and OpenFOAM is placed on a disk with a journaled case-sensitive FS. I failed to set db48 as default, failed with "Selecting 'db48' for 'db' failed: The configuration file '/opt/local/etc/select/db/base' could not be opened." but I am thinking that isn't the cause of my current difficulty. port select --summary output: Name Selected Options ==== ======== ======= cython none cython26 none db none db46 db48 none gcc mp-gcc48 mp-gcc47 mp-gcc48 mp-gcc49 mp-gcc5 none llvm mp-llvm-3.5 mp-llvm-3.5 none mpi openmpi-gcc48-fortran mpich-gcc49-fortran mpich-mp-fortran openmpi-gcc48-fortran openmpi-gcc49-fortran openmpi-mp-fortran none nosetests none nosetests26 none python python27 python26 python26-apple python27 python27-apple none python2 none python26 python26-apple python27 python27-apple none wxWidgets none wxWidgets-3.0 none Current directory = OpenFOAM-2.3.x/applications/utilities/mesh/conversion/ansysToFoam Command and result as follows: 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/evans/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude \ -I/Users/evans/OpenFOAM/OpenFOAM-2.3.x/src/OSspecific/POSIX/lnInclude -fPIC \ -Ddarwin -lpthread \ -L/Users/evans/OpenFOAM/OpenFOAM-2.3.x/platforms/darwinIntel64Gcc48DPOpt/lib/openmpi-macport-gcc48 \ -lPstream Make/darwinIntel64Gcc48DPOpt/ansysToFoam.o \ -L/Users/evans/OpenFOAM/OpenFOAM-2.3.x/platforms/darwinIntel64Gcc48DPOpt/lib \ -lOpenFOAM -ldl -lpthread -lm \ -o /Users/evans/OpenFOAM/OpenFOAM-2.3.x/platforms/darwinIntel64Gcc48DPOpt/bin/ansysToFoam Undefined symbols for architecture x86_64: "yyFlexLexer::yywrap()", referenced from: vtable for yyFlexLexer in ansysToFoam.o ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status I tried to force feed it /opt/local/lib/libfl.dylib, which contains _yywrap(), and which has x86_64 architexture. This made no difference. Also "libfl_pic.dylib" This error keeps me from building. It is the only error to show up, so I assume that it is the same error that prevents me from building some core elements like writeMeshObj and zipUpMesh. EDIT: Oh, it looks like the code breaks for flex 2.6.0 because the minor version is less than 34. How quaint. I have brutally hacked it, seems to be compiling. |
2.3.x upgrade bison and flex
Hi,
OSX usually ships with pretty old versions of Bison and Flex (which is where the errors are coming from). It seems to be a pretty common problem across other applications (not just OpenFOAM), so as a first try, I would suggest installing more up-to-date versions of bison and flex. i.e.: $ sudo port install bison $ sudo port install flex and then sudo port select --set ... as normal for each so that they are used instead of the system versions. You may need to use the macports installed version of python as well, if you are going to use the bindings. Anyway, give it a try and let us know how it goes! Good luck! Peter |
Ironic, then, that it was a too recent version of flex that caused the problem.
|
Hi Thomas,
Glad it's working! Would you mind elaborating just a bit on your fix? Installing OpenFOAM on the Mac can be something of an adventure, so every problem/solution is helpful! Thanks, Peter |
hack
% cd $WM_PROJECT_DIR
% find . -name '*.L' -print Open all of the above in your fav editor (I use jEdit). Change all instances of #if YY_FLEX_SUBMINOR_VERSION < 34 to #if YY_FLEX_SUBMINOR_VERSION < 34 && YY_FLEX_SUBMINOR_VERSION > 0 I did say it was a hack, right? This gets around the SUBMINOR==0 problem with flex 2.6.0, but it's hardly a real solution. A real solution, however, would require knowing that YY_FLEX_MINOR_VERSION and YY_FLEX_MAJOR_VERSION are defined, which is beyond me since I do not have a clue about the build system in use here. |
All times are GMT -4. The time now is 07:01. |