0

I need to take Kronecker product of two matrices one of them is an identity matrix, my system size happens to be of the order of 256*256 for both the matrices. Although I've written a code which works fine but the problem is with the system size. It takes a lot of time just to take the product. I tried to develop an MPI code but I'm facing problem in sending and receiving the data from one core to other. I don't know which routine of MPI would be efficient for this task, it will be helpful if there is some library which uses mpi to evaluate the tensor product of if someone can help with mpi tensor product code.

  • 1
    If you are facing a `MPI` problem and need help solving it, then post your code ! If this is not a `lapack` nor `scalapack` issue, then remove these flags. – Gilles Gouaillardet Mar 03 '18 at 12:29
  • btw, is there enough memory available on your system to store the result matrix ? – Gilles Gouaillardet Mar 03 '18 at 12:34
  • @ Gilles Gouaillardet, there is enough memory on my system, I'm doing 256*256 on cluster. I was able to do 128*128 on my laptop, but I want to speed up my code. I'll post the code soon, I'm trying to use MPI_GATHER routine, though I don't have much idea about that can you help me with that. – Puneet Sharma Mar 04 '18 at 13:17
  • Post your code first, and please make it [MCVE] – Gilles Gouaillardet Mar 04 '18 at 14:04
  • by the way, are you writing a general kronecker product ? or one that it optimized for the identity matrix ? (in the latter case, this is basically a bunch of `memcpy`, but you might consider sparse matrix or no matrix at all since the result can be "computed" on the fly) – Gilles Gouaillardet Mar 05 '18 at 00:48

0 Answers0