CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Installation on Windows, Mac and other Unsupported Platforms

Mac OS X 10.11 and OpenFOAM 3.0: Error when running ParaFoam with "command not found"

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

Like Tree2Likes
  • 1 Post By alexeym
  • 1 Post By alexeym

Reply
 
LinkBack Thread Tools Display Modes
Old   February 4, 2016, 11:55
Default Mac OS X 10.11 and OpenFOAM 3.0: Error when running ParaFoam with "command not found"
  #1
hua
New Member
 
Join Date: Nov 2015
Location: Yokohama
Posts: 5
Rep Power: 3
hua is on a distinguished road
I install openfoam 3.0.0 and paraview on mac os 10.11, I succeed install them and I can run the openfoam solver and paraview without problem. But after the calculation, when I run the "paraFoam" command, I meet some error with:

➜ cavity paraFoam
Created temporary 'cavity.foam'
/Users/huaweizhuo/OpenFOAM/OpenFOAM-3.0.0/bin/paraFoam: line 283: paraview: command not found
➜ cavity which paraview
paraview () {
"/Applications/paraview.app/Contents/MacOS/paraview" "$@"
}
➜ cavity type paraveiw
paraveiw not found
➜ cavity type paraview
paraview is a shell function from /Users/huaweizhuo/OpenFOAM/OpenFOAM-3.0.0/etc/config/paraview-osx.sh

I will really appreciate it if you can help me, thank you!
hua is offline   Reply With Quote

Old   February 6, 2016, 18:08
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,872
Blog Entries: 39
Rep Power: 108
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Quick question: What does this command give you?
Code:
ls -l /Applications/paraview.app/Contents/MacOS/paraview
wyldckat is offline   Reply With Quote

Old   February 7, 2016, 08:18
Default
  #3
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,596
Rep Power: 26
alexeym will become famous soon enoughalexeym will become famous soon enough
@wyldckat

To reduce total number of questions:

- Yes, paraview is installed (since TS can run paraview from command line)
- Shell is zsh

Bash can execute functions in non-interactive shells, yet it seems zsh can not (so paraview can be executed from command line, but not from paraFoam script). Guess, the easiest way to solve the problem is to symlink /Applications/.../paraview in $WM_PROJECT_DIR/bin.

[RANT] Since I do not use zsh and has no desire to learn its idiosyncrasies, in the bug report on github I have proposed TS to find a solution, since he loves zsh. In two months he decided to look for help here (instead of zsh-related forum). [/RANT]
hua likes this.
alexeym is offline   Reply With Quote

Old   February 7, 2016, 12:17
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,872
Blog Entries: 39
Rep Power: 108
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
@alexeym: I see: https://github.com/mrklein/openfoam-os-x/issues/17
Many thanks for the heads up!

Well, I did give zsh a quick go on Ubuntu and I wasn't able to reproduce the problem, even after doing something similar to what's done in "paraview-osx.sh", so... I don't know.
I guess this should work :
Code:
bash paraFoam
wyldckat is offline   Reply With Quote

Old   February 7, 2016, 13:27
Default
  #5
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,596
Rep Power: 26
alexeym will become famous soon enoughalexeym will become famous soon enough
@wyldckat

