Dear Hong,

Thank you for your reply. I think it reduces the number of flops to use a 
seqaij matrix C because I will use very large sparse matrix for A and also 
multiply C and another large matrix. If so, then I might create B as a seqaij 
matrix.

Thanks,
Joon

----- Original Message -----
From: "Hong Zhang" <[email protected]>
To: "Joon Hee Choi" <[email protected]>
Cc: "Jed Brown" <[email protected]>, "PETSc users list" 
<[email protected]>
Sent: Thursday, September 26, 2013 8:56:39 PM
Subject: Re: [petsc-users] About MatTransposeMatMult



Joon : 



Dear Jed, 

Hello. I modified my code using MatTranspose and MatMatMult, and it works well. 
BTW, the result of the multiplication of seqaij and seqdense was seqdense. 
I thought C should be seqaij when A is seqaij and B is seqdense in C=A*B. 


When B is dense, C=A*B is a dense matrix. 



Is the way to get seqaij just seqaij*seqaij? 

Why do you want store a dense matrix in sparse format? 


Hong 



----- Original Message ----- 

From: "Joon Hee Choi" < [email protected] > 
To: "Jed Brown" < [email protected] > 


Cc: [email protected] 
Sent: Thursday, September 26, 2013 2:45:38 PM 
Subject: Re: [petsc-users] About MatTransposeMatMult 

> Thank you. I think MatMatMult runs well for multiplication between seqaij and 
> seqdense. 

> Joon 

----- Original Message ----- 
From: "Jed Brown" < [email protected] > 
To: "Karl Rupp" < [email protected] >, "Joon Hee Choi" < [email protected] >, 
[email protected] 
Cc: "Hong Zhang" < [email protected] > 
Sent: Thursday, September 26, 2013 11:01:42 AM 
Subject: Re: [petsc-users] About MatTransposeMatMult 

>> Karl Rupp < [email protected] > writes: 

>>> Hi, 
>>> 
>>> I am trying to calculate M = X^T * B. X is a seqaij and B is a seqdense 
>>> matrix. 
>>> 
>>> This is not yet allowed in the latest 3.4. release. 

>> You can explicitly transpose X: 

>> MatTranspose(X,MAT_INITIAL_MATRIX,&Xt); 

>> and then use MatMatMult. 

>>> However, I used MatTransposeMatMult() but I got an error. Can someone why I 
>>> got the >>> error and how I should modify my code? I am attaching my simple 
>>> code, error message, >>> and result. Thank you very much. 
>>> 
>>> Do you use the master branch from our Bitbucket repository? It contains 
>>> the commit where Hong added the respective functionality: 
>>> https://bitbucket.org/petsc/petsc/commits/8949adfd119cb1d44c9fb5cf3dc01f4b6a02252d
>>>  

>> This is only for MPI. Hong, can you expose 
>> MatTransposeMatMult_SeqAIJ_SeqDense? 

Reply via email to