CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [Other] blockMesh: command not found - on Mac OS X (https://www.cfd-online.com/Forums/openfoam-installation/115775-blockmesh-command-not-found-mac-os-x.html)

nprociw@hotmail.com April 6, 2013 10:51

blockMesh: command not found - on Mac OS X
 
Hi

I have installed OpenFOAM version 2.0.x on Mac OS X as shown by the instructions given at the following link:

http://www.optimulation.com/category.../installation/

I tried to run the cavity tutorial case but I have run into the error:

-bash: blockMesh: command not found

Does anybody have a clue how to fix this problem? I am new to open foam and Mac OS so I am pretty clueless as to how to fix this issue.

Thanks

Lieven April 6, 2013 17:08

Are any of the other commands like 'simpleFoam' available?
If not, the bashrc-file is probably not loaded. Make sure to add
Code:

source OpenFOAM/OpenFOAM-2.2.0/etc/bashrc
to ~/.profile
and to reboot (or re-login) afterwards.

Cheers,

L

itsme_kit December 28, 2013 13:19

Quote:

Originally Posted by nprociw@hotmail.com (Post 418767)
Hi

I have installed OpenFOAM version 2.0.x on Mac OS X as shown by the instructions given at the following link:

http://www.optimulation.com/category.../installation/

I tried to run the cavity tutorial case but I have run into the error:

-bash: blockMesh: command not found

Does anybody have a clue how to fix this problem? I am new to open foam and Mac OS so I am pretty clueless as to how to fix this issue.

Thanks

Hi

Have you solved your problem already

I got the same problem too

KateEisenhower March 3, 2015 05:53

Hi everybody,

Has anybody solved this problem yet?

Cheers,

Kate

Edit: @Lieven: Unfortunately that didn't work.

Lieven March 3, 2015 06:17

Kate

Which version of OF are you using?
In which folder is it installed?
Could you perhaps post the output of
Code:

locate bashrc
Cheers,

L

KateEisenhower March 3, 2015 07:00

Quote:

Originally Posted by Lieven (Post 534144)
Kate

Which version of OF are you using?
In which folder is it installed?
Could you perhaps post the output of
Code:

locate bashrc
Cheers,

L

Hi Lieven,

I want to use 2.3.1 on OS X Yosemite. Haven't been successful so far.
I tried to install it in the main user folder following the steps described in this guide: http://openfoamwiki.net/index.php/In...es_and_patches
The output of
Code:

locate bashrc
is
Code:

WARNING: The locate database (/var/db/locate.database) does not exist.
To create the database, run the following command:

  sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist

Please be aware that the database can take some time to generate; once
the database has been created, this message will no longer appear.

.
Should I run the proposed command?

alexeym March 3, 2015 07:09

Hi,

You would like to run 2.3.1 and yet use guide for 2.2.2. So please post more details about your way of installation.

To check if you have set up environment variables correctly, run in terminal:

Code:

$ export | grep -E '(FOAM_|WM_)'
If output is empty, then you have missed the step 4.3.9 in the guide (in fact you have to do this every time you start new terminal).

Quote:

Should I run the proposed command?
You could but I am not quite sure you will use locate command in the future (you have got find and Spotlight).

KateEisenhower March 3, 2015 12:10

Quote:

Originally Posted by alexeym (Post 534152)
Hi,

You would like to run 2.3.1 and yet use guide for 2.2.2. So please post more details about your way of installation.

To check if you have set up environment variables correctly, run in terminal:

Code:

$ export | grep -E '(FOAM_|WM_)'
If output is empty, then you have missed the step 4.3.9 in the guide (in fact you have to do this every time you start new terminal).



You could but I am not quite sure you will use locate command in the future (you have got find and Spotlight).

Hi alexeym,

I'd love to use a guide for 2.3.1 if I could find one. Since gschaider recommended to use the 2.2.2 guide in his post (http://www.cfd-online.com/Forums/ope...s-x-patch.html), I thought it would be fine.

When I ran
Code:

$ export | grep -E '(FOAM_|WM_)'
I got
Code:

-bash: $: command not found
as an answer. I don't know if this helps.

When I execute step 4.3.9 of the guide, I get the following answer:
Code:

-bash: mpicc: command not found
Using paraview in directory /Applications/paraview.app

Is this okay?

In my opinion it would be the best to clear my harddrive and start all over again.

alexeym March 3, 2015 12:37

Hi,

Quote:

Originally Posted by KateEisenhower (Post 534198)
I'd love to use a guide for 2.3.1 if I could find one. Since gschaider recommended to use the 2.2.2 guide in his post (http://www.cfd-online.com/Forums/ope...s-x-patch.html), I thought it would be fine.

It's OK but still it is worth to mention the guide you have used. At least now it is clear that you are using Macports and unknown patch.

Quote:

When I ran
Code:

$ export | grep -E '(FOAM_|WM_)'
I got
Code:

-bash: $: command not found
as an answer. I don't know if this helps.
$ in my post is the shell prompt, so you do not need to copy it. If you would like to have copy-paste variant, here it is:

Code:

export | grep -E '(FOAM_|WM_)'
Quote:

When I execute step 4.3.9 of the guide, I get the following answer:
Code:

-bash: mpicc: command not found
Using paraview in directory /Applications/paraview.app

Is this okay?
No, it is not OK. It means you have problem with OpenMPI installation. Either you have not selected default MPI installation or simply forgot to install it.

Quote:

In my opinion it would be the best to clear my harddrive and start all over again.
Well, if you follow the same installation guide you will end up with the same broken build. So I am not sure that this is right solution.

KateEisenhower March 5, 2015 09:02

Quote:

Originally Posted by alexeym (Post 534204)
Hi,



It's OK but still it is worth to mention the guide you have used. At least now it is clear that you are using Macports and unknown patch.



$ in my post is the shell prompt, so you do not need to copy it. If you would like to have copy-paste variant, here it is:

Code:

export | grep -E '(FOAM_|WM_)'


No, it is not OK. It means you have problem with OpenMPI installation. Either you have not selected default MPI installation or simply forgot to install it.



Well, if you follow the same installation guide you will end up with the same broken build. So I am not sure that this is right solution.

Thanks a lot for your help. I guess I have a lack of basic knowledge. Because of that I posted a question on the main 2.3 patch thread (http://www.cfd-online.com/Forums/ope...tml#post534615). Maybe I will come back to this thread later.

Thanks again,

Kate

ajmas March 15, 2015 17:54

Could you give the following script a go and let me know if it helps you:

https://github.com/ajmas/scripts-et-...sx-macports.sh

It should do much of the work for you, including creating the disk image, checking out the necessary 'Mac Ports', checking out the patched source for MacOS X and building the project. It is still a work in progress, but hopefully it should remove some of the guess work.

Please let me know this helps.


All times are GMT -4. The time now is 12:16.