Dual core performance estimate

Barry Smith bsmith at mcs.anl.gov
Sun Nov 18 20:00:30 CST 2007


   Gideon,

On Sun, 18 Nov 2007, Gideon Simpson wrote:

> I asked the original question, and I have a follow up.  Like it or not, 
> multi-core CPUs have been thrust upon us by the manufacturers and many of us 
> are more likely to have access to a shared memory, multi core/multi processor 
> machine, than a properly built cluster with MPI in mind.
>
> So, two questions in this direction:
>
> 1.  How feasible would it be to implement  OpenMP in PETSc so that multi core 
> CPUs could be properly used?
>
> 2.  Even if we are building a cluster, it looks like AMD/Intel are thrusting 
> multi core up on is.  To that end, what is the feasibility of merging MPI and 
> OpenMP so that between nodes, we use MPI, but within each node, OpenMP is 
> used to take advantage of the multiple cores.
>
> -gideon
>

    Unfortunately using MPI+OpenMP on multi-core systems for the iterative
solution of linear systems will not help AT ALL. Sparse matrix algorithms
(like matrix-vector production, triangular solves) are memory bandwidth limited.
The speed of the memory is not enough to support 2 (or more) processes both
trying to pull sparse matrices from memory at the same time; the details of
the parallelism are not the issue.

   Now it is possible that other parts of a PETSc code; like evaluating
nonlinear functions, evaluating Jacobians and other stuff may NOT be
memory bandwidth limited. Those parts of the code might benefit by using
OpenMP on those pieces of the code, while only using the single thread
on the linear solvers. That is, you would run PETSc with one MPI process
per node, then in parts of your code you would use OpenMP loop level
parallelism or OpenMP task parallelism.

    Barry



> On Nov 18, 2007, at 3:53 PM, Aron Ahmadia wrote:
>
>> Hi Ben,
>> 
>> You're asking a question that is very specific to the program you're
>> running.  I think the general consensus on this list has been that for
>> the more common uses of PETSc, getting dual-cores will not speed up
>> your performance as much as dual-processors.  For OS X, dual-cores are
>> pretty much the baseline now, so I wouldn't worry too much about it.
>> 
>> ~A
>> 
>> On Nov 18, 2007 3:34 PM, Ben Tay <zonexo at gmail.com> wrote:
>>> Hi,
>>> 
>>> someone was talking abt core 2 duo performance on os x in some previous
>>> email. it seems that due to memory issues, it's not possible to get 2x the
>>> performance. there's also some mention of amd vs intel dual core.
>>> 
>>> for computation using PETSc, is there any reason to buy one instead of the
>>> other? Also, supposed I use winxp + mpich2 + PETSc on a dual core, what 
>>> sort
>>> of performance increase can we expect as compared to PETSc + nompi on the
>>> same machine?
>>> 
>>> or is that too difficult an answer to give since there are too many 
>>> factors?
>>> 
>>> thank you
>>> 
>>> regards
>> 
>




More information about the petsc-users mailing list