diff --git a/notebooks/figures/fig_jacobi.svg b/notebooks/figures/fig_jacobi.svg index 0cdab8a..653fa80 100644 --- a/notebooks/figures/fig_jacobi.svg +++ b/notebooks/figures/fig_jacobi.svg @@ -3095,9 +3095,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="1.3845452" - inkscape:cx="7205.0733" - inkscape:cy="-130.08677" + inkscape:zoom="0.24475533" + inkscape:cx="3538.2486" + inkscape:cy="-74.706304" inkscape:document-units="mm" inkscape:current-layer="layer1" inkscape:document-rotation="0" @@ -3640,6 +3640,7 @@ + ??CPU 2Data updatedData used?CPU 2Data updatedData used?myC + + + + + + + + + + + + + + + + + + + + + + + rank 0 + + + + + A + B + C + x x x x x x x x x x x x x x x x + + + + x x x x x x x x x x x x x x x x + + + + x x x x x x x x x x x x x x x x + + + + = * + + x x x x x x x x x x x x x x x x + + + x x x x x x x x + + + x x x x x x x x + rank 1 + + + + + + + + + + + + + + + + + + + + + + + + rank 0 + + + + A + B + C + x x x x x x x x x x x x x x x x + + + + x x x x x x x x x x x x x x x x + + + + x x x x x x x x x x x x x x x x + + + + = * + x x x x x x x x x x x x x x x x rank 1 + + x x x x x x x x + x x x x x x x x diff --git a/notebooks/julia_mpi.ipynb b/notebooks/julia_mpi.ipynb index 1797ef6..3011772 100644 --- a/notebooks/julia_mpi.ipynb +++ b/notebooks/julia_mpi.ipynb @@ -260,7 +260,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ae6b88eb", + "id": "7511de1b", "metadata": {}, "outputs": [], "source": [ @@ -505,7 +505,8 @@ "comm = MPI.COMM_WORLD\n", "nranks = MPI.Comm_size(comm)\n", "rank = MPI.Comm_rank(comm)\n", - "println(\"Hello, I am process $rank of $nranks processes!\")\n", + "host = MPI.Get_processor_name()\n", + "println(\"Hello from $host, I am process $rank of $nranks processes!\")\n", "MPI.Finalize()\n", "\"\"\"\n", "filename = tempname()*\".jl\"\n", @@ -565,7 +566,8 @@ " comm = MPI.COMM_WORLD\n", " nranks = MPI.Comm_size(comm)\n", " rank = MPI.Comm_rank(comm)\n", - " println(\"Hello, I am process $rank of $nranks processes!\")\n", + " host = MPI.Get_processor_name()\n", + " println(\"Hello from $host, I am process $rank of $nranks processes!\")\n", " MPI.Finalize()\n", "end\n", "run(`$(mpiexec()) -np 4 julia --project=. -e $code`);" diff --git a/notebooks/mpi_collectives.ipynb b/notebooks/mpi_collectives.ipynb index feced87..30bbc18 100644 --- a/notebooks/mpi_collectives.ipynb +++ b/notebooks/mpi_collectives.ipynb @@ -120,6 +120,16 @@ "In this example the ranks sleep for a random amount of time and then they call barrier. It is guaranteed that the message \"Done!\" will be printed after all processes printed \"I woke up\" since we used a barrier. Try also to comment out the call to `MPI.Barrier`. You will see that the message can be printed in any order." ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "c6e78389", + "metadata": {}, + "outputs": [], + "source": [ + "using MPI" + ] + }, { "cell_type": "code", "execution_count": null,