CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Parallel Computing in a local network

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   June 11, 2013, 07:05
Default Parallel Computing in a local network
  #1
ray
New Member
 
Join Date: May 2013
Posts: 8
Rep Power: 4
ray is on a distinguished road
Hi dear FOAMers,

I want to use two computers in a local network in order to make my calculations in OpenFOAM 2.2 much faster.
I wish to run the calculations from cfd4 on the machines cfd3 and cfd4, which both have 4 processors (cpu), that means I want to use 8 cpus for the calculation. By the way I got the names of the computers by typing hostname in the terminal. The operating system on both computers is Kubuntu 12.04.
In order to run applications in parallel I followed the instructions given by http://www.openfoam.org/docs/user/ru...s-parallel.php .
So I first of all wrote the file "decomposeParDict" in order to break up the geometry and the field of my calculation in 8 subdomains. Afterwards I have written the file machines.
After creating the mesh and decomposing my mesh and field on cfd4 I typed

mpirun -hostfile machines -np 8 sprayFoam -parallel > log &

in order to get the process using the sprayFoam solver started.
Unfortunately I get the following error:

mpirun was unable to launch the specified application as it could not find an executable:
Executable: sprayFoam

while attempting to start process rank 4.

I know that process rank 0 to 3 belong to cfd4 and process rank 4 to 7 belong to cfd3, that means that he cannot find the executable on cfd3.
Can anybody help me through this problem?

I would be very pleased for any hint. Thank you very much in advance.

best regards

Ray

Last edited by ray; June 12, 2013 at 06:02.
ray is offline   Reply With Quote

Old   June 28, 2013, 03:51
Default
  #2
Member
 
Luca Giannelli
Join Date: Jun 2010
Location: Kobe, Japan
Posts: 58
Rep Power: 7
voingiappone is on a distinguished road
Hello Ray,

I had a very bad experience using OF on multiple machines so I started this thread.
I was mixing architectures and eventually I gave up. But! If you go through the thread there is a lot of troubleshooting related to mpirun you may be lucky enough to find your problem by following wyldckat's suggestions.

Hope it helps!
voingiappone is offline   Reply With Quote

Old   June 28, 2013, 05:54
Default
  #3
New Member
 
RDG
Join Date: Feb 2011
Posts: 29
Rep Power: 6
onyir is on a distinguished road
Hi Ray,

As far as I know, to be able to run in a local network, you have to:

1. Have the OpenFOAM installed in all the nodes you are willing to use, or in a shared (nfs) unit.
2. Have your user load the OpenFOAM environment by default by adding
source /path/to/foam_install_dir/etc/bashrc
to your ~/.bashrc
3. Have passwordless login by ssh to the nodes.
onyir is offline   Reply With Quote

Old   July 1, 2013, 10:00
Default
  #4
ray
New Member
 
Join Date: May 2013
Posts: 8
Rep Power: 4
ray is on a distinguished road
Hey guys thanks for your answer.

Dear onyir,

could you please describe in more detail point 2. Where shall I add this line and to which directory should it refer?

best regards

ray
ray is offline   Reply With Quote

Old   July 1, 2013, 10:08
Default
  #5
New Member
 
RDG
Join Date: Feb 2011
Posts: 29
Rep Power: 6
onyir is on a distinguished road
Hi ray,

In order to use OpenFOAM, you have to load the environment by sourcing the configuration file.
For example, if you have OpenFOAM-2.2.0 installed in your home directory, you'll have to do
. /home/user/OpenFOAM/OpenFOAM-2.2.0/etc/bashrc
or
source /home/$user/OpenFOAM/OpenFOAM-2.2.0/etc/bashrc

To do that automatically for your user, you have to add that line (updating your OpenFOAM installation directory and version) to the file
/home/$user/.bashrc
onyir is offline   Reply With Quote

Old   July 1, 2013, 10:13
Default
  #6
ray
New Member
 
Join Date: May 2013
Posts: 8
Rep Power: 4
ray is on a distinguished road
i found my bashrc file in the following directory:

cfd4@cfd4:/opt/openfoam220/etc$

So do i have to add source/opt/openfoam220/etc/bashrc in the first line of my .bashrc - file?

best regards
ray is offline   Reply With Quote

Old   July 1, 2013, 10:16
Default
  #7
New Member
 
RDG
Join Date: Feb 2011
Posts: 29
Rep Power: 6
onyir is on a distinguished road
You can add that line at the end of your .bashrc
onyir is offline   Reply With Quote

Old   July 1, 2013, 10:19
Default
  #8
ray
New Member
 
Join Date: May 2013
Posts: 8
Rep Power: 4
ray is on a distinguished road
oh now I know what you mean, but I already had that line added
ray is offline   Reply With Quote

Old   July 1, 2013, 10:23
Default
  #9
ray
New Member
 
Join Date: May 2013
Posts: 8
Rep Power: 4
ray is on a distinguished road
i still get the same error:

mpirun was unable to launch the specified application as it could not find an executable:

Executable: sprayFoam

while attempting to start process rank 4.
ray is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 15:33
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 bookie56 OpenFOAM Installation 8 August 13, 2011 04:03
BlockMeshmergePatchPairs hjasak OpenFOAM Native Meshers: blockMesh 11 August 15, 2008 07:36
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 19:07


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