CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   Setup OpenFOAM to run one two computers steps (

hsieh July 28, 2006 10:28

Hi, Is there any step descr

Is there any step describing how to setup parallel runs on two computers?

1. do I need to install OpenFOAM on each computer?
2. how to setup so that these two computers can communicate with each other.

I have been running parallel jobs on computer with dual CPUs and/or dual cores.



msrinath80 July 28, 2006 13:03

1. do I need to install OpenFO
1. do I need to install OpenFOAM on each computer?

Not necessarily. If you can nfs export your filesystem that should mirror computer A on computer B quite nicely.

2. how to setup so that these two computers can communicate with each other.

I have not done this myself, but I would assume that you need to sey up some kind of password-less rsh/ssh connection between the two.

Maybe someone else can quickly explain the details.

hsieh July 28, 2006 21:05

Hi, Thanks for the reply.

Thanks for the reply.

I did set this up successfully through passwordless ssh when I was using OpenFOAM-1.1 (more than one year ago). At that time, I did not get very good results when running parallel on two computers (those were old AMD 1GHz CPUs). So, I abandoned those setup and totally forgot what I did then.

Now that OpenFOAM-1.3 is out, I would like to try running a job on multiple computers again (6 computers, each computer with dual Intel Xeon 3.2 GHz CPUs). I am hoping that some OpenFOAM experts here have done something like this and is willing to share the steps for setting this up.

Is it correct to say that what I have is not a cluster? Each computer already has OpenFOAM-1.3 installed, and some runs SuSE 64 10.0 OS, some runs SuSE 64 10.1 OS.


msrinath80 July 29, 2006 14:03

That should not be too much of
That should not be too much of a problem. Why don't you give it a shot now and post any error messages?

irc August 2, 2006 16:17

As pUl| notes, you only need t
As pUl| notes, you only need to install OF on one disk on one machine, then mount this disk via NFS on all the other machines. Moreover, it's better this way since when updates occur, you only have to change one installation.

As for communications - passwordless ssh (or even rsh, if your system will allow it - we're assuming that your "cluster" is secure behind it's own firewall) is necessary to allow LAM to start up the OF processes on the remote machines. Also, make sure you have accounts set up on each of the machines!

Check out the OF User Guide (chapter 3.4) for instructions on the domain decomposition and on how to initiate the run.

Should be as simple as that. Try it out and post your speed-up results (i.e. run times for running an identical application on 1, 2, 6 nodes) - I'd be interested in those.

Good luck!

hsieh August 23, 2006 09:59

Hi, Now that I have 6 works

Now that I have 6 workstations each with dual Xeon CPUs connected to a gigabit switch, I tried to
1. turn on NSF server service on the main computer,
2.turned on NSF client service on the rest 5 workstation,
3. ping all the workstations and got reply
4. issue "ssh -l workstation_name

NO response. So, ssh is not working I think.

.. stay tune

msrinath80 August 23, 2006 17:10

What is an NFS client service?
What is an NFS client service? If I remember correctly, all you should be doing is using the mount command with the filesystem type specified to nfs or some such?

Also, are all the workstations on the same subnet?

hsieh September 9, 2006 08:21

Hi, I finally got this to w

I finally got this to work. The main problem was firewall.

I will post the steps I used later.

I only have OpenFOAM installed on the server. All clients mount to /home/user/OpenFOAM. Is this a good idea? When running in parallel, the clients gets OpenFOAM from the server. Will it be faster if each client also has OpenFOAM install and only mount the NFS server to say, /home/user/OpenFOAM/run_project?

Here are two articles about setting up NFS and passwordless ssh. I could not get passwordless ssh to work using what described in the first article. The second article has the correct steps. mote_Logins_and_File_Copying


hsieh September 13, 2006 12:13

Hi, These are the steps I u

These are the steps I used to setup a cluster:

1. because this is a close network, I disabled firewall.
2. Only the server has OpenFOAM installed
3. I used SuSE 10.1 64 bit OS.
4. you need root password.
5. Make sure that in /etc/hosts you have all the computers name with their IP addresses entered. Use Ping to check.
6. All computer should have the same user account.
7. On all client computers, create OpenFOAM directory.

1. Setup NFS sever:
1.1 start YaST. Select Network Service. Click "NFS Server"
1.2 Click "start" under NFS Server. Click Next.
1.3 Add Directory: /home/user/OpenFOAM
1.4 Add Host: enter the host name (or IP). enter
rw,sync under options.
1.5 click Finish to start NFS server.
2. Setup NFS Client
2.1 start YaST. Select Network Service. Click "NFS Client".
2.2 Click "Add".
2.3 enter NFS Server name.
2.4 enter Remote File System: /home/user/OpenFOAM.
2.5 enter Mount Point: /home/user/OpenFOAM
3. Setup passwordless SSH
3.1 Client Side (This actually would be the NFS server, because the NFS server needs to log onto the clients)
3.1.1 Type "ssh-keygen -t dsa"
3.1.2 hit return twice when prompts for passphrase
3.1.3 type "cd ~/.ssh"
3.1.4 type "ls", you should get 3 files: id_dsa known_hosts
3.1.5 scp user@NFS_client:public-key.tmp
3.2 Server side (this will be NFS client):
3.2.1 type "ls"
3.2.2 type "mkdir .ssh"
3.2.3 type "chmod 700 .ssh"
3.2.4 type "cd .ssh"
3.2.5 type "cat ~/public-key.tmp >> authorized_keys"
3.2.6 type "rm ~/public-key.tmp"
Note: from the NFS sever side, type "ssh -l userID NFS_client" to see if you can log in without a password.
if it prompts for a password, then, enter the password. Logout, and repeat Steps 3. For some
unknown reason, sometimes, I have to steps 3 a couple of times.
4. Lamboot: LAM uses RSH by default, on the NFS server, type "export LAMRSH="ssh -x" to change to SSH.

Please let me know if there is any mistake.


sxhdhi January 29, 2009 20:58

Dear Pei Ying, Thanks so mu
Dear Pei Ying,

Thanks so much for sharing your work.

I am going to build up a PC cluster soon for OpenFOAM running in parallel computation. Your information is no doubt quite helpful for me to work.

If possible could you please give me some suggestion about how to build up a beowulf? What is your configuration and budget?
I am not familiar to do that. Thanks a lot in advance. Now I am thinking to setup simplest one: one head node plus one node. if these work well I then consider adding other two nodes.



hsieh January 29, 2009 21:18

Hi, XH, At home, I have two
Hi, XH,

At home, I have two computers each has a dual core CPU, hence, total of 4 CPU cores. They are connected by gigabit switch.

Just follow the steps, then follow the tutorial in OpenFOAM. You should be fine.

Speed up of a parallel run depends on the case you have.

Have fun.


sxhdhi August 2, 2009 22:39

Dear Pei Ying,

I am sorry it has been long time I did not response. Have to work on other projects. Now I am back to setup the cluster.

I follow your suggestion to setup the cluster. I got problem at step 3. Although I have tried many times for step 3. It still needs password to log into client pc. It seems ssh passwordless does not work.

If there is another way to solve the problem now?

Best regards


maysmech February 12, 2011 05:44


Is it any easier and newer way to use OF parallel with multiple PCs?
I have Ubuntu 10.10 and OF 1.7.0.

Thanks in advance

All times are GMT -4. The time now is 06:04.