CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [OpenFOAM.com] Problem installing on Yosemite (https://www.cfd-online.com/Forums/openfoam-installation/168946-problem-installing-yosemite.html)

danlr46 March 31, 2016 11:34

Problem installing on Yosemite
 
Hi
after updating Xquartz and OS X Yosemite ver. 10.10.5 (14F1605) on my MacBoo Air (endi 2010),

I have installed docker and openFoam following the instructions provided.
Nor trying to run openFOAM I execute:
> ./startOpenFOAM+

i get this message:
non-network local connections being added to access control list
of_v3.0_plus

now typing:
bash$ run
I get this other message:

bash: cd: /home/docker/OpenFOAM/docker-v3.0+/run: No such file or directory

I have tried to create the above directory in vane. Any help please?

hjasak April 1, 2016 00:55

mkdir $FOAM_RUN

danlr46 April 1, 2016 03:14

Problem installing on Yosemite
 
Quote:

Originally Posted by hjasak (Post 592769)
mkdir $FOAM_RUN

Yes I already did and this is what happens:

bash-4.1$ mkdir $FOAM_RUN
mkdir: cannot create directory `/home/docker/OpenFOAM/docker-v3.0+/run': No such file or directory

I also did this:
bash-4.1$ mkdir /home/docker
mkdir: cannot create directory `/home/docker': Permission denied

and this:

bash-4.1$ sudo mkdir /home/docker
bash: sudo: command not found

I also did the same using the csh:

[Orfeo:~] dan% sudo mkdir /home/docker
Password:
mkdir: /home/docker: Operation not supported

what else?
thanks
Daniele

pgh April 1, 2016 07:31

1 Attachment(s)
Here is the solution :
i) Open the docker terminal via clicking on "Docker Quick Start" short cut .
ii) Delete old container: docker rm -f of_v3.0_plus
iii)Open installOpenFOAM_MAC scripts (attached here. unzip it before using )
in line 25, replace strings NAME with your user name as appears in mac i.e /Users/Name to /Users/alex assuming alex is user name
iv) run installOpenFOAM_MAC script as done earlier i.e
docker-machine ssh default $HOME/installOpenFOAM_MAC $HOME
v) Now run startOpenFOAM.sh script (http://openfoam.com/download/install-binary.php)
and you will be login as root.
vi) run following command to login as ofuser
su ofuser
Always work as ofuser to work on OpenFOAM

vii) Go inside the folder /home/ofuser/workingDir and follow following steps
a) mkdir OpenFOAM/ofuser-v3.0+/run
b) cd ..
c)ln -s workingDir/OpenFOAM (creating soft link to OpenFOAM/ofuser-v3.0+)

Note: Please note that all changes inside container will be lost once you delete the container by command "docker rm -f contName" except content in /home/ofuser/workingDir . So if you are making changes in /opt/OpenFOAM better be careful .


shangyan April 4, 2016 22:16

Quote:

Originally Posted by danlr46 (Post 592692)
Hi
after updating Xquartz and OS X Yosemite ver. 10.10.5 (14F1605) on my MacBoo Air (endi 2010),

I have installed docker and openFoam following the instructions provided.
Nor trying to run openFOAM I execute:
> ./startOpenFOAM+

i get this message:
non-network local connections being added to access control list
of_v3.0_plus

now typing:
bash$ run
I get this other message:

bash: cd: /home/docker/OpenFOAM/docker-v3.0+/run: No such file or directory

I have tried to create the above directory in vane. Any help please?

Hi,danlr46.I met the same problem as yours.
I did not do as the "pgh" suggested (but I think it may work as well),but I fixed it another way(I do not know why lol...)
First, you need to remove your openfoam docker image totally.
Then, download the "installOpenFOAM+" from http://www.openfoam.com/download/install-binary.php
There are two script start with "docker run ..."
Use the second one,
which is "docker run -it -d --name ${containerName} --user=${user} -e USER=${user} -e QT_X11_NO_MITSHM=1 -e DISPLAY=${displayVar} --workdir="/home/${user}" --volume="${home}:/home/${user}" --volume="/etc/group:/etc/group:ro" --volume="/etc/passwd:/etc/passwd:ro" --volume="/etc/shadow:/etc/shadow:ro" --volume="/etc/sudoers.d:/etc/sudoers.d:ro" -v=/tmp/.X11-unix:/tmp/.X11-unix ${imageName} /bin/bash --rcfile /opt/OpenFOAM/OpenFOAM-v3.0+/etc/bashrc"
And use "#" to comments the first one.
Other remain initial.
Next,run
"chmod +x installOpenFOAM+ "
and
" docker-machine ssh default $HOME/installOpenFOAM+ $HOME"


