Parallel Performance of Large Case
Dear Foamers,
After searching for a while on the forum about the performance of parallelization I decided to open this new thread to be able to specify better my problem. I am doing a speed-up test of an industrial application of two phase flow. The mesh is 64 million cells, and the solver is compressibleInterFoam. Each node of the cluster contains 2 eight cores CPU Sandy Bridge clocked at 2.7 GHz (AVX), let 16 cores / node. Each node has 64 GB of memory, let 4 GB / core. Respecting the rule of thumb of 50 k cells/processor, I have carried out the performance study on 1024 (62,500 cells/processor), 512 and 256 processors respectively using the scotch decomposition method. The real physical time to compute a same simulated period is 1.35, 1.035, and 1 (normalized by the physical time of using 256 processors) respectively, thus leaving the 1024 the least efficient configuration and the 256 the most efficient. Any help or suggestion will be very appreciated. |
Hi Leslie,
A few remarks: 1. If I were you, I would test with an even lower number of processors. From what I can see, you don't gain anything by increasing the number from 256 to 512 (ok, 3%, let's call this negligible) but you might have the same when increasing from 128 to 256. 2. Your 50 k cells/processor "rule of thumb" is strongly cluster dependent. For the cluster I'm using, this is in the order of 300 k cells/processor 3. Make sure the physical time is "sufficiently long" so that overhead like reading the grid, creating the fields etc. becomes negligible with respect to the simulation. 4. Also, in case you didn't do it, switch off all writing of data when you do the test. Your I/O speed might mess up your test Cheers, L |
Hi Lieven, Thanks for the tips.
Actually the 50k cells/processor was verified on this cluster by a coarser mesh of 8 millions (exactly the same set-up) where 128 processors have proven to be the most efficient, which is quite reasonable. Then I simply did a "refineMesh" to get the 64 million mesh. In fact going from 256 to 512, I LOSE 3%. Quote:
|
Greetings to all!
@Leslie: There are several important details that should be kept in mind, some of which I can think of right now:
Anyway, all of these influence how things perform. And I didn't even mention specific BIOS configurations, since it's Intel CPUs :). Best regards, Bruno |
Thanks a lot Bruno, these things will keep me busy for a while. :) I will get back to the forum when I have the solution.
|
I would, as an even more important factor than the list of wyldckat, put the attention to the pressure solver. My experience is as follows:
For me it seems like you are using a GAMG solver for the pressure equation, that could in a very simple way explain the bad scaling. If you are interested, you can consult my study here: https://www.hpc.ntnu.no/display/hpc/...mance+on+Vilje This is done on an Intel Sandy Bridge cluster with 16 core/node, as you have. |
1 Attachment(s)
Hi Håkon,
Indeed I am using the GAMG for pressure. But why this bad scaling behavior did not occur for a 8 million cell mesh with exactly the same set up? (see the attachment) Cheers, Leslie |
Quote:
Anyway, I now also see that you use a compressible solver. Then some of my considerations might not necessarily be correct, as I have only worked with and tested incompressible flows. The pressure is some quite different things (physically) in compressible and incompressible flows... |
Hi all,
I am also planning to move my simulations on a big cluster (Blue Gene/Q). I will have to do scalability tests before starting the real job, so this thread is of particular interest to me. The project is not yet started so i cannot post here my results at the moment (but i hope in few weeks), but i am trying to understand as much as possibile in advance.:) so here my questions, related to bruno's post: Can you please clarify a bit points 1, 5 and 7 of your post? Thanks andrea |
All,
The only way to answer this question is to profile the code to see where it is slowing down as it is scaled to larger process counts. I have had some success using the TAU tools (http://www.cs.uoregon.edu/research/tau/about.php) with the simpleFoam and pimpleFoam incompressible solvers from OpenFOAM-2.2.x to get subroutine level timings. I am willing to try getting some results from compressible/interFoam if you can provide me your 8M cell case. Dan |
Thanks Dan for proposing. In fact the 8M case was with a reasonable scaling behavior, the problem is with 64M. You think TAU can handle such big case?
I was hoping to use extrae + paraver to get the communication time. Anyone here who is experienced with these analysis tools I will be grateful! The problem is I don't find a proper way to limit the traces generated by extrae, for example for the depthCharge2D case, 6 minutes run generates 137GB traces and after parsing it's 29 GB. paraver couldn't handle this because of too much data. And this is just for a 12800 cell case... Does anyone have a proposal for a suitable performance analysis tool? Cheers and have a good weekend! |
Greetings to all!
@Andrea: Quote:
Quote:
Quote:
For a bit more on this topic, read:
Quote:
You might find more information from the links at this blog post of mine: Notes about running OpenFOAM in parallel Best regards, Bruno |
LESlie,
TAU can handle such a small case. The trouble is getting TAU to properly instrument OpenFOAM. It takes a bit of patience, but it works very well. Once the code is instrumented and built, you can use the resulting executable for any case. Dan |
In addition to TAU, you can also use IPM ( http://ipm-hpc.sourceforge.net/ ) to find out where time is spent in your solver. I find this very useful. You can either use a simple LD_PRELOAD to link your OpenFOAM solver to IPM at runtime, this works sufficiently well to find out what takes time (calculation, I/O, different MPI calls etc).
You can also create a special purpose solver, and insert markers in the code, in that case you can find out what parts of the solution process that uses most time. This is a very powerful feature. The IPM library has very low overhead, such that you can use it on production runs, without suffering in terms of performance. I have written a small guide on how to profile an OpenFOAM solver with IPM here: https://www.hpc.ntnu.no/display/hpc/...filing+Solvers if that is of any interest. |
Dear haakon,
I am interested in parallel performace/anaylisis for the refinement stage in snappyHexMesh. I found your instruction regarding IPM very useful but I have problems to compile it correctly within OpenFOAM. I'd like to control the MPI execution in the "autoRefineDriver.C", where it refine the grid. I changed the "Make/options" file and compile it with "wmake libso" as follows: Code:
sinclude $(GENERAL_RULES)/mplib$(WM_MPLIB) 1) What are "GENERAL_RULES" and "RULES"? How should I define them? 2) Which lib for IPM should I use? The static (.a) or the dynamic (.so)? 3) "-lipm" is not found. Only if I remove it I can compile correctly the library "libautoMesh.so" 4) Once I compiled the lib "libautoMesh.so", I added the line Code:
#include "/usr/include/mpi/mpi.h" Quote:
Thank you in advance for any help Best regards Andrea Pasquali |
I compiled it!
It works Andrea |
Hello all!
I have recently come up with some issues regarding parallel jobs. I am running potentialFoam and simpleFoam on several cluster nodes. I am experiencing really different running times depending on the nodes selected. I am observing this behaviour: Running on a single switch, the case is running as expected with let's say 80 seconds per iteration. Running the same job across multiple switches, each iteration takes 250 sec, so 3 times more. I am running with openfoam-2.3.1 and mpirun-1.6.5 and using InfiniBand. For pressure, I use the GAMG solver (I will try with the PCG solver to see if I can get more consistent results). The cell count is roughly 1M cells/ proc which should be fine. I am using scotch decomposition method. Hello I am coming back to you with more information. I have run the Test-Parallel of OpenFOAM and the output looks fine for me. Here is an example of the log file PHP Code: Create time [0] Starting transfers [0] [0] master receiving from slave 1 [144] Starting transfers [144] [144] slave sending to master 0 [144] slave receiving from master 0 [153] Starting transfers [153] [153] slave sending to master 0 [153] slave receiving from master 0[/PHP] I don't know how to interpret all the processor numbers at the end of the test but I don't find them really useful. Should I get more information from this Test-Parallel ? I want to emphasize that the IB fabric seems to work correctly as we don't observe any issue running commercial grade CFD applications. We have built mpich3.1.3 from source and we observe exactly the same behaviour as using openmpi (slow across switches and fast in a single switch) so this suggests it is not mpi-related. Has anyone experienced this behaviour running parallel openfoam jobs ? And I would like to add that if I increased the numbers of processors I am using, I am experiencing even worse results (in this case I am running on mutiple switches). The run is completely stuck while iterating !! If you have any further information of what I should check and try, that would be very much appreciated! |
I notice the same behavior but running without infiniband it goes faster for me!
I did not investigate it yet, but I guess is something concerning with infiniband+mpi+openfoam. I used openfoam 2.2.0. Andrea |
Ah that's really interesting, I will give a try with an ethernet connection instead of IB so.
Andrea, did you notice different running times when running on nodes on a single switch ? |
Greetings to all!
Have you two used renumberMesh? Both in serial and in parallel mode? This will rearrange the cell order, so that the final matrices for solving are as close to diagonal as possible, which improves considerably the performance! Best regards, Bruno |
Hi,
I did not see different running times when running on nodes on a single switch. My test was with mesh generation whit the refinement stage in snappyHexMesh. As I said, I did not investigate it in detail yet. I only tried once recompiling mpi and openfoam with intel12 but having still the same (bad) performance with infiniband... Andrea |
Hello,
So I have tried the rebumberMesh before solving and it looks like it has improved a bit the performances of both single and multiple switches, reducing the running time by ~10%. But I still can't see why the running times are so slow across multiple switches. RenumberMesh or not, we should get roughly the same running time whatever the nodes selected, right ? |
Greetings to all!
@arnaud6: Quote:
Problem is that when 3 switches are used, the tree becomes a lot larger and is sectioned in 3 parts, making it a bit harder to map out communications. Commercial CFD software might already have these kinds of configurations taken into account, by either asking the InfiniBand controls to adjust accordingly, or the CFD software itself tries to balance this out on its own, by placing sub-domains closer to each other on the same machines that share a switch and keeping communication to a minimum when communicating with machines that are connected on other switches. But when you use OpenFOAM, you're probably not taking this into account. I haven't had to deal with this myself, so I have no idea how this is properly configured, but there are at least a few things I can imagine that could work:
Bruno |
Hi Bruno,
Thanks for your ideas ! I am looking at the PCG solvers. Would you advice to use the combination PCG for p and PBiCG for other variables or using PCG for p and keep other variables with a smopothSolver/Gauss Seidel ? In my cases it looks like p is the most difficult to solve (at least it is the variable that takes the longest time to be solved at each iteration). The difficulty is that I don't have much control on the nodes thus the switches that will be selected when I submit my parallel job ... I will see what I can do with the IB support. |
Hi arnaud6,
Quote:
The best I could tell you back then and now is that you try running for a few iterations yourself with each configuration. Even the GAMG matrix solver can sometimes be improved if you fine tune the parameters and do some trial and error sessions with your case, because these parameters depend on the case size and how the sub-domains in the case are structured. Either way, I hope you managed to figure this out on your own. Best regards, Bruno |
Hi Bruno,
indeed. In my expericence, how the subdomain is structured has strong impact on the performance. So I choose to decompose manually. My problem now is as following: I am running a DNS case (22 Mio. cells) using buoyantPimpleFoam (OF V2.4). The case is a long pipe with an inlet and outlet. The fluid is air. Inlet Re is about 5400. For getting better scalability, I use PCG for pressure equation. If I use perfect gas equation of state, the number of iterations will be around 100, which is acceptable. If I use icopolynom or rhoConst to describe the density, the number of iterations will be around 4000! If I use GAMG for p equation, number of iteration will be under 5, but the scalability is poor with above 500 cores. Does anyone has any opinion? How can I improve PCG solver to decrease the number of iterations? Thank you. Quote:
|
Quote:
|
Sorry for getting back so late on this one. The problem was mpirun 1.6.5. As soon as I switched to mpirun 1.8.3, the slowness disappeared !
|
All times are GMT -4. The time now is 05:13. |