Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please help me with the code in C please, and every information is in here and for the code it'd already some of them and
Please help me with the code in C please, and every information is in here and for the code it'd already some of them and need to do the TODO part. Thank you so much
Problem 2. (50 points for CS4473 and CS5473] In this course, we will use C for the OpenMP, GPU and MPI programming. This exercise will refresh your memory about C programming. Please write a serial C program to do the matrix- vector multiplication It should take two input files, one for the input matrix and the other one for the input vector. All the numbers are integers. The two input files are provided in the comma-separated values (CSV) format. Because the input matrix and vector can be very large, please use dynamic memory allocation (malloc and free) to store them in the heap. To prevent the numbers from running out of range, please declare the type of all variables as long int. The output vector should be saved in a CSV file. Your program should be run using the following command line: serial_mult_mat_vec file_1.csv n_row_1 n_col_1 file_2.csv n_row 2 result_vector.csv The input parameters of your programs include: file_1.csv: input CSV file for the input matrix n_row_1: number of rows in the input matrix n_col_1: number of columns in the input matrix file_2.csv: input CSV file for the input vector n_row_2: number of rows in the input vector result_vector.csv: output CSV file for the result vector The starter code and the make file are provided for your reference in the Problem_2 folder. Please keep the names of the C code and executable as serial_mult_mat_vec.c and serial_mult_mat_vec, respectively. To use the Make command, you may need to first load GCC using the following command: module load GCC Our auto-grading script will unzip the zip files submitted by every student, compile the code using the Makefile, execute the program using the command specified above, and validate the output. Therefore, it is important for you to name the directories and files as instructed. #includeStep 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