CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   First Parallel Run - need some help (

Gian Maria June 16, 2011 06:24

First Parallel Run - need some help
Hello foamers!

I'm a aerodynamic student, and I'm workin on my master thesis project (an heat transfer system). Some days ago I asked your help, and I have solved my problem, thank you :D

Now, my solver run correctly, and I want to perform a non-stationary simulation on a cluster, far away from my office.

I can come in the cluster by SSH protocol, so I have load my test case in cluster pc, and I want to perform a parallel run..

I have prepared the file named "decomposeParDict", and put it into my test-case.

But now, if I wanto to say to pc what are the processors, how can I proceed?

I have read in OpenFOAM guide that lines, but I don't understand:


3.4.2 Running a decomposed case
A decomposed OpenFOAM case is run in parallel using the openMPI implementation of MPI.
openMPI can be run on a local multiprocessor machine very simply but when running on machines across a network, a file must be created that contains the host names of the machines.
The file can be given any name and located at any path.
In the following description we shall refer to such a file by the generic name, including full path, <machines >.
The <machines > file contains the names of the machines listed one machine per line.
The names must correspond to a fully resolved hostname in the /etc/hosts file of the machine on which the openMPI is run.
The list must contain the name of the machine running the openMPI.
Where a machine node contains more than one processor, the node name may be followed by the entry cpu= where is the number of processors openMPI should run on that node.
What is "machine" ?
How can I find the exact name of "machine" ? Is it a i.p. number? Or something else?

Thanks in advance!!!

francescomarra June 17, 2011 05:12

Dear Gian Maria,

I think that nobody else than the system administrator of the cluster you wish to use can answer your question. If you are using some large HPC facility, usually instructions are provided to the users. machine refers to the name od the computing nodes that you ask for your job. Usually a proper queueing mechanism is applied to automatically select the available nodes. This is really very dependent on the single cluster installation.



Gian Maria June 17, 2011 05:58

Thank you, Franco, I understood.

So, con you help me a little more?
This afternoon I will try to launch my simulation.

When I access to my terminal, I can see that:


Where gianmaria is my name (I am the user), and pcm3086 is the name of my personal computer.

When I came in the host computer, I can read



hostComputer is the the "machine" that I'm searching for?

I know that supercomputer has 16 node, node000, node 001 to node 015.
So I must create a file with this content



Is it correct?

Last question: the file above must be called machines.txt or hostComputer.txt ?

Thank for all, to everyone would help me :D:D:D:D

francescomarra June 17, 2011 12:08

Dear Gian Maria,

no, hostComputer is, much more probably, the hostname of the frontend of the remote cluster. You can use the name you prefer, say machines.txt , for the file where you write the names of the nodes you want to use (node000 etc. each one in a row) . Then you will launch your simulation with the command:

$ mpirun --hostfile machines.txt -np ncores foamExec -parallel
where ncores is the number of cores you like to use for the simulation.


All times are GMT -4. The time now is 19:51.