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

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

Register Blogs Community New Posts Updated Threads Search

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

Reply
 
LinkBack Thread Tools Search this Thread 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: 11
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
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
@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
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
@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,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
@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: 11
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: 11
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,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
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: 11
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: 11
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


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
[CGNS] CGNS converters available mbeaudoin OpenFOAM Meshing & Mesh Conversion 137 December 14, 2018 05:20
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 15:25
Regarding FoamX running Kindly help out hariya03 OpenFOAM Pre-Processing 0 April 18, 2008 05:26
Problem running paraFoam paraview command not found spdracer22 OpenFOAM Pre-Processing 2 December 7, 2005 06:32
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 05:15


All times are GMT -4. The time now is 03:33.