Loading jacobi/openmp/not_opt/src/jacobi_2D_omp_not_opt.c +4 −4 Original line number Diff line number Diff line Loading @@ -225,9 +225,7 @@ void JacobiAlgorithm(MyData **const restrict Phi, { *error = 0.0; #pragma omp parallel default(none) shared(error, delta, Phi, Phi0) \ firstprivate(ibeg, iend, jbeg, jend) \ num_threads(Nthreads) #pragma omp parallel default(none) /**** MISSING CLAUSES ****/ { #if defined(DEBUG) const int id = omp_get_thread_num(); Loading @@ -236,7 +234,9 @@ void JacobiAlgorithm(MyData **const restrict Phi, #pragma omp barrier #endif /* DEBUG */ #pragma omp for schedule(static) /***** MISSING LOOP(s) PARALLELIZATION *****/ for (int j=jbeg ; j<=jend ; j++) { for (int i=ibeg ; i<=iend ; i++) Loading jacobi/serial/not_opt/src/jacobi_2D_serial_not_opt.c +4 −18 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ int main(int argc, char **argv) 2. Generate grid, allocate memory -------------------------------------------------------- */ /* memory allocation */ /* memory allocation for I.C. */ MyData *xg = (MyData *) malloc((NX_GLOB + 2*NGHOST) * sizeof(MyData)); MyData *yg = (MyData *) malloc((NY_GLOB + 2*NGHOST) * sizeof(MyData)); assert((xg != NULL) && (yg != NULL)); Loading Loading @@ -136,24 +136,10 @@ int main(int argc, char **argv) printf("\n\t NX_GLOB x NY_GLOB = %d x %d\n", NX_GLOB, NY_GLOB); printf("\n\t Time = %lf [s]\n\n", seconds() - time_start); // free memory if (phi0) { free(phi0[0]); free(phi0); } if (phi) { free(phi[0]); free(phi); } if (yg) free(yg); if (xg) free(xg); /******************** MISSING CODE ********************************/ /* free memory dynamically allocated */ /******************** MISSING CODE ********************************/ return 0; } Loading jacobi/mpi/SendRecv/Makefile→jacobi_solutions/mpi/SendRecv/Makefile +0 −0 File moved. View file jacobi/mpi/SendRecv/include/allvars.h→jacobi_solutions/mpi/SendRecv/include/allvars.h +0 −0 File moved. View file jacobi/mpi/SendRecv/include/tools.h→jacobi_solutions/mpi/SendRecv/include/tools.h +0 −0 File moved. View file Loading
jacobi/openmp/not_opt/src/jacobi_2D_omp_not_opt.c +4 −4 Original line number Diff line number Diff line Loading @@ -225,9 +225,7 @@ void JacobiAlgorithm(MyData **const restrict Phi, { *error = 0.0; #pragma omp parallel default(none) shared(error, delta, Phi, Phi0) \ firstprivate(ibeg, iend, jbeg, jend) \ num_threads(Nthreads) #pragma omp parallel default(none) /**** MISSING CLAUSES ****/ { #if defined(DEBUG) const int id = omp_get_thread_num(); Loading @@ -236,7 +234,9 @@ void JacobiAlgorithm(MyData **const restrict Phi, #pragma omp barrier #endif /* DEBUG */ #pragma omp for schedule(static) /***** MISSING LOOP(s) PARALLELIZATION *****/ for (int j=jbeg ; j<=jend ; j++) { for (int i=ibeg ; i<=iend ; i++) Loading
jacobi/serial/not_opt/src/jacobi_2D_serial_not_opt.c +4 −18 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ int main(int argc, char **argv) 2. Generate grid, allocate memory -------------------------------------------------------- */ /* memory allocation */ /* memory allocation for I.C. */ MyData *xg = (MyData *) malloc((NX_GLOB + 2*NGHOST) * sizeof(MyData)); MyData *yg = (MyData *) malloc((NY_GLOB + 2*NGHOST) * sizeof(MyData)); assert((xg != NULL) && (yg != NULL)); Loading Loading @@ -136,24 +136,10 @@ int main(int argc, char **argv) printf("\n\t NX_GLOB x NY_GLOB = %d x %d\n", NX_GLOB, NY_GLOB); printf("\n\t Time = %lf [s]\n\n", seconds() - time_start); // free memory if (phi0) { free(phi0[0]); free(phi0); } if (phi) { free(phi[0]); free(phi); } if (yg) free(yg); if (xg) free(xg); /******************** MISSING CODE ********************************/ /* free memory dynamically allocated */ /******************** MISSING CODE ********************************/ return 0; } Loading
jacobi/mpi/SendRecv/include/allvars.h→jacobi_solutions/mpi/SendRecv/include/allvars.h +0 −0 File moved. View file
jacobi/mpi/SendRecv/include/tools.h→jacobi_solutions/mpi/SendRecv/include/tools.h +0 −0 File moved. View file