The PMMM which stands for parallel matrix-matrix multiplication essentially accelerates the algorithm of the matrix-matrix multiplication of two matrices $A$ and $B$ both of size $n$ so that $C:= AB$. Let us say we have $4$ processors and I wish to know how many words are stored per processor.

To my knowledge, since we have $4$ processors then we can convert $A, B$, and $C$ to block matrices. Each block matrix has $4$ sub-blocks since we have $4$ processors so processor $i$ should store the matrix multiplications that will occur between sub-blocks from matrix $A$ and $B$ where ($i=1,2,3,4$). Now each sub-block must have $n^{2}/4$ elements. Taking processor $1$ for example, we have : $$ C_{1,1}=A_{1,1}B_{1,1}+A_{1,2}B_{2,1} $$ We may see that we should have a total of $n^{2}/4+4n^{2}/4=5n^{2}/4$ words per processor. Is my assertion correct? It might appear that the value obtained is illogical but let's say $n$ is divisible by $4$.

  • 3
    $\begingroup$ Depends on the algorithm and memory management. You don't really need A12 and B21 immediately. Sometimes, it is worthwhile to start A11B11 computation and meanwhile trade with other processes. That would reduce the amount of memory you need at once to $3n^2/4$. Whether this would always be beneficial is questionable. $\endgroup$ May 21 at 1:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.