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

[swak4Foam] Installing OpenFOAM 2.3.x and swak4Foam on Mac Yosemite 10.10.5

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 28, 2015, 17:23
Default Installing OpenFOAM 2.3.x and swak4Foam on Mac Yosemite 10.10.5
  #1
New Member
 
Join Date: Aug 2015
Posts: 17
Rep Power: 10
ajonuz is on a distinguished road
Dear Bruno,

I think groovyBC would be the solution to this problem and want to give it a last try. I use OpenFOAM 2.3.0 at the moment and want to download/install swak4Foam to be able to use the groovyBC, however I just can't get it installed correctly. The error message i get when i run the ./Allwmake after following the download/installation instructions on:

https://openfoamwiki.net/index.php/I...am/Downloading

Start of the log file:

Code:
Previously compiled for OpenFOAM 2.3.0
No file 'swakConfiguration'. Python etc won't work. See README for details
Try 'ln -s swakConfiguration.automatic swakConfiguration' for automatic configuration. BEWARE: this does not work on some systems
Checking swak4Foam-version and generating file
Swak version is 0.3.2
Bison is version 2.7
Flex is version 2.5.37 (Minor version: 37)
OpenFOAM-version: Major 2 Minor 3 Patch 0 (-1 == x / 0)
No change to swak4FoamParsers/foamVersion4swak.H
SOURCE=helpers/printSwakVersion.C ;  g++-mp-4.6 -m64 -fsignaling-nans  -ftrapping-math -DdarwinIntel64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O2  -DNoRepository -ftemplate-depth-100 -IMake/darwinIntel64Gcc46DPOpt       -I/Users/Admir/OpenFOAM/OpenFOAM-2.3.0/src/finiteVolume/lnInclude -I/Users/Admir/OpenFOAM/OpenFOAM-2.3.0/src/sampling/lnInclude -I/Users/Admir/OpenFOAM/OpenFOAM-2.3.0/src/fileFormats/lnInclude -I/Users/Admir/OpenFOAM/OpenFOAM-2.3.0/src/triSurface/lnInclude -I/Users/Admir/OpenFOAM/OpenFOAM-2.3.0/src/surfMesh/lnInclude -I/Users/Admir/OpenFOAM/OpenFOAM-2.3.0/src/lagrangian/basic/lnInclude -I/Users/Admir/OpenFOAM/OpenFOAM-2.3.0/src/meshTools/lnInclude -IlnInclude -I. -I/Users/Admir/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude -I/Users/Admir/OpenFOAM/OpenFOAM-2.3.0/src/OSspecific/POSIX/lnInclude   -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64Gcc46DPOpt/printSwakVersion.o
End of log file:

Code:
/opt/local/include/gcc46/c++//x86_64-apple-darwin14/bits/gthr.h:178:27: error: expected declaration before end of line
make: *** [Make/darwinIntel64Gcc46DPOpt/exprString.o] Error 1
Parser library did not compile OK. No sense continuing as everything else depends on it
Furthermore, I have been trying to debug the error for days, looking for solutions on the forum but I have had no luck.

Do you know what can cause these installation issues?

Best regards
Admir

