Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 1: The hello-world of HPC Write a program that multiplies the two 3x3 matrices Print out each matrix first, then print out the resultant

Part 1: The hello-world of HPC

Write a program that multiplies the two 3x3 matrices

Print out each matrix first, then print out the resultant matrix

= 2.33 4.53 98.4

28.54 75.62 3.44

102.33 3.3 45.01

= 46.73 43.6 92.1

2.233 116.8 11.4

156.8 13.44 67.8

Part 2: The random hello-world of HPC

Write a program that multiplies two 3x3 matrices

Each matrix has random elements generated from -199.999 to 199.999

You may (should) google random functions for your program

Print out each matrix first, then print out the resultant matrix

Part 3: The average-random-hello-world of HPC

Write a program that multiplies the two random 3x3 matrices

Do it 100 times!

Take the average each element as it iterates 100 times

Print out the resultant matrix -> each elements is the average value of that element

Part 4: Timing the average-random-hello-world of HPC

Take your Part 3 code from HW1 and run it on LEAP! o Write a program that multiplies the two random matrices

o Do it 1,000 times!

o Take the average each element as it iterates 1,000 times

o Print out the resultant matrix -> each element is the average value of that element

Part 5:

Changes: o Matrix size: 10,000 x 10,000

o Obtain the time of execution of: The matrix multiplication at each iteration, and The time of executing the entire program.

o Take the time of matrix multiplication time average and report it with the final resultant matrix (tons of numbers bigger file) and the total execution time of the program.

o Report the output in an output file with TXT extension.

o for example: https://stackoverflow.com/questions/2808398/easily-measure-elapsed-time

o You Can Google other timing solutions!

Submit: o Your C-file

o Your SLURM file

o Your output-file

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started