Merge pull request #58 from fverdugo/francesc

More changes in jacobi_notebook
This commit is contained in:
Francesc Verdugo
2024-09-23 16:34:25 +02:00
committed by GitHub
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."
]
},
{

View File

@@ -1534,7 +1534,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Julia 1.9.1",
"display_name": "Julia 1.9.0",
"language": "julia",
"name": "julia-1.9"
},
@@ -1542,7 +1542,7 @@
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.9.1"
"version": "1.9.0"
}
},
"nbformat": 4,