Giter VIP home page Giter VIP logo

openfoam-os-x's Introduction

OpenFOAM(R) on OS X

Patches for OpenFOAM(R) compilation on macOS. Detailed installation instructions can be found in wiki.

Disclaimer

This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com, and owner of the OPENFOAM(R) and OpenCFD(R) trade marks.

Acknowledgement

OPENFOAM(R) is a registered trade mark of OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com.

Feb. 9, 2024

  • Updated Foundation dev patch.
  • Updated guides in wiki.

Nov. 5, 2023

  • Updated Foundation dev patch.

Jul. 12, 2023

  • Added OpenFOAM 11 patch

Oct. 5, 2022

  • Updated Foundation dev patch.

Aug. 7, 2022

  • OpenFOAM 10 patch
  • OpenFOAM v2206 patch (submitted upstream)

Sep. 23, 2021

  • Fixed OpenFOAM 9 patch (since GMP and MPFR formulae are not linked, their path should be passed explicitly).
  • Updated dev patch.

Sep. 22, 2021

Added patch for OpenFOAM 9.

Jan. 23, 2021

Added patch for OpenFOAM v2012. Slight correction of the patch for the previous version. OpenQBBM fixed obsolete gamma function issue, yet, decided to leave alphaMax constructor issue in JohnsonJacksonParticleSlipFvPatchVectorField.C where it was.

Aug. 10, 2020

Added OpenFOAM 8 and OpenFOAM v2006 patches.

In case of OpenFOAM 8 it is simple adaptation of the previous patch.

For OpenFOAM v2006 due to external modules it was necessary to make more changes:

  • Changed ADIOS configuration logic (has_adios script). Instead of looking for header and library, look up adios2-config utility and check if cxx-flags and cxx-libs are not empty.
  • Avalanche defines ntohl inline function, yet does not check it is already defined. So on OS X compilation stops with rather misleading messages about missing braces.
  • OpenQBBM module uses obsolete gamma function. Decided to change it into tgamma. NOTE! Maybe it should be changed to lgamma instead, if original author meant to calculate logarithm of gamma (as in glibc).

Apr. 9, 2020

Updated version OpenFOAM(R) 5.x, 6, and 7 patches. Added OpenFOAM(R) v1912 patch. Notes:

  • Set C++ standard to C++14 in wmake rules due to CGAL 5.0. It started to requite C++14 and became header only.
  • Rewrote SIP remedy code. It was started as an issue in OpenCFD GitLab and resulted in modified configuration logic.
  • Fixed csh initialisation scripts, so users of tcsh can use source etc/cshrc to initialise environment.

Small note on WM_LABEL_SIZE=64: since all Mac OS X installations are performed on personal notebooks I do not see a point in using 64-bit labels. So I won't test this configuration any more. Though I am open to suggestions and reasoning behind using 64-bit labels.

Jul. 15, 2019

Added version 7 patch. Updated patches for 5.x and 6.

Sept. 8, 2018

Updated version 6 and dev patches.

July 28, 2018

Added patches for version 6.

