Description of Question:
Matrix Multiplication
Develop a program to multiply two large matrices, using multiple threads. As each entry of the resultant matrix can be computed independent of the other, we can use multithreading to speed up the calculations. However, creating too many threads is inefficient; we shall rather deploy only as many threads as there are number of processors in the system (see get_nprocs() system call).
The task shall be evenly divided among the threads. If there are 100 entries in the resultant matrix for example, and we have four processors (and hence four threads), each thread shall compute 25 entries.
Use files for input and output. The program shall take two files as input, each containing a matrix. The program shall read the files, perform the multiplication, and shall store the result into a third file. Each file shall also contain order of the matrix. The program shall check whether the multiplication is possible or not.
#How to run program:
We have used VMware for running Ubuntu on our computers.
You can download VMware from the given link:
https://www.vmware.com/products/workstation-player/workstation-player-evaluation.html
https://www.virtualbox.org/wiki/Downloads
Any Ubuntu operating system can be used on VMware or VMbox.
You can download Ubuntu from the given link:
https://www.ubuntu.com/download
You can run this program on Netbeans IDE in virtually created Ubuntu.
You can download Netbeans from the given link:
https://netbeans.org/downloads/8.0.2/