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

[foam-extend.org] Installing Foam-Extend-5.0 on Mac M1

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 23, 2022, 12:13
Default Installing Foam-Extend-5.0 on Mac M1
  #1
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 722
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
Greetings,

I fail to make etc/bashrc run as part of the installation of Foam-Extend-5.0 on Mac M1. Suggestions are welcome. Thx.
dlahaye is offline   Reply With Quote

Old   September 27, 2022, 06:06
Default
  #2
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 722
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
Anyone , please? Thank you.
dlahaye is offline   Reply With Quote

Old   December 27, 2022, 13:06
Default
  #3
Member
 
Ali B.
Join Date: Mar 2020
Location: abzrg.github.io
Posts: 34
Rep Power: 6
reverseila is on a distinguished road
The bashrc file needs to be changed to check for new arm64 arch.

Code:
# etc/bashrc
# ------------
...

Darwin)
    # this makes certain things easier
    export WM_ARCH_BASE=darwin

    case `uname -p` in

...
        #  for m1 mac: `uname -p` == arm
        arm)
            export $WM_ARCH=darwin

...
There are also some errors (sed command) in the foamCleanPath script (at least this happened on my machine).

Code:
# etc/bashrc
# ------------
...
cleanProg=$WM_PROJECT_DIR/bin/foamCleanPath


#- Clean PATH
cleanEnv=`$cleanProg "$PATH" "$foamOldDirs"` && PATH="$cleanEnv"  # sed: -e expression #1, char 47: unknown option to `s'

...


#- Clean PATH
cleanEnv=`$cleanProg "$PATH"` && PATH="$cleanEnv"  #  sed: -e expression #1, char 47: unknown option to `s'

...

With some printf debugging (into stderr) I found the problematic sed command in this line of code

Code:
# bin/foamCleanPath
# ---------------------
...

        duplicate=`echo " $dirList " | sed -ne "s@ $dir @DUP@p"`
        #                                        ^      ^   ^
        # I replaced the delimiter '@' with '|' (pipe) and error was gone
...
Also, the wmake rules directory for the arch+compiler (for example darwin64Clang) should be created.
reverseila is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[blockMesh] blockMesh not working in Foam Extend 4.0 siddhesh OpenFOAM Meshing & Mesh Conversion 3 April 8, 2020 05:47
error with reactingFoam BakedAlmonds OpenFOAM Running, Solving & CFD 4 June 22, 2016 02:21
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
channelFoam for a 3D pipe AlmostSurelyRob OpenFOAM 3 June 24, 2011 13:06
[Gmsh] Import problem ARC OpenFOAM Meshing & Mesh Conversion 0 February 27, 2010 10:56


All times are GMT -4. The time now is 19:07.