CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

OpenFOAM on deux pc

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By calim_cfd

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 12, 2012, 07:22
Default OpenFOAM on two pc
  #1
Member
 
Join Date: Apr 2012
Location: France
Posts: 72
Rep Power: 14
Rider is on a distinguished road
Hi,

Anybody has already executed a parallel simulation on two pc ?

Currently, I execute my simulation in multi-core on one pc, but it's apparently not enough ...

Thanks

Last edited by Rider; April 12, 2012 at 08:59.
Rider is offline   Reply With Quote

Old   April 12, 2012, 07:40
Default
  #2
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 460
Rep Power: 18
lovecraft22 is on a distinguished road
Send a message via Skype™ to lovecraft22
Yes, I would say anybody here has already ran a parallel simulation…
lovecraft22 is offline   Reply With Quote

Old   April 12, 2012, 07:47
Default
  #3
Member
 
Join Date: Apr 2012
Location: France
Posts: 72
Rep Power: 14
Rider is on a distinguished road
Sorry, this is not what I meant

I just would like an help to realise this type of configuration
Rider is offline   Reply With Quote

Old   April 12, 2012, 08:12
Default
  #4
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 460
Rep Power: 18
lovecraft22 is on a distinguished road
Send a message via Skype™ to lovecraft22
First you need to decompose your domain using decomposePar (see decomposeParDict) among your processors, so if you have 2 processor you'll decompose your domain in 2 subparts.
Then, use mpirun to run any command you want. For example, if you want to run snappyHexMes in parallel you'll need to run:

Quote:
mpirun -np 2 snappyHexMesh -parallel
where 2 is, again, the number of your processors. At the end run reconstructPar.

Have a look at par "2.3.11 Running in parallel" of the user manual.
lovecraft22 is offline   Reply With Quote

Old   April 12, 2012, 09:05
Default
  #5
Member
 
Join Date: Apr 2012
Location: France
Posts: 72
Rep Power: 14
Rider is on a distinguished road
Thanks for your answer, but it's not really my question. I know how to realise a simulation in multi-core. Currently, I'm using it on 4 cores and on 8 cores. Personnaly, I use the command "FoamJob" but it's the same method as "mpirun"

My problem is to use two computeur for the same simulation, so use the 4 cores of the PC n°1 and the 8 cores of the pc n°2.
Rider is offline   Reply With Quote

Old   April 12, 2012, 09:50
Default
  #6
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 460
Rep Power: 18
lovecraft22 is on a distinguished road
Send a message via Skype™ to lovecraft22
Sorry, my mistake…
I found this one, don't know if it may be of any help…
http://www.divms.uiowa.edu/~jni/HowT...dAClusterG.pdf
lovecraft22 is offline   Reply With Quote

Old   April 12, 2012, 09:52
Default
  #7
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

@Rider: you're already on the right track, by using foamJob. All you need is to create a file named "machines" on the base folder of your case.

With open source, when in doubt, check the code!

As for the format of the "machines" file, if using Open-MPI: http://www.open-mpi.org/faq/?categor...imple-spmd-run

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   April 12, 2012, 10:11
Default
  #8
Member
 
Join Date: Apr 2012
Location: France
Posts: 72
Rep Power: 14
Rider is on a distinguished road
Quote:
Originally Posted by lovecraft22 View Post
Sorry, my mistake…
No problem. A forum is a platform of exchange.

@wyldckat
Thanks for your answer. Have you an example of "machines" file ?

How the computers should being connected ?
Rider is offline   Reply With Quote

Old   April 13, 2012, 04:20
Default
  #9
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Rider,

The example was on the link I posted and the connection is simple: both machine should reflect the same exact installation structure. And be on the same network, namely the following command should work in both directions:
Code:
ping the_other_machine_IP_or_name
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   April 13, 2012, 05:19
Default
  #10
Member
 
Join Date: Apr 2012
Location: France
Posts: 72
Rep Power: 14
Rider is on a distinguished road
In fact, I don't really understand this example.

I don't see how to parameterise the two computers to share the simulation. Moreover, the fisrt computer has 4 cores and the seconde has 8 cores.

Can you detail the procedure in simple words ... for a basic simpleFoam simulation

Thanks for your help !
Rider is offline   Reply With Quote

