matrix creation on LAPACK mode
Barry Smith
bsmith at mcs.anl.gov
Fri Jul 3 11:00:39 CDT 2009
On Jul 3, 2009, at 2:50 AM, Zi-Hao Wei wrote:
> Hi
>
> I remember that when you use LAPACK as eigensolver the SLEPc will
> automatically convert sparse matrix into dense matrix by the function
> SlepcMatConvertSeqDense.
That conversion should be very fast so it won't affect the overall
time by much. Especially since the LAPACK eigenvalues computation is
order N^3 work which will swamp out any oder N^2 work.
Barry
>
>
> On Fri, Jul 3, 2009 at 12:30 PM, Takuya Sekikawa<sekikawa at msi.co.jp>
> wrote:
>> Hello
>>
>> I made eigenvalue solver program with SLEPc. in my program, to
>> setup matrix, I use MatCreateSeqAIJ() function.
>>
>> void setupMatrix(int m, int n)
>> {
>> PetscErrorCode ierr;
>>
>> ierr=MatCreateSeqAIJ(PETSC_COMM_WORLD, m, n, nz, PETSC_NULL,
>> &g_A);
>> ...
>> }
>>
>> Normally I select solver as KrylovSchur, but sometimes I switched
>> solver
>> to LAPACK. with using LAPACK, result seems to be no problem. but I
>> suspect calculation time takes longer (because of using
>> MatCreateSeqAIJ)
>>
>> Does switching matrix create function to MatCreateSeqDense() give any
>> effect to speed up on LAPACK mode?
>>
>> Thanks,
>> Takuya
>> ---------------------------------------------------------------
>> Takuya Sekikawa
>> Mathematical Systems, Inc
>> sekikawa at msi.co.jp
>> ---------------------------------------------------------------
>>
>>
>>
>
>
>
> --
> Zi-Hao Wei
> Department of Mathematics
> National Central University, Taiwan
> Adrienne Gusoff - "Opportunity knocked. My doorman threw him out." -
> http://www.brainyquote.com/quotes/authors/a/adrienne_gusoff.html
More information about the petsc-users
mailing list