![]() |
OpenFOAM on two pc
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 |
Yes, I would say anybody here has already ran a parallel simulation…
|
Sorry, this is not what I meant :o
I just would like an help to realise this type of configuration |
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. |
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. |
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 |
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 |
Quote:
@wyldckat Thanks for your answer. Have you an example of "machines" file ? How the computers should being connected ? |
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_nameBruno |
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 ! |
:eek: ... OK... Example "machines" file:
Code:
machine1 slots=4 max-slots=4 |
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). |
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!:D |
| All times are GMT -4. The time now is 13:10. |