about MatMatMultTranspose_seqdense_seqdense()

Shao-Ching Huang schuang at ats.ucla.edu
Wed Apr 9 14:18:42 CDT 2008


In BLAS API, the eight parameter for DGEMM is the physically-allocated
leading (in Fortran sense) dimension of matrix B, as in C=(alpha)*A*B
+ (beta)*C.

See the comments in
http://www.netlib.org/blas/dgemm.f

Shao-Ching


On Wed, Apr 09, 2008 at 10:02:41AM -0700, Yujie wrote:
> hi, everyone
> 
> My codes are as follows:
> 
> ierr=MatGetSubMatrices(tempM_mat,1,&is_row,&is_col,MAT_INITIAL_MATRIX,&tempA_mat);
> CHKERRQ(ierr);
>   A_mat=*tempA_mat;
>   ierr=MatDestroy(tempM_mat);CHKERRQ(ierr);
>   ierr=MatGetSize(A_mat,&M,&N);CHKERRQ(ierr);
>   //AtA
>   ierr=MatMatMultTranspose(A_mat,A_mat,MAT_INITIAL_MATRIX,fill,&AtA_mat);
> 
> I get a seqdense submatrix "A_mat" by
> MatGetSubMatrices(). I further get At*A by MatMatMultTranspose().
> However, I meet an error:
> " ** On entry to DGEMM parameter number 8 had an illegal value"
> 
> I debug my codes.
> In MatMatMultTranspose_seqdense_seqdense(), the codes call
> "BLASgemm_("T","N",&m,&n,&k,&_DOne,a->v,&a->lda,b->v,&b->lda,&_DZero,c->v,&c->lda);"
> I don't know the meaning of the 8th parameters"&a->lda". In my codes, its
> value is "0".
> 
> Are there any problems in my codes? could you give me some advice? thanks a lot.
> 
> Regards,
> Yujie




More information about the petsc-users mailing list