Comments (10)
Correct URL for patch release is http://dl.openfoam.org/source/9.20211007. So, you do:
$ curl -L http://dl.openfoam.org/source/9.20211007 | tar xz
$ mv OpenFOAM-9-20211007 OpenFOAM-9
$ cd OpenFOAM-9
$ curl -LO https://raw.githubusercontent.com/mrklein/openfoam-os-x/master/OpenFOAM-9-2b1d7d67c.patch
$ git apply OpenFOAM-9-2b1d7d67c.patch
With your command
curl -L http://dl.openfoam.org/source/9 > OpenFOAM-9.20211007.tgz
you just downloaded release 9 Into a file with the name OpenFOAM-9.20211007.tgz. And as a result, you got the same error.
from openfoam-os-x.
I would suggest to use more recent OpenFOAM-9 source code. Either checkout sources from git repository, or use patch release, as described here: https://openfoam.org/news/v9-patch/.
The problem is that between release 9 and time when patch was created, there was source code change:
# Evaluate command-line parameters and record settings for later
# these can be used to set/unset values, or specify alternative pref files
export FOAM_SETTINGS="$@"
_foamEval $@
was changed to
# Evaluate command-line parameters of the form "param=keyword" or unset
# parameters with "param="
export FOAM_SETTINGS="$@"
_foamParams $@
And this breaks application of the patch.
from openfoam-os-x.
So, I tried the following:
- download the latest dev version of the source code:
curl -L http://dl.openfoam.org/source/9 > OpenFOAM-9.20211007.tgz
- download the latest version of the patch
curl -L https://raw.githubusercontent.com/mrklein/openfoam-os-x/master/OpenFOAM-9-2b1d7d67c.patch > OpenFOAM-9.patch
However, when I run the command "git apply OpenFOAM-9.patch" I get the same error:
error: patch failed: etc/bashrc:154
error: etc/bashrc: patch does not apply
from openfoam-os-x.
Thanks for the help. Now it is compiling!
Next error:
When I run Allwmake it goes for a long time then stops when trying to compile scotch. Here is the error:
using SCOTCH_ARCH_PATH=/usr/local
wmake scotchDecomp
Making dependency list for source file scotchDecomp.C
could not open file scotch.h for source file scotchDecomp.C due to No such file or directory
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 -Wno-undefined-var-template -O3 -DNoRepository -ftemplate-depth-100 -DOMPI_SKIP_MPICXX -I/usr/local/Cellar/open-mpi/4.1.1_2/include -I/usr/local/include -I../decompositionMethods/lnInclude -IlnInclude -I. -I/Users/rditlrmw/OpenFOAM/OpenFOAM-9/src/OpenFOAM/lnInclude -I/Users/rditlrmw/OpenFOAM/OpenFOAM-9/src/OSspecific/POSIX/lnInclude -fPIC -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -c scotchDecomp.C -o /Users/rditlrmw/OpenFOAM/OpenFOAM-9/platforms/darwin64ClangDPInt32Opt/src/parallel/decompose/scotchDecomp/scotchDecomp.o
scotchDecomp.C:36:10: fatal error: 'scotch.h' file not found
#include "scotch.h"
^~~~~~~~~~
1 error generated.
make: *** [/Users/rditlrmw/OpenFOAM/OpenFOAM-9/platforms/darwin64ClangDPInt32Opt/src/parallel/decompose/scotchDecomp/scotchDecomp.o] Error 1
bash-3.2$
from openfoam-os-x.
This one is caused by new Homebrew package installation location on M1. On x86_64 Homebrew links formulae in /usr/local/opt
, on M1 it is different. So, you open etc/config.sh/mac/scotch
(and then etc/config.sh/mac/metis
) and put there location of Scotch and METIS (SCOTCH_ARCH_PATH
and METIS_ARCH_PATH
). Guess, in future patch versions search logic should be adapted to use brew --cellar
.
from openfoam-os-x.
Hello,
Thanks for posting the problems, I faced similar issues (M1Pro 10 core, 32GB RAM) and this helped. But when I tried to test the installation, it returned such errors:
$ mkdir -p "$FOAM_RUN"
$ run
$ cp -r $FOAM_TUTORIALS/incompressible/icoFoam/cavity/cavity .
$ cd cavity
$ foamRunTutorials
dyld[50136]: symbol not found in flat namespace '_MPI_Abort'
Running blockMesh on /Users/massisenergy/OpenFOAM/massisenergy-9/run/cavity
/Volumes/OpenFOAM/OpenFOAM-9/bin/tools/RunFunctions: line 56: 50140 Abort trap: 6 $APP_RUN "$@" > log.$LOG_SUFFIX 2>&1
Running on /Users/massisenergy/OpenFOAM/massisenergy-9/run/cavity
From the log, I could not see any obvious error that can be related to dyld ...
, what is the issue here?
from openfoam-os-x.
Last time similar problem was reported, the was a problem of mixing Rosetta and native code. This also can be a problem of SIP. Did you try to run foamRunTutorials
commands from command line? Since, there is no Allrun
script in cavity
tutorial, foamRunTutorials
command runs these two: blockMesh
and icoFoam
. Could you run them from command line?
from openfoam-os-x.
Thanks for your response.
I am not sure what do you mean by 'commands from command line'. Any OpenFOAM commands must be run from command line AFAIK. I attach screenshots from my terminal (iTerm2), if that helps.
How do I go about 'mixing Rosetta and native code'?
I'll disable SIP and then try again.
from openfoam-os-x.
foamRunTutorials
is a script, which is quite simple: either it runs Allrun
script in the current folder, or it creates mesh with blockMesh
and runs solver (which is extracted from controlDict
).
If there is a problem with SIP, usually it manifests when a case is run from script (like foamRunTutorials
) due to cleaned DYLD_LIBRARY_PATH
. If you simply enter commands one by one (i.e. blockMesh
, icoFoam
) usually everything works.
Concerning Rosetta (https://en.wikipedia.org/wiki/Rosetta_(software)) I was referencing this thread: #62 (comment). Since I do not use M1, I do not encounter these problems, so I can not help you any further.
from openfoam-os-x.
I ran blockMesh and icoFoam individually. The result is same. I'll try to understand and adopt according to the issue you've mentioned, thanks.
Also I should mention that in stead of mounting using hdutil
, I have used ln -s /Volumes/OpenFOAM $HOME/OpenFOAM
, can that be causing those issues?
from openfoam-os-x.
Related Issues (20)
- testing installation only works halfway HOT 5
- Can you add the patch for OpenFOAM-v1812? HOT 6
- License? HOT 6
- OpenFOAM v2112 and Mac OS 12 HOT 4
- OpenFOAM-8: symbol not found in flat namespace '_MPI_Abort' HOT 22
- Correct code for OpenMPI folders lookup
- Request: A new patch for swak4Foam (develop branch) HOT 2
- Encountered C++ import errors when making HOT 6
- clang: error when allmake HOT 5
- OpenFOAM 10 HOT 4
- Patch for OpenFOAM-dev HOT 9
- libomp needs a quick fix HOT 2
- Updated path for OpenFOAM v10 HOT 2
- OpenFOAM-11 HOT 1
- OpenFOAMv2306 and scotch library linking HOT 14
- problem with " brew install mrklein/foam/scotch" HOT 1
- -v2012 on Mac-m2-Ventura HOT 1
- Patches for v1806 HOT 1
- symbol not found in flat namespace '_ompi_mpi_byte' HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openfoam-os-x.