[ Moderator Note: Moved this line of conversation from another thread: http://www.cfd-online.com/Forums/ope...180-deg-2.html ]

Last edited by wyldckat; October 17, 2015 at 09:37. Reason: see "Moderator note:"
ajonuz is offline   Reply With Quote

Old   October 4, 2015, 15:48
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
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
Quick answer: If you are using a pre-built/installed image of OpenFOAM 2.3.0 on Mac OS X, then that means that you do not have a working development environment for building OpenFOAM from source code. Therefore, it's also not possible to build swak4Foam from source code
wyldckat is offline   Reply With Quote

Old   October 12, 2015, 01:45
Default
  #3
New Member
 
Join Date: Aug 2015
Posts: 17
Rep Power: 10
ajonuz is on a distinguished road
Hi Bruno,

Unfortunately, I do use a prebuilt image of OpenFOAM on my Mac. I have deleted the prebuilt version and are now trying to install OpenFOAM by following the link:

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

But end up getting a error message as shown on attached file. I have to tried to resolve the problem all weekend, and still no luck.
Do you maybe have an idea of what can be wrong, and what is worth trying? Can the patch used from the link be damaged or somehow not be working with my Mac Yosemite 10.10.5 ?

Best regards
Admir
Attached Images
File Type: jpeg received_10153442140438283.jpeg (12.3 KB, 6 views)
ajonuz is offline   Reply With Quote

Old   October 12, 2015, 16:59
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
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
Quick answer: The error message you're getting seems to be because the command from 2.4 failed to work properly: http://openfoamwiki.net/index.php/In...pply_the_patch
What messages did the command give?
Keep in mind that applying the patch once again will possibly ask about reverting the changes, therefore you will need to use the command on a clean unpacked folder of OpenFOAM 2.3.x.
wyldckat is offline   Reply With Quote

Old   October 15, 2015, 09:41
Default
  #5
New Member
 
Join Date: Aug 2015
Posts: 17
Rep Power: 10
ajonuz is on a distinguished road
Hi Bruno,

I get the following message when executing patch "-p1<OpenFOAM-2.3.x-Mac.patch" :

Code:
patching file applications/solvers/combustion/fireFoam/Make/options
patching file applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/Make/options
patching file applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/Make/options
patching file applications/solvers/incompressible/adjointShapeOptimizationFoam/Make/options
Hunk #1 succeeded at 7 with fuzz 1 (offset 1 line).
patching file applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/Make/options
patching file applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options
patching file applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/Make/options
patching file applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options
patching file applications/solvers/multiphase/multiphaseEulerFoam/Make/options
Hunk #1 succeeded at 18 with fuzz 1 (offset 1 line).
patching file applications/utilities/mesh/generation/blockMesh/Make/options
patching file applications/utilities/mesh/generation/foamyQuadMesh/Make/options
patching file applications/utilities/mesh/generation/snappyHexMesh/Make/options
patching file applications/utilities/mesh/manipulation/renumberMesh/Make/options
patching file applications/utilities/miscellaneous/expandDictionary/Make/options
patching file applications/utilities/miscellaneous/foamDebugSwitches/Make/options
patching file applications/utilities/parallelProcessing/reconstructParMesh/Make/options
patching file applications/utilities/postProcessing/dataConversion/foamToEnsight/Make/options
patching file applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/Make/options
patching file applications/utilities/postProcessing/turbulence/R/Make/options
patching file applications/utilities/postProcessing/turbulence/createTurbulenceFields/Make/options
Hunk #1 succeeded at 6 with fuzz 1 (offset 1 line).
patching file applications/utilities/postProcessing/velocityField/Pe/Make/options
patching file applications/utilities/postProcessing/wall/wallShearStress/Make/options
Hunk #1 FAILED at 7.
1 out of 1 hunk FAILED -- saving rejects to file applications/utilities/postProcessing/wall/wallShearStress/Make/options.rej
patching file applications/utilities/postProcessing/wall/yPlusLES/Make/options
patching file applications/utilities/postProcessing/wall/yPlusRAS/Make/options
patching file applications/utilities/preProcessing/applyBoundaryLayer/Make/options
patching file bin/addr2line4Mac.py
patching file etc/bashrc
patching file etc/config/CGAL.sh
patching file etc/config/metis.sh
patching file etc/config/paraview.sh
Hunk #1 succeeded at 138 (offset -6 lines).
patching file etc/config/scotch.sh
patching file etc/config/settings.sh
Hunk #2 succeeded at 160 (offset 1 line).
Hunk #3 succeeded at 530 (offset -15 lines).
Hunk #4 succeeded at 591 (offset -15 lines).
Hunk #5 succeeded at 775 (offset 31 lines).
patching file etc/controlDict
patching file src/OSspecific/POSIX/POSIX.C
patching file src/OSspecific/POSIX/clockTime/clockTime.H
patching file src/OSspecific/POSIX/fileStat.C
patching file src/OSspecific/POSIX/printStack.C
Hunk #2 FAILED at 58.
Hunk #3 succeeded at 117 with fuzz 2 (offset 15 lines).
Hunk #4 FAILED at 132.
Hunk #5 succeeded at 129 with fuzz 1.
Hunk #6 FAILED at 179.
Hunk #7 FAILED at 198.
Hunk #8 FAILED at 262.
Hunk #9 FAILED at 292.
Hunk #10 FAILED at 333.
7 out of 10 hunks FAILED -- saving rejects to file src/OSspecific/POSIX/printStack.C.rej
patching file src/OSspecific/POSIX/signals/sigFpe.C
patching file src/OSspecific/POSIX/signals/sigFpe.H
patching file src/OpenFOAM/db/dictionary/functionEntries/codeStream/codeStream.C
patching file src/OpenFOAM/db/dynamicLibrary/codedBase/codedBase.C
patching file src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C
patching file src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.H
patching file src/OpenFOAM/primitives/Scalar/doubleFloat.H
patching file src/conversion/ensight/part/ensightPart.C
patching file src/conversion/ensight/part/ensightPartIO.C
patching file src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C
patching file src/dynamicMesh/meshCut/refineCell/refineCell.H
patching file src/fvOptions/Make/options
Hunk #1 succeeded at 14 (offset 1 line).
patching file src/meshTools/meshTools/meshTools.H
patching file src/parallel/decompose/ptscotchDecomp/Make/options
Hunk #1 FAILED at 8.
1 out of 1 hunk FAILED -- saving rejects to file src/parallel/decompose/ptscotchDecomp/Make/options.rej
patching file src/parallel/decompose/scotchDecomp/Make/options
patching file src/renumber/Allwmake
patching file src/renumber/SloanRenumber/Make/options
patching file src/sampling/sampledSurface/writers/ensight/ensightPTraits.H
patching file wmake/Makefile
patching file wmake/rules/darwinIntel64Clang/c
patching file wmake/rules/darwinIntel64Clang/c++
patching file wmake/rules/darwinIntel64Clang/c++Debug
patching file wmake/rules/darwinIntel64Clang/c++Opt
patching file wmake/rules/darwinIntel64Clang/c++Prof
patching file wmake/rules/darwinIntel64Clang/cDebug
patching file wmake/rules/darwinIntel64Clang/cOpt
patching file wmake/rules/darwinIntel64Clang/cProf
patching file wmake/rules/darwinIntel64Clang/general
patching file wmake/rules/darwinIntel64Clang/mplib
patching file wmake/rules/darwinIntel64Clang/mplibMACPORTMPICH
patching file wmake/rules/darwinIntel64Clang/mplibMACPORTOPENMPI
patching file wmake/rules/darwinIntel64Clang/mplibOPENMPI
patching file wmake/rules/darwinIntel64Dragonegg/c
patching file wmake/rules/darwinIntel64Dragonegg/c++
patching file wmake/rules/darwinIntel64Dragonegg/c++Debug
patching file wmake/rules/darwinIntel64Dragonegg/c++Opt
patching file wmake/rules/darwinIntel64Dragonegg/c++Prof
patching file wmake/rules/darwinIntel64Dragonegg/cDebug
patching file wmake/rules/darwinIntel64Dragonegg/cOpt
patching file wmake/rules/darwinIntel64Dragonegg/cProf
patching file wmake/rules/darwinIntel64Dragonegg/general
patching file wmake/rules/darwinIntel64Dragonegg/mplib
patching file wmake/rules/darwinIntel64Dragonegg/mplibMACPORTMPICH
patching file wmake/rules/darwinIntel64Dragonegg/mplibMACPORTOPENMPI
patching file wmake/rules/darwinIntel64Dragonegg/mplibOPENMPI
patching file wmake/rules/darwinIntel64Gcc/c
patching file wmake/rules/darwinIntel64Gcc/c++
patching file wmake/rules/darwinIntel64Gcc/c++Debug
patching file wmake/rules/darwinIntel64Gcc/c++Opt
patching file wmake/rules/darwinIntel64Gcc/c++Prof
patching file wmake/rules/darwinIntel64Gcc/cDebug
patching file wmake/rules/darwinIntel64Gcc/cOpt
patching file wmake/rules/darwinIntel64Gcc/cProf
patching file wmake/rules/darwinIntel64Gcc/general
patching file wmake/rules/darwinIntel64Gcc/mplib
patching file wmake/rules/darwinIntel64Gcc/mplibMACPORTMPICH
patching file wmake/rules/darwinIntel64Gcc/mplibMACPORTOPENMPI
patching file wmake/rules/darwinIntel64Gcc/mplibOPENMPI
I can't figure out why the "hunk fails", and if this is the reason why it does not build OpenFOAM properly?

Best regards
Admir
ajonuz is offline   Reply With Quote

Old   October 17, 2015, 09:35
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
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 Admir,

Definitely the problem is because the patch isn't working as intended
The main file I can see that could pose the biggest problem is this one:
Code:
src/OSspecific/POSIX/printStack.C
The issue is that the patch was created for a much older development version of OpenFOAM 2.3.x and the code changed considerably since then. Let me see if I can guide you bit in this...
OK, I don't have a Mac, so I'm not able to test this further, but I have updated the instructions on the wiki for a safe application of the patch: https://openfoamwiki.net/index.php/I...pply_the_patch

It's easier if you clone again from the original 2.3.x repository and then follow the updated instructions on how to apply the patch.

You can also try the instructions provided by this little project: http://www.cfd-online.com/Forums/ope...ac-github.html

Best regards,
Bruno
__________________

Last edited by wyldckat; October 17, 2015 at 09:39. Reason: fixed typo I made in Admir's name
wyldckat is offline   Reply With Quote

Old   October 18, 2015, 03:47
Default
  #7
New Member
 
Join Date: Aug 2015
Posts: 17
Rep Power: 10
ajonuz is on a distinguished road
Hi Bruno,

I tried building OpenFOAM with the updated instructions https://openfoamwiki.net/index.php/I...pply_the_patch, however when I open my terminal after the build I get the attached message.
Furthermore, I have attached my log.Allwmake.

Best regards
Admir
Attached Images
File Type: jpg terminalAfterBuild.jpg (28.2 KB, 9 views)
Attached Files
File Type: zip log.Allwmake.zip (97.2 KB, 1 views)
ajonuz is offline   Reply With Quote

Old   October 18, 2015, 07:00
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
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 Admir,

That message in the image is just a warning... although after looking into the file in question, I suspect that something weird is going on. The message appears when this check fails:
Code:
   which -s port >/dev/null
    if [ $? -eq "0" -a -d '/opt/local/etc/macports' ]
Which means that it tries to find if the command/application "port" exists and if MacPorts' configuration folder is located at '/opt/local/etc/macports'.
So you'll have to review how you installed and configured to use MacPorts, because if MacPorts wasn't installed properly, then this message should have also appeared before you started building OpenFOAM.

As for the content of the log file, there is no error message and it looks like everything was built properly.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   October 19, 2015, 04:51
Default
  #9
New Member
 
Join Date: Aug 2015
Posts: 17
Rep Power: 10
ajonuz is on a distinguished road
Hi Bruno,

I modified in my etc/config/settings.sh file (line 295-303), and attached it so you can have a look at it. This little trick actually made me run a simulation on my Mac again!

Now I have two questions:

1. When I try to execute a wmake when building my own solver i get the following error message:

Code:
Admirs-MacBook-Pro:~ Admir$ cd OpenFOAM/Admir-2.3.x/applications/temperatureSimpleFoam/
Admirs-MacBook-Pro:temperatureSimpleFoam Admir$ wmake
SOURCE=temperatureSimpleFoam.C ;  clang++-mp- -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/Admir/OpenFOAM/OpenFOAM-2.3.x/src/finiteVolume/lnInclude -I/Users/Admir/OpenFOAM/OpenFOAM-2.3.x/src/sampling/lnInclude -I/Users/Admir/OpenFOAM/OpenFOAM-2.3.x/src/meshTools/lnInclude -I/Users/Admir/OpenFOAM/OpenFOAM-2.3.x/src/fvOptions/lnInclude -I/Users/Admir/OpenFOAM/OpenFOAM-2.3.x/src/turbulenceModels -I/Users/Admir/OpenFOAM/OpenFOAM-2.3.x/src/turbulenceModels/incompressible/RAS/lnInclude -I/Users/Admir/OpenFOAM/OpenFOAM-2.3.x/src/transportModels -I/Users/Admir/OpenFOAM/OpenFOAM-2.3.x/src/transportModels/incompressible/singlePhaseTransportModel -IlnInclude -I. -I/Users/Admir/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude -I/Users/Admir/OpenFOAM/OpenFOAM-2.3.x/src/OSspecific/POSIX/lnInclude   -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntel64GccDPOpt/temperatureSimpleFoam.o
/bin/sh: clang++-mp-: command not found
make: *** [Make/darwinIntel64GccDPOpt/temperatureSimpleFoam.o] Error 127
It seems to me that i still can not find the proper compiler?

2. Is there a way to avoid mounting OpenFOAM 2.3.x, and instead make it as a folder on my Mac?

Best regards
Admir
Attached Files
File Type: zip settings.sh.zip (5.5 KB, 0 views)
ajonuz is offline   Reply With Quote

Old   October 24, 2015, 12:11
Default
  #10
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
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 Admir,

Sorry, but this is past the point where I can't figure it out without access to a machine with Mac OS X .
I asked Alexey about this and he prefers to use Homebrew. I knew I had seen a few blog posts of his on this so I then went looking for it and found this: https://github.com/mrklein/openfoam-...ion-&-Homebrew

If before changing from Macports to Homebrew, you still want to keep trying with Macports, then try this: http://www.cfd-online.com/Forums/ope...ac-github.html

Good luck! Best regards,
Bruno
__________________
wyldckat 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
[swak4Foam] Error: Installing swak4Foam into OpenFOAM 2.3.0 on CentOS 7 mushtime OpenFOAM Community Contributions 9 July 23, 2017 15:27
[swak4Foam] Installing swak4Foam 0.4.0 on ubuntu 14.04 JFM OpenFOAM Community Contributions 1 October 30, 2016 09:43
[swak4Foam] Installing swak4Foam with openFoam v3.0+ RebelLion OpenFOAM Community Contributions 0 March 11, 2016 19:10
[swak4Foam] Installing swak4Foam to OpenFOAM in mac j-avdeev OpenFOAM Community Contributions 1 May 14, 2014 10:12
[swak4Foam] Installing swak4Foam to OpenFOAM in mac Kaquesang OpenFOAM Community Contributions 22 January 21, 2013 11:51


All times are GMT -4. The time now is 00:34.