[petsc-users] Small vectors and matrices

Matthew Knepley knepley at gmail.com
Fri Nov 11 08:14:47 CST 2011


On Fri, Nov 11, 2011 at 2:11 PM, markus.sons at gmail.com <
markus.sons at gmail.com> wrote:

> Thanks for the quick answer. We already have a wrapper class for
> BLAS/Lapack and it's currently being used for small problems as well as
> solving the - possibly huge - equation system.
> We want to use PETSc to solve this problem in parallel and would have
> hoped to be able to simultaneously drop the wrapper. I guess a mixed
> approach would be perfect then?
>

You can certainly use Vec for small vectors. The overhead is minimal.
However, it will not optimize these operations (neither does BLAS)
in the same way as Eigen. BLAS is optimized for vectors of length 10000+.

   Matt


> On Fri, Nov 11, 2011 at 3:05 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
>
>> On Fri, Nov 11, 2011 at 03:35, markus.sons at gmail.com <
>> markus.sons at gmail.com> wrote:
>>
>>> So, what do you recommend? Using PETSc for the large-scale computations
>>> and some simple Vec and Mat class for small, local stuff?
>>
>>
>> Don't use PETSc Mat/Vec for very small local problems like the 3x3 or 4x4
>> matrices. If you are already addicted to templates and overloading, you
>> might check out a library like Eigen which is competitive with BLAS/Lapack
>> for some problems on some architectures.
>>
>
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111111/c55ea904/attachment.htm>


More information about the petsc-users mailing list