Someone in the Foundation hates versioning, so now it is impossible to distinguish release (let's call it 6.0) from bug-fixes version (6.x). Guess, next step will be to abandon versions at all.

May 23, 2018

Updated dev patch.

dev branch wmkdep now makes certain substitutions in dep files (-R command line switches). It fails to do it properly if -R / is passed to the command.

There were two possibilities: either to modify wmake/rules/General/transform by removing line -R '$(WM_THIRD_PARTY_DIR)/' '$$(WM_THIRD_PARTY_DIR)/' \, or add check for / search pattern in wmkdep.l. Opted for latter.

May 22, 2018

  • Updated 5.x patch.
  • In dev branch some fancy modifications to wmkdep were made, so I have decided to postpone patch update for this version.

Apr. 14, 2018

Updated 5.x and dev patches.

Nov. 25, 2017

Updated 5.x and dev patches. Since Foundation decided to abandon version numbering, 5.0 patch will not receive any updates or corrections.

Aug. 11, 2017

Update

WM_QUIET_RULES are temporary gone in 5.x series.

May 13, 2017

wmake unification made it simpler to update patches, so returned 3.0.x and dev into tree (it seems 3.0.x is still widely used), updated foamJob script to account for macOS releases greater than 15.

May 8, 2017

Update.

  • Only 2.2.x, 2.4.x, 4.0, 4.1, and 4.x patches are kept. Other versions could appear later, but since I do not use them, odds are rather low (old patches still can be found in repository history).
  • wmake is unified across versions (with WM_QUIET_RULES, to reduce noise in log-files).
  • Latest CLT update requires addition of -Wno-undefined-var-template to avoid excess of warnings.
  • Paraview configuration file now looks for Paraview*.app, this resolves #32.
  • Check for wxt terminal is added to foamMonitor script, a workaround for #31.
  • IOobject emits mode-line for vi and adds foamVersion to header.

Build process was tested on

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.12.4
BuildVersion:	16E195

with

$ clang++ --version
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

and the following third-party software

$ brew list --versions
...
boost 1.63.0
cgal 4.9.1
eigen 3.3.3
gmp 6.1.2
gnuplot 5.0.6
isl 0.18
libmpc 1.0.3
metis 5.1.0
mpfr 3.1.5
open-mpi 2.1.0
parmetis 4.0.3_4
scotch 6.0.4_4
...

Oct. 28, 2016

Following recent bug-reports updated dev patch (up to commit 37c5d28). Major changes:

  • Usage of CLT utilities are forced (using xcrun), hope this will resolve problems of third party cpps and flexes.

  • Draft of WM_SILENT_RULES, so build log files now look like

    + wmake dummy
    /Users/alexey/OpenFOAM/OpenFOAM-dev/src/Pstream/dummy
        LN ./lnInclude
       DEP UIPread.C
       DEP UPstream.C
       DEP UOPwrite.C
        CC UPstream.C
        CC UIPread.C
        CC UOPwrite.C
        LD libPstream.dylib
    ->> libPstream.dylib
  • IOobject's writeEndDivider is modified to emit mode line for vim.

Oct. 19, 2016

Added patch for version 4.1 (it is almost the same as 4.x-7dce081 patch).

Oct. 4, 2016

Updated 4.x patch. Build process was tested on

$ sw_vers 
ProductName:	Mac OS X
ProductVersion:	10.12
BuildVersion:	16A323

with

$ clang --version
Apple LLVM version 8.0.0 (clang-800.0.38)
Target: x86_64-apple-darwin16.0.0
Thread model: posix
InstalledDir:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

and the following third-party packages

$ brew list --versions
...
boost 1.61.0_1
cgal 4.9
eigen 3.2.9
gmp 6.1.1
libmpc 1.0.3
metis 5.1.0
mpfr 3.1.5
open-mpi 2.0.1
parmetis 4.0.3_4
parmgridgen 0.0.2
scotch 6.0.4_4
...

July 30, 2016

Updated 2.4.x (problem with /usr/include in -I flags for CGAL) and 4.x (new commits in this branch) patches.

June 29, 2016

Patches for 4.0 and 4.x (well, slight modification of the last -dev patch).

June 21, 2016

Updated 3.0.x and dev patches. Currently by default foamyMesh is not built, if you need it, set FOAMY_HEX_MESH environment variable to non-empty value (for example add export FOAMY_HEX_MESH=Y to prefs.sh).

Build process was tested on

$ sw_vers 
ProductName:	Mac OS X
ProductVersion:	10.11.5
BuildVersion:	15F34

with

$ clang++ --version
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

and the following third-party packages:

$ brew list --versions
boost 1.60.0_2
cgal 4.7
gmp 6.1.0
metis 5.1.0
mpfr 3.1.4
open-mpi 1.10.2_1
parmetis 4.0.3_3
parmgridgen 0.0.2
scotch 6.0.4_1

March 29, 2016

Updated 3.0.1 and 3.0.x patches to fix problem on CLT only systems (reported by Nikolai Tauber), this includes:

  1. Correction of wmake rules (if xcrun --show-sdk-path returned empty string remove part of CC command).
  2. Small addition to Allwmake script to set up environment if it is not. Since any way Allwmake script should be run from $WM_PROJECT_DIR, we could source etc/bashrc in the beginning to remedy quite confusing ./Allwmake: line 7: /wmake/scripts/AllwmakeParseArguments: No such file or directory.

Build process was tested on

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.11.4
BuildVersion:	15E65

with

$ clang++ --version
Apple LLVM version 7.3.0 (clang-703.0.29)
Target: x86_64-apple-darwin15.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

and the following third-party software (there is still problem with new Homebrew's METIS, so, no METIS this time)

$ brew list --versions
boost 1.60.0_1
cgal 4.7
gmp 6.1.0
mpfr 3.1.3
open-mpi 1.10.2
scotch 6.0.4_1

February 24, 2016

  1. Updated patches for 3.0.x and dev.
  • in 3.0.x unsilenced wmkdep utility, so now this part of build process is marked as [DEP]
  • By accident added matrix constraining in scalar transport solver.
  1. Tried to extend third-party software configuration logic, i.e. if brew is not found, try port, and fall-back to /usr/local if neither brew, nor port were found. Since I have only brew on my laptop, functionality is not tested.

January 25, 2015

Though OpenCFD distributes Docker images for OS X, to me native compilation looks more convenient (for people who does not like compilation, there are precompiled binaries). Installation guide is almost the same as for any other release (OpenFOAM(R) release & Homebrew), except:

  1. Download URL is OpenFOAM-v3.0+.tgz.
  2. Graphics function objects ($FOAM_SRC/postProcessing/functionObjects/graphics) depend on VTK. You can install the library with Homebrew (right now there is Python library path problem with bottled version, so either install using --build-from-source flag, or edit $(brew --prefix)/opt/vtk/lib/cmake/vtk-6.3/Modules/vtkPython.cmake so it points to valid Python installation).
  3. Compilation of Zoltan renumber functionality is silently skipped.

January 18, 2015

Updated patch for development OpenFOAM(R) branch.

December 18, 2015

  1. Patch for OpenFOAM(R) 3.0.1 (it was the same as the last 3.0.x patch)
  2. Since any way I am testing success of build process, decided to upload binary archives. More details can be found in wiki.

December 15, 2015

Major update.

  1. Changed wmake rules for Darwin. Hopefully this solves problems with missing symbols (1, 2). Though, since I never had this problem on my laptop it is a question of external testing. No, it did not solve the problem.

  2. Fixed bugs and typos in RunFunctions, also added overwrite flag from dev-repository (now run(Application|Parallel) functions have -f, -force, --force, -overwrite flags to run application overwriting log-file, and -a, -append, --append flags to run application and append to log-file).

  3. Just for fun added emulation of "silent rules" in 3.0.x. To turn this feature on you need to set WM_SILENT_RULES to non-empty value (export WM_SILENT_RULES=y in prefs.sh will do the trick). And instead of

    daphne:icoFoam$ wmake
    $WM_PROJECT_DIR/applications/solvers/incompressible/icoFoam
    Making dependency list for source file icoFoam.C
    xcrun c++ -arch x86_64 -Ddarwin64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=64 -Wall -Wextra -Wno-unused-parameter -Wno-overloaded-virtual -Wno-unused-variable -Wno-unused-local-typedef -Wno-invalid-offsetof -Wno-c++11-extensions -O3  -DNoRepository -ftemplate-depth-100 -I$WM_PROJECT_DIR/src/finiteVolume/lnInclude -I$WM_PROJECT_DIR/src/meshTools/lnInclude -IlnInclude -I. -I$WM_PROJECT_DIR/src/OpenFOAM/lnInclude -I$WM_PROJECT_DIR/src/OSspecific/POSIX/lnInclude   -fPIC -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -c icoFoam.C -o $WM_PROJECT_DIR/platforms/darwin64ClangDPInt64Opt/applications/solvers/incompressible/icoFoam/icoFoam.o
    xcrun c++ -arch x86_64 -Ddarwin64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=64 -Wall -Wextra -Wno-unused-parameter -Wno-overloaded-virtual -Wno-unused-variable -Wno-unused-local-typedef -Wno-invalid-offsetof -Wno-c++11-extensions -O3  -DNoRepository -ftemplate-depth-100 -I$WM_PROJECT_DIR/src/finiteVolume/lnInclude -I$WM_PROJECT_DIR/src/meshTools/lnInclude -IlnInclude -I. -I$WM_PROJECT_DIR/src/OpenFOAM/lnInclude -I$WM_PROJECT_DIR/src/OSspecific/POSIX/lnInclude   -fPIC -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -Wl,-execute,-undefined,dynamic_lookup $WM_PROJECT_DIR/platforms/darwin64ClangDPInt64Opt/applications/solvers/incompressible/icoFoam/icoFoam.o -L$WM_PROJECT_DIR/platforms/darwin64ClangDPInt64Opt/lib \
    	-lfiniteVolume -lmeshTools -lOpenFOAM -ldl  \
    	 -lm -o $WM_PROJECT_DIR/platforms/darwin64ClangDPInt64Opt/bin/icoFoam   
    

    you will get

    daphne:icoFoam$ wmake
    $WM_PROJECT_DIR/applications/solvers/incompressible/icoFoam
       [CC] icoFoam.C
       [LD] icoFoam
    

As usual, build was tested on:

daphne:openfoam-os-x$ sw_vers 
ProductName:	Mac OS X
ProductVersion:	10.11.2
BuildVersion:	15C50

with the following compiler:

daphne:openfoam-os-x$ clang++ --version
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.2.0
Thread model: posix

and the following thrid party packages:

daphne:openfoam-os-x$ brew list --versions
boost 1.59.0
cgal 4.6.3
eigen 3.2.6
gmp 6.1.0
metis 5.1.0
mpfr 3.1.3
open-mpi 1.10.1
parmetis 4.0.3_3
parmgridgen 0.0.2
scotch 6.0.4_1

December 5, 2015

  1. Updated patch for 3.0.x.
  2. Since 3.0.x and dev branches started to diverge, returned dev patch to the repository.

November 27, 2015

Added patch for swak4Foam and wiki page with installation guide. Maybe one day it will be imported into Mercurial repository, I do not have plans to open pull request on Sourceforge.

November 22, 2015

Updated patches to include

  1. Working getApplication function (resolves #14)
  2. Extended functionality for runApplication and runParallel.
    • -f (or --force) flag to force log-file overwrite
    • -a (--append) to append to log-file instead of overwriting
  3. RunFunctions now also automatically source $WM_PROJECT_DIR/etc/bashrc if run on El Capitan with enabled SIP (workaround for #15).

November 9, 2015

Updated 3.0.0 and 3.0.x patches to include build logic for Scotch and METIS with 64-bit index types. Libraries can be installed using files (scotch64.rb and metis64.rb) from formulae folder. See OpenFOAM 3.0.(0|x) & WM_LABEL_SIZE=64.

November 8, 2015

  1. Initial commit of 3.0.0 and 3.0.x patches (at this point they are identical). For 32 bit labels nothing changed in installation procedure. For 64 bit labels currently Scotch and METIS decomposition methods along with MGridGenGamgAgglomeration agglomeration method are disabled. They could be enabled in the future patches after testing 64 bit indexes in Scotch and METIS.

  2. Update for 2.2.x, 2.3.1, 2.3.x, 2.4.0, and 2.4.x patches that includes fixes in printStack function.

  3. Dropped 2.1.x patch (you can find it in earlier releases/commits) as I do have enough resources to support it. Temporarily removed -dev patch, currently it is equal to 3.0.x.

Build was tested on

alexey at daphne in openfoam-os-x$ sw_vers 
ProductName:	Mac OS X
ProductVersion:	10.11.1
BuildVersion:	15B42

with

alexey at daphne in openfoam-os-x$ clang++ --version
Apple LLVM version 7.0.0 (clang-700.1.76)
Target: x86_64-apple-darwin15.0.0
Thread model: posix

and these third party libraries

alexey at daphne in openfoam-os-x$ brew list --versions
boost 1.59.0
cgal 4.6.3
gmp 6.0.0a
metis 5.1.0
mpfr 3.1.3
open-mpi 1.10.0
parmetis 4.0.3_2
parmgridgen 0.0.1
scotch 6.0.4_1

September 20, 2015

Being upset by sigSegv in renumberMesh (guess segmentation violations happen in other places as well, yet I found it in renumberMesh), copied NullObject concept from -dev repository. Now everything seems to be OK (at least renumberMesh works).

Made additional cosmetic corrections (like SloanRenumber build script, so it checks for library with dylib extension instead of so).

Build process was tested on

alexey at daphne in openfoam-os-x$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.10.5
BuildVersion:	14F27

with the following compiler:

alexey at daphne in openfoam-os-x$ clang --version
Apple LLVM version 7.0.0 (clang-700.0.72)
Target: x86_64-apple-darwin14.5.0
Thread model: posix

and these third party packages:

alexey at daphne in openfoam-os-x$ brew list --versions
boost 1.58.0
cgal 4.6.1
metis 5.1.0
open-mpi 1.8.4_1
parmetis 4.0.3
parmgridgen 0.0.1

September 9, 2015

Updated patches for OpenFOAM(R) 2.3.1 and 2.4.0.

September 8, 2015

Updated patches for 2.3.x and 2.4.x (forgot certain things). Added patches for 2.2.x and 2.1.x (reinterpret_cast<const void*> solution for reference address seems to solve memory corruption problem).

Test platform and third party software versions did not change since September 5.

September 5, 2015

Updated patches for 2.3.x (OpenFOAM-2.3.x-2f9138f.patch) and 2.4.x (OpenFOAM-2.4.x-8685344.patch) versions. This time decided not to be too invasive, so ended up with 50k patches (with stats). There were 3 general types of modifications:

  1. OS X specifics in OSspecific/POSIX folder. These are again has two types: additions of certain OS X headers (like sys/time.h in clockTime.H) and reimplementation of functionality (like chunks in printStack.C, POSIX.C, and sigFpe.?)
  2. Clang's cpp does not fully support "traditional mode", so it does not understand continuations after comments. There were two variants: remove these comments or install traditional cpp. Chose the first variant.
  3. Warnings. First type comes from OpenFOAM(R)'s desire to take address of the reference and the other one comes from third party software (updated CGAL). First problem could be solved by -Wno-... flag, yet I have chosen reinterpret_cast way. The second problem is solved by conditional compilation and pragmas.

Cause these patches were "fresh start", finally paid attention to and implemented SetNaN functionality; simplified sigFpe code; implemented dlLoaded function. Also printStack.C was a little bit revised to contract HOME and PWD in library file names (in previous version HOME and PWD paths was replaced only in resolved source files).

And since the corrections are mostly in the old files, hope creation of patches for new versions will become much easier.

Build was tested on:

alexey at daphne in ~$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.10.5
BuildVersion:	14F27

with the following compiler

alexey at daphne in ~$ clang --version
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.5.0
Thread model: posix

and the following third party packages:

alexey at daphne in ~$ brew list --versions
boost 1.58.0
cgal 4.6.1
gmp 6.0.0a
libmpc 1.0.3
metis 5.1.0
mpfr 3.1.3
open-mpi 1.8.4_1
parmetis 4.0.3
parmgridgen 0.0.1

July 31, 2015

Added patch for OpenFOAM-dev (commit 40310a5). Though this time patch is less invasive, so maybe it will work with later commits.

The patch is a continuation of an attempt to build OpenFOAM(TM) with -Wall -Wextra -std=c++11 flags.

  1. register storage class is removed in dev-branch, so the only places where it appears are sources generated by flex. Added pragmas to suppress warnings.
  2. Still lots of unused parameter warnings. Commented them out (sometimes it is convenient to keep name of parameter since it a bit of documentation, sometimes parameters have names like p, yet for consistency I have decided to use comments everywhere). Patch was submitted upstream.
  3. printStack functionality uses only lldb. So implementation became simplified compared to 2.(3|4).x version.
  4. Boost and CGAL both have unused parameters and tautological comparison warnings, added pragmas around include lines to ignore them.
  5. Scotch decomposition method is disabled when OpenFOAM(TM) is build with WM_LABEL_SIZE=64, since it requires recompilation of Scoth. Maybe later I will create special Homebrew formula for this version.
  6. Clang on OS X does not want to do certain implicit conversions, so long.H and ulong.H headers were added to explicitly create Ostream methods for long and unsigned long types.
  7. Miscellaneous bugs where revealed due to no implicit type coercion (like if (mag(A > B)) instead of if (mag(A) > B)), they were fixed. Patches are submitted upstream.

Since the patch is a fresh start compared to 2.3.x and 2.4.x versions, there could be certain bugs, which were not revealed by quick tutorials check. Use github Issues functionality to report them.

Build process was tested on:

alexey at daphne in ~$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.10.4
BuildVersion:	14E46

with the following compiler

alexey at daphne in ~$ clang --version
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.4.0
Thread model: posix

and with the following third party package versions:

alexey at daphne in ~$ brew list --versions
boost 1.57.0
cgal 4.6
gmp 6.0.0a
metis 5.1.0
mpfr 3.1.2-p11
open-mpi 1.8.4_1
parmetis 4.0.3
parmgridgen 0.0.1
scotch 6.0.4_1

June 5, 2015

Added patches for OpenFOAM(R) 2.4.0 and 2.4.x (commit b750988).

The patches are an attempt to build OpenFOAM with -Wall -Wextra -std=c++11 flags. The following appears after addition of the flags:

  1. C++11 deprecates register storage class. So I have removed it, also flex generates code that put this keyword in several places: added sed pipe after flex code generation to remove it.
  2. Lots of "unused parameter" warnings. Solved this problem commenting out names of the unused parameters, like: fvPatch& /* pp */.
  3. Lots of "unused variable" warnings. These are due to love of developers to do thing like #include "readTimeControls.H" in the beginning of the solver, though not all created variables are used. Solved the problem by introducing readInitialTimeControls.H file and partially pruning unused chunks of code.
  4. Quite a lot of hidden virtual functions warnings. These are due to mess in return types and method parameters (postProcessing/functionObjects library is an example of the problem). Solved by either declaring and implementing correct methods, or by "using Class::method" addition.
  5. Tried to address constant reference dereferencing problem. Since it is not strictly defined behavior and, guess, results depend on compiler. So either added method returning pointer (since frequently OpenFOAM does this: const T& method() { return *ptr; } ... a = method(); if (&a) { ... }, in general if condition should always be true), or boolean returning function checking validity of the pointer.
  6. Corrected loop condition in readKivaGrid.H, though since it is there from version 1.1 (according to Bruno Santos), guess ether this incorrect loop exit condition never lead to any problems, or nobody converts Kiva meshes.
  7. Removed trailing white-space in several places.
  8. Added of240 and of24x environment setup functions to openfoam-env-setup.sh.
  9. From now on, patches for git version will contain commit SHA for which they were created.

As usual, build was tested on:

alexey at daphne in ~$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.10.3
BuildVersion:	14D136

with the following compiler

alexey at daphne in ~$ clang --version
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
Thread model: posix

and with the following third party package versions:

boost 1.57.0
cgal 4.6
gmp 6.0.0a
metis 5.1.0
mpfr 3.1.2-p11
open-mpi 1.8.4_1
parmetis 4.0.3
parmgridgen 0.0.1
scotch 6.0.4_1

May 5, 2015

  1. As versions 2.1.x and 2.2.x have rather funny memory allocation bug, I have only one laptop, and I do not use those versions, further support of patches for these versions is dropped.
  2. Patches for 2.3.1 and 2.3.x (commit OpenFOAM/OpenFOAM-2.3.x@00eea57) include: - new printStack implementation (so there is no need in Python script for address resolution) - update of the code for new version of CGAL - corrections in METIS decomposition build logic - corrections in fvAgglomerationMethods build logic, so it can use Homebrew-installed ParMGridGen - corrections in sigFpe.C, so there is no more infinite loop in parallel run (due to print stack functionality in OpenMPI)
  3. Initial foam-extend (commit ec44c9) patch attempt. Installation guide is in wiki.
  4. Homebrew formulae for Mesquite and ParMGridGen.

Build was tested on

alexey at daphne in ~$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.10.3
BuildVersion:	14D136

With the following versions of third party packages

alexey at daphne in ~$ brew ls --versions
bison27 2.7.1
boost 1.57.0
cgal 4.6
gmp 6.0.0a
hwloc 1.9
libmpc 1.0.3
mesquite 2.1.2
metis 5.1.0
mpfr 3.1.2-p11
open-mpi 1.8.4
parmetis 4.0.3
parmgridgen 0.0.1
scotch 6.0.3

Mar. 26, 2015

  1. Updated OpenFOAM(TM) 2.3.1 patch for new version of Scotch.
  2. Added patch to fix Scotch linking. Though patch was tested on 2.3.1, guess it will work on 2.3.0 and 2.2.x versions.

Dec. 13, 2014

Added patch for OpenFOAM(TM) 2.3.1. Build was tested on:

myself at daphne in openfoam-os-x$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.10.1
BuildVersion:	14B25

myself at daphne in openfoam-os-x$ clang --version
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix

openfoam-os-x's People

Contributors

mrklein avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openfoam-os-x's Issues

Mac OS High Sierra Xcode Beta 9 - tutorial test fails `_rm~all_': not a valid identifier

Hi,
I've been beta testing Mac OS high sierra with Xcode. Openfoam compiled fine, only one small glitch running the cavity tutorial test. I obtain the following error:

/OpenFOAM/OpenFOAM-5.x/etc/config.sh/bash_completion: line 6658: `_rmall_': not a valid identifier

To get the tutorials running I edited the bash_completion file and removed the ~. I'm not sure if this is the correct fix.

Many thanks for your wiki and compilation patches.

Best wishes,

Andy.

__ZN4FoamlsERNS_7OstreamEl Symbol not Found?

Hi,

I seem to have another problem. I can't run icoFoam on the cavity tutorial, and it throws this error:
dyld: Symbol not found: __ZN4FoamlsERNS_7OstreamEl Referenced from: /Users/PeterE/OpenFOAM/OpenFOAM-4.0/platforms/darwin64ClangDPInt32Opt/bin/icoFoam Expected in: flat namespace

This seems to be the same error as this person had, but your fix of changing motionSolverLibs ( "libfvMotionSolvers.so" ); to .dylib. It didn't work, throwing the same error (I was using movingCone):
dyld: Symbol not found: __ZN4FoamlsERNS_7OstreamEl Referenced from: /Users/PeterE/OpenFOAM/OpenFOAM-4.0/platforms/darwin64ClangDPInt32Opt/bin/pimpleDyMFoam Expected in: flat namespace
The whole output is here.

Even if I get movingCone to work, is there a way to fix this for all simulations to come?
Thank you so much, and I'm sorry to bug you with these issues.

Bottled Scotch

Bottled version of Scotch is installed as a set of *.dylib files instead of *.a files. This behavior leads to the error

dyld: Symbol not found: __SCOTCHbgraphbipartststratab
  Referenced from: /usr/local/opt/scotch/lib/libptscotch.dylib
  Expected in: flat namespace
 in /usr/local/opt/scotch/lib/libptscotch.dylib
Trace/BPT trap: 5

Error during installation

Hi. I'm getting a lot of errors during compilation for file "/Users/MadScientist/OpenFOAM/OpenFOAM-4.1/platforms/darwin64ClangDPInt32Opt/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L.C" as shown in the attached log.

Any idea?

log.Allwmake.txt

extend disk space

Hi,

I have the openfoam dev version installed. Is it possible to extend disk space after installation?
I get the error:
the user's disk quota is exhausted

Thanks,
Jenna

OF 5.0 git version running parallel gives dyld: Symbol not found: ___intel_sse2_strdup error?

Hi,
thanks for all your great work! OF 5 compiles well and runs well on a single node. When I try to run parallel using the latest mpirun (Open MPI) 2.1.1 and OF 5 it throws the following error:

dyld: lazy symbol binding failed: Symbol not found: ___intel_sse2_strdup
Referenced from: /Users/openmpi/OpenFOAM/OpenFOAM-5.x/platforms/darwin64ClangDPInt64Opt/lib/openmpi-system/libPstream.dylib
Expected in: flat namespace

dyld: Symbol not found: ___intel_sse2_strdup
Referenced from: /Users/openmpi/OpenFOAM/OpenFOAM-5.x/platforms/darwin64ClangDPInt64Opt/lib/openmpi-system/libPstream.dylib
Expected in: flat namespace

Any ideas?

Best wishes,

Andy.

OF7 compilation: in UPstream.H:42:10: fatal error: 'labelList.H' file not found

Hello!
I was trying to compile OFv7 (OpenFOAM(R) git version & Homebrew) using the provided instructions and I stuck on Allwmake command with the following error:
OpenFOAM/OpenFOAM-7/src/OpenFOAM/lnInclude/UPstream.H:42:10: fatal error: 'labelList.H' file not found
I understand that the link on labelList.H does not exist in the lnInclude directory.
What is the right way to add it?
Could you please advise?
Thanks!

WM_PROJECT_DIR not set for 3.0.x_f5fbd39 patch

The compile stops immediately with:

./Allwmake: line 7: /wmake/scripts/AllwmakeParseArguments: No such file or directory

which indicates that $WM_PROJECT_DIR from this line of Allwmake is not set:

. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments

Should this be added to prefs.sh ?

Patch for OpenFoam 6

With the release of OpenFoam 6 some days ago, a new patch for this new version would be great.

lldb warning in printStack

It should be suppressed.

#0  "Foam::error::printStack(Foam::Ostream&)"warning: (x86_64) /Users/alexey/OpenFOAM/OpenFOAM-2.3.1/platforms/darwin64ClangDPOpt/lib/libOpenFOAM.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
 in ~/OpenFOAM/OpenFOAM-2.3.1/platforms/darwin64ClangDPOpt/lib/libOpenFOAM.dylib
#1  "Foam::sigFpe::sigHandler(int)"warning: (x86_64) /Users/alexey/OpenFOAM/OpenFOAM-2.3.1/platforms/darwin64ClangDPOpt/lib/libOpenFOAM.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
 in ~/OpenFOAM/OpenFOAM-2.3.1/platforms/darwin64ClangDPOpt/lib/libOpenFOAM.dylib
#2  "_sigtramp" in /usr/lib/system/libsystem_platform.dylib
#3  "Foam::addfileMonitorToDebug_"warning: (x86_64) /Users/alexey/OpenFOAM/OpenFOAM-2.3.1/platforms/darwin64ClangDPOpt/lib/libOpenFOAM.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
 in ~/OpenFOAM/OpenFOAM-2.3.1/platforms/darwin64ClangDPOpt/lib/libOpenFOAM.dylib
#4  "Foam::PCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const"warning: (x86_64) /Users/alexey/OpenFOAM/OpenFOAM-2.3.1/platforms/darwin64ClangDPOpt/lib/libOpenFOAM.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
 in ~/OpenFOAM/OpenFOAM-2.3.1/platforms/darwin64ClangDPOpt/lib/libOpenFOAM.dylib
#5  "Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&)" in ~/OpenFOAM/OpenFOAM-2.3.1/platforms/darwin64ClangDPOpt/lib/libfiniteVolume.dylib
#6  "Foam::fvMatrix<double>::solve(Foam::dictionary const&)" in ~/OpenFOAM/OpenFOAM-2.3.1/platforms/darwin64ClangDPOpt/bin/icoFoam
#7  "Foam::fvMatrix<double>::solve()" in ~/OpenFOAM/OpenFOAM-2.3.1/platforms/darwin64ClangDPOpt/bin/icoFoam
#8  "main" in ~/OpenFOAM/OpenFOAM-2.3.1/platforms/darwin64ClangDPOpt/bin/icoFoam
#9  "start" in /usr/lib/system/libdyld.dylib
#10  ? in /usr/lib/system/libdyld.dylib

WM_LABEL_SIZE metis 5.1.0 did not build clang: error: linker...

Hi, thanks for all the great work with openFOAM, Mac os x and home-brew. It is very impressive and helped my work. I've installed home-brew and openFOAM 3.0.0 on my macbook pro ( El-Cap) and it runs happily in serial. So I've just tried to update metis and scotch as per:

https://github.com/mrklein/openfoam-os-x/wiki/OpenFOAM-3.0.(0%7Cx)-&-WM_LABEL_SIZE=64

via:

$ brew install https://raw.githubusercontent.com/mrklein/openfoam-os-x/master/formulae/metis64.rb

and it fails, I'm not sure why. Can you please help, attached is the output of above script:

log.metis64.zip

Many thanks, Andy

Compilation Error on Catalina

Hello,

I was installing OpenFOAM-7-0ebbff061 following your tutorial and got an error:

primitives/quaternion/quaternion.C:129:12: error: call to 'pow' is ambiguous
return pow(magQ, power)*exp(powq);

My system information

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.15.3
BuildVersion:	19D76
$ clang++ --version
Apple clang version 11.0.0 (clang-1100.0.33.17)
Target: x86_64-apple-darwin19.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

3rd party:

$ brew list --versions
boost 1.72.0
cgal 5.0.2
eigen 3.3.7
gcc 9.2.0_3
gmp 6.2.0
hwloc 2.1.0
icu4c 64.2
isl 0.22.1
libevent 2.1.11_1
libmpc 1.1.0
metis 5.1.0
mpfr 4.0.2
open-mpi 4.0.3
[email protected] 1.1.1d
parmgridgen 0.0.2
scotch 6.0.4_1

Is my software version too new?

Typo in openfoam-env-setup.sh

I just noticed that on the 13th line of the script there is a typo (apparently).

It is written as:
readonly FOAM_RELEASE_FILE="${FOAM_RELESE_FILE:-"$HOME/.OpenFOAM/OpenFOAM-release"}"

I believe the intention was for it to be written as:
readonly FOAM_RELEASE_FILE="${FOAM_RELEASE_FILE:-"$HOME/.OpenFOAM/OpenFOAM-release"}"

scotch installation fails in Mac 10.14.2 with homebrew

mpicc -O3 -fPIC -Drestrict=__restrict -DCOMMON_PTHREAD_BARRIER -DCOMMON_PTHREAD -DSCOTCH_CHECK_AUTO -DCOMMON_RANDOM_FIXED_SEED -DCOMMON_TIMING_OLD -DSCOTCH_RENAME -DCOMMON_FILE_COMPRESS_BZ2 -DCOMMON_FILE_COMPRESS_GZ -DSCOTCH_PTSCOTCH -I../../include -L../../lib test_scotch_dgraph_redist.c -o test_scotch_dgraph_redist -lptscotch -lscotch -lptscotcherrexit -lm -lz -lpthread -lbz2
make[1]: *** [check] Error 2
make: *** [check] Error 2
make: *** Waiting for unfinished jobs....
./test_strat_par
dyld: __dyld section not supported in /usr/local/Cellar/scotch/6.0.4_1/lib/libptscotch.dylib
make[2]: *** [check_strat_par] Abort trap: 6
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [ptcheck] Error 2
make: *** [ptcheck] Error 2

Infinite loop after sigfpe in parallel run

  1. Take any tutorial case
  2. Make it raise FPE (the easiest way is to set negative viscosity)
  3. Run the case in parallel

(confirmed on OpenFOAM 2.1.1, 2.2.2, 2.3.0 & OS X 10.9.5)

Adapt tutorials for OS X

Certain tutorial cases loads dynamic libraries, in configuration they have .so extension. Two variants are possible:

  1. Correct tutorial configuration files.
  2. Correct dynamic library loading code to change .so to .dylib on OS X.

sigSegv in renumberMesh

renumberMesh halts with the following error:

#0  "Foam::error::printStack(Foam::Ostream&)" in ~/OpenFOAM/OpenFOAM-2.3.1/platforms/darwin64ClangDPOpt/lib/libOpenFOAM.dylib
#1  "Foam::sigSegv::sigHandler(int)" in ~/OpenFOAM/OpenFOAM-2.3.1/platforms/darwin64ClangDPOpt/lib/libOpenFOAM.dylib
#2  "_sigtramp" in /usr/lib/system/libsystem_platform.dylib
#3  ? in /usr/lib/system/libsystem_platform.dylib
#4  "reorderMesh(Foam::polyMesh&, Foam::List<int> const&, Foam::List<int> const&)" in ~/OpenFOAM/OpenFOAM-2.3.1/platforms/darwin64ClangDPOpt/bin/renumberMesh
#5  "main" in ~/OpenFOAM/OpenFOAM-2.3.1/platforms/darwin64ClangDPOpt/bin/renumberMesh
#6  "start" in /usr/lib/system/libdyld.dylib

The error seems to be happening in Opt build (since in Debug build of 2.4.x error does not happen).

El Capitan's SIP & foamJob

Since (DY)LD_LIBRARY_PATH variables are suppressed from environment of protected executables (in this case protected executable is bash), cases, which load additional libraries, fail when started with foamJob.

Possible solutions:

  1. Reimplement foamJob in C/C++, for binary these environment variables won't be suppressed
  2. Export (DY)LD_LIBRARY_PATH before execution of the application (or just use foamExec in all cases)

SHA256 Mismatch

Hi,

i have the following error during the installation procedure.

~22:36:40$ brew install https://raw.githubusercontent.com/mrklein/openfoam-os-x/master/formulae/parmgridgen.rb

################################################################## 100.0%

==> Downloading https://github.com/mrklein/ParMGridGen/archive/v0.0.2.tar.gz
==> Downloading from https://codeload.github.com/mrklein/ParMGridGen/tar.gz/v0.0.2

################################################################## 100.0%

Error: SHA256 mismatch
Expected: 94fd48e0253c809646b2ce90d9e282dff63393802cdf0d29d21368617599b1c5
Actual: b3875d877def79c5fe37df0c9b1a43a47b3a99e8714f654a44d2010ce338ea93
Archive: /Library/Caches/Homebrew/parmgridgen-0.0.2.tar.gz
To retry an incomplete download, remove the file above.
~22:37:06$

Have you any idea how to resolve this?

Tnx in advance!

parmgridgen.rb installation dependency issue

I'm getting some errors while trying to install by brew.

$ brew install https://raw.githubusercontent.com/mrklein/openfoam-os-x/master/formulae/parmgridgen.rb
######################################################################## 100.0%
Error: parmgridgen: Unsupported special dependency :mpi

And after removing depends_on :mpi => :cc:

$ brew install parmgridgen.rb 
==> Downloading https://github.com/mrklein/ParMGridGen/archive/v0.0.2.tar.gz
Already downloaded: /Users/hadi/Library/Caches/Homebrew/downloads/fc1d32fa5314ed86ff952aa1fdc69104e84a148218347a2929bf1ee71031b444--ParMGridGen-0.0.2.tar.gz
==> make parallel
Last 15 lines from /Users/hadi/Library/Logs/Homebrew/parmgridgen/01.make:
a - setup.o
a - diffuse.o
a - grsetup.o
a - timer.o
a - coarsen.o
a - edge_refine.o
a - drivers.o
a - remap.o
a - iidxsort.o
a - ikeysort.o
a - var.o
make[3]: *** [../libIMparmetis.a] Error 1
make[2]: *** [default] Error 2
make[1]: *** [default] Error 2
make: *** [parallel] Error 2

Do not report this issue to Homebrew/brew or Homebrew/core!

Could you give me any hint please?

make 2

I got the error during ./Allwmake:

make[2]: *** No rule to make target /Users/XYZ/OpenFOAM/OpenFOAM-5.0/platforms/darwin64ClangDPInt32Opt/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C.dep', needed by /Users/XYZ/OpenFOAM/OpenFOAM-5.0/platforms/darwin64ClangDPInt32Opt/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.o'. Stop.
make[1]: *** [reactingEulerFoam] Error 2
make: *** [multiphase] Error 2

Best regards
Hans

question on commits

Hi,

I'm following the OpenFOAM dev & Homebrew instructions to install OpenFOAM on my mac.

Now, I'm stuck with the part 'Check out sources':
$ git checkout -b local-install
I suppose that I have to replace by the correct commit number? But how do I know what to fill in here, can anyone explain me?

Thanks!
Jenna

Patches not zsh compatible with == comparison operator

Another issue I would like to tackle:

The == operator ist not posix compliant, but (more or less) bash specific and doesn't work in a lot of other shells, including my beloved zsh.
eg:

[ "$(uname -s)" == "Darwin" ] && export DYLD_LIBRARY_PATH
will produce an error in zsh.

Is there anything speaking against changing all == to = so that

[ "$(uname -s)" == "Darwin" ] && export DYLD_LIBRARY_PATH
becoms
[ "$(uname -s)" = "Darwin" ] && export DYLD_LIBRARY_PATH

If not, I can create a pull request if you like.

Atb Effi

Unable to install v4.0 on Sierra

Hey, first of all thank you for your effort to support the community!

I tried to install OpenFOAM 4.x on a freshly installed system. Maybe my problem is quite simple, as the files I use differ from the link you provided in the wiki (OpenFOAM release & Homebrew). I followed your guide and replaced

curl -L http://downloads.sourceforge.net/foam/OpenFOAM-<VER>.tgz > OpenFOAM-<VER>.tgz

with

wget -O - http://download.openfoam.org/source/4-0 | tar xvz
as there is no http://downloads.sourceforge.net/foam/OpenFOAM-4.0.tgz available.

I thought I have to use the 4.x patch but it's not possible to apply it.

curl -L https://raw.githubusercontent.com/mrklein/openfoam-os-x/master/OpenFOAM-4.x-7dce081.patch > OpenFOAM-4.x.patch
git apply OpenFOAM-4.x.patch 
error: patch failed: etc/bashrc:42
error: etc/bashrc: patch does not apply
error: patch failed: src/renumber/SloanRenumber/Make/options:1
error: src/renumber/SloanRenumber/Make/options: patch does not apply

OpenFOAM-4.0.patch applies without errors.

./Allwmake returns:

xcrun cc -arch x86_64 -Ddarwin64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -O3   -fPIC -isysroot  -Wno-unused-function dirToString.c -o /Users/xyz/OpenFOAM/OpenFOAM-4.0/wmake/platforms/darwin64Clang/dirToString
clang: warning: no such sysroot directory: '-Wno-unused-function'
dirToString.c:43:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
         ^
1 error generated.
make: *** [/Users/xyz/OpenFOAM/OpenFOAM-4.0/wmake/platforms/darwin64Clang/dirToString] Error 1

Additional information:

ProductName:    Mac OS X
ProductVersion: 10.12
BuildVersion:   16A323

clang++ --version

Apple LLVM version 8.0.0 (clang-800.0.38)
Target: x86_64-apple-darwin16.0.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

brew -v

Homebrew 1.0.6
Homebrew/homebrew-core (git revision 8cff; last commit 2016-10-06)

Thanks in advance!

Problem in testing (or installing, I don't know exactly)

Hi,

I'm trying to install OpenFOAM 3.0.x in my Mac OS X El Captain, but I'm struggling to get it right. In the "Testing installation" manual (https://github.com/mrklein/openfoam-os-x/wiki/Testing-installation), when it asks me to use the "run" command, the terminal sends me back the following:

-bash: cd: /Users/roberto/OpenFOAM/roberto-3.0.x/run: No such file or directory

I followed all the steps contained in https://github.com/mrklein/openfoam-os-x/wiki/OpenFOAM-release-&-Homebrew , and I'm suspecting that the error above has something to do with the "Build OpenFOAM" section. In this section, the tutorial asks me to run the command:

$ mkdir -p $HOME/.OpenFOAM

but when I run the abover line in the terminal, nothing happens, in other words, no directory is created in the $HOME location. I can't figure what I'm doing wrong.

Thanks in advance,

Roberto

Too man open files issues on OS X 10.11.0

I get a lot of "osx could not open file XXXX.C/H due to Too many open files" issues.
Not sure if they are a dealbreaker (but I think so), but executing

ulimit -n 4096

before ./Allwmake seems to have solved the problem.

Its compiling atm, will post an update afterwards

macports use

After a 2 year break, I'm back to using OpenFOAM again on my mac using Macports for dependencies (openmpi, etc.). I'm happy to report that your patch (version 5.0) worked! No edits were needed. Thanks much for continuing to provide these patches.

I do have one question. I spent some time double checking that things would link properly to my macports libraries. I edited etc/config.sh/mac/functions so that line 71 is
version="port installed $pkg | grep '(active)' | awk -F '[@|_]' '{print $2}'"
but I can't tell if it is doing anything. In fact, everything built and seems to work with or without making this edit (I can run decomposePar with scotchCoeffs in either case). Do you think this edit is helpful? Should I provide a pull request?

darwin64Gcc/c++: No such file or directory

Hello! Thank you for your patch!
I have a question. I'm following instruction, but get some error:
OpenFOAM/OpenFOAM-4.1/wmake/rules/darwin64Gcc/c++: No such file or directory

I was check my etc/bashrc and it contains next line:
Source OpenFOAM github

export WM_COMPILER=Gcc

Am I right, that I need to replace this one with

export WM_COMPILER=Clang

because your package contains patch with DarwinClang?

If I made manipulation with compiler I get following error:

/Users/dima/study/OpenFOAM/OpenFOAM-4.1/src/OSspecific/POSIX
'libNULL.o' is up to date.
\+ wmake libso OpenFOAM
/Users/dima/study/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM
sed -e 's!VERSION_STRING!4.1!' -e 's!BUILD_STRING!4.1!' global/global.Cver > /Users/dima/study/OpenFOAM/OpenFOAM-4.1/platforms/darwin64ClangDPInt32Opt/src/OpenFOAM/global/global.Cver.C; xcrun c++ -arch x86_64 -std=c++14 -Ddarwin64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wno-unused-parameter -Wno-overloaded-virtual -Wno-unused-variable -Wno-unused-local-typedef -Wno-invalid-offsetof -Wno-deprecated-register -O3  -DNoRepository -ftemplate-depth-100 -I/Users/dima/study/OpenFOAM/OpenFOAM-4.1/platforms/darwin64ClangDPInt32Opt/src/OpenFOAM -IlnInclude -I. -I/Users/dima/study/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude -I/Users/dima/study/OpenFOAM/OpenFOAM-4.1/src/OSspecific/POSIX/lnInclude   -fPIC -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -c /Users/dima/study/OpenFOAM/OpenFOAM-4.1/platforms/darwin64ClangDPInt32Opt/src/OpenFOAM/global/global.Cver.C -o /Users/dima/study/OpenFOAM/OpenFOAM-4.1/platforms/darwin64ClangDPInt32Opt/src/OpenFOAM/global/global.o
make: *** No rule to make target \`/Users/dima/study/OpenFOAM/OpenFOAM-4.1/platforms/darwin64ClangDPInt32Opt/src/OpenFOAM//bool/bool.C.dep', needed by \`/Users/dima/study/OpenFOAM/OpenFOAM-4.1/platforms/darwin64ClangDPInt32Opt/src/OpenFOAM//bool/bool.o'.  Stop.

The root directory of homebrew is hard-coded.

Today, I try to build OpenFOAM 2.3.1 on my MBP. I found your work for it. It's so great!

However, I also found something defective on your patches because the root directory of homebrew is hard-coded. e.g. there is the following line in OpenFOAM-2.3.1.patch:

export BOOST_ARCH_PATH=/usr/local/opt/boost

However, my homebrew is installed in to $HOME/Developer. I recommend that all /usr/local in your patches should replaced by brew --prefix.

E.L.

Dummy Pstream Library

I have used your recipe before, with success, but after doing a clean install of OS X El Capitan I have problems. I get the error "Trying to use the dummy Stream library. This dummy library cannot be used in parallel mode" when running applications in parallel. Guessing it has something to do with open-mpi, but open-mpi is definitely installed via home-brew. Current version: open-mpi-1.10.1.

Error in foamMonitor

It seems that foamMonitor ist not working under Mac OS. Code to reproduce:

   cd $FOAM_TUTORIALS/incompressible/simpleFoam/pitzDaily/
   ****add "#includeFunc residuals" to functions in controlDict
   blockMesh
   simpleFoam > log &
   foamMonitor -l postProcessing/residuals/0/residuals.dat 

Error:

stat: illegal option -- -
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
/Users/USERNAME/OpenFOAM/OpenFOAM-4.x/bin/foamMonitor: line 174: test: : integer expression expected
/Users/USERNAME/OpenFOAM/OpenFOAM-4.x/bin/foamMonitor: line 179:  7922 Killed: 9               $GNUPLOT $GPFILE

Works fine on Linux. I suppose that my Gnuplot installation is fine. Could you provide any solution?

Can't run icoFoam or blockMesh?

Hi!

I love your recipe. Thank you! The installation seemed to be fine, but apparently running icoFoam or blockMesh throws a big scary command not found error. FoamRunTutorials works fine, which shows at least the installation is working. Had this problem before? How'd you fix it? Thanks for your help! I attached the output of ./Allmwake.
log.txt
I'm using macOS Sierra, and I'm installing OpenFOAM 4.0.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.