Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Learning Objectives: Design an efficient data-decomposition (i.e., block vs. cyclic) for a pthread program in C. Write correct C program using pthread library commands to
Learning Objectives: Design an efficient data-decomposition (i.e., block vs. cyclic) for a pthread program in C. Write correct C program using pthread library commands to initialize (create) pthreads and synchronize their operation. Time various sizes and # of threads Homework #6 Description: You are to design and write a C program utilizing pthreads to efficiently perform matrix multiplication. homework, download and extract hwo. zip from the eLearning system. It contains a copy of the lab5/multSeqOptions.c program which you can use as your starting point. To start the Your program must satisfy the following specifications can handle square matrices A and B fill matrices A and B with randomly generated doubles in the range -1.0 and +1.0 checks the results ofyour parallel product matrix by comparing it against a sequentially calculated (matrixMultiplicationAlt) matrix. Each element of the two products should be within a tolerance of 0.000001 time both the parallel and sequential matrix multiplications -- second granularity as done in multSeqOptions.c Compile (gcc-o mmult -03 mmultHW6.c -1pthread) and run the program varying the matrix size and number of threads to complete the following table. You can develop your program using student.cs.uni.edu, but I would like you to complete the timings on fermil.cs.uni.edu. Matrix Sizes Time of sequential matrixMultiplicationAlt function (in seconds) Time of your parallel matrix multiplication function (in seconds) using a varying number of threads 1 thread 2 threads 4 threads 8 threads16 threads 1500 x 1500 2000 x 2000 2500 x 2500 3000 x 3000 3500 x 3500 Learning Objectives: Design an efficient data-decomposition (i.e., block vs. cyclic) for a pthread program in C. Write correct C program using pthread library commands to initialize (create) pthreads and synchronize their operation. Time various sizes and # of threads Homework #6 Description: You are to design and write a C program utilizing pthreads to efficiently perform matrix multiplication. homework, download and extract hwo. zip from the eLearning system. It contains a copy of the lab5/multSeqOptions.c program which you can use as your starting point. To start the Your program must satisfy the following specifications can handle square matrices A and B fill matrices A and B with randomly generated doubles in the range -1.0 and +1.0 checks the results ofyour parallel product matrix by comparing it against a sequentially calculated (matrixMultiplicationAlt) matrix. Each element of the two products should be within a tolerance of 0.000001 time both the parallel and sequential matrix multiplications -- second granularity as done in multSeqOptions.c Compile (gcc-o mmult -03 mmultHW6.c -1pthread) and run the program varying the matrix size and number of threads to complete the following table. You can develop your program using student.cs.uni.edu, but I would like you to complete the timings on fermil.cs.uni.edu. Matrix Sizes Time of sequential matrixMultiplicationAlt function (in seconds) Time of your parallel matrix multiplication function (in seconds) using a varying number of threads 1 thread 2 threads 4 threads 8 threads16 threads 1500 x 1500 2000 x 2000 2500 x 2500 3000 x 3000 3500 x 3500
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started