That's it.

danlr46 April 5, 2016 03:47

Problem solved
 
Thanks to all replay the problem is solved.
Daniele

raespl April 9, 2016 16:50

I have same problem. None of the above worked. How did you solve it?

Thxs.

danlr46 April 10, 2016 04:06

Quote:

Originally Posted by raespl (Post 594240)
I have same problem. None of the above worked. How did you solve it?

Thxs.

i) Open the docker terminal via clicking on Docker Quickstart shortcut . Make sure you are in the Docker Quickstart Terminal window

ii) Delete old container: docker rm -f of_v3.0_plus

iii) Open installOpenFOAM_MAC script.

in line 25, replace strings NAME with your user name as appears in mac i.e /Users/Name to /Users/alex assuming alex is user name
in line 13 change of_v3.0_plus1 to of_v3.0_plus

iv) run installOpenFOAM_MAC script as done earlier i.e
docker-machine ssh default $HOME/installOpenFOAM_MAC $HOME

v) Now run startOpenFOAM+ script and you will be login as root.

vi) Go insider workingDir and follow following step
a) mkdir OpenFOAM/ofuser-v3.0+/run (I had to make directories one by one, so first OpenFOAM then cd into it and make fuser-3.0+, cd uno it and make run
b) cd .. (up to home directory /home/ofuser)
c)ln -s workingDir/OpenFOAM (creating soft link to OpenFOAM/ofuser-v3.0+)

vii) run this command
su ofuser
and you will login as ofuser (Always work as ofuser to work)

Check carefully $HOME variable. When you try the first tutorials check also that variables $FOAM_RUN and $FOAM_TUTORIALS are coherent to your installation.

You can find the scripts in the attach of PGH answer.
Daniele

raespl April 10, 2016 11:58

It worked.

Thank you.

hjj3118 April 22, 2016 00:55

Hi Daniele,

I tried your method, and it worked till the final step, ie I worked as ofuser. However, when I tried to run tutorials, I got "permission denied" when I tried to run
cp -r $FOAM_TUTORIALS $FOAM_RUN
What is the reason?

pgh April 22, 2016 12:02

Hi
Try to go inside $FOAM_RUN directory . i.e cd $FOAM_RUN
and then run command cp -ar $FOAM_TUTORIALS. Even if it denies permission,
then try to give all user permission to this folder i.e OpenFOAM/of-v3.0+ i.e to read and write

hjj3118 April 23, 2016 22:50

Quote:

Originally Posted by pgh (Post 596318)
Hi
Try to go inside $FOAM_RUN directory . i.e cd $FOAM_RUN
and then run command cp -ar $FOAM_TUTORIALS. Even if it denies permission,
then try to give all user permission to this folder i.e OpenFOAM/of-v3.0+ i.e to read and write

Thanks.

But there is a problem here. Every time I create a new folder I have to give it permission in order to write into this folder. Do you ever encounter this problem?

pgh April 25, 2016 09:17

No.. I created a folder in Users\pgh with name Projects and provides read+ write permission to it for every user. I put all my project in this directory and it is working fine .

windscion April 26, 2016 13:22

Quote:

Originally Posted by hjj3118 (Post 596410)
Thanks.
But there is a problem here. Every time I create a new folder I have to give it permission in order to write into this folder. Do you ever encounter this problem?

Had similar issue. My problem was that my folder was not owned by ofuser. It isn't enough to grant permission because new directories will not have those permissions: they will have the permissions granted by your mask. (And while it may be possible to set your mask to ultimate permissiveness, it is not recommended!) Therefore after doing "su ofuser" you need to create the directory under which you will be running. Then the new directories will be owned by ofuser and hopefully you will not have any problems.
Editted to note:
Hrmph. Seems my directory only exists inside the container. I am missing something regarding how stuff outside the container relates to stuff inside the container. I haven't figured out how to make the same directory visible on both sides and yet have correct permissions inside the container.

pgh May 6, 2016 09:00

1 Attachment(s)
Hi .. use this script and it should work fine .

i)delete old container
docker rm -f of_v3.0_plus

ii) run new script attached here (unzip the script first)
Please place script in home folder and then run command from docker terminal as

docker-machine ssh default $HOME/installOpenFOAM+ $HOME


It will login as docker user and you can run openfoam and there will be no permission issue
Also you can login as root now . password for root : 0fuser2015

