More changes in jacobi_notebook

This commit is contained in:
Francesc Verdugo
2024-09-23 16:17:55 +02:00
parent d22fd3b292
commit eae62654d9
3 changed files with 86 additions and 50 deletions

View File

@@ -281,7 +281,7 @@
"outputs": [],
"source": [
"n = 5\n",
"tol = 1e-9\n",
"tol = 1e-10\n",
"jacobi_with_tol(n,tol)"
]
},
@@ -1531,7 +1531,7 @@
" u = jacobi_mpi(n,niters,comm)\n",
" @show u\n",
"end\n",
"run(`$(mpiexec()) -np 1 julia --project=. -e $code`);"
"run(`$(mpiexec()) -np 3 julia --project=. -e $code`);"
]
},
{
@@ -1914,7 +1914,7 @@
"source": [
"### Exercise 2\n",
"\n",
"In the parallel implementation of the Jacobi method, we assumed that the method runs for a given number of iterations. In function, `jacobi_with_tol` at the beginning of the notebook shows how the Jacobi iterations can be stopped when the difference between iterations is small. Implement a parallel version of this function. Start with the in Exercise 1 and add the stopping criterion implemented in `jacobi_with_tol`. Use a text editor and the Julia REPL. Do not try to implement the code in a notebook."
"In the parallel implementation of the Jacobi method, we assumed that the method runs for a given number of iterations. In function, `jacobi_with_tol` at the beginning of the notebook shows how the Jacobi iterations can be stopped when the difference between iterations is small. Implement a parallel version of this function. Start with the code in Exercise 1 and add the stopping criterion implemented in `jacobi_with_tol`. Use a text editor and the Julia REPL. Do not try to implement the code in a notebook."
]
},
{