Piecework Matrix ProductIn this program, the JICOS client:
If the operand matrices are of dimension n, and the blocksize is b, then each matrix decomposes into n/b x n/b blocks (i.e. submatrices): There are (n/b)3 submatrix product tasks. When the result of a submatrix product task is returned to the client, the submatrix is added to the appropriate submatrix of the product matrix. We use the Jicos's input
capability to transmit the
operand matrices
to the hosts: Each submatrix product task is small because it is
characterized by only 4 int values:
The classesThis program comprises the following classes:
OutputWith a block size of 4 and the number of blocks = 5, the client produces 2 matrices of size 20 whose entries are all 1. The product of these matrices is a 20 x 20 matrix use entries are all 20. The client produces the following output:row 0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 row 1: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 row 2: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 row 3: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 row 4: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 row 5: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 row 6: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 row 7: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 row 8: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 row 9: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 row 10: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 row 11: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 row 12: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 row 13: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 row 14: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 row 15: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 row 16: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 row 17: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 row 18: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 row 19: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |