CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   Unsteady parallel scalability definition (http://www.cfd-online.com/Forums/main/99170-unsteady-parallel-scalability-definition.html)

lakeat March 27, 2012 13:28

Unsteady parallel scalability definition
 
Dear all,

I have a question.

In CFD unsteady simulation, how to define/calculate/measure the speedup?
Since it each time step the matrix needs to be solved is different, so is the iteration number. Then I mean, how did you set the "end time" and compare the clock time and calculate the speedup?

And in the meantime, if I got a bad speedup, isn't that a big possibility that the matrix solving scheme is not efficient enough. If then, when a person define the speedup, shouldn't he also provide the numerical schemes also? But how could we have a perfect scheme that will not affect the speedup measuring.

Thanks

SergeAS March 28, 2012 02:22

In case of transient solution you can compare computing time for achieve a fixed "real" time in simulated process

lakeat March 28, 2012 09:12

And another question,

Isn't there a possibility that the bad speedup in case one see, might be actually due to the bad matrix solution algorithm?
For example, if one uses bad multigrid method, and got a very bad sppedup, then his report of speedup is totally misleading.

If I was right, then, how could we find a "perfect" enough algorithm, that it will not affect the test of scalability?

Thanks, btw, love your signature!!

SergeAS March 28, 2012 09:40

At first we must agree on what type of scalability we're talking about

One usually considers two types of scalability
1) The acceleration in solving the problem of fixed size for different number of cores
2) The solution of problems in several sizes for a fixed number of cores

Next, we must agree on what kind of scalability can be considered "bad" because as you know - everything is relative.

Usually the cause of poor scalability may be the presence of a significant piece of the algorithm can not be parallelized. As an example, see my blog on the comparison of the use of blocking and nonblocking MPI calls

If the algorithm does not contain any such places in an explicit form, the inefficiency may be associated with a significant number of barriers, synchronization and / or critical sections.

In the latter case can help to collect statistics on what part of the algorithm are called most frequently (in several data sets)

lakeat March 28, 2012 10:03

Thanks for your help.

So the real scalability test result is closely related to two major aspects, one is hardware side, another is software side.

Question concerning hardware side,
Is there a way, or what is the best way of finding where is the bottleneck?
For example, if I have a cluster, 2.5G cpu, 2G/core RAM, infiniband QDR, blahblah. Given a certain CFD software and case at hand, how could I know, how could I test, where is the bottleneck, so that I could choose another cluster?

Question concerning the software design.
If hardware is not a problem all the time, then how could I test that which part of the code can be further optimized for parallel efficiency?
I am not referring to which part takes the longest time, I just want to know which part can be ideally improved to a better efficiency. E.g., I know solving p equation takes the most of time, but we have no better choice, right, it is always so. I am also doing FSI simulations, I would hope that part of code that I am writing wont be too bad to slow down the whole simulation.


PS: Sorry, I am not from computer science, nor from pure programming, I am from other engineering field, I just want to make sure I dont make huge mistakes when choosing a cluster or writing a code. :)

SergeAS March 28, 2012 11:44

1 Attachment(s)
Quote:

Originally Posted by lakeat (Post 351941)
So the real scalability test result is closely related to two major aspects, one is hardware side, another is software side.

Sure
Quote:

Originally Posted by lakeat (Post 351941)
Question concerning hardware side,
Is there a way, or what is the best way of finding where is the bottleneck?
For example, if I have a cluster, 2.5G cpu, 2G/core RAM, infiniband QDR, blahblah. Given a certain CFD software and case at hand, how could I know, how could I test, where is the bottleneck, so that I could choose another cluster?

The simplest test solution to your problem on the same node but on two cores (1-node x 2 core) and at two nodes, using one core in each (2-nodes x 1-core) can show what your problem is more sensitive: to memory access or interconnect


Quote:

Originally Posted by lakeat (Post 351941)
Question concerning the software design.
If hardware is not a problem all the time, then how could I test that which part of the code can be further optimized for parallel efficiency?
I am not referring to which part takes the longest time, I just want to know which part can be ideally improved to a better efficiency. E.g., I know solving p equation takes the most of time, but we have no better choice, right, it is always so. I am also doing FSI simulations, I would hope that part of code that I am writing wont be too bad to slow down the whole simulation.


PS: Sorry, I am not from computer science, nor from pure programming, I am from other engineering field, I just want to make sure I dont make huge mistakes when choosing a cluster or writing a code. :)

If you do not delve into the intricacies of the code analysis, I can advise you to use any simple profiler.

Personally, I like valgrind (see attached screenshot for one of my code)
http://www.cfd-online.com/Forums/att...1&d=1332949269
If you want to analyze and debug parallel code is then that there are special tools, such as TotalView (in the case of the MPI code) and ThreadSpotter


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