PETSc algebraic solvers can now use pthreads on Vec and Mat operations. This sometimes provides an alternative to the all MPI approach.
Thread usage in PETSc is available in release 3.2, but because things are changing rapidly, we recommend working with petsc-dev if you want to explore this feature.
- Installing PETSc to use the pthreads
-
Quick summary of usage:
- The VecType VECSEQPTHREAD or VECPTHREAD maybe used
with VecSetType() or -vec_type seqpthread or pthread
when
VecSetFromOptions() is used.
- The MatType MATSEQAIJPTHREAD, MATPTHREAD
maybe used with MatSetType or -mat_type
seqaijpthread or
aijpthread when MatSetOptions() is used.
- If you are creating the vectors and matrices with a DM, you can use -dm_vec_type pthread and -dm_mat_type pthread
- It is useful to develop your code with the default vectors and matrices and then run production runs with the command line options to use the pthread classes.
- The VecType VECSEQPTHREAD or VECPTHREAD maybe used
with VecSetType() or -vec_type seqpthread or pthread
when
VecSetFromOptions() is used.
- We could use your help in further developing PETSc with threads; see petsc-dev