Parallel Computing decomposePar
Hey All!
I'm trying to do some parallel calculations. I've access to several computers. Each of them has 6 processors. For testing I'm running the motorBike tutorial. So when I want to use 12 processors, how do I have to set "n" in hierarchicalCoeffs? Originally: (3 2 1) <== with 6 processors I read the user guide, but couldn't find the right solution, because e.g. (6 4 2) doesn't work. greets Christian |
Well, if you need 12 subdomains, (6 4 2) is obviously not going to work, as it leads to 6*4*2=48 subdomains. Use e.g. (3 4 1) instead.
I do not know what your conditions and geometry are, so make sure that your decomposition is meaningful. A (6 2 1) or even (12 1 1) decomposition might turn out to be more suited. As for how to make your computer understand it has to use processors on several computers, I can unfortunately not help. It might work automatically as soon as the computers are connected to each other through the same server. Just give it a shot, I guess =D Tibo |
Quote:
optionally you can then state a processor weight, for example if you have different computers (different cpu's ...) then you can state that one processor has more weight than another. in order to get this working on more than one computer, check out any mpi tutorial that explains on how to set up automatic ssh login by sharing keys and so on. |
Hi
I recommend you to use Scotch decomposition method if you are unsure about the suitability of Hierarchical. If you encounter any problems with running in parallel you should check out mpi machinefile options. Best |
thanks for your replies!!
it worked so far! except, when I use more then 6 processors (doesn't matter if all on the same machine or split to others) the computer crashes. AND when i want to run potentialFoam in parallel it always prints the error: Code:
Reading field p Do I have set some special options in decomposePar or snappyHexMesh? I tried all I could see in the help files, but always get the same error. greets |
Greetings to all!
@ChrisPro: why do I have the feeling that you are trying to use the motorBike case from an older version of OpenFOAM on the newer 2.0.1!? That error message indicates that the mesh that has been created has patches that are not present in the "0/p" field! If you are not using the motorBike case from 2.0.1, you better compare your modified case with the one in 2.0.1! If this is not the case, please gives us a (short) step-by-step list of what you are doing, so it'll be easier for us to test it ourselves or at least diagnose what might be missing ;) Best regards, Bruno |
hey! sorry for the late answer.
I tried the same thing on several computers but always get the same error. I made sure, using the newest version of openFoam AND the tutorials. Here is what i do in the motorBike example: making a file called machines where the computername and the number of processors is in. running blockMesh decomposePar <== works mpirun --hostfile machines -np 4 snappyHexMesh -overwrite -parallel > log & (here on a machine with 4 processors) <== works mpirun --hostfile machines -np 4 potentialFoam -noFunctionObjects -writep -parallel > log & this displays the error: Code:
[0] Code:
/*---------------------------------------------------------------------------*\ greets Christian |
Hi Christian,
OK, I managed to reproduce the same error you got. But I don't have time right now to figure out how to fix this. My suggestion is that you check the "turbineSiting" tutorial:
Bruno |
I tried the tutorial, but even when I do not change anything in the tutorial, snappyHexMesh reports an error, that the ptscotch library has to be installed.
but ptscotch isn't used when snappyHexMesh is executed! Code:
Shell refinement iteration 4 |
Yeah, that's one of those crazy bugs :( I thought that they had fixed that in 2.1.0, but I haven't confirmed this yet.
You might want to report this on the bug tracker: http://www.openfoam.com/mantisbt/ - I haven't reported it because I keep forgetting about it :( |
ok!
just reported it! |
1 Attachment(s)
Hi Christian,
OK, I've managed to solve the problem with running motorBike in parallel, namely the problem you had in post #7. The attached case has only been tested with OpenFOAM 2.0.x. Basically the problem is that decomposePar does not preserve the regular expressions that are present in the original boundaries (p, U, k, omega, nut). So the solution that I implemented resorts to changeDictionary to reinstate the missing boundaries, as well as add ones that were missing from the decomposition and parallel meshing. It's not the perfect solution, but it's a start. As for the ptscotch problem, I've seen your report and I'am wandering which were the steps you took for installing OpenFOAM. Was is it the Debian packages one? (this one: http://www.openfoam.org/download/ubuntu.php) Best regards, Bruno |
Oh yeah Bruno! you're my man!
I tested it on openfoam 2.1.0 and it works!! Thanks a lot!! But how do you reconstruct the Case? when i use reconstructPar the following Error message is displayed: Code:
Create time I downloaded the file ptscotch library from: http://packages.debian.org/sid/libptscotch-5.1 greets Christian |
Hi Christian,
The problem is rather simple when we think about it: since we generated the mesh in parallel, said mesh doesn't exist in reconstructed form! The following commands are meant to be placed at the end of Allrun: Code:
runApplication reconstructParMesh -mergeTol 1e-6 -constant Code:
paraFoam -builtin By the way, you might also be interested in the new tutorial available for 2.1.0: "incompressible/pisoFoam/les/motorBike/motorBike" - this is another variant of the "motorBike" case we know, but it is meshed in parallel with 8 cores with a higher mesh resolution and is quite the memory eater. 2.7GiB of RAM weren't enough to feed this beast of a mesh! edit: I forgot to ask - Which version of Linux and architecture are you using? For the architecture, you can check by running: Code:
uname -m Best regards, Bruno |
First: Happy New Year!! :)
oh thanks a lot!!! that worked fine, with your motorbike example. but what exaclty is procBoundary? and why did you set the velocity in the changeDictionaryDict file for procBoundary? I adapted this example to my case. It works and i get a good residual. But in my case I simulate the flow through a rather complex geometrie where all boundaries are given by stl files, even the inlet and the outlet. I set the pressure at the inlet and outlet and the velocity is calculated with "pressureDirectedInletVelocity". The pressure at the inlet is 10Pa and at the outlet 0Pa. when I calculate this the normal way, with only a single processor, everithing is fine. But in parallel the starting (Time 0) boundary conditions are so that there is a pressure of 10Pa at the inlet and outlet. The changeDictionaryDict has exactly the same adjustments as the single files for p, U,... except for the additional procBoundary Code:
dictionaryReplacement Yes the pisoForm motorbike example looks quite interesting, but I still get this dam ptscotch error which we talked about some posts before. Maybe I really made something wrong installing OpenFoam but I excactly followed the instructions on OpenFoam.com for Ubuntu http://www.openfoam.org/download/ubuntu.php So I'm using Ubuntu 10.04LTS on a x86_64 How did you install the ptscotch library? and where are the correct files to download? regards Christian |
Hi Christian,
Quote:
Quote:
Oh, and these values between processors seem to be the same as the initial internal fields. Quote:
Quote:
I'm checking this in a virtual machine with the same version of Ubuntu 10.04 x86_64 to confirm what's going on... I'll edit this post after I have results. edit: preliminary tests indicated that the relevant package is only recommended. Said package still needs to be installed manually, at least for 10.04: Code:
sudo apt-get install libptscotch-dev edit 2: OK, now I understand why you went to Debian for the package. And wouldn't you know it, since there is no "libptscotch-dev" for 10.04, then there is no "libptscotchDecomp.so" for "openmpi-system"! Here are the commands for a possible proper installation:
Bruno |
Hey!!
Yeah I managed to install the ptscotch library! Thank you!! now, openmpi works really well. I'm running all functions now with the keyword mpirun, because there one has the option to make a "machines" file, where all computers and their cpus which are used for the calculations are listed. Thats how my "Allrun" flie looks like now: Code:
#!/bin/sh Christian |
Hi, Christian,
I have been working on the use on snappyHexMesh. About the running of motobike case, I have some problems: In the "OpenFOAM-2.1.0/tutorials/incompressible/pisoFoam/les/motorBike/motorBike" directory, I didn't change anything. Then I run the commands according to the Allrun file, the commands list is as below: "blockMesh", "cp system/decomposeParDict.hierarchical system/decomposeParDict","decomposePar", "cp system/decomposeParDict.ptscotch system/decomposeParDict", "mpirun -np 8 snappyHexMesh -overwrite -parallel" then it just got stuck at: Overall mesh bounding box : (-5 -4 0) (15 4 8) Relative tolerance : 1e-06 Absolute matching distance : 2.29783e-05 In fact I have tested many cases in OpenFOAM-2.1.0, all of them were stuck somewhere during their running, while they got stuck at different points. Do you know what's wrong with it? Best wishes, xiaow_g.:p Quote:
|
Hey!
when snappyHexMesh says something like: "aborted" or "killed" then probably your memory is to low for that case. :/ greets christian |
Greetings to all!
@xiaow_g: I know I've had a similar problem, where snappyHexMesh kept running at 100% in parallel and wouldn't continue, but I can't remember what the problem was. It might be a memory issue like Chris said, but it could also be a bug you might be triggering somehow. It would be useful to know the Linux distribution and architecture (uname -m) you are using, as well how much RAM is available to your Linux installation (in case you are running it inside a virtual machine). The other possibility is that you need to upgrade to OpenFOAM 2.1.x. Several bugs have been fixed since 2.1.0 was released and I vaguely remember having problems with snappyHexMesh in parallel with one versions that wasn't from git... Best regards, Bruno |
All times are GMT -4. The time now is 06:16. |