Hot answers tagged

16

We are currently writing a paper that contains a number of comparable plots, and we more or less had the same problem. The paper is about comparing the scaling of different algorithms over the number of cores, which ranges between 1 and up to 100k on a BlueGene. The reason for using loglog-plots in this situation is the number of orders of magnitude involved....


14

Georg Hager wrote about this in Fooling the Masses - Stunt 3: The log scale is your friend. While it is true that log-log plots of strong scaling are not very discerning on the high end, they allow for showing scaling across many more orders of magnitude. To see why this is useful, consider a 3D problem with regular refinement. On a linear scale, you can ...


9

Solving a (linear) PDE consists in discretizing the equation to yield a linear system, which is then solved by a linear solver whose convergence (rate) depends on the condition number of the matrix. Scaling the variables often reduces this condition number, thus improving convergence. (This basically amounts to applying a diagonal preconditioner, see ...


9

PDEs of which the solutions have sharp boundaries pose problems that go beyond being able to represent the solution in floating point. This is especially true when solutions have a certain physical meaning, e.g., a density (that per se cannnot be smaller than 0). Consider, for example, $$ -\varepsilon \Delta u + u = 0 \text{ on } \Omega,\\ u = 1 \text{ on } \...


7

It is the difference in scales between terms in your equations that tend to cause numerical difficulties. You may work in any units you like as long as you are consistent. My approach has been to always consistently non-dimensionalize my equations in order to reduce the number of parameters to the minimum required, but this is only for my convenience.


6

Yes, that's what it means. This is usually illustrated with $A$ a diagonal matrix having both large and small entries. Clearly such a matrix can be accurately inverted, but a simple measure of condition number being ratio of largest eigenvalue to smallest (in this case, largest diagonal entry to smallest) would easily give a high value.


6

It may help to define $N$, the number of discretization points along a 1D edge, and relate it to $n$, the number of unknowns in the system. In 2D on a square grid of points, $n = O(N^2)$. Nested dissection efficiently reduces the sparse system you usually get from discretizations by eliminating levels of "interior" points. The result is a more dense system ...


6

One thing that makes your non-dimensionalized ODE confusing is that you use the same symbols for dimensionalized and nondimensionalized variables, even though they are different variables. Consider writing it in a different way: let there be a new set of variables, $\tilde t, \tilde x,\ldots$, all unitless, defined by $$ \tilde t = n_{\mathrm{time}}t, \...


5

I've found that if I reduce the radial domain to $8 \leq r \leq 20$, the condition number drops to ~10,000. This makes me think I need to scale my problem. I'm not sure how to do this, however, and I need to do it right. Nondimensionalization is partly repeated application of the chain rule, and partly art. The goal is to make as many quantities in your ...


5

In contrast to Bill Barth, I usually try to keep things in dimensional form. Within a single equation, this of course does not change the relative scaling of terms. However, not doing the scaling requires that one pays attention to the relative scaling between different equations of a system of equations. A discussion of one case we have documented can be ...


3

As sensitive_scientist mentioned, Measuring Parallel Scaling Performance provides the information you want on how to calculate strong\weak scaling. I've plotted your data in a way I consider it the most informative: both execution timing and strong scaling. Note: In my opinion, it is preferred to plot the execution timing on a log-log plot. The dashed line ...


3

Not well. If serial is a common case, it is important to wrap and drop down to lapack for serial execution. I implemented this in my code. For 2013 MKL pzhegvx with $n \approx 100 (1000)$ seems to incur 30% (100%) overhead compared to zhegvx when executed in serial. This seems high to me, so I'm a little worried about my implementation. Note that I ...


3

For matrices of that size, I'm not sure if you want to use ScaLAPACK at all. If you've got the ScaLAPACK code already, it shouldn't be hard to implement your own logic to drop into LAPACK instead. At the very least, doing that will allow you to perform the experiments required to answer your own question.


3

If we treat the input array as $d$ real numbers rather than floating-point values, then this is a problem of best simultaneous diophantine approximation. The differences between this and the one-dimensional version, well-known to be solved by continued fraction approximations (see e.g. Knuth AOCP vol. 2, Seminumerical Algorithms) were explored by J.C. ...


3

Sure -- just take $m=\frac{1}{tol}\frac{1}{\min_i |F_i|} 10^{16}$. It's easy to see that if you take $m$ just large enough, you will always achieve this. For simplicity, assume that your numbers are all larger than one and have at most 3 digits after the decimal point, then if you multiply them by a thousand, you will get only integers. Of course, ...


2

I agree with everything Jed had to say in his response, but I wanted add the following. I've become a fan of the way Martin Berzins and his colleagues show scaling for their Uintah framework. They plot weak and strong scaling of the code on log-log axes (using the run time per step of the method). I think it shows how the code scales pretty well (though ...


2

In most cases, it does not matter what system of units you use. However, physics deals with quite small an quite large numbers (in SI), and particularly if you're using single-precision floating points you can get into trouble very quickly. For instance, the electron charge squared is very close to what can be represented. In these cases using units in which ...


2

Dealing with floating point numbers can be trick with regards to subtraction of small numbers from larger numbers, as well as with many other aspects. I would recommend reading John D. Cooks blog posts on them, such as Anatomy of a Floating Point Number as well as Oracle's What Every Computer Scientist Should Know About Floating-Point Arithematic Also ...


2

To close this question, as @AntonMenshov said in a comment I will put two of mine toguether: These peaks result when some iterative method becomes unstable, like when using euler forwards scheme the Courant number defined as: $$C = \frac{v \Delta t}{\Delta x}$$ where $\Delta x/v$ must be the minimum residence time in a computation cell defined as the ...


2

Yes. Let's assume you have an ODE of the form $$ x'(t) = kx(t) $$ and that your coefficient is $k=42$. If the physical units of $x$ are meters and of $t$ seconds, then what that really means is that $k=42 \frac{1}{s}$. So now if you rescale time -- say, you want to measure time in minutes, you still have $k=42 \frac{1}{s}$ but you want to express this also ...


1

Scaling can affect the condition number of the matrix, and for some things that you might do with the matrix that could be important. However, if you're only solving a system of equations, the scaling/unscaling of the right hand side ends up canceling out the scaling of the Cholesky factor so that the Cholesky factor of the scaled matrix is nearly (up to ...


1

One can define weak scaling in many different ways: Amount of work per processor stays the same Amount of communication per processor stays the same Amount of memory usage per processor stays the same. Number of objects per processor stays the same. In many cases, all of these will amount to the same, notably if the amount of work, memory, and ...


1

If the main idea is to highlight the advantages of open-source over commercial software in terms of parallel processing one has to first answer the question of what one wants to achieve from the simulation. Commercial software packages offer more than just solution of PDE/ODE, meshing, etc. They offer support, documentation, convenient graphical ...


Only top voted, non community-wiki answers of a minimum length are eligible