Guess, this issue could be version-dependent. On Ubuntu it is 5.1.1 (according to https://launchpad.net/ubuntu/+source/zsh), on OS X it could be either 5.0.8 (system), or 5.1.1 (Macports), or 5.2 (Homebrew).

Since paraFoam script on OS X could be reduced to

Code:
F=$(basename $PWD).foam; touch $F && /Applications/paraview.app/Contents/MacOS/paraview --data=$F; rm $F
The line could be set as an alias to paraFoam (though do not know if in zsh aliases have priority over PATH content, maybe alias name could be just pf).

Nevertheless this does not change the fact, that the problem has nothing to do with OpenFOAM, paraview, or OS X.
wyldckat likes this.
alexeym is offline   Reply With Quote

Old   February 8, 2016, 10:38
Default
  #6
hua
New Member
 
Join Date: Nov 2015
Location: Yokohama
Posts: 5
Rep Power: 3
hua is on a distinguished road
➜ ~ ls -l /Applications/paraview.app/Contents/MacOS/paraview
-r-x------@ 1 huaweizhuo admin 970452 Sep 12 06:37 /Applications/paraview.app/Contents/MacOS/paraview
hua is offline   Reply With Quote

Old   February 8, 2016, 10:58
Default
  #7
hua
New Member
 
Join Date: Nov 2015
Location: Yokohama
Posts: 5
Rep Power: 3
hua is on a distinguished road
Quote:
Originally Posted by alexeym View Post
@wyldckat

To reduce total number of questions:

- Yes, paraview is installed (since TS can run paraview from command line)
- Shell is zsh

Bash can execute functions in non-interactive shells, yet it seems zsh can not (so paraview can be executed from command line, but not from paraFoam script). Guess, the easiest way to solve the problem is to symlink /Applications/.../paraview in $WM_PROJECT_DIR/bin.

[RANT] Since I do not use zsh and has no desire to learn its idiosyncrasies, in the bug report on github I have proposed TS to find a solution, since he loves zsh. In two months he decided to look for help here (instead of zsh-related forum). [/RANT]
As I am a newbee in Linux(or Mac OS), So would you mind me ask some simple question? how to symlink /Applications/.../paraview in $WM_PROJECT_DIR/bin, thank you very much!
hua is offline   Reply With Quote

Old   February 8, 2016, 11:21
Default
  #8
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,596
Rep Power: 26
alexeym will become famous soon enoughalexeym will become famous soon enough
Hi,

Well, what if you try:

https://duckduckgo.com/?q=how+to+cre...ink+on+os+x%3F

To avoid problem of choice:

http://apple.stackexchange.com/quest...nk-in-terminal

http://hints.macworld.com/article.ph...01110610290643

Then you can try

https://duckduckgo.com/?q=paraview+o...m+os+x+symlink

And go to section 6 of https://openfoamwiki.net/index.php/I...OpenFOAM_2.2.2.

[RANT]Though I still not quite understand why you are able to change default shell to zsh (guess you wanted that fancy prompt with arrow?), and can not create symlink or use search engine.[/RANT]
alexeym is offline   Reply With Quote

Old   February 8, 2016, 12:44
Default
  #9
hua
New Member
 
Join Date: Nov 2015
Location: Yokohama
Posts: 5
Rep Power: 3
hua is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Hi,

Well, what if you try:

https://duckduckgo.com/?q=how+to+cre...ink+on+os+x%3F

To avoid problem of choice:

http://apple.stackexchange.com/quest...nk-in-terminal

http://hints.macworld.com/article.ph...01110610290643

Then you can try

https://duckduckgo.com/?q=paraview+o...m+os+x+symlink

And go to section 6 of https://openfoamwiki.net/index.php/I...OpenFOAM_2.2.2.

[RANT]Though I still not quite understand why you are able to change default shell to zsh (guess you wanted that fancy prompt with arrow?), and can not create symlink or use search engine.[/RANT]
This is the result after I create the Symlink.
➜ ~ ln -s /Applications/paraview/Contents/MacOS/paraview $WM_PROJECT_DIR/bin/paraview
ln: /Users/huaweizhuo/OpenFOAM/OpenFOAM-3.0.0/bin/paraview: File exists
➜ ~ ls OpenFOAM/OpenFOAM-3.0.0/bin
engridFoam foamExec foamPackBin foamTags
findEmptyMake foamGraphExecTime foamPackBinAll foamUpdateCaseFileHeader
foamAllHC foamGraphResKE foamPackDoxygen mpirunDebug
foamCheckJobs foamGraphResUVWP foamPackSource org-html
foamCleanPath foamInstallationTest foamPackThirdParty org-latex
foamCleanPolyMesh foamJob foamPackThirdPartyBin org-pdflatex
foamCleanTutorials foamLog foamPackThirdPartyBinAll paraFoam
foamCloneCase foamMonitor foamPrintJobs paraview
foamCopySettings foamNew foamProcessInfo rmcore

It seems that the Symlink is created successfully, but the problem is still not settled.
hua is offline   Reply With Quote

Old   February 11, 2016, 00:45
Default change the shell to bash, the problem is settled
  #10
hua
New Member
 
Join Date: Nov 2015
Location: Yokohama
Posts: 5
Rep Power: 3
hua is on a distinguished road
Absolutely, this is a problem caused by zsh shell. After I uninstall oh_my_zsh using command "uninstall_oh_my_zsh", I change the shell back to bash and the problem is settled.
Thank you very much for your help.
By the way, if I want to use oh_my_zsh, how to tackle the problem?
hua is offline   Reply With Quote

Reply

Tags
mac os, openfoam 3.0.0, parafoam, paraview

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFoam (Ubuntu): paraFoam via Xming+PuTTY raketenmaid OpenFOAM Paraview & paraFoam 4 February 5, 2013 06:20
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 06:55
Problem running paraFoam on OpenFOAM 1.5 sonny OpenFOAM 3 June 6, 2009 20:24
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 14:25
Kubuntu uses dash breaks All scripts in tutorials platopus OpenFOAM Bugs 8 April 15, 2008 07:52


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