Separated main
This commit is contained in:
@@ -5,20 +5,15 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <mpi.h>
|
||||
#include "../config.h"
|
||||
#include "../utils.h"
|
||||
|
||||
double *compute_jacobi(int rank, int numprocs, int n, double init_value, double threshold, borders b, int *iterations) {
|
||||
double *compute_jacobi(int n, double init_value, double threshold, borders b, int *iterations) {
|
||||
double *x;
|
||||
double max_diff, new_x;
|
||||
int i, j;
|
||||
int nb = n + 2; // n plus the border
|
||||
|
||||
if (numprocs != 1) {
|
||||
MPI_Abort(MPI_COMM_WORLD, 1);
|
||||
}
|
||||
|
||||
/* Initialize boundary regions */
|
||||
x = create_sa_matrix(n + 2, n + 2);
|
||||
for (i = 1; i <= n; i++) {
|
||||
|
||||
Reference in New Issue
Block a user