Let me know if it works or you face any issue

j_moulton May 18, 2016 14:30

Quote:

Originally Posted by pgh (Post 598990)
Hi .. use this script and it should work fine .

i)delete old container
docker rm -f of_v3.0_plus

ii) run new script attached here (unzip the script first)
Please place script in home folder and then run command from docker terminal as

docker-machine ssh default $HOME/installOpenFOAM+ $HOME


It will login as docker user and you can run openfoam and there will be no permission issue
Also you can login as root now . password for root : 0fuser2015

Let me know if it works or you face any issue

Hi, I'm also new to OpenFOAM. I tried this and while it seemingly worked, but if I try to run:

bash-4.1$ cp -r $FOAM_TUTORIALS $FOAM_RUN

I get:
cp: cannot create directory `/home/docker/Users/OpenFOAM/JMM-v3.0+/run': No such file or directory

This is a bit over my head and I'm confused as to what to try next.

pgh May 18, 2016 14:57

Hi,,
It looks to me you are using old script still . please use new script attached earlie(Note to delete old container before running script )
When you run script see the message it throw. In case you still have issue , send snaphot of those message i.e one coming while running)

1. Note that script name is different here , so make sure you use following command which use name of script which was attached earlier
docker-machine ssh default $HOME/installOpenFOAM+_Mac_pgh $HOME

2. once you started container, i.e using ./start... ,, script

. First type mkdir -p $FOAM_RUN (it basically create a folder with name OpenFOAM/docker-v3.0+ in your home area ile C\User\JMM ..

j_moulton May 18, 2016 15:19

Quote:

Originally Posted by pgh (Post 600617)
Hi,,
It looks to me you are using old script still . please use new script attached earlie(Note to delete old container before running script )
When you run script see the message it throw. In case you still have issue , send snaphot of those message i.e one coming while running)

1. Note that script name is different here , so make sure you use following command which use name of script which was attached earlier
docker-machine ssh default $HOME/installOpenFOAM+_Mac_pgh $HOME

2. once you started container, i.e using ./start... ,, script

. First type mkdir -p $FOAM_RUN (it basically create a folder with name OpenFOAM/docker-v3.0+ in your home area ile C\User\JMM ..

bash-4.1$ mkdir -p $FOAM_RUN
mkdir: cannot create directory `/home/docker/Users/OpenFOAM': Permission denied
bash-4.1$

I don't know how to change permissions to create this.

pgh May 18, 2016 17:09

Which version of docker toolbox are you using ?

Go inside User folder and try to create a folder with name OpenFOAM
with following command
mkdir OpenFOAM
If it works , then copy tutorial inside this folder
cp -ar $FOAM_TUTORIALS .

and try to run some tutorial . Even if you face permission issue , send your problem to
docker@opencfd.co.uk. Some one from OpenCFD will look into this issue

Nann3r June 7, 2016 18:44

[Solved] Permissions Issues OS-X 10.11.5
 
1 Attachment(s)
Just successfully installed OF+ on OS-X 10.11.5 (El Capitan). This should work for Yosemite as well. Following the OpenFOAM official instructions, I kept running into the familiar permissions issues. Much thanks to pgh for the modified script/instructions found earlier in this thread. Here is a recap of the procedure to get OF running on Docker. This is assuming you already have Docker successfully installed.

0) Check you have the docker daemon running:

Code:

docker info
If not, go to Launchpad > Docker QuickStart Terminal and verify using the above script again.

1) In terminal, delete the old OF container (even if you haven't tried to create a container yet, it wont hurt):

Code:

docker rm -f of_v3.0_plus
2) Check that the old container was indeed removed:

Code:

docker ps -a
3) Download the start script startOpenFoam+_MAC as well as pgh's modified install script Attachment 48035. Unzip pgh's script first, then place both scripts in your home directory (just as you would for the official OpenFOAM installation).

4) From Docker terminal, run the following commands to make the scripts executable:

Code:

chmod +x installOpenFOAM_MAC_pgh
Code:

chmod +x startOpenFOAM+_MAC
5) Create the Docker container:

Code:

docker-machine ssh default $HOME/installOpenFOAM_MAC_pgh $HOME
With luck, there should be no permissions issues.

6) Start the Docker container with the following script:

Code:

./startOpenFOAM+_MAC
which should also open a new shell and OpenFOAM environment.

7) You should now be able to create a run directory, hopefully without permissions issues

Code:

mkdir -p $FOAM_RUN
Follow the remainder of the OF guide to test run cavity case


All times are GMT -4. The time now is 17:46.