Mac OS X 10.11 and OpenFOAM 3.0: Error when running ParaFoam with "command not found"
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! |
Quick question: What does this command give you?
Code:
ls -l /Applications/paraview.app/Contents/MacOS/paraview |
@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] |
@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 :confused:: Code:
bash paraFoam |
@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 Nevertheless this does not change the fact, that the problem has nothing to do with OpenFOAM, paraview, or OS X. |
➜ ~ ls -l /Applications/paraview.app/Contents/MacOS/paraview
-r-x------@ 1 huaweizhuo admin 970452 Sep 12 06:37 /Applications/paraview.app/Contents/MacOS/paraview |
Quote:
|
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] |
Quote:
➜ ~ 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. |
change the shell to bash, the problem is settled
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? |
All times are GMT -4. The time now is 23:44. |