Old   April 13, 2012, 05:26
Default
  #11
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
... OK... Example "machines" file:
Code:
machine1 slots=4 max-slots=4
machine2 slots=8 max-slots=8
I can't go into more details right now. Good luck!
__________________
wyldckat is offline   Reply With Quote

Old   April 14, 2012, 08:32
Default
  #12
Senior Member
 
sail's Avatar
 
Vieri Abolaffio
Join Date: Jul 2010
Location: Always on the move.
Posts: 308
Rep Power: 17
sail is on a distinguished road
In addition to the machinefile you also will need to have the case and OpenFoam in a shared directory (or a exact copy of both on the slave, but this might be impratical) and passwordless ssh access on the slave node.

You might find a nice howto on this subject on the clustermonkey website (that's how i learnt).
__________________
http://www.leadingedge.it/
Naval architecture and CFD consultancy
sail is offline   Reply With Quote

Old   April 17, 2012, 17:10
Default
  #13
Senior Member
 
calim_cfd's Avatar
 
mauricio
Join Date: Jun 2011
Posts: 172
Rep Power: 18
calim_cfd is on a distinguished road
hi thou the user's guide has all the info you need you may get stuck while setting the case.. this is what you gotta do:

1:have the same OF version properly installed on all pcs along with permissions

2: create a machine files like this

192.168.15.xx cpu=n1
192.168.15.xx cpu=n2

where nx is the number of cores on each cpu.. this file can be fancier..

3: edit this file on the host machine, from where you're firing the job : /etc/hosts

and add all nodes on it.. like this:
192.xx.xx.xx name1 #
192.xx.xx.xx name2 #
192.xx.xx.xx name2 #

4: edit decomposepardict like this (the setting are for 5 cores, set it accordingly):
decomposeParDict:

#ofSubdomains 5
...

scotchCoeffs
{
processorWeights
(
1
1
1
1
1
);

}
distributed yes;

roots 4
(
"/disk1/test/noh1"
"/disk1/test/noh2"
"/home/noh3"
"/home/noh4"
);

note that the paths given above are only needed if you want each pc to store the files on it, instead of only using its cpu power. Also you only list the the slave nodes (4 if you're using 5). In this case you'd run the analysis from the direc: "/disk1/test/noh0"

most important thing is that inside each folder, here named "nohx" you have the exact same decomposed case, and i mean you got the folders 0, constant, system, processor* etc inside these "nohx" folders

5: selectively get the files back into the host/master machine through the command:

user@pc:/disk1/test/rec> scp -r user2@pcx:~/noh4/processor4 rec/

i guess you can figure out how to use this command


hope it helps!
wyldckat and BlnPhoenix like this.
__________________
Best Regards
/calim

"Elune will grant us the strength"

Last edited by calim_cfd; May 6, 2012 at 11:31. Reason: reminder of decomposed case
calim_cfd is offline   Reply With Quote

Old   August 29, 2016, 18:53
Default
  #14
New Member
 
Danny Jierian
Join Date: Jul 2016
Posts: 3
Rep Power: 10
djierian is on a distinguished road
Mauricio,

To do this, how are the two computers linked? Is a cross cable sufficient? or do I need an NFS and passworldess SSH as I've seen elsewhere on these forums.

Thanks,

Danny
djierian is offline   Reply With Quote

Old   August 30, 2016, 07:29
Default
  #15
Senior Member
 
calim_cfd's Avatar
 
mauricio
Join Date: Jun 2011
Posts: 172
Rep Power: 18
calim_cfd is on a distinguished road
hi Danny.

It's been a while since i've ran some simulations using more than one machine. Not sure if things haven't changed. Probably not, lol.

So, from what i can remember, i guess you don't need to setup a new file system. The cabling should be enough. I guess you could, even though, depending on how you work on linux OSs this won't change much.

It suffices that node0 sees has access and you have write and reading permissions for the other folders at the other nodes. Also, don't forget to setup the /etc/host file with the address of the nodes and the decomposePardict with the case locations.

Nonetheless, you should watch for a network bottleneck when you use 100mb or even 1gb networks. Your performance may not be that great, assuming you have some hardcore hardware, aka, cluster lol

gl
__________________
Best Regards
/calim

"Elune will grant us the strength"
calim_cfd is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 07:55
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 wyldckat OpenFOAM Announcements from Other Sources 3 September 8, 2010 07:25
Modified OpenFOAM Forum Structure and New Mailing-List pete Site News & Announcements 0 June 29, 2009 06:56
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 19:07


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