[petsc-users] MatCreateSeqDense ?
John Chludzinski
jchludzinski at gmail.com
Wed Jul 27 05:51:53 CDT 2011
I let the SLEPc code run for ~45 min. when it terminated with the same
values I was getting using DSYGV in LAPACK.
If I write code to directly call LAPACK (i.e., DSYGV), it uses ~3.93 min.
What's up with this?
---John
On Wed, Jul 27, 2011 at 5:29 AM, John Chludzinski <jchludzinski at gmail.com>wrote:
> I'm trying to create a dense matrices from values I'm reading from (binary)
> files. I tried the following code:
>
> Mat A;
> int n = SIZE; //4002
> double *K = (double *)calloc( sizeof(double), SIZE*SIZE );
> ...
> MatCreateSeqDense(PETSC_COMM_SELF, n, n, K, &A);
> MatView(A,PETSC_VIEWER_BINARY_(PETSC_COMM_WORLD));
> ierr = PetscFinalize();CHKERRQ(ierr);
>
> NOTE:*** I'm converting K to the FORTRAN column major from the C row major
> order before I call MatCreateSeqDense(...).
>
> This appears to work but when I try to use the 2 matrices I thus created
> with SLEPc ex7 (generalized eigenvalue problem) it never terminates, using:
>
> ./ex7.exe -f1 k.dat -f2 m.dat -eps_type lapack -eps_smallest_real
>
> Am I creating the proper PETSc binary (canonical) format for my 2 matrices?
>
> ---John
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110727/9078e5e6/attachment.htm>
More information about the petsc-users
mailing list