[petsc-dev] Petsc Pthreads Capability

Shrirang Abhyankar abhyshr at mcs.anl.gov
Wed Nov 30 09:13:52 CST 2011


Dave, 
    I doubt if you would see a significant performance improvement in linear solves using pthreads since currently we have support for threaded seq and mpi vectors only. The pthread work is an ongoing work so it might be also unstable at times. I suggest experimenting with the linear solvers and preconditioners available with PETSc first and then move to using pthreads if you feel necessary.
 To use Petsc with pthreads
I) configure with --with-pthreadclasses=1
Ii) pthread runtime options 
   A) -thread_max <max_threads>
   B) -use_thread_pool <main, true, chain, tree>
   C) -vec_type <pthread, seqpthread, mpipthread>
   D) -mat_type <seqaijpthread>
 
Note that the matrix class seqiajpthread only has threaded MatMult operation, all others are sequential.

Shri


On Nov 29, 2011, at 11:47 PM, Dave Nystrom <dnystrom1 at comcast.net> wrote:

> I have a 2d resistive mhd code which spends over 95 percent of its run time
> doing linear solves and I have interfaced these linear solves to petsc.  I'm
> interested in optimizing the single node performance of this code right now
> and was wondering if there could be any benefit to trying out the petsc
> pthreads capability that is in petsc-dev.  Is this work at a stage yet where
> I might be able to benefit from trying it with my code when running on a
> multi-core cpu?
> 
> Thanks,
> 
> Dave
> 
> -- 
> Dave Nystrom
> 
> phone: 505-661-9943 (home office)
>       505-662-6893 (home)
> skype: dave.nystrom76
> email: dnystrom1 at comcast.net
> smail: 219 Loma del Escolar
>       Los Alamos, NM 87544



More information about the petsc-dev mailing list