Proof read Jacobi method

This commit is contained in:
Gelieza K
2023-08-14 13:04:06 +02:00
parent 1c3062f249
commit d13ea2408a
3 changed files with 114 additions and 117 deletions

View File

@@ -56,9 +56,8 @@
"metadata": {},
"outputs": [],
"source": [
"@everywhere workers() begin\n",
"@mpi_do manager begin\n",
" using MPI\n",
" MPI.Initialized() || MPI.Init()\n",
" comm = MPI.Comm_dup(MPI.COMM_WORLD)\n",
" nw = MPI.Comm_size(comm)\n",
" iw = MPI.Comm_rank(comm)+1\n",
@@ -84,8 +83,8 @@
" end\n",
" if iw != nw\n",
" neig_rank = (iw+1)-1\n",
" s = n_own-1\n",
" r = n_own\n",
" s = n_own+1\n",
" r = n_own+2\n",
" req = MPI.Isend(view(u,s:s),comm,dest=neig_rank,tag=0)\n",
" push!(reqs_snd,req)\n",
" req = MPI.Irecv!(view(u,r:r),comm,source=neig_rank,tag=0)\n",
@@ -102,6 +101,7 @@
" u, u_new = u_new, u\n",
" end\n",
" u\n",
" @show u\n",
" end\n",
" niters = 100\n",
" load = 4\n",