mirror of
https://github.com/fverdugo/XM_40017.git
synced 2026-11-15 06:07:17 +01:00
Saving changes
This commit is contained in:
1 parent
a727478b45
commit
60f0119dc9
4 files changed
+317
-25
No files matched your search
+6
-6
@@ -119,13 +119,13 @@ makedocs(;
|
||||
"Julia Basics" => "julia_basics.md",
|
||||
"Asynchronous programming in Julia" => "julia_async.md",
|
||||
"Distributed computing in Julia" => "julia_distributed.md",
|
||||
"Distributed computing with MPI" => "mpi_tutorial.md",
|
||||
#"Distributed computing with MPI" => "mpi_tutorial.md",
|
||||
"Matrix-matrix multiplication"=>"matrix_matrix.md",
|
||||
"Jacobi method" => "jacobi_method.md",
|
||||
"All pairs of shortest paths" => "asp.md",
|
||||
"Gaussian elimination" => "LEQ.md",
|
||||
"Traveling salesperson problem" => "tsp.md",
|
||||
"Partial differential equations" => "pdes.md",
|
||||
#"Jacobi method" => "jacobi_method.md",
|
||||
#"All pairs of shortest paths" => "asp.md",
|
||||
#"Gaussian elimination" => "LEQ.md",
|
||||
#"Traveling salesperson problem" => "tsp.md",
|
||||
#"Partial differential equations" => "pdes.md",
|
||||
],
|
||||
"Solutions" => "solutions_for_all_notebooks.md",
|
||||
],
|
||||
|
||||
@@ -365,6 +365,53 @@
|
||||
id="path8527-8"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<marker
|
||||
style="overflow:visible"
|
||||
id="marker8529-3-3"
|
||||
refX="0"
|
||||
refY="0"
|
||||
orient="auto"
|
||||
inkscape:stockid="Arrow2Mend"
|
||||
inkscape:isstock="true"
|
||||
inkscape:collect="always">
|
||||
<path
|
||||
transform="scale(-0.6)"
|
||||
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
|
||||
style="fill:#0000ff;fill-opacity:1;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="path8527-8-6"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:isstock="true"
|
||||
inkscape:stockid="Arrow2Mend"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="marker4031-1"
|
||||
style="overflow:visible"
|
||||
inkscape:collect="always">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4029-0"
|
||||
style="fill:#0000ff;fill-opacity:1;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
|
||||
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
|
||||
transform="scale(-0.6)" />
|
||||
</marker>
|
||||
<marker
|
||||
style="overflow:visible"
|
||||
id="marker4223-6"
|
||||
refX="0"
|
||||
refY="0"
|
||||
orient="auto"
|
||||
inkscape:stockid="Arrow2Mend"
|
||||
inkscape:isstock="true">
|
||||
<path
|
||||
transform="scale(-0.6)"
|
||||
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
|
||||
style="fill:#0000ff;fill-opacity:1;fill-rule:evenodd;stroke:#0000ff;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="path4221-3"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
@@ -373,9 +420,9 @@
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.70000001"
|
||||
inkscape:cx="4005.3666"
|
||||
inkscape:cy="58.38566"
|
||||
inkscape:zoom="0.98994951"
|
||||
inkscape:cx="5591.9655"
|
||||
inkscape:cy="831.84122"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
inkscape:document-rotation="0"
|
||||
@@ -2678,5 +2725,225 @@
|
||||
y="194.96161"
|
||||
x="1153.2484">20</tspan></text>
|
||||
</g>
|
||||
<g
|
||||
transform="translate(192.3794,-112.09032)"
|
||||
id="g5148-2"
|
||||
inkscape:export-filename="/home/francesc/Downloads/g5148.png"
|
||||
inkscape:export-xdpi="200"
|
||||
inkscape:export-ydpi="200">
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 1359.9626,79.585912 h 20.9409"
|
||||
id="path978-3-6-3-0"
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc"
|
||||
id="path1168-6-1-6-6"
|
||||
d="m 1314.5268,79.585912 h 20.9408"
|
||||
style="fill:none;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<g
|
||||
transform="translate(1155.5468,183.31702)"
|
||||
id="g1148-7-5-75-1">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path1063-5-5-3-5"
|
||||
d="m 129.89807,-136.23112 12.99038,7.5 17.32051,-10 -12.99038,-7.5 z"
|
||||
style="fill:#e6e6e6;stroke:#000000;stroke-width:0.79374999;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccc"
|
||||
id="path1065-3-4-5-5"
|
||||
d="m 142.88845,-128.73112 v 39.999996 l 17.32051,-10 v -39.999996"
|
||||
style="fill:#e6e6e6;stroke:#000000;stroke-width:0.79374999;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccc"
|
||||
id="path1067-56-7-62-4"
|
||||
d="m 129.89807,-136.23112 v 39.999996 l 12.99038,7.5"
|
||||
style="fill:#e6e6e6;stroke:#000000;stroke-width:0.79374999;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path1069-2-6-9-7"
|
||||
d="m 147.21857,-126.23112 v 15 l 4.33013,-2.5 v -15 l -4.33013,2.5"
|
||||
style="fill:#e6e6e6;stroke:#000000;stroke-width:0.529167;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path1071-91-5-1-6"
|
||||
d="m 145.48652,-96.231123 v 1.999999 l 12.99038,-7.499996 v -2 z"
|
||||
style="fill:#e6e6e6;stroke:#000000;stroke-width:0.529167;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path1073-2-6-2-5"
|
||||
d="m 145.48652,-100.23111 v 2.000003 l 12.99038,-7.500013 v -2 z"
|
||||
style="fill:#e6e6e6;stroke:#000000;stroke-width:0.529167;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path1075-7-9-7-6"
|
||||
d="m 145.48652,-104.23111 v 2 l 12.99038,-7.50001 v -2 z"
|
||||
style="fill:#e6e6e6;stroke:#000000;stroke-width:0.529167;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
</g>
|
||||
<g
|
||||
transform="translate(1163.1327,183.31701)"
|
||||
id="g1157-09-3-0-9">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path1086-3-7-93-3"
|
||||
d="m 169.05642,-136.23112 12.99038,7.5 17.32051,-10 -12.99038,-7.5 z"
|
||||
style="fill:#e6e6e6;stroke:#000000;stroke-width:0.79374999;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccc"
|
||||
id="path1088-6-4-6-7"
|
||||
d="m 182.0468,-128.73112 v 39.999996 l 17.32051,-10 v -39.999996"
|
||||
style="fill:#e6e6e6;stroke:#000000;stroke-width:0.79374999;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccc"
|
||||
id="path1090-0-5-0-4"
|
||||
d="m 169.05642,-136.23112 v 39.999996 l 12.99038,7.5"
|
||||
style="fill:#e6e6e6;stroke:#000000;stroke-width:0.79374999;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path1092-6-2-6-5"
|
||||
d="m 186.37692,-126.23112 v 15 l 4.33013,-2.5 v -15 l -4.33013,2.5"
|
||||
style="fill:#e6e6e6;stroke:#000000;stroke-width:0.529167;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path1094-2-5-2-2"
|
||||
d="m 184.64487,-96.231123 v 1.999999 l 12.99038,-7.499996 v -2 z"
|
||||
style="fill:#e6e6e6;stroke:#000000;stroke-width:0.529167;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path1096-6-4-6-5"
|
||||
d="m 184.64487,-100.23111 v 2.000003 l 12.99038,-7.500013 v -2 z"
|
||||
style="fill:#e6e6e6;stroke:#000000;stroke-width:0.529167;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path1098-1-7-1-4"
|
||||
d="m 184.64487,-104.23111 v 2 l 12.99038,-7.50001 v -2 z"
|
||||
style="fill:#e6e6e6;stroke:#000000;stroke-width:0.529167;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
</g>
|
||||
<text
|
||||
y="15.986771"
|
||||
x="1244.8425"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:5.93749809px;line-height:1.25;font-family:Hack;-inkscape-font-specification:Hack;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect1130-2);stroke-width:1.87007797"
|
||||
id="text1128-7-8-4-8-7"
|
||||
xml:space="preserve"><tspan
|
||||
style="stroke-width:1.87007797"
|
||||
id="tspan78-79-4-7-4"
|
||||
y="103.6842"
|
||||
x="1289.8303">worker 1</tspan></text>
|
||||
<text
|
||||
y="15.986771"
|
||||
x="1294.8483"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:5.93749809px;line-height:1.25;font-family:Hack;-inkscape-font-specification:Hack;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect1184);stroke-width:1.87007797"
|
||||
id="text1182-0-0-2-3"
|
||||
xml:space="preserve"><tspan
|
||||
style="stroke-width:1.87007797"
|
||||
id="tspan83-2-7-0-0"
|
||||
y="103.6842"
|
||||
x="1339.8361">worker 2</tspan></text>
|
||||
<g
|
||||
id="g970-7-6-3-8"
|
||||
transform="translate(1209.6376,183.31701)">
|
||||
<path
|
||||
style="fill:#e6e6e6;stroke:#000000;stroke-width:0.79374999;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 169.05642,-136.23112 12.99038,7.5 17.32051,-10 -12.99038,-7.5 z"
|
||||
id="path956-5-8-7-6"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:#e6e6e6;stroke:#000000;stroke-width:0.79374999;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 182.0468,-128.73112 v 39.999996 l 17.32051,-10 v -39.999996"
|
||||
id="path958-92-8-5-8"
|
||||
sodipodi:nodetypes="cccc"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:#e6e6e6;stroke:#000000;stroke-width:0.79374999;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 169.05642,-136.23112 v 39.999996 l 12.99038,7.5"
|
||||
id="path960-2-4-9-8"
|
||||
sodipodi:nodetypes="ccc"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:#e6e6e6;stroke:#000000;stroke-width:0.529167;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 186.37692,-126.23112 v 15 l 4.33013,-2.5 v -15 l -4.33013,2.5"
|
||||
id="path962-8-3-2-4"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:#e6e6e6;stroke:#000000;stroke-width:0.529167;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 184.64487,-96.231123 v 1.999999 l 12.99038,-7.499996 v -2 z"
|
||||
id="path964-9-1-2-3"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:#e6e6e6;stroke:#000000;stroke-width:0.529167;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 184.64487,-100.23111 v 2.000003 l 12.99038,-7.500013 v -2 z"
|
||||
id="path966-7-4-8-1"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:#e6e6e6;stroke:#000000;stroke-width:0.529167;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 184.64487,-104.23111 v 2 l 12.99038,-7.50001 v -2 z"
|
||||
id="path968-3-9-9-4"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
id="text976-6-2-7-9"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:5.93749809px;line-height:1.25;font-family:Hack;-inkscape-font-specification:Hack;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect1184);stroke-width:1.87007797"
|
||||
x="1342.9568"
|
||||
y="15.986771"><tspan
|
||||
x="1387.9445"
|
||||
y="103.6842"
|
||||
id="tspan974-1-0-3-2"
|
||||
style="stroke-width:1.87007797">worker 3</tspan></text>
|
||||
<text
|
||||
y="-54.098297"
|
||||
x="1247.6248"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:5.93749809px;line-height:1.25;font-family:Hack;-inkscape-font-specification:Hack;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect1130-2);fill:#0000ff;stroke-width:1.87007797"
|
||||
id="text1128-7-8-7-3-7-0-06"
|
||||
xml:space="preserve"><tspan
|
||||
style="fill:#0000ff;stroke-width:1.87007797"
|
||||
id="tspan78-79-8-2-1-3-8"
|
||||
y="33.599152"
|
||||
x="1292.6124">msg</tspan></text>
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path1386-9"
|
||||
d="m 1304.0316,27.773394 c 16.0706,-14.103005 27.5564,-13.085868 41.886,-0.615601"
|
||||
style="fill:none;stroke:#0000ff;stroke-width:0.76499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker8529-3-3)" />
|
||||
<text
|
||||
y="-54.561871"
|
||||
x="1290.4174"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:5.93749809px;line-height:1.25;font-family:Hack;-inkscape-font-specification:Hack;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect1130-2);fill:#0000ff;stroke-width:1.87007797"
|
||||
id="text1128-7-8-7-3-7-0-0-2"
|
||||
xml:space="preserve"><tspan
|
||||
style="fill:#0000ff;stroke-width:1.87007797"
|
||||
id="tspan78-79-8-2-1-3-6-6"
|
||||
y="33.135578"
|
||||
x="1335.405">msg+=1</tspan></text>
|
||||
<text
|
||||
y="-53.871326"
|
||||
x="1338.3951"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:5.93749809px;line-height:1.25;font-family:Hack;-inkscape-font-specification:Hack;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect1130-2);fill:#0000ff;stroke-width:1.87007797"
|
||||
id="text1128-7-8-7-3-7-0-0-3-6"
|
||||
xml:space="preserve"><tspan
|
||||
style="fill:#0000ff;stroke-width:1.87007797"
|
||||
id="tspan78-79-8-2-1-3-6-2-4"
|
||||
y="33.826126"
|
||||
x="1383.3828">msg+=1</tspan></text>
|
||||
<path
|
||||
style="fill:none;stroke:#0000ff;stroke-width:0.76499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker4031-1)"
|
||||
d="m 1354.3024,27.773394 c 16.0706,-14.103005 27.5564,-13.085868 41.886,-0.615601"
|
||||
id="path4027-9"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4219-5"
|
||||
d="m 1402.8962,28.340358 c -14.7223,-30.9560949 -88.632,-34.6967981 -104.63,-1.371553"
|
||||
style="fill:none;stroke:#0000ff;stroke-width:0.76499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker4223-6)" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 175 KiB |
@@ -34,16 +34,6 @@
|
||||
"With this knowledge you will be able to implement simple and complex parallel algorithms in Julia."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "952e204b",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"<div class=\"alert alert-block alert-info\">\n",
|
||||
"<b>Tip:</b> We consider the Distributed module as an easy way to start implementing parallel algorithms in this course. Note however that many real-world applications are implemented using MPI, but MPI is harder to learn than Distributed. We will also learn MPI. It will be easier once you have some experience implementing parallel algorithms with Distributed.\n",
|
||||
"</div>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "ec225103",
|
||||
@@ -801,7 +791,7 @@
|
||||
"source": [
|
||||
"\n",
|
||||
"<div class=\"alert alert-block alert-success\">\n",
|
||||
"<b>Question (NB3-Q1):</b> How many integers are transferred between master and worker? Including both directions. \n",
|
||||
"<b>Question:</b> How many integers are transferred between master and worker? Including both directions. \n",
|
||||
"</div>\n",
|
||||
"\n",
|
||||
"\n",
|
||||
@@ -835,7 +825,7 @@
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"<div class=\"alert alert-block alert-success\">\n",
|
||||
"<b>Question (NB3-Q2):</b> How many integers are transferred between master and worker? Including both directions. \n",
|
||||
"<b>Question:</b> How many integers are transferred between master and worker? Including both directions. \n",
|
||||
"</div>\n",
|
||||
"\n",
|
||||
"\n",
|
||||
@@ -870,7 +860,7 @@
|
||||
"source": [
|
||||
"\n",
|
||||
"<div class=\"alert alert-block alert-success\">\n",
|
||||
"<b>Question (NB3-Q3):</b> Which value will be the value of `x` ? \n",
|
||||
"<b>Question:</b> Which value will be the value of `x` ? \n",
|
||||
"</div>\n"
|
||||
]
|
||||
},
|
||||
@@ -894,7 +884,7 @@
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"<div class=\"alert alert-block alert-success\">\n",
|
||||
"<b>Question (NB3-Q4):</b> Which value will be the value of `x` ? \n",
|
||||
"<b>Question:</b> Which value will be the value of `x` ? \n",
|
||||
"</div>\n",
|
||||
"\n",
|
||||
"Which value will be the value of `x` ?"
|
||||
@@ -1328,6 +1318,41 @@
|
||||
"We have seen the basics of distributed computing in Julia. The programming model is essentially an extension of tasks and channels to parallel computations on multiple machines. The low-level functions are `remotecall` and `RemoteChannel`, but there are other functions and macros like `pmap` and `@distributed` that simplify the implementation of parallel algorithms."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "a75aa3bb",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Exercises"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "3153bd90",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Exercise 1\n",
|
||||
"\n",
|
||||
"Implement this \"simple\" algorithm (the telephone game):\n",
|
||||
"\n",
|
||||
"Worker 1 generates a message (an integer). Worker 1 sends the message to worker 2. Worker 2 receives the message, increments the message by 1, and sends the result to worker 3. Worker 3 receives the message, increments the message by 1, and sends the result to worker 4. Etc. The last worker sends back the message to worker 1 closing the ring. See the next figure."
|
||||
]
|
||||
},
|
||||
{
|
||||
"attachments": {
|
||||
"g5148-2.png": {
|
||||
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA/MAAAMYCAYAAACHf7fiAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAewgAAHsIBbtB1PgAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAACAASURBVHic7N13uFxVvf/x9z7pIQFSCSWQ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TnaRwhL2XolGzMzs/rQdunT9jU5KuRVacN/WuzozczMrNk0FHQi6J81NOqfJSTL2yx2KczMzNqUJpM/O/3SdJ/JsaM3MzOzVqCZ6QP+vFnwF6f3FJNil8DMzKxNaEvQN3M24peAPg0aGzt6MzMza0WaDPo86IWcjfploK+5o8DMzKwsjQV9BfRSjgp2OehLeN1YMzMzy0SjQGeD5uZs1K8C/QS0S+wSmJmZtQgNAZ0Gei5nhXoBaKvY0ZuZmVk70lBCFvv7czbq1xFW1dk5dgnMzMwi0tGge3NUoKvTeW9TY0duZmZmnUA9hKVrb6qxUb9j7BKYmZk1kfYBXesK08zMzFqHDiUsaZunUd/X0bB97OjNzMwaSFulw+OzrhXf14j3/DQzMzNrEu2VNtCz3q8UTgHcOnb0ZmZmdaRNQOcQMsJmqRB7Qb8DTY8duZmZmXUrTSMkvcuzrN1LoP8DbRE7ejMzswFQD+hU8mWMLine truncated
|
||||
}
|
||||
},
|
||||
"cell_type": "markdown",
|
||||
"id": "6a485db2",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"<div>\n",
|
||||
"<img src=\"attachment:g5148-2.png\" align=\"left\" width=\"320\"/>\n",
|
||||
"</div>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "9a49ad48",
|
||||
|
||||
@@ -1036,7 +1036,7 @@
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Julia 1.9.1",
|
||||
"display_name": "Julia 1.9.0",
|
||||
"language": "julia",
|
||||
"name": "julia-1.9"
|
||||
},
|
||||
@@ -1044,7 +1044,7 @@
|
||||
"file_extension": ".jl",
|
||||
"mimetype": "application/julia",
|
||||
"name": "julia",
|
||||
"version": "1.9.1"
|
||||
"version": "1.9.0"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
||||
Reference in new issue
Block a user