|
[Sponsors] |
April 12, 2012, 07:22 |
OpenFOAM on two pc
|
#1 |
Member
Join Date: Apr 2012
Location: France
Posts: 72
Rep Power: 14 |
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. |
|
April 12, 2012, 07:40 |
|
#2 |
Senior Member
|
Yes, I would say anybody here has already ran a parallel simulation…
|
|
April 12, 2012, 07:47 |
|
#3 |
Member
Join Date: Apr 2012
Location: France
Posts: 72
Rep Power: 14 |
Sorry, this is not what I meant
I just would like an help to realise this type of configuration |
|
April 12, 2012, 08:12 |
|
#4 | |
Senior Member
|
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:
Have a look at par "2.3.11 Running in parallel" of the user manual. |
||
April 12, 2012, 09:05 |
|
#5 |
Member
Join Date: Apr 2012
Location: France
Posts: 72
Rep Power: 14 |
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. |
|
April 12, 2012, 09:50 |
|
#6 |
Senior Member
|
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 |
|
April 12, 2012, 09:52 |
|
#7 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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
__________________
|
|
April 12, 2012, 10:11 |
|
#8 |
Member
Join Date: Apr 2012
Location: France
Posts: 72
Rep Power: 14 |
||
April 13, 2012, 04:20 |
|
#9 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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 Bruno
__________________
|
|
April 13, 2012, 05:19 |
|
#10 |
Member
Join Date: Apr 2012
Location: France
Posts: 72
Rep Power: 14 |
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 ! |
|
April 13, 2012, 05:26 |
|
#11 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
... OK... Example "machines" file:
Code:
machine1 slots=4 max-slots=4 machine2 slots=8 max-slots=8
__________________
|
|
April 14, 2012, 08:32 |
|
#12 |
Senior Member
Vieri Abolaffio
Join Date: Jul 2010
Location: Always on the move.
Posts: 308
Rep Power: 17 |
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). |
|
April 17, 2012, 17:10 |
|
#13 |
Senior Member
mauricio
Join Date: Jun 2011
Posts: 172
Rep Power: 18 |
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!
__________________
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 |
|
August 29, 2016, 18:53 |
|
#14 |
New Member
Danny Jierian
Join Date: Jul 2016
Posts: 3
Rep Power: 10 |
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 |
|
August 30, 2016, 07:29 |
|
#15 |
Senior Member
mauricio
Join Date: Jun 2011
Posts: 172
Rep Power: 18 |
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" |
|
|
|
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 |