Question: Purpose: The goal in this assignment is to perform the multiplication of two squared matrices (nxn) of a specified size n, store all matrices to

Purpose: The goal in this assignment is to perform the multiplication of two squared matrices (nxn) of a specified size n, store all matrices to file, and measure the execution time(benchmarking). Then the matrix size n is plotted versus the CPU time in seconds. This assignment tests the computer performance using arithmetic and I/O operations.

Requirements:

1) Describe your computer:

-CPU specification

-Number of cores

-Physical Memory (RAM)

-Hard drive size

-Hard drive type (Hard disk, solid state or other)

-Operating system (i.e., Windows 10, Mac OS, etc.)

2) Code requirements

-Provide a flowchart or pseudocode

-Include this entire document in your code using comments for documentation purposes.

-Read the matrix size n in the same line as the jar file; for instance, you specify a 10x10 matrix when you type (see Appendix F for some information)

java -jar matrixjar.jar 10

-Create matrices matrix1 and matrix2 of size nxn, and having random numbers between 0 and 10.

-Perform the multiplication result=matrix1*matrix2, where the size of matrix result is nxn. Note that a matrix multiplication code was described in Homework 3.

-Store matrices matrix1, matrix2 and result in file fileMatrix.txt. The file format is described in Appendix E.

3) Benchmarking

-First test your code using an IDE such as Eclipse or NetBeans

-Then create the jar file using the appropriate script for your operating system (For Windows, see Appendix A, and for a Mac or Linux, see Appendix C). Make sure all the files are in the same directory

-Create a script for measuring the run time (for Windows, see Appendix B, and for a Mac or Linux, see Appendix D).

-Run the script for different values of n; for instance, n can be 10, 1000, 2000, 3000, 4000,.,10000, (the initial runs will take seconds, then the runs will take minutes and then hours). Note that it would be interesting to see the largest case you can run.

-Record the numbers in a file having the name runtimes.txt, where the first column has the matrix size, and the second column has the run time in seconds.

-Provide a plot of matrix size n in the x-axis and CPU time in seconds in the y-axis, showing the computer performance. Note that this graph is different for each computer due to its hardware configuration and operating system and current background processes running. An example of a graph is shown below.

The data used for this plot is shown next:

10 0.4

100 1.2

250 1.89

500 4.92

1000 53.21

List of required deliverables

-A flowchart or pseudocode must show the logic of the code.

-The java code or codes.

-All the scripts used, and information about how to use them.

-File runtimes.txt having the data collected during the benchmarking.

-A graph of the collected data, where x-axis is the matrix size n, and the y-axis is the CPU time in seconds.

-Compress all these files in a folder and attach it in the Canvas assignment corresponding to homework # 5.

How it will be graded:

-All the required files and documents must be provided.

-The Java code must produce the correct results for the matrix multiplication.

-The assignment must be submitted on time for full credit.

-Code style: Include comments in your code, use spaces to improve code readability.

-Efficiency: Make sure your code follows the logic shown in your flowchart or pseudocode.

Purpose: The goal in this assignment is to perform the multiplication of

Please show all the work and present the deliverables.

Thanks

(spuoDas) aun uny 42921 0.892 143 1050 125 10 11 12 11 6 17 123456789 6789

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!