Running openfoam in parallel on local processors
Dear Foamers,
Last time I posted a question that I was trying to answer for hours it was solved in a matter of minutes, so fingers crossed this happens again :). I am trying to run a simulation in parallel on local processors. All goes well when I run decomposePar, I get 8 new processor directories (processor0 -> processor7) but when I use the command: Code:
mpirun -np 8 buoyantBoussinesqPimpleFoam in the case directory that I want, I get the output Code:
mpirun has detected an attempt to run as root. I am running openfoam on ubuntu if that makes any difference. Many thanks in advance! J |
Hopefully this is the anywer:
Code:
mpirun -np 8 buoyantBoussinesqPimpleFoam -parallel |
Quote:
Many thanks trying though! |
Are you maybe running the command from a terminal where you are logged in as root?
|
Quote:
Andreas I think you are totally right! I can't use the: Code:
./startOpenFOAM Code:
sudo ./startOpenFOAM Thank you, J |
I am not familiar with the "./startOpenFOAM" command.
Typically you just need to source the bashrc-file that is located in the etc/-directory of your OpenFOAM installation. This is done by going into the main directory of your OpenFOAM and then typing "source etc/bashrc". This should also be possible without root rights. Did you maybe install/compile OpenFOAM as a root user and thus only the root user has access to all OpenFOAM files? Maybe check the rights of the startOpenFOAM script by typing "ls -al startOpenFOAM" and have a look who has got execution rights (just google for rights management in linux). |
it is not a problem if the openfoam installation has been done by root.
But the case that you want run must be yours and not root. So just check the permissions and the owner of the testcase directory. |
Quote:
Thanks again you are a life saver, J |
Quote:
J |
Hi,
Did you solve this issue? I too have similar issue. Thanks in advance |
OF installed via Docker
I have the exactly same problem.
I believe this happens, when you have installed OF via Docker. Using the "ls -al startOpenFOAM" command shows, who has the rights to the file. This command "sudo usermod -a -G docker $USER" will add permission to your user to start and navigate Docker. Now you are able to start OpenFOAM (./startOpenFOAM), without using the sudo prefix, but the problem on using the mpirun command remains, as somehow Docker is still starting in the root mode. Does anyone have input on how to fix this? Edit: Couldn't resolve the problem. Went with building OpenFOAM ESI version from source. |
Hi,
I have the same problem, have anybody found a solution? Thanks in advanced. |
All times are GMT -4. The time now is 06:21. |