Question: You are supposed to use the given template for implementing each of the problems. Additionally, your program will be given two arguments, path to an
You are supposed to use the given template for implementing each of the problems. Additionally, your program will be given two arguments, path to an input file and an output file from which your program will obtain the input and output the result into respectively, like the following (for C++): mpirun -np 11 ./a.out
Let A be a full rank square matrix of N rows and N columns. Write a program to find the solution to the set of linear equations Ax = b using the Gaussian Elimination algorithm followed by back substitution. You can assume that A is partitioned into rows and the partitions are stored across the processes.
Input: First line will contain N, the size of the square matrix. The next N rows will contain N + 1 floating-point values each, where the value in the ith row at the jth place is the A[i][j] value when j N and b[i] if j is N + 1.
Output: A vector x which is the solution to Ax = b containing real numbers having absolute error less than 1e-6. Constraints: 1 <= N <= 102
Example: Sample Input: 3 1.0 5.0 11.0 -1.0 2.0 9.0 29.0 -2.0 -3.0 10.0 1.0 3.0 Sample Output: -1.0 0 0
Code should be written in the middle of the template given below, where it is written as "Enter your code here"
# include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
