Giter VIP home page Giter VIP logo

Comments (10)

mrklein avatar mrklein commented on June 23, 2024 1

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.

mrklein avatar mrklein commented on June 23, 2024

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.

wallbob avatar wallbob commented on June 23, 2024

So, I tried the following:

  1. download the latest dev version of the source code:

curl -L http://dl.openfoam.org/source/9 > OpenFOAM-9.20211007.tgz

  1. 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.

wallbob avatar wallbob commented on June 23, 2024

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.

mrklein avatar mrklein commented on June 23, 2024

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.

massisenergy avatar massisenergy commented on June 23, 2024

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

log.Allwmake_backUp.txt

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.

mrklein avatar mrklein commented on June 23, 2024

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.

massisenergy avatar massisenergy commented on June 23, 2024

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.
Screenshot 2022-01-05 at 22 01 02
Screenshot 2022-01-05 at 21 59 24
How do I go about 'mixing Rosetta and native code'?

I'll disable SIP and then try again.

from openfoam-os-x.

mrklein avatar mrklein commented on June 23, 2024

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.

massisenergy avatar massisenergy commented on June 23, 2024

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?
Screenshot 2022-01-06 at 19 02 39

from openfoam-os-x.

Related Issues (20)

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.