Þ¥bonds€¬cell_resultsÞŽÙ$c55dcd4a-8438-4679-9c4a-78cceec6835dЦqueued¤logs�§running¦output†¤body ¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ�r� .Ó°persist_js_state·has_pluto_hook_features§cell_idÙ$c55dcd4a-8438-4679-9c4a-78cceec6835d¹depends_on_disabled_cells§runtimeÎø¨¿µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$6be49c46-4900-4457-81b4-0704cd7da0afЦqueued¤logs�§running¦output†¤bodyÚ˜

Would it be more efficient to have a specialized implementation instead of combining existing collectives ?

Let the size of each $x_{i,j}$ be $n/p$ bytes.

  1. MPI_Reduce acts on the concatenation $x_{:,j}$ which has length $n$ bytes hence the complexity is $\log_2(p)(\alpha + \beta n + \gamma n)$

  2. MPI_Scatter has the same complexity as MPI_Gather (since it's the same but backwards in time) : $\log_2(p) \alpha + \beta n$

In total, we have the complexity $\log_2(p) (\alpha + \beta n + \gamma n)$. Can we do better ?

Start exchanging between 1 and 2 and simultaneously exchanging between 3 and 4. The complexity is $\alpha + 2(\beta + \gamma) n/4$.

procid1234
$x_{1,1} + x_{1,2}$$x_{1,3} + x_{1,4}$
$x_{2,1} + x_{2,2}$$x_{2,3} + x_{2,4}$
$x_{3,1} + x_{3,2}$$x_{3,3} + x_{3,4}$
$x_{4,1} + x_{4,2}$$x_{4,3} + x_{4,4}$

Next, we exchange between 1 and 3 and simultaneously between 2 and 4. The complexity is $\alpha + (\beta + \gamma) n/4$. In total, we have complexity

$$\begin{align} \log_2(p) \alpha + (\beta + \gamma) n(p/2 + \cdots + 4 + 2 + 1)/p & = \log_2(p) \alpha + (\beta + \gamma) n(p-1)/p\\ & \approx \log_2(p) \alpha + (\beta + \gamma) n. \end{align}$$

This is better than the approaches combining existing collectives above since we removed the $\log_2(p)$ in front of $\beta$ and $\gamma$.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�rŽì{°persist_js_state·has_pluto_hook_features§cell_idÙ$6be49c46-4900-4457-81b4-0704cd7da0af¹depends_on_disabled_cells§runtimeεpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$c1285653-38ba-418b-bdf5-cda99440998dЦqueued¤logs�§running¦output†¤bodyÚ€ ¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�DȰpersist_js_state·has_pluto_hook_features§cell_idÙ$c1285653-38ba-418b-bdf5-cda99440998d¹depends_on_disabled_cells§runtimeÎIE•µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$4fdb4cd6-a794-4b14-84b0-72f484c6ea86Цqueued¤logs�§running¦output†¤bodyÙ@

All gather

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�Ê“-°persist_js_state÷has_pluto_hook_features§cell_idÙ$4fdb4cd6-a794-4b14-84b0-72f484c6ea86¹depends_on_disabled_cells§runtimeÎ`bµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$a59db59c-d34e-4abd-8865-9907607e06a8Цqueued¤logs�§running¦output†¤bodyÚ¨ ¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�H j°persist_js_state·has_pluto_hook_features§cell_idÙ$a59db59c-d34e-4abd-8865-9907607e06a8¹depends_on_disabled_cells§runtimeÎM޵published_object_keys�¸depends_on_skipped_cells§erroredÂÙ$5a566137-fbd1-45b2-9a55-e4aded366bb3Цqueued¤logs�§running¦output†¤bodyÙ‚

Single Program Multiple Data (SPMD)

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�µ¸x°persist_js_state÷has_pluto_hook_features§cell_idÙ$5a566137-fbd1-45b2-9a55-e4aded366bb3¹depends_on_disabled_cells§runtimeÎ"¶µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$ad3559d1-6180-4eaa-b97d-3c1f10f036b9Цqueued¤logs�§running¦output†¤bodyÙ8

Reduce

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�Ê`[°persist_js_state÷has_pluto_hook_features§cell_idÙ$ad3559d1-6180-4eaa-b97d-3c1f10f036b9¹depends_on_disabled_cells§runtimeξóµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$88f33f35-d922-4d98-af4a-ebb79d9b7dc6Цqueued¤logs�§running¦output†¤body ¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ�r�r¹°persist_js_state·has_pluto_hook_features§cell_idÙ$88f33f35-d922-4d98-af4a-ebb79d9b7dc6¹depends_on_disabled_cells§runtimeÎ}Uµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$b540d5e3-6686-479a-b2c7-c1f65b85b6baЦqueued¤logs�§running¦output†¤bodyÙt

Profiling with NVIDIA Nsight Systems

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�Ԥװpersist_js_state÷has_pluto_hook_features§cell_idÙ$b540d5e3-6686-479a-b2c7-c1f65b85b6ba¹depends_on_disabled_cells§runtimeÎ�tµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$f6f9447c-9bc9-432d-bd80-2c39f9d842f8Цqueued¤logs�§running¦output†¤bodyÛÿõ¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�¹£µ°persist_js_state·has_pluto_hook_features§cell_idÙ$f6f9447c-9bc9-432d-bd80-2c39f9d842f8¹depends_on_disabled_cells§runtime΃µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$9a100ccf-1ad3-4d2c-bbe0-e297969eb69eЦqueued¤logs�§running¦output†¤bodyÙ<

Topology

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�ÔÐê°persist_js_state÷has_pluto_hook_features§cell_idÙ$9a100ccf-1ad3-4d2c-bbe0-e297969eb69e¹depends_on_disabled_cells§runtimeÎ⮵published_object_keys�¸depends_on_skipped_cells§erroredÂÙ$a1b2d090-d498-4d5d-90a0-8cdc648dc833Цqueued¤logs�§running¦output†¤bodyÙJ

Distributed sum

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�˘°persist_js_state÷has_pluto_hook_features§cell_idÙ$a1b2d090-d498-4d5d-90a0-8cdc648dc833¹depends_on_disabled_cells§runtimeÎöþµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$8b83570a-6982-47e5-a167-a6d6afee0f7dЦqueued¤logs�§running¦output†¤bodyƒªattributes�¥styleÙ#display: flex; flex-direction: row;£tag£div¨children“’Úe

Before

procid1234
$x$
©text/html’ƒªattributes�¥style­margin: 50pt;£tag£div¨children‘’Ù1

©text/htmlÙ,application/vnd.pluto.reactdomelement+object’Ú¸

After

procid1234
$x$$x$$x$$x$
©text/html¤mimeÙ,application/vnd.pluto.reactdomelement+object¬rootassigneeÀ²last_run_timestampËAÚ�rŽåüã°persist_js_state·has_pluto_hook_features§cell_idÙ$8b83570a-6982-47e5-a167-a6d6afee0f7d¹depends_on_disabled_cells§runtimeÎe _µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$e3474aea-ee14-4c78-ae46-5badc66a543aЦqueued¤logs�§running¦output†¤body ¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ�r�¥z°persist_js_state·has_pluto_hook_features§cell_idÙ$e3474aea-ee14-4c78-ae46-5badc66a543a¹depends_on_disabled_cells§runtimeάJµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$21d507f6-02f8-4f8b-84f1-bcb84731df66Цqueued¤logs�§running¦output†¤bodyÙ<

Fat-tree

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�Ú½'°persist_js_state÷has_pluto_hook_features§cell_idÙ$21d507f6-02f8-4f8b-84f1-bcb84731df66¹depends_on_disabled_cells§runtimeÎ$Zµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$de72d596-0daf-4629-bbb5-20bb8a67cbedЦqueued¤logs�§running¦output†¤bodyÚi

What is the number of edges ? What is the bisection width ?

Number of edges is $n\log_2(n)$ and bisection width is $n/2$.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�F°persist_js_state·has_pluto_hook_features§cell_idÙ$de72d596-0daf-4629-bbb5-20bb8a67cbed¹depends_on_disabled_cells§runtimeÎô©µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$c253bb24-ad76-4b58-8dfc-7dc2576e3db5Цqueued¤logs�§running¦output†¤bodyÙR

Bisection bandwidth

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�Ø1°persist_js_state÷has_pluto_hook_features§cell_idÙ$c253bb24-ad76-4b58-8dfc-7dc2576e3db5¹depends_on_disabled_cells§runtimeÎoìµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$e4d1de1d-d57a-48ab-ad7a-c09b427daa03Цqueued¤logs�§running¦output†¤bodyÚt§

What is the diameter and bisection width of $n$ computer nodes ?

Diameter is $2\log_2(n)$ and bisection width is 1.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�¼š(°persist_js_state·has_pluto_hook_features§cell_idÙ$e4d1de1d-d57a-48ab-ad7a-c09b427daa03¹depends_on_disabled_cells§runtimeÎF×µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$133f4c7d-33e0-4e13-b716-f538125436caЦqueued¤logs�§running¦output†¤bodyƒªattributes�¥styleÙ#display: flex; flex-direction: row;£tag£div¨children“’ƒªattributes�¥style±flex: 0 1 64.68%;£tag£div¨children‘’Úk

There can be $n$ simultaneous communications at the same time, provided that each input communicates with a different output. The figure on the right provides an example of such non-conflicting communications with the black dots indicating that the input of that row communicates to the corresponding output (case (a) of above figure). The switch at row 1 and column 2 is just propagating the input data horizontally and output data vertically (case (b) of above figure). The switch at row 0 and column 5 is receiving no data.

©text/htmlÙ,application/vnd.pluto.reactdomelement+object’ƒªattributes�¥style­flex: 0 0 2%;£tag£div¨children�Ù,application/vnd.pluto.reactdomelement+object’ƒªattributes�¥style±flex: 0 1 33.32%;£tag£div¨children‘’ÚV�©text/htmlÙ,application/vnd.pluto.reactdomelement+object¤mimeÙ,application/vnd.pluto.reactdomelement+object¬rootassigneeÀ²last_run_timestampËAÚ�r�麶°persist_js_state·has_pluto_hook_features§cell_idÙ$133f4c7d-33e0-4e13-b716-f538125436ca¹depends_on_disabled_cells§runtimeÎlÜéµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$3a50ca06-06e8-4a61-ade2-afbfc52ca655Цqueued¤logs�§running¦output†¤bodyÚ« ¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�rŽõy¯°persist_js_state·has_pluto_hook_features§cell_idÙ$3a50ca06-06e8-4a61-ade2-afbfc52ca655¹depends_on_disabled_cells§runtimeΕ®ñµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$6c1984f6-4e36-4637-b0da-c7dd8b0f9ff0Цqueued¤logs�§running¦output†¤body ¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ�r�Ξ°persist_js_state·has_pluto_hook_features§cell_idÙ$6c1984f6-4e36-4637-b0da-c7dd8b0f9ff0¹depends_on_disabled_cells§runtimeÎÈÛµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$de20bf96-7d33-4a78-8147-f0b7f8488e46Цqueued¤logs�§running¦output†¤bodyÚ e

Would it be more efficient to have a specialized implementation instead of combining existing collectives ?

Let the size of $x_i$ be $n/p$ bytes.

  1. MPI_Gather has complexity $\log_2(p)\alpha + \beta n$

  2. MPI_Bcast acts on the concatenation $x_:$ which has length $n$ bytes so the complexity is $\log_2(p) (\alpha + \beta n)$

In total, we have the complexity $\log_2(p) (\alpha + \beta n)$. Can we do better ?

Start exchanging between 1 and 2 and simultaneously exchanging between 3 and 4. The complexity is $\alpha + \beta n/4$.

procid1234
$x_1$$x_1$
$x_2$$x_2$
$x_3$$x_3$
$x_4$$x_4$

Next, we exchange between 1 and 3 and simultaneously between 2 and 4. The complexity is $\alpha + 2\beta n/4$. In total, we have complexity

$$\begin{align} \log_2(p) \alpha + \beta n(1 + 2 + 4 + \cdots + p/2)/p & = \log_2(p) \alpha + \beta n(p-1)/p\\ & \approx \log_2(p) \alpha + \beta n. \end{align}$$

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�rŽèÐ1°persist_js_state·has_pluto_hook_features§cell_idÙ$de20bf96-7d33-4a78-8147-f0b7f8488e46¹depends_on_disabled_cells§runtimeÎïåµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$51d70f9a-cd67-44b9-8fd1-5ab70b526c7aЦqueued¤logs�§running¦output†¤bodyÙJ

Launching a job

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�Ï'�°persist_js_state÷has_pluto_hook_features§cell_idÙ$51d70f9a-cd67-44b9-8fd1-5ab70b526c7a¹depends_on_disabled_cells§runtimeÎÓ¤µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$98392c40-6542-4a26-8552-c0960bbaa6a6Цqueued¤logs�§running¦output†¤bodyÚ&
¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�×Ïê°persist_js_state÷has_pluto_hook_features§cell_idÙ$98392c40-6542-4a26-8552-c0960bbaa6a6¹depends_on_disabled_cells§runtimeÎíXµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$39b055f5-3dbf-403c-b21e-210e3813d8b0Цqueued¤logs�§running¦output†¤bodyÛÓ¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�µ1‡°persist_js_state·has_pluto_hook_features§cell_idÙ$39b055f5-3dbf-403c-b21e-210e3813d8b0¹depends_on_disabled_cells§runtimeÎ ›µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$b0ca0392-71b8-4f44-8c6c-0978a02a0e6cЦqueued¤logs“ˆ¤lineÿ£msg’Ù”Compiling : `mpicc -O3 -I/home/runner/.julia/artifacts/207eb5b8330e24674fe59b50d72f4b3d946219c8/include /tmp/jl_BbghxG/main.c -o /tmp/jl_BbghxG/bin`ªtext/plain§cell_idÙ$b0ca0392-71b8-4f44-8c6c-0978a02a0e6c¦kwargs�¢id´SimpleClang_e77d60b3¤fileÙA/home/runner/.julia/packages/SimpleClang/N4VZY/src/SimpleClang.jl¥group«SimpleClang¥level¤Infoˆ¤lineÿ£msg’Ù+Running : `mpiexec -n 2 /tmp/jl_BbghxG/bin`ªtext/plain§cell_idÙ$b0ca0392-71b8-4f44-8c6c-0978a02a0e6c¦kwargs�¢id´SimpleClang_9f8d091b¤fileÙA/home/runner/.julia/packages/SimpleClang/N4VZY/src/SimpleClang.jl¥group«SimpleClang¥level¤Infoˆ¤lineÿ£msg’ÙbProcess 0/2 is running on node <> Process 1/2 is running on node <> ªtext/plain§cell_idÙ$b0ca0392-71b8-4f44-8c6c-0978a02a0e6c¦kwargs�¢id´PlutoRunner_d1acb81e¤fileÙP/home/runner/.julia/packages/Pluto/F6SNP/src/runner/PlutoRunner/src/io/stdout.jl¥group¦stdout¥level®LogLevel(-555)§running¦output†¤bodyÚX
  int name_length = MPI_MAX_PROCESSOR_NAME;
  char proc_name[name_length];
  MPI_Get_processor_name(proc_name,&name_length);
  printf("Process %d/%d is running on node <<%s>>\n",
	 procid,nprocs,proc_name);
¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�7¾¡°persist_js_state·has_pluto_hook_features§cell_idÙ$b0ca0392-71b8-4f44-8c6c-0978a02a0e6c¹depends_on_disabled_cells§runtimeÎ7˜!¸µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$26aa369f-e5c7-4fe5-8b6b-903f4f4e91baЦqueued¤logs‘ˆ¤lineÿ£msg’Ú~[1] I have received 1 B in 0.000004 sec [1] I have received 2 B in 0.000001 sec [1] I have received 4 B in 0.000000 sec [1] I have received 8 B in 0.000000 sec [1] I have received 16 B in 0.000002 sec [1] I have received 32 B in 0.000001 sec [1] I have received 64 B in 0.000000 sec [1] I have received 128 B in 0.000012 sec [1] I have received 256 B in 0.000000 sec [1] I have received 512 B in 0.000002 sec [1] I have received 1024 B in 0.000001 sec [1] I have received 2048 B in 0.000001 sec [1] I have received 4096 B in 0.000024 sec [1] I have received 8192 B in 0.000018 sec [1] I have received 16384 B in 0.000016 sec [1] I have received 32768 B in 0.000031 sec [1] I have received 65536 B in 0.000056 sec [1] I have received 131072 B in 0.000157 sec [1] I have received 262144 B in 0.000372 sec [1] I have received 524288 B in 0.000673 sec [1] I have received 1048576 B in 0.001165 sec ªtext/plain§cell_idÙ$26aa369f-e5c7-4fe5-8b6b-903f4f4e91ba¦kwargs�¢id´PlutoRunner_d1acb81e¤fileÙP/home/runner/.julia/packages/Pluto/F6SNP/src/runner/PlutoRunner/src/io/stdout.jl¥group¦stdout¥level®LogLevel(-555)§running¦output†¤bodyÚ.
  for(int size = 1; size <= (1<<20); size <<= 1){
    char* buf = malloc(size);
    if (procid == 0) {
      MPI_Barrier(MPI_COMM_WORLD);
      MPI_Send(buf, size, MPI_CHAR, procid + 1, 0, comm);
    }
    else {
      MPI_Irecv(buf, size, MPI_CHAR, procid - 1, 0, MPI_COMM_WORLD, &rqst);
      MPI_Barrier(MPI_COMM_WORLD);
      double tic = MPI_Wtime();
      MPI_Wait(&rqst, MPI_STATUS_IGNORE);
      double toc = MPI_Wtime();
      printf("[%d] I have received %d B in %f sec\n", procid, size, (toc-tic));
    }
  }
¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�›u.°persist_js_state·has_pluto_hook_features§cell_idÙ$26aa369f-e5c7-4fe5-8b6b-903f4f4e91ba¹depends_on_disabled_cells§runtimeÎ%…c µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$a103c5af-42fe-4f8c-b78c-6946895105d7Цqueued¤logs�§running¦output†¤bodyÚ7

num_processes = 2

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�rމå;°persist_js_state·has_pluto_hook_features§cell_idÙ$a103c5af-42fe-4f8c-b78c-6946895105d7¹depends_on_disabled_cells§runtimeΡIƒµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$d8bb1d43-bf42-4a09-bdeb-5db406ef1ccdЦqueued¤logs�§running¦output†¤bodyƒªattributes�¥styleÙ#display: flex; flex-direction: row;£tag£div¨children’’ƒªattributes�¥styleÙ!margin-right: 30px; flex-grow: 1;£tag£div¨children‘’Ú(
  • srun : Synchronous (blocked) job

[blegat@lm4-f001 ~]$ srun --time=1 pwd
srun: job 3491072 queued and waiting for resources
srun: job 3491072 has been allocated resources
/home/users/b/l/blegat
  • $ sbatch submit.sh : Asynchronous job, get status with

  • $ squeue --me

  • More details on the README

©text/htmlÙ,application/vnd.pluto.reactdomelement+object’ÚgÔ©text/html¤mimeÙ,application/vnd.pluto.reactdomelement+object¬rootassigneeÀ²last_run_timestampËAÚ�r�ª0j°persist_js_state·has_pluto_hook_features§cell_idÙ$d8bb1d43-bf42-4a09-bdeb-5db406ef1ccd¹depends_on_disabled_cells§runtimeα'›µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$82230d6c-25ce-4d12-8842-e0651fc4b143Цqueued¤logs�§running¦output†¤bodyÙp

Processor name identifies the node

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�¸xѰpersist_js_state÷has_pluto_hook_features§cell_idÙ$82230d6c-25ce-4d12-8842-e0651fc4b143¹depends_on_disabled_cells§runtimeÎ…صpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$fc43b343-79cd-4342-8d80-8ea72cf34942Цqueued¤logs�§running¦output†¤bodyƒªattributes�¥styleÙ#display: flex; flex-direction: row;£tag£div¨children“’Ú5

Before

procid1234
$x_1$
$x_2$
$x_3$
$x_4$
©text/html’ƒªattributes�¥style­margin: 50pt;£tag£div¨children‘’Ù1

©text/htmlÙ,application/vnd.pluto.reactdomelement+object’Ú4

After

procid1234
$x_1$
$x_2$
$x_3$
$x_4$
©text/html¤mimeÙ,application/vnd.pluto.reactdomelement+object¬rootassigneeÀ²last_run_timestampËAÚ�rŽæ²æ°persist_js_state·has_pluto_hook_features§cell_idÙ$fc43b343-79cd-4342-8d80-8ea72cf34942¹depends_on_disabled_cells§runtimeÎ�çµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$d2104fbd-ba22-4501-b03a-8809271d598bЦqueued¤logs�§running¦output†¤bodyÙX

Blocking communication

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�ËÍû°persist_js_state÷has_pluto_hook_features§cell_idÙ$d2104fbd-ba22-4501-b03a-8809271d598b¹depends_on_disabled_cells§runtimeΉ{µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$8a527c17-bf2b-4e6b-937f-ef3a269c5112Цqueued¤logs�§running¦output†¤bodyÛu]¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r��Ä"°persist_js_state·has_pluto_hook_features§cell_idÙ$8a527c17-bf2b-4e6b-937f-ef3a269c5112¹depends_on_disabled_cells§runtimeÎBµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$be0e3ba0-18cc-4b9a-a56d-2566f5148faeЦqueued¤logs�§running¦output†¤bodyÚ:±

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�¡�d°persist_js_state·has_pluto_hook_features§cell_idÙ$be0e3ba0-18cc-4b9a-a56d-2566f5148fae¹depends_on_disabled_cells§runtimeÎ͵published_object_keys�¸depends_on_skipped_cells§erroredÂÙ$2ff573a3-4a84-4497-9305-2d97e35e5e3dЦqueued¤logs�§running¦output†¤bodyÚ

Can MPI_Reduce_scatter be implemented by combining existing collectives ?

MPI_Reduce_scatter can be implemented by MPI_Reduce followed by MPI_Scatter

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�rŽë¿�°persist_js_state·has_pluto_hook_features§cell_idÙ$2ff573a3-4a84-4497-9305-2d97e35e5e3d¹depends_on_disabled_cells§runtimeÎÙÿµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$1b617828-e2b2-4a94-a120-59fa533d3e11Цqueued¤logs�§running¦output†¤bodyÚ

Bandwidth $\texttt{bw}(u, v)$ is the bandwidth of the cable if $(u, v) \in E$ or 0 otherwise. Given $S, T \subseteq V$ two disjoint subsets of nodes $S \cap T = \varnothing$,

$$\begin{align} \text{Width} &\qquad & w(S, T) & = |\{ (u, v) \in E \mid u \in S, v \in T \}|\\ \text{Bandwidth} & & \texttt{bw}(S, T) & = \sum_{u\in S, v\in T} \texttt{bw}(u,v) \end{align}$$

The width is exactly the number of edges between the two sets of nodes.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�ب‹°persist_js_state÷has_pluto_hook_features§cell_idÙ$1b617828-e2b2-4a94-a120-59fa533d3e11¹depends_on_disabled_cells§runtimeÎ]xµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$c3590376-06ed-45a4-af0b-2d46f1a387c8Цqueued¤logs�§running¦output†¤bodyƒªattributes�¥styleÙ#display: flex; flex-direction: row;£tag£div¨children’’ƒªattributes�¥style­flex-grow: 1;£tag£div¨children‘’Ù3

Free up memory.

©text/htmlÙ,application/vnd.pluto.reactdomelement+object’Ù_
MPI_Finalize();
©text/html¤mimeÙ,application/vnd.pluto.reactdomelement+object¬rootassigneeÀ²last_run_timestampËAÚ�rŽBðA°persist_js_state·has_pluto_hook_features§cell_idÙ$c3590376-06ed-45a4-af0b-2d46f1a387c8¹depends_on_disabled_cells§runtimeÎxýµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$35ba1eea-56ae-4b74-af96-21ec5a93c455Цqueued¤logs�§running¦output†¤bodyÙ’

You could simply add lmpi but using mpicc and mpic++ is easier.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�ÆlU°persist_js_state÷has_pluto_hook_features§cell_idÙ$35ba1eea-56ae-4b74-af96-21ec5a93c455¹depends_on_disabled_cells§runtimeÎqœµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$488b0c17-4f0f-43bf-a16c-b9faa7ae0595Цqueued¤logs�§running¦output†¤bodyÚ{ ¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�G*аpersist_js_state·has_pluto_hook_features§cell_idÙ$488b0c17-4f0f-43bf-a16c-b9faa7ae0595¹depends_on_disabled_cells§runtimeÍGеpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$10a1b3a7-21c7-4f97-93e1-006ad3aea40dЦqueued¤logs�§running¦output†¤bodyÙ>

Butterfly

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�ÛÚ°persist_js_state÷has_pluto_hook_features§cell_idÙ$10a1b3a7-21c7-4f97-93e1-006ad3aea40d¹depends_on_disabled_cells§runtime΋µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$b68eb860-a5b4-4e9e-9fbf-6eb6ce43ae69Цqueued¤logs�§running¦output†¤bodyÚvv

What is the bisection width of a $n \times n$ 2D array ?

It is $n = \sqrt{|V|}$:

What is the bisection width of a $n^d$ $d$D array ?

It is 1 for $d = 1$, $n$ for $d = 2$ and $n^2$ for $d = 3$. In general, it is $n^{d-1} = |V|^{(d-1)/d}$

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�·Û”°persist_js_state·has_pluto_hook_features§cell_idÙ$b68eb860-a5b4-4e9e-9fbf-6eb6ce43ae69¹depends_on_disabled_cells§runtimeÎGèõpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$3dc860be-016d-49ee-8535-7d9457c70f85Цqueued¤logs�§running¦output†¤bodyÚV

What is the graph diameter ?

$|V| - 1$ if $u$ and $v$ are extreme points of the array

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r� �ü°persist_js_state·has_pluto_hook_features§cell_idÙ$3dc860be-016d-49ee-8535-7d9457c70f85¹depends_on_disabled_cells§runtimeÎOÓµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$2e4dc3f9-a132-444f-a35d-f583823a7dfdЦqueued¤logs�§running¦output†¤bodyÚâ

What is the graph diameter of a $n \times n$ 2D array ?

It is $2(n-1)$, attained for opposite vertices of the square.

What is the graph diameter of a $n^d$ $d$D array ?

It is $d(n-1)$, attained for opposite vertices of the hypercube.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�97°persist_js_state·has_pluto_hook_features§cell_idÙ$2e4dc3f9-a132-444f-a35d-f583823a7dfd¹depends_on_disabled_cells§runtimeΟµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$8981b5e2-2497-478e-ab28-a14b62f6f916Цqueued¤logs‘ˆ¤lineÿ£msg’Ù’gcc -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -L/usr/lib/x86_64-linux-gnu/openmpi/lib -lmpi ªtext/plain§cell_idÙ$8981b5e2-2497-478e-ab28-a14b62f6f916¦kwargs�¢id´PlutoRunner_d1acb81e¤fileÙP/home/runner/.julia/packages/Pluto/F6SNP/src/runner/PlutoRunner/src/io/stdout.jl¥group¦stdout¥level®LogLevel(-555)§running¦output†¤bodyÙ:Process(`mpicc -show`, ProcessExited(0))¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ�rŽÇà˜°persist_js_state·has_pluto_hook_features§cell_idÙ$8981b5e2-2497-478e-ab28-a14b62f6f916¹depends_on_disabled_cells§runtimeÎãíšµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$34a10003-2c32-4332-b3e6-ce70eec0cbbeЦqueued¤logs�§running¦output†¤bodyÙ:

Example

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�Ì,0°persist_js_state÷has_pluto_hook_features§cell_idÙ$34a10003-2c32-4332-b3e6-ce70eec0cbbe¹depends_on_disabled_cells§runtimeÎô×µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$a0566fdb-a08d-4bcf-9b2f-ed211c9f111fЦqueued¤logs�§running¦output†¤bodyÚy ¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�;a°persist_js_state·has_pluto_hook_features§cell_idÙ$a0566fdb-a08d-4bcf-9b2f-ed211c9f111f¹depends_on_disabled_cells§runtimeÍL)µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$655e980d-b4e9-4f56-a5ae-380072242d27Цqueued¤logs�§running¦output†¤bodyƒªattributes�¥styleÙ#display: flex; flex-direction: row;£tag£div¨children’’ÚHˆ©text/html’Ú=8©text/html¤mimeÙ,application/vnd.pluto.reactdomelement+object¬rootassigneeÀ²last_run_timestampËAÚ�r�¼$°persist_js_state·has_pluto_hook_features§cell_idÙ$655e980d-b4e9-4f56-a5ae-380072242d27¹depends_on_disabled_cells§runtimeÎN[µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$4788d8b4-2efa-4489-80c3-71f405513644Цqueued¤logs�§running¦output†¤bodyÚ2

num_processes = 2

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�rŽììš°persist_js_state·has_pluto_hook_features§cell_idÙ$4788d8b4-2efa-4489-80c3-71f405513644¹depends_on_disabled_cells§runtimeÎõpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$233c13ff-f008-40b0-a6c5-c5395b2215ecЦqueued¤logs�§running¦output†¤bodyÚg

Lower bound complexity with $p$ processes if each $x_i$ has length $n/p$ bytes ?

Lower bound : $\log_2(p) \alpha$ using spanning tree algorithm and $\beta n$ as all messages need to be sent at least once.

First send $x_2$ from 2 to 1 and simultaneously send $x_4$ from 4 to 3. Complexity is $\alpha + \beta n/4$

procid1234
$x_1$
$x_2$$x_2$
$x_3$
$x_4$$x_4$

Then send $(x_3, x_4)$ from 3 to 1. Complexity is $\alpha + 2\beta n/4$

procid1234
$x_1$
$x_2$$x_2$
$x_3$$x_3$
$x_4$$x_4$$x_4$

In total, it is $2\alpha + 3\beta n/4$. In general, we have

$$\log_2(p)\alpha + \beta n(1 + 2 + 4 + \cdots + p/2)/p = \log_2(p)\alpha + \beta n(p - 1)/p \approx \log_2(p)\alpha + \beta n$$

What about having each node sending directly to 1 ?

procid1234
$x_1$
$x_2$$x_2$
$x_3$
$x_4$

Then

procid1234
$x_1$
$x_2$$x_2$
$x_3$$x_3$
$x_4$

Then

procid1234
$x_1$
$x_2$$x_2$
$x_3$$x_3$
$x_4$$x_4$

Here, we have $3\alpha + 3\beta n/4$. The coefficient is higher in front of $\alpha$. However, is the same in front of $\beta$. Indeed, even though the spanning tree above communicate more bytes through the network, as the communication from node 2 to node 1 and node 4 to node 3 are done in parallel, this isn't affecting the coefficient in front of $\beta$.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�rŽçd °persist_js_state·has_pluto_hook_features§cell_idÙ$233c13ff-f008-40b0-a6c5-c5395b2215ec¹depends_on_disabled_cells§runtimeÎBzµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$6fc34de1-469b-41a9-9677-ff3182f7a498Цqueued¤logs�§running¦output†¤bodyÚs

Can MPI_Allgather be implemented by combining existing collectives ?

MPI_Allgather can be implemented by MPI_Gather followed by MPI_Bcast

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�rŽè‚™°persist_js_state·has_pluto_hook_features§cell_idÙ$6fc34de1-469b-41a9-9677-ff3182f7a498¹depends_on_disabled_cells§runtimeÎŒ�µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$b53ec488-ff25-4647-ab00-fbf90963a795Цqueued¤logs�§running¦output†¤bodyÙº

blocking factor : Ratio between upper links and lower links. Ratio is 1 for fat-tree to prevent bottlenecks if all nodes start communicating.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�Úíš°persist_js_state÷has_pluto_hook_features§cell_idÙ$b53ec488-ff25-4647-ab00-fbf90963a795¹depends_on_disabled_cells§runtimeÎCoµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$c3c848ff-526a-450d-9b1c-5d9d3ccccf28Цqueued¤logs�§running¦output†¤bodyÙd

Eager vs rendezvous protocol

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�ÌX°persist_js_state÷has_pluto_hook_features§cell_idÙ$c3c848ff-526a-450d-9b1c-5d9d3ccccf28¹depends_on_disabled_cells§runtimeÎïÀµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$063f0acc-c023-46d0-9ed9-fbd7fbdcfa3bЦqueued¤logs�§running¦output†¤body ¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ�r�þ>O°persist_js_state·has_pluto_hook_features§cell_idÙ$063f0acc-c023-46d0-9ed9-fbd7fbdcfa3b¹depends_on_disabled_cells§runtimeÎL µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$4569aa05-9963-4976-ac63-caf3f3979e83Цqueued¤logs�§running¦output†¤bodyÚ

Blocking send/received with MPI_Send and MPI_Recv.

The network cannot buffer the whole message (unless it is short). The sender needs to wait for the receiver to be ready and then transfers its copy of the data.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�̰persist_js_state÷has_pluto_hook_features§cell_idÙ$4569aa05-9963-4976-ac63-caf3f3979e83¹depends_on_disabled_cells§runtimeÎ3çµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$7565e3da-84ce-42b6-8d4b-3615576f33b7Цqueued¤logs�§running¦output†¤bodyÙ%img (generic function with 3 methods)¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ�r�UÑ̰persist_js_state·has_pluto_hook_features§cell_idÙ$7565e3da-84ce-42b6-8d4b-3615576f33b7¹depends_on_disabled_cells§runtimeÎ0ÎÇ=µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$7fc70992-973a-43c6-904a-dd1b622a5ed8Цqueued¤logs�§running¦output†¤bodyÚDD

What is the bisection width ?

The bisection width is 1 :

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�ª¢Ó°persist_js_state·has_pluto_hook_features§cell_idÙ$7fc70992-973a-43c6-904a-dd1b622a5ed8¹depends_on_disabled_cells§runtimeÎØkµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$fa024a5d-52a6-459d-894d-13a60ec723d2Цqueued¤logs�§running¦output†¤bodyÚÈ

What are the differences with Min-Cut ?

In Min-Cut, we fix a node in $S$, a node in $V \setminus S$ and the cardinality of S is not constrained. These differences allow Min-Cut to be solvable in polynomial time.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r� õ°persist_js_state·has_pluto_hook_features§cell_idÙ$fa024a5d-52a6-459d-894d-13a60ec723d2¹depends_on_disabled_cells§runtime΋Vµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$f7f097cb-d7bd-49eb-a030-ac26f8f61a67Цqueued¤logs�§running¦output†¤bodyÚ°

Fat-tree needs large switches, the root one of previous slide had 8 links. This is as many links as the number of processes, that's not scalable. An alternative is butterfly network for which each switch uses at most 4 links. In the figures above, the boxes with P represent a process, the ones with M represent their local memory and the other ones are the routers.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�ÛLŒ°persist_js_state÷has_pluto_hook_features§cell_idÙ$f7f097cb-d7bd-49eb-a030-ac26f8f61a67¹depends_on_disabled_cells§runtimeÎÓÞµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$3a2bfd4e-0ce6-4a79-a578-fc1b4ef563c5Цqueued¤logs�§running¦output†¤bodyÚ

How to fix it ?

We should load gompi or at least OpenMPI:

[blegat@lm4-f001 examples]$ module load OpenMPI
[blegat@lm4-f001 examples]$ mpicc procname.c
[blegat@lm4-f001 examples]$ mpiexec -n 4 a.out
Process 1/4 is running on node <<lm4-f001>>
Process 3/4 is running on node <<lm4-f001>>
Process 0/4 is running on node <<lm4-f001>>
Process 2/4 is running on node <<lm4-f001>>

Why are they all on same node ?

We are on the login node, we need to run jobs on the compute nodes using Slurm !

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�ç°persist_js_state·has_pluto_hook_features§cell_idÙ$3a2bfd4e-0ce6-4a79-a578-fc1b4ef563c5¹depends_on_disabled_cells§runtimeÎ D©µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$a79c410a-bebf-434c-9730-568e0ff4f4c7Цqueued¤logs�§running¦output†¤bodyÙ¨

Consortium des Équipements de Calcul Intensif (CÉCI)

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�Îôù°persist_js_state÷has_pluto_hook_features§cell_idÙ$a79c410a-bebf-434c-9730-568e0ff4f4c7¹depends_on_disabled_cells§runtimeÎÖ§µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$7cf59087-efca-4f03-90dc-f2acefdcbc8aЦqueued¤logs�§running¦output†¤bodyÙL

Let's try it

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�Ëj°persist_js_state÷has_pluto_hook_features§cell_idÙ$7cf59087-efca-4f03-90dc-f2acefdcbc8a¹depends_on_disabled_cells§runtimeÎçöµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$5d72bf87-7f3a-4229-9d7a-2e63c115087dЦqueued¤logs�§running¦output†¤bodyÚ?

Lower bound complexity with $p$ processes if $x$ has length $n$ bytes ?

Lower bound : $\log_2(p) (\alpha + \beta n)$ using spanning tree algorithm:

After first communication (1 → 3):

procid1234
$x$$x$

After second communication (1 → 2 and 3 → 4 at the same time):

procid1234
$x$$x$$x$$x$

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�rŽæLw°persist_js_state·has_pluto_hook_features§cell_idÙ$5d72bf87-7f3a-4229-9d7a-2e63c115087d¹depends_on_disabled_cells§runtimeÎüJµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$e796b093-9c1d-4656-9acb-918de53f7e4dЦqueued¤logs�§running¦output†¤bodyÙ<

Crossbar

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�Ú)Z°persist_js_state÷has_pluto_hook_features§cell_idÙ$e796b093-9c1d-4656-9acb-918de53f7e4d¹depends_on_disabled_cells§runtimeέֵpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$954f1ab1-1e2f-458b-96d7-a1746631fac7Цqueued¤logs�§running¦output†¤body ¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ�r�=o—°persist_js_state·has_pluto_hook_features§cell_idÙ$954f1ab1-1e2f-458b-96d7-a1746631fac7¹depends_on_disabled_cells§runtimeÎÜJKµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$a771f33f-7ed1-41aa-bee0-c215729a8c8dЦqueued¤logs�§running¦output†¤bodyÙP

Distributed vector

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�Ë?°persist_js_state÷has_pluto_hook_features§cell_idÙ$a771f33f-7ed1-41aa-bee0-c215729a8c8d¹depends_on_disabled_cells§runtimeÎúHµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$8da580fe-6b56-4d8f-ad43-aed7b728a06eЦqueued¤logs�§running¦output†¤bodyÚ4
  • Worst case pairwise communication of two groups $S$ and $V \setminus S$ of almost ($\pm 1$) equal size.

  • NP-hard to compute for general graphs.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�Øìx°persist_js_state÷has_pluto_hook_features§cell_idÙ$8da580fe-6b56-4d8f-ad43-aed7b728a06e¹depends_on_disabled_cells§runtimeÎ Cµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$39f48c25-6efb-4ff2-aedc-9d3e722dad24Цqueued¤logs�§running¦output†¤bodyÚ°
  • Follow README instructions to create an account and setup your computer

    • Don't wait the last minute, if you get into trouble it's easier to get this setup before you actually need it

  • Select cluster from the list + manneback for GPU. You only have access to Tier-2 clusters. This sadly leaves out:

    • Tier-1 clusters such as Lucia

    • Tier-0 cluster such as from

  • Connect with SSH using ssh lemaitre4 or ssh manneback.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�žÔ°persist_js_state·has_pluto_hook_features§cell_idÙ$39f48c25-6efb-4ff2-aedc-9d3e722dad24¹depends_on_disabled_cells§runtimeÎäyµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$e119c2d3-1e24-464f-b812-62f28c00a913Цqueued¤logs�§running¦output†¤bodyÙH

Reduce scatter

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�ʾ'°persist_js_state÷has_pluto_hook_features§cell_idÙ$e119c2d3-1e24-464f-b812-62f28c00a913¹depends_on_disabled_cells§runtimeÎÒpµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$a258eec9-f4f6-49bd-8470-8541836f5f6bЦqueued¤logs�§running¦output†¤bodyƒªattributes�¥styleÙ#display: flex; flex-direction: row;£tag£div¨children“’Ú5

Before

procid1234
$x_1$
$x_2$
$x_3$
$x_4$
©text/html’ƒªattributes�¥style­margin: 50pt;£tag£div¨children‘’Ù1

©text/htmlÙ,application/vnd.pluto.reactdomelement+object’Ú·

After MPI_Allgather

procid1234
$x_1$$x_1$$x_1$$x_1$
$x_2$$x_2$$x_2$$x_2$
$x_3$$x_3$$x_3$$x_3$
$x_4$$x_4$$x_4$$x_4$
©text/html¤mimeÙ,application/vnd.pluto.reactdomelement+object¬rootassigneeÀ²last_run_timestampËAÚ�rŽèX`°persist_js_state·has_pluto_hook_features§cell_idÙ$a258eec9-f4f6-49bd-8470-8541836f5f6b¹depends_on_disabled_cells§runtimeÎ(”µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$79b405a5-54b5-4727-a0cd-b79522ad109fЦqueued¤logs�§running¦output†¤bodyÙH

Point-to-point

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�Ë¡ù°persist_js_state÷has_pluto_hook_features§cell_idÙ$79b405a5-54b5-4727-a0cd-b79522ad109f¹depends_on_disabled_cells§runtimeÎIÿµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$93f0c63c-b597-4f89-809c-7af0476f319aЦqueued¤logs�§running¦output†¤bodyÙö

MPI_Isend and MPI_Irecv where I stands for immediate or incomplete. MPI_Wait can be used to wait for the send and receive to finish.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�ÎŒX°persist_js_state÷has_pluto_hook_features§cell_idÙ$93f0c63c-b597-4f89-809c-7af0476f319a¹depends_on_disabled_cells§runtimeÎ6͵published_object_keys�¸depends_on_skipped_cells§erroredÂÙ$944d827e-bc6a-4de8-b959-5fde8790bedcЦqueued¤logs�§running¦output†¤bodyÙü
[laptop]$ ssh lemaitre4
[blegat@lm4-f001 ~]$ cd LINMA2710/examples
[blegat@lm4-f001 examples]$ mpicc procname.c
-bash: mpicc: command not found
¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�ÔAÿ°persist_js_state÷has_pluto_hook_features§cell_idÙ$944d827e-bc6a-4de8-b959-5fde8790bedc¹depends_on_disabled_cells§runtimeÎ {µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$c04bcc96-e5fe-4d6e-a12e-40dcde58c62eЦqueued¤logs�§running¦output†¤bodyÛî
  • MPI is an open standard for distributed computing

  • Many implementations:

    • MPICH, from and

    • Open MPI (not to be confused with )

    • commercial implementations from , , , and

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�O3°persist_js_state·has_pluto_hook_features§cell_idÙ$c04bcc96-e5fe-4d6e-a12e-40dcde58c62e¹depends_on_disabled_cells§runtimeÎÈ©µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$c420ad25-6af1-4fb4-823a-b6bbd4e10f7fЦqueued¤logs�§running¦output†¤bodyƒªattributes�¥styleÙ#display: flex; flex-direction: row;£tag£div¨children“’ÚÁ

Before

procid1234
$x_1$$x_2$$x_3$$x_4$
©text/html’ƒªattributes�¥style­margin: 50pt;£tag£div¨children‘’Ù1

©text/htmlÙ,application/vnd.pluto.reactdomelement+object’Ú„

After

procid1234
$x_1 + x_2 + x_3 + x_4$
©text/html¤mimeÙ,application/vnd.pluto.reactdomelement+object¬rootassigneeÀ²last_run_timestampËAÚ�rŽç¯ °persist_js_state·has_pluto_hook_features§cell_idÙ$c420ad25-6af1-4fb4-823a-b6bbd4e10f7f¹depends_on_disabled_cells§runtimeÎ Tµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$a6c337c4-0c81-4463-ad4f-9a4528d953abЦqueued¤logs�§running¦output†¤bodyÙz

Message Passing Interface (MPI)

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�·ÿÁ°persist_js_state÷has_pluto_hook_features§cell_idÙ$a6c337c4-0c81-4463-ad4f-9a4528d953ab¹depends_on_disabled_cells§runtimeÎVµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$921b5a18-0733-4032-a543-9d60e254b1b2Цqueued¤logs�§running¦output†¤bodyÚ´
  • Specializing on topology is important for communication libraries like MPI/NCCL. For instance, Deepseek-V3 by-passed NCCL and used PTX directly to hardcode how their hardware should be used.

  • Specified in Slurm's topology.conf file.

  • Source : [Eij10; Section 2.7]

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�T;°persist_js_state·has_pluto_hook_features§cell_idÙ$921b5a18-0733-4032-a543-9d60e254b1b2¹depends_on_disabled_cells§runtimeÎ çµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$2257220c-6f0e-4edf-9fea-7e388b84df9bЦqueued¤logs�§running¦output†¤bodyÙl

Multidimensional array and torus

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�Ù�½°persist_js_state÷has_pluto_hook_features§cell_idÙ$2257220c-6f0e-4edf-9fea-7e388b84df9b¹depends_on_disabled_cells§runtimeΨoµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$c45ff9b5-35d9-4a9d-a801-c762333a1f02Цqueued¤logs�§running¦output†¤body ¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ�r�ê=Ù°persist_js_state·has_pluto_hook_features§cell_idÙ$c45ff9b5-35d9-4a9d-a801-c762333a1f02¹depends_on_disabled_cells§runtimeÎRMµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$4aac6ab5-053a-4f60-9e2e-e8d61ff0cecbЦqueued¤logs�§running¦output†¤bodyÛ³7¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�¾WT°persist_js_state·has_pluto_hook_features§cell_idÙ$4aac6ab5-053a-4f60-9e2e-e8d61ff0cecb¹depends_on_disabled_cells§runtimeÎ ïĵpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$61af27f1-9f83-42f1-a419-06d12ea62133Цqueued¤logs�§running¦output†¤bodyÚ{ ¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�

Each process runs the same executable. So how can we make them do different things ?

Even if the code is the same, MPI_Comm_rank will give different procid so the part of the program depending on the value of procid will differ.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�rŽJl‹°persist_js_state·has_pluto_hook_features§cell_idÙ$52d428d5-cb33-4f2a-89eb-3a8ce3f5bb81¹depends_on_disabled_cells§runtimeÎÀàÙµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$d7e31ced-4eb2-4221-b83f-462e8f32fe89Цqueued¤logs�§running¦output†¤bodyÚ[ ¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�rŽò °persist_js_state·has_pluto_hook_features§cell_idÙ$d7e31ced-4eb2-4221-b83f-462e8f32fe89¹depends_on_disabled_cells§runtimeÎ L̵published_object_keys�¸depends_on_skipped_cells§erroredÂÙ$2c84bd84-b54d-4594-b9f8-35db2124d7e8Цqueued¤logs�§running¦output†¤bodyÙ>

Hypercube

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�ÙÈÚ°persist_js_state÷has_pluto_hook_features§cell_idÙ$2c84bd84-b54d-4594-b9f8-35db2124d7e8¹depends_on_disabled_cells§runtimeÎ!ðµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$32f740e7-9338-4c42-8eaf-ce8022412c50Цqueued¤logs�§running¦output†¤bodyÙ^

Nonblocking communication

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�ÎS°persist_js_state÷has_pluto_hook_features§cell_idÙ$32f740e7-9338-4c42-8eaf-ce8022412c50¹depends_on_disabled_cells§runtimeÎ9yµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$db16e939-b490-497b-a03f-80ce2e8485afЦqueued¤logs�§running¦output†¤bodyÚ"

Lower bound complexity with $p$ processes if each $x_i$ has length $n$ bytes and the arithmetic complexity is $\gamma$ ?

Lower bound : $\log_2(p) (\alpha + \beta n) + \log_2(p) \gamma n$ using spanning tree algorithm:

First communication (2 → 1 and 4 → 3 at the same time):

procid1234
$x_1 + x_2$$x_3 + x_4$

Then second communication (3 → 1)

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�rŽçè÷°persist_js_state·has_pluto_hook_features§cell_idÙ$db16e939-b490-497b-a03f-80ce2e8485af¹depends_on_disabled_cells§runtimeÎ âµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$7d37fbea-baa3-43ec-b003-a4707017a4cfЦqueued¤logs�§running¦output†¤bodyÙ6

Rings

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�ÙZ°persist_js_state÷has_pluto_hook_features§cell_idÙ$7d37fbea-baa3-43ec-b003-a4707017a4cf¹depends_on_disabled_cells§runtimeÎW0µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$568057f5-b0b8-4225-8e4b-5eec911a52efЦqueued¤logs�§running¦output†¤bodyÙ:

Example

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�ÎÁ°persist_js_state÷has_pluto_hook_features§cell_idÙ$568057f5-b0b8-4225-8e4b-5eec911a52ef¹depends_on_disabled_cells§runtimeÎtlµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$370f0f20-e373-4028-bca1-83e93678cbcbЦqueued¤logs�§running¦output†¤bodyÛ%0¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�Ž™¿°persist_js_state·has_pluto_hook_features§cell_idÙ$370f0f20-e373-4028-bca1-83e93678cbcb¹depends_on_disabled_cells§runtimeÎ ©:µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$1bac238f-79c8-4f9f-a187-bacb288de3b0Цqueued¤logs�§running¦output†¤bodyȉPNG  IHDR€ðBœbKGDÿÿÿ ½§“ÉIDATxœíÝX•õýÇñÏAPAд"ÉDˆ  áR�ü�N6¹Šº¶6­ØÅÜ¥‘žË‰ÚšH2”‹9EAJ�»ÀëëŸÂl[Š%?Äi¡5 1£"&‚?„ûûǽ1¾ü<À9çsŸû<ÑápóÆ»/Î}îûsEÀºd€=¢€�€@  (`$ €�€@  (`$ €�€@  (`$ €�€@  (`$ €�€@  (`$ €�€@  (`$ €�€@  (`$ €�€@  (`$p”=€~+++ËËË;wîœ"000&&fæÌ™²‡Ð?EQdÏÀT---ñññûöíë˜\ƒÁðâ‹/fff:99Iœ @¿ð °%ñññ{÷îuqqIHHX´h‘âÈ‘#»wïÎÉÉBìÙ³Gö€LÅ+`Àf”••…„„8;;Íš5«ýñÒÒÒ 455•••͘1Câ„LÇIX€ÍÈËËS%!!¡cû !‚ƒƒW¯^­(Jnn®¬Ùô ØŒóçÏ !Ô#Ï�¨ªO`(`ÀÆð¶ 0`3¦M›&„xï½÷º~êÈ‘#BˆÀÀ@kÏ` 8 °êIXNNN~øapppûãŸ|òIXXؽ{÷8 ZÀuê&¢€ÐÖÖvøðá-[¶”—— !œ��W¯^!„x÷Ýw³²²ššš„���k×®]¶lÙ�!C$O »Äuêý£Ð°æææÜÜ\???5°¡¡¡ƒ¡cŠ ÃìÙ³=<<ÔÿôóóËÍÍmnn–=;ìΊ+„...6l(*****JJJrvvBÄÅÅ™²…ŒŒ ŸiÓ¦�8q¢§§]¿~Ý××WQ”[·negg÷ô´šššÇ{l?ˆuPÀ€Fݽ{777×ÇÇG­UOOÏ�;wÞ¾}[Q”òòò„„„°°°ùóç'$$œ^RRâììl0ÊËË{ßBEEÅäÉ“Eùî»ï®\¹ÒÓ3ïÝ»WQQ¡(Jmm­¿¿OO£€ôOccãÎ�;Ç�§V©··÷믿nâ+ÚÖÖÖ7ß|sêÔ©ê׺»»'''×××[zf`ÕªUBˆ 6týTRR’">>¾÷->|xöìÙmmmí�¤§§gff*вfÍš (Šòþûï/[¶¬ýðêÕ«]\\ÂÂÂ~÷»ß)Šòæ›oþâ¿P¥¦¦& `ùòå¾¾¾wîÜ1ß�k0 !7nÜØ¶mÛý÷߯Ög```nnî½{÷ú»�ÖÖÖ·ß~»}½Ž‘#G®_¿¾®®Î3ª°°0!DQQQ×O=zT1þüÞ·pûöíY³fMž<ù¥—^:v옢(üñ/ùKEQæÌ™3sæÌæææÍ›7¿öÚkíÜñð¥K—¼¼¼jjjEQÿo¯©©2dˆzˆ(***??ߌ?ïàq  µµµ›7oöôôܰaC]]ÝìÙ³ß~ûí3gÎÄÄÄ àŒ*‡§Ÿ~º´´ôĉ .lhhHOO÷ôôLLLüæ›o,1? Rqb¯³³sIII^^Þøñ㣣£÷ìÙ3cÆŒ“'O6666,44ôäÉ“'Nœ˜;wn·_þÁ<ýôÓcÇŽBŒ3F}pÒ¤I�?þ¸"$$¤ªªjÀ³Y HV]]�˜˜øÈ#�¤¤¤Ô×׫Õ[\\üôÓOw:ÙjæÌ™óþûïŸ8q"22òÖ­[»víòòòЉ‰ù׿þe–á�vf¹NÝ`0oܸ1;;»  ÀÉÉÉÓÓó/ùËO<1wîÜ¢¢¢K—.M™2¥Û¯U¥kd†®~0dÈ�{÷îõë'²4 �æòåˉ‰‰“'OÞµk×�;w"##KJJÔê5ï7š3gÎ;ï¼súôéèèèÖÖÖƒN�:5&&¦²²Ò¼ßö,&&Æ`0ìÞ½»´´´ããŸ|òIVV–Á`ˆ‰‰é} .\¨¨¨B(ŠRZZêéé)„˜;wîÿøÇyóæÍ�;÷µ×^ êØ²®®®���êÇóçÏûí·kjj„µµµæýé,Bò!pÀ.}úé§ÑÑÑê±e‡ÈÈHõ”N+8þ|tt´££cû·.++³Î·†îÅÅÅ !œ��“’’Ž;vìØ±ßþö·êkÐ>ÏÀRåüùóaaažžž�>úhddä7ß|£(ÊßÿþwGGÇ›7o*Šâãã³}ûv¥ÃeHŠ¢üæ7¿ñ÷÷_³f�¢(o¼ñ†¿¿¿¿¿¿úÎqdz srr¶lÙb™Ÿ{€(`Àª***/^¬þ ?tèÐèèè‹/ZŒ¯¾ú*!!A½@SþÑGY èLsss\\\×ëÔããã[ZZdO§9¬„XIqqqzzzaa¡bĈË—/_·nÝøñã%ŽôÝwßåääìØ±£¡¡A1{öìõë×›ý8ìÍÉ“'ûÌCö~a³ÈÈÈØ±cGïÏÑÃ_è€õUUUµ/àÜÐÐþñÇ[bIíP׳o3®?êRšÿ¬¶”&´lݺu=uÍúõëûüòŠŠ ooïÖÖÖN�ïÝ»7 ÀßßóæÍŠ¢ÔÔÔøûûÇÆÆN™2eÉ’%Ç�öòòRï`XSSãããóâ‹/.^¼øÙgŸmll¬¬¬ S7µuëÖ;vtº‹pAAÁÌ™3§OŸÕÔÔTSSãçç÷ÒK/-Z´H½¹¡ºY__ß5kÖüìg?{òÉ'Õ[ wLQ”?ýéO~~~ .ŒŠŠR_wÚxÇŸ‹LuæÌ™öœ�œœ¢££+++e%Ó¥K—† &„0 êÍ$d™æÍ›×S÷y3`EQrss/^ÜéÁ .øøøÔ××755…„„üóŸÿTïò{æÌ™¶¶¶ <÷Üs­­­%%%jËÖÔÔ888¨+¼nÛ¶-%%¥kw¼‹ðW_}¦Vã¦M›vïÞ­nÿÂ… Ǩ©©:tèW_}¥(ÊêÕ«óóó»VYYéëëÛØØxóæM??¿;vtÝxÇmrè›zlyúôétttŒŽŽþüóÏóòòüüüd�&Ó£�>š™™ùÅ_¨ËJ†„„¨Gªe�9M¥ËyÁÅÅÅ‘‘‘£F�6lØóÏ?ÿᇠ!|||{ì1ƒÁô“ŸüÄÁÁaúôéí·û}ôÑG'Ož,„xê©§Nœ8Ñûw<~üxUUÕ¢E‹æÏŸÿÞ{ï]»vMáíííëëÛ陓&Mzä‘G„~~~UUU]Squu1bijÏ>ÛÓÆÛQÀ@oŠ‹‹ÃÃÃçÎ�[XX¨žytùòå¼¼¼I“&ÉM+&Nœ˜™™YUU•œœ|ß}÷}ôÑGÏ<óŒZÃ]™Bß‚ƒƒ{úTHHHŸ_îïïêÔ)SÞvU�»!Ô�Úo÷ÛÒÒÒñGGÇöm677wÚ”¢(Ç�?~üxiiéÖ­[…í÷)éÈÉÉ©ý›ötkáöç¨t»ñv0Ð�¶¶¶wÞygÖ¬YsçÎ=zôèÈ‘#ׯ_åÊ•ÌÌ̇~XötZôàƒnÞ¼ùÊ•+Û¶m»ÿþûÕ ÊËËkmm•=¬$>>ÞÕÕµëãnnnñññ}~ùã�?îííýòË/«5ùñÇ¿óÎ;sæÌ9|øð�7îÞ½{èС°°°>·såÊ•ââb!D^^Þ¼yó<<<¾þúëÖÖÖ¶¶¶¢¢"ÑÝ]„Õ³½êëë/]ºdâÛu°9sæ;vLýFÿøÇ?úÜ8 ü?mmmÏ<óLyy¹»»{rrruuõ¶mÛÆŒ#{:­kÿKeçÎ�ãÆ�ûôÓOõ«_ùúúîÝ»·ýE tl„ �:ØÍÍ­  `ܸq¦l!??ÿÚµk&LðôôüÃþ0yòd__ßµk׆††EDD,\¸°Ï�äææ>öØc—/_6�#FŒˆ‹‹›?~TT”úôðáÃúÓŸ�F//¯œœœŸÿüçS§N 3ñlm!D×ÁüüüžþùE‹EGGOœ8QÑûÆYˆø�æææC‡¥¦¦~ùå—BOOO£Ñ¸bÅŠnF¡Oü{Ú­«W¯fgg«+·„††ÆÇǛؾfñí·ßFDDœ9sÆjßqÀ(`à?7ÊÈÈh?ÿ")))66¶ýí X[[Û[o½•œœ\YY)„pww�‹‹3�£F�’=ô‰lCCCCNNNFFF]]�"00píڵ˖-S¯5‚¹¨ËJ§¦¦–•• !FŽ—””ÄQ}Ø3 vª¶¶6;;;33³¾¾^1{öìõë×GFFþ: ô¢¸¸xóæÍG�B¸ººþú׿^¿~=çµÁ>QÀ°;ÕÕÕÛ·oß¿ÿíÛ·Å«WÇKHjPqqqzzúáÇE:tèsÏ=·iÓ&®ì‚½¡€aG._¾œ™™ùúë¯ß½{×`0<õÔS¯¼òJ/W.¢Ξ=»}ûö¿þõ¯­­­NNNÏ?ÿüÆ�§L™"{.ÀJ(`Ø…sçÎedd¨¿ëž|òÉ”””ýèG²ç‚øì³ÏÒÓÓóóóïÝ»§îšM›6Íœ9Sö\€ÅQÀйS§NmÛ¶íoû[ûÑÎW^yE]¦ÚQUUµcÇŽ}ûöݹsGž’’òÄOÈž ° º¥¾ÑXXX(„1bÄòåË×­[7~üxÙs¡Gß}÷]NNÎŽ;oÏCï(`è�¢(………iiiê:nnn±±±7n;v¬ìÑ`’~ø!++k×®]ׯ_B�ƨ¨(VPÀÐõbÓ”””ŠŠ !Ä<°jÕªÄÄÄÑ£GË ýÖØØxàÀ�ôôôšš!D@@Àºuë–.]ªÞ„Ð zÐÒÒ’ŸŸŸ––vñâE!ÄC=d4Õ{nË ƒr÷îÝÜÜÜÔÔTu]//¯ÄÄÄ•+W>\öhÀ`QÀ°mü‚¶ü�]¢€a«8Diox‹:CÃöp’Ž=ëö$» 6xxxÈ è ¶„ËTÐŽËÌ`ë(`Øu¡†½{÷655 !ÂÃÃ_}õÕÐÐPÙsA²Ó§Ooݺ•…V`‹(`h]×¥ “““g̘!{.hK�ÂQÀЮ®‹õ¿üòË~~~²ç‚Fq³ Ø ZÔñvuÆ [²d ·«ƒ‰¸Ý$l má†í0‹ÚÚÚìììÌÌÌúúzñߎŒŒ4 ²Gþƒ†&¨—xnÙ²¥¼¼\1räȸ¸¸¤¤¤1cÆÈ 6¬¡¡!'''##£®®N¸víÚeË– 2Döh ÙÚÚÚÞzë­äääÊÊJ!„»»{\\œÑh5j”ìÑ ·nÝÚ¿FFƵkׄÞÞÞIII±±±NNN²Gƒ]£€!Mssó¡C‡RSS¿üòK!„§§§Ñh\±b…³³³ìÑ Cüÿ­¡€!¯H G\ 0¬Š÷ä œs- €a%œ• â¬{HDÃâ¸.×ñºsu=K®;‡PÀ° V&‚ aå5X ‹`m^ب®k�oÚ´iæÌ™²ç‚QÀ0³S§NmÛ¶�»ÓÀ¦©wßÚ·oß�;w„ááá)))O<ñ„ì¹ +0̆û³Bg¸ÿ4,ŠÆ`)ŠRXX˜––VRR"„pss‹��ݸqãØ±ce�˜Á?ü�••µk×®ëׯ !‚‚‚ŒFcTT”ƒƒƒìÑ`Û(` œz1eJJJEE…â�XµjUbbâèÑ£e�˜Yccã�ÒÓÓkjj„ëÖ­[ºt©£££ìÑ`«(` DKKK~~~ZZÚÅ‹…=ô�Ñh\½zµ‹‹‹ìÑ º{÷nnnnjjêÕ«W…^^^‰‰‰+W®>|¸ìÑ`{(`ô¿€þ…YPÀ0‡à€Žx ƒD£oœ„ô¤Û“7lØàáá!{4hŒÞp`".ÃCQÀ螺ÁÞ½{›šš„áá᯾újhh¨ì¹M;}úôÖ­[Yˆ¦ €ÑY×¥ø’““g̘!{.Àf°+LAãXŒ0#nF‚ÞQÀâÿߎmذaK–,ávl€Yp;Nô„¶wÜ�°‚ÚÚÚìììÌÌÌúúzñߎŒŒ4 ²Gƒ4°�R/aܲeKyy¹bäÈ‘qqqIIIcÆŒ‘= [ 999uuuBˆÀÀÀµk×.[¶lÈ�!²Gƒ°Ýikk{ë­·’““+++…îîîqqqF£qÔ¨Q²Gì­[·öïߟ‘‘qíÚ5!„··wRRRll¬“““ìÑ`U°>•••ååå�;wN3sæÌæææC‡¥¦¦~ùå—BOOO£Ñ¸bÅ gggÙóv§—Y°`Asssyyùã�?.qB=!¿ö†Ö•ï¿ÿ~Ê”)ÿþ÷¿‡ –˜˜!„x÷ÝwwïÞ}÷îÝûï¿ÿóÏ?www—=&€n�_{CëGmmíÂ… Ï�;wß}÷ݸq£Ó…ücÆŒ©««óóó;v옇‡‡Ä9tE~í¬íéõóó+**úúë¯òk.äwð(àþ!½æE†aMä×¼Èï QÀý@z-� Ã:ȯ%�ßÁ €MEz-‡ ÃÒȯå�ߣ€MBz-� Ãrȯ¥‘ß�¡€ûFz­ƒ Ãȯu�ß €û@z­‰ üȯ5‘ßþ¢€{Cz­� Ã\ȯõ‘ß~¡€{Dze!Ã<ò+ ù5Ü=Ò+Æ`�_¹È¯‰(àn�^- Ãò«ä×pg¤W;È0ú‹üjùíüÿ�^­!Ã0ùÕòÛ; øH¯6‘a˜‚üjùíü¤WËÈ0zG~µŒüö„‚ôÚ2Œž�_í#¿Ý¢€I¯Í ÃèŠüÚ òÛ•½0éµ-d‘_ÛB~;±ë&½¶ˆ CE~mùíÈ~ ˜ôÚ.2 òk»Èo;ƒ¢(²g°†êêꬬ¬ÒÒR!DHHÈ /¼CzmZÇ_Á|óÍ7Û÷o||ü„ d³!¿úC~…�ð»ï¾»dÉ’[·nµ?ââââèè8qâÄ£G�º»»Kœ ƒñý÷ß/\¸°ººº¥¥åÎ�;í�»ººDDDHœ æB~õŠüê¿€«««§N�Ú1½*—âââéÓ§K™ ærúôéÙ³gwL¯ÊÕÕõóÏ?·“¿£uŒüê›�çWÿïgeeuM¯âöíÛo¼ñ†õç�yåççwM¯âæÍ›ÙÙÙÖŸæE~õÍÎó«ÿVßWèï§`+Ø¿úÆþÕ7;ß¿ú/`ƒÁ {XûWߨ¿úfçûWÿÜÓ§BBB¬9 ,�ý«oì_}³óý«ÿ“°®^½:uêÔ›7ovzÜÍÍ­²²rܸqR¦‚¹°õ�ý«ov¾õÿ x„ ®®®tss+((ÐýÞµì_}cÿê›�ï_ý¿V]½z5;;»¤¤Do{×~°õ�ý«ov»í¥€Ðý‚@ƒ(`$ €�€@  (`$ €�€@  (`$ €�€@  (`$ €�€@  (`$ €�€@  (`$ €�€@  (`$ €�€@  (`$ €�€@  (`$ø?'I@>01D1IEND®B`‚¤mime©image/png¬rootassigneeÀ²last_run_timestampËAÚ�r�Eæm°persist_js_state·has_pluto_hook_features§cell_idÙ$1bac238f-79c8-4f9f-a187-bacb288de3b0¹depends_on_disabled_cells§runtimeÎ15µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$40606ee3-38cc-4123-9b86-b774bf89e499Цqueued¤logs�§running¦output†¤bodyÙB

Collectives

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�ƌڰpersist_js_state÷has_pluto_hook_features§cell_idÙ$40606ee3-38cc-4123-9b86-b774bf89e499¹depends_on_disabled_cells§runtimeΙLµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$8df4ff2f-d176-4b4e-a525-665b5d07ea52Цqueued¤logs�§running¦output†¤body ¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ�rŒWõ™°persist_js_state·has_pluto_hook_features§cell_idÙ$8df4ff2f-d176-4b4e-a525-665b5d07ea52¹depends_on_disabled_cells§runtimeÎ!"Ü|µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$23bfbe95-7ba2-41b9-bd8b-dc4baa3ad53aЦqueued¤logs�§running¦output†¤bodyÚzÇ

What is the bisection width ?

The bisection width is 2:

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�ªÑÙ°persist_js_state·has_pluto_hook_features§cell_idÙ$23bfbe95-7ba2-41b9-bd8b-dc4baa3ad53a¹depends_on_disabled_cells§runtimeÎ)«µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$49b596b8-891d-4f3f-a6a4-a62cc8237df3Цqueued¤logs�§running¦output†¤bodyÙû

Def: Graph diameter

Graph diameter is $d(G) := \max_{u, v \in V} d(G, u, v)$

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�ªK°persist_js_state·has_pluto_hook_features§cell_idÙ$49b596b8-891d-4f3f-a6a4-a62cc8237df3¹depends_on_disabled_cells§runtimeΖ&Hµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$cf799c26-1cea-4b38-9a15-8497813bd668Цqueued¤logs�§running¦output†¤bodyÙ@

MPI basics

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�¸-¡°persist_js_state÷has_pluto_hook_features§cell_idÙ$cf799c26-1cea-4b38-9a15-8497813bd668¹depends_on_disabled_cells§runtimeίtµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$70e88569-cd5c-40e8-9198-6bf6578fb0a2Цqueued¤logs�§running¦output†¤bodyÚæ

Bandwidth and Latency

The time it takes to transfer $n$ bytes is usually modeled with

$$T(n) = \alpha + \beta n$$

where $\alpha$ is the latency (fixed-cost) and $\beta$ is the time per byte, so the inverse of the bandwidth, (linear cost). This simple model does not incorporate the fact that communicating between nodes that are not directly connected needs to pass through intermediate nodes or routers. Therefore, using these formula only gives a lower bound to the actual time. This bound is achieved for a fully-connected topology but for other topologies, they should really only be considered as a lower bound. So consider the bounds obtained in the Collectives section below as lower bounds.

See [Eij10; Section 2.7.8] for more details.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�rŽÈϰpersist_js_state·has_pluto_hook_features§cell_idÙ$70e88569-cd5c-40e8-9198-6bf6578fb0a2¹depends_on_disabled_cells§runtimeÎUœ–µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$5441e428-b320-433c-acde-15fe6bf58537Цqueued¤logs‘ˆ¤lineÿ£msg’Ùœg++ -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -L/usr/lib/x86_64-linux-gnu/openmpi/lib -lmpi_cxx -lmpi ªtext/plain§cell_idÙ$5441e428-b320-433c-acde-15fe6bf58537¦kwargs�¢id´PlutoRunner_d1acb81e¤fileÙP/home/runner/.julia/packages/Pluto/F6SNP/src/runner/PlutoRunner/src/io/stdout.jl¥group¦stdout¥level®LogLevel(-555)§running¦output†¤bodyÙ;Process(`mpic++ -show`, ProcessExited(0))¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ�rŽÈCî°persist_js_state·has_pluto_hook_features§cell_idÙ$5441e428-b320-433c-acde-15fe6bf58537¹depends_on_disabled_cells§runtimeÎ1µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$bfab5c2d-61c3-468b-9ddf-4aaa49cb7785Цqueued¤logs�§running¦output†¤bodyÚš
¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�¯‚0°persist_js_state÷has_pluto_hook_features§cell_idÙ$bfab5c2d-61c3-468b-9ddf-4aaa49cb7785¹depends_on_disabled_cells§runtimeÎ Œóµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$7d9ac5f9-39bf-4052-ad8a-ac0fec15c64aЦqueued¤logs�§running¦output†¤bodyÙ—

Processes that are on the same node share the same processor_name (the hostname).

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�Æ °persist_js_state÷has_pluto_hook_features§cell_idÙ$7d9ac5f9-39bf-4052-ad8a-ac0fec15c64a¹depends_on_disabled_cells§runtimeÎ⮵published_object_keys�¸depends_on_skipped_cells§erroredÂÙ$86394e1c-0ff4-449a-8940-4b5906d8b6f0Цqueued¤logs�§running¦output†¤bodyÚó

What is the graph diameter ?

$|V|/2$

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�66°persist_js_state·has_pluto_hook_features§cell_idÙ$86394e1c-0ff4-449a-8940-4b5906d8b6f0¹depends_on_disabled_cells§runtimeÎ�êµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$97d3cf3f-ddac-4850-8b05-bdc0c4741f61Цqueued¤logs�§running¦output†¤bodyÚé

What are the number of switches, edges, graph diameter and bisection width for $n$ computer nodes ?

  • There are $n^2$ switches one per intersection. This makes this architecture only suitable for small $n$.

  • The number of edges is : $|E| = 2n^2$ which consists of $n$ connections from an input to a switch, $n$ connections from a switch to an output and $2n(n-1)$ connections between switches.

  • The diameter is 2 if we don't count the in-between switches or $2n$ if we count them.

  • The bisection width is $n/2$.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�;T&°persist_js_state·has_pluto_hook_features§cell_idÙ$97d3cf3f-ddac-4850-8b05-bdc0c4741f61¹depends_on_disabled_cells§runtimeÎ $–µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$b9a9e335-1328-4c63-a213-ce21263bc201Цqueued¤logs�§running¦output†¤bodyÚ

Can MPI_Allreduce be implemented by combining existing collectives ?

Let the size of each $x_i$ be $n$ bytes. MPI_Allreduce can be implemented either by combining MPI_Reduce followed by MPI_Bcast or MPI_Reduce_scatter followed by MPI_Allgather. The first choice would lead to a complexity of $\log_2(p)(\alpha + \beta n + \gamma n )$. The second would lead to a complexity of $\log_2(p)\alpha + \beta n + \gamma n$. This second approach is faster for large $p$ since we removed $\log_2(p)$ in front of $\beta$ and $\gamma$.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�rŽì†'°persist_js_state·has_pluto_hook_features§cell_idÙ$b9a9e335-1328-4c63-a213-ce21263bc201¹depends_on_disabled_cells§runtimeÎþûµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$9b4cae31-c319-444e-98c8-2c0bfc6dfa0cЦqueued¤logs�§running¦output†¤bodyÙ>

Broadcast

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�Æ­:°persist_js_state÷has_pluto_hook_features§cell_idÙ$9b4cae31-c319-444e-98c8-2c0bfc6dfa0c¹depends_on_disabled_cells§runtimeΆԵpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$7b1d26c6-9499-4e44-84c8-c272737a175eЦqueued¤logs�§running¦output†¤bodyÙ8

Gather

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�ÆÍ¯°persist_js_state÷has_pluto_hook_features§cell_idÙ$7b1d26c6-9499-4e44-84c8-c272737a175e¹depends_on_disabled_cells§runtimeÎh/µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$360091c4-d3a0-462d-abcf-b9bbb9480871Цqueued¤logs�§running¦output†¤bodyÙD

Linear array

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�Ù°persist_js_state÷has_pluto_hook_features§cell_idÙ$360091c4-d3a0-462d-abcf-b9bbb9480871¹depends_on_disabled_cells§runtimeÎE¼µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$f2417047-33fc-4489-8e89-115bc6b46c13Цqueued¤logs�§running¦output†¤bodyÚ¨ ¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�H˰persist_js_state·has_pluto_hook_features§cell_idÙ$f2417047-33fc-4489-8e89-115bc6b46c13¹depends_on_disabled_cells§runtimeÎõkµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$1152dec8-3810-42b1-bb2a-8755dcaef56cЦqueued¤logs�§running¦output†¤bodyÙ%img1 (generic function with 1 method)¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ�r�ÊÕ°persist_js_state·has_pluto_hook_features§cell_idÙ$1152dec8-3810-42b1-bb2a-8755dcaef56c¹depends_on_disabled_cells§runtimeÎ{²µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$8f46daf1-9ca2-4a08-99aa-4ed68af218b8Цqueued¤logs�§running¦output†¤bodyÚy ¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�:”°persist_js_state·has_pluto_hook_features§cell_idÙ$8f46daf1-9ca2-4a08-99aa-4ed68af218b8¹depends_on_disabled_cells§runtimeÍL¿µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$143dca7c-f9a4-472a-a4bc-4578e4e8413bЦqueued¤logs�§running¦output†¤bodyÙ4

Tree

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�Ú�аpersist_js_state÷has_pluto_hook_features§cell_idÙ$143dca7c-f9a4-472a-a4bc-4578e4e8413b¹depends_on_disabled_cells§runtimeΞµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$c0daf219-cb87-4203-b835-49ab7eb955beЦqueued¤logs�§running¦output†¤bodyÚ ™
[local computer]$ ssh lemaitre4

[blegat@lm4-f001 ~]$ module list

Currently Loaded Modules:
  1) tis/2018.01 (S)   2) releases/2023a (S)   3) StdEnv

  Where:
   S:  Module is Sticky, requires --force to unload or purge
[blegat@lm4-f001 ~]$ mpicc
-bash: mpicc: command not found

[blegat@lm4-f001 ~]$ module load gompi/2023a

[blegat@lm4-f001 ~]$ mpicc
gcc: fatal error: no input files
compilation terminated.

[blegat@lm4-f001 ~]$ module list

Currently Loaded Modules:
  1) tis/2018.01                   (S)  11) libpciaccess/0.17-GCCcore-12.3.0
  2) releases/2023a                (S)  12) hwloc/2.9.1-GCCcore-12.3.0
  3) StdEnv                             13) OpenSSL/1.1
  4) GCCcore/12.3.0                     14) libevent/2.1.12-GCCcore-12.3.0
  5) zlib/1.2.13-GCCcore-12.3.0         15) UCX/1.14.1-GCCcore-12.3.0
  6) binutils/2.40-GCCcore-12.3.0       16) libfabric/1.18.0-GCCcore-12.3.0
  7) GCC/12.3.0                         17) PMIx/4.2.4-GCCcore-12.3.0
  8) numactl/2.0.16-GCCcore-12.3.0      18) UCC/1.2.0-GCCcore-12.3.0
  9) XZ/5.4.2-GCCcore-12.3.0            19) OpenMPI/4.1.5-GCC-12.3.0
 10) libxml2/2.11.4-GCCcore-12.3.0      20) gompi/2023a

  Where:
   S:  Module is Sticky, requires --force to unload or purge
¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�áT°persist_js_state·has_pluto_hook_features§cell_idÙ$c0daf219-cb87-4203-b835-49ab7eb955be¹depends_on_disabled_cells§runtimeÎ=ÿTµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$d04b9af5-f004-4ca4-b1c9-2c86d46cb37dЦqueued¤logs�§running¦output†¤bodyÚœ
  • Each node input is a row and each node output is a column; source of figure below.

  • Each intersection is a switch. The cases (a) and (c) represent conflicting cases where two inputs want to simultaneously communicate with the same output.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�Úbаpersist_js_state÷has_pluto_hook_features§cell_idÙ$d04b9af5-f004-4ca4-b1c9-2c86d46cb37d¹depends_on_disabled_cells§runtimeÎîšµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$fc705b81-7310-44cc-ad9f-dc2cf8a9b645Цqueued¤logs�§running¦output†¤bodyÈw‰PNG  IHDRXˆ´¥�bKGDÿÿÿ ½§“,IDATxœíÝkLS÷ÿÀñSJ±J‘¡\‹��—É- êPÝ Ñ8 Î…©1›šc¢[²'{j2“mº™™É\4Qa8‘�N.îOÀ6¦[D¥0.–K«ÐÿƒLýÍŸà¡ý¾_H=-æó�Ò7§§çTe³Ù$Då¢ô(‰„FB#„¡B€Ð!@h„ 4B!�„FB#„¡B€Ð!@h„ 4B!�„FB#„¡B€Ð!@h„ 4B!�„FB#„¡¹*=œÖðððÐÐP¿Õjíïï~úƒåÛ®®®’$yzzº¸¸hµÚ©S§ªTª—^zI’$�N§Ñh^̈€â_±Z­ÝÝÝ]]]ÝÝÝ&“Éd2ÙÿØÓÓcµZå¯÷îݳZ­}}}:�F£Ñét^^^žÿiúôéò û]>>>~~~îîî:Ç¥²ÙlJÏ€I¡··×h4Þ¼yÓh4�Æ[·nÉ©ëêê2™LýýýÏúN™2eÚ´innnžžžòŽÝ“üè½÷ïß7›Í’$õõõ�ŽŽÊ»’£££r\ïÝ»÷àÁƒgÆÝÝÝßßßÏÏÏÇÇ' À~Ã×××××700pÚ´iÏúwp„P,V«µ½½]žÁ`0�íííòí{÷î=å]]]gΜéíí-õñññöö–ÿèåå¥Õj===§L™¢ÓéÜÝÝÝÜܼ¼¼&z!f³¹······¯¯¯¯¯¯¿¿¿ïö»:;;ïÞ½kÝõI¼½½õz½^¯ ÒëõsæÌÑëõþþþºŠ#„NËjµ¶µµµ¶¶¶¶¶þõP{{û“þÅÝÝÝí�ÙËçãã3Ña›hf³¹£££³³Ód2utt˜L¦»wïÞ¾}Ûd2ݹsçÖ­[‹å±ß¨Õjå@†„„„†††……………sœp„ÐIX­Ö?þø£¹¹¹©©©¹¹¹±±±­­mdddÌÃ\]]gÍš%?³Ëµ“÷�g̘¡Èä“ÄíÛ· ƒ¼—|óæMy/Ù`0twwÿóÁ®®®sçÎ �7o^XXXhhhhh¨^¯W©T/~rω:ªŽŽŽßjll¼víÚ˜#gjµ:((H~޶?Y¹ºò©g000 wñúõëþùç_ýÕÚÚj0þùKÆ´iÓÂÃ㢢"##å¯ŠÌ à™B‡qãÆ�ÚÚÚ+W®\¹rå÷ßïìì|ô^µZ.�7ož›››RÓ:7‹ÅbÆÖÖÖ;wîŒyØÌ™3£¢¢"""¢¢¢ä4NŸ>]‘�<!œ¼º»»ÿï¡ÚÚZ“Éôè½^^^ѽúꫯ¼òÊ”)S”’$õôô455555566Ê7zzz}€J¥ ����‹‹‹‹‹‹‰‰¡‹Àd@'›ÍÖÒÒRYYYUUU]]}íÚµGïõóóKHHˆ��•ã7wî\…ÆÄ¿ÕÞÞ~õêÕ†††«W¯666^½zõѷ丸¸Œé¢|/!T˜Õj­­­­ªªª¬¬¬®®~ô­îîî±±± ‰‰‰AAA Ήçwÿþý¦¦¦º‡Æt1""báÂ…IIIIIIaaa Ž …*`dd¤¾¾¾¼¼¼¼¼¼²²rppÐ~×ìÙ³_{íµE‹-^¼822’7¶8±§wÑÇÇG.âÂ… ããã9ߘ8„ðÅinn.+++//¿xñboo¯¼Q¥R…‡‡ÛãÇ žÂ²X,õõõ555UUU555·o߶ߥÑhbbb’““—,Y’œœÌ‘E`|‰500PSSSPPpúôé›7oÚ·Ëå{ë­·œ“SGGG]]�üšymm­Õj•·«Õêyóæ-^¼855555ÕÑ/tL„püÙl¶+W®”””œ;w®ººÚ~zŸŸŸßÊ•+SRRRRRôz½²CÂ�˜ÍæË—/_¼x±¢¢bLcbb–.]º|ùòääd^>þ7„pÜŒŒŒÔÔÔäææž:uÊh4ÊÕjutttjjjZZÚÂ… ]\øH<—ÁÁÁúúúªªª²²²K—.Ù+ººº&&&®Zµ*555&&†ÿiÀ¿GŸWOOOqqñéÓ§KJJìÑøæ›o¾ñÆ©©©ÑÁ¬ªªºpáÂùóçëêêFGGåí~~~+V¬X¹råŠ+¸h8ð_ÂÿQWWשS§rss+**ì/~Ο??======..ŽËNâEêîî.++;þ|ii©ý •J—–––––ËÿIà±á³éêêÊÏÏÏË˳÷O£Ñ$''Ëýã=Ÿ˜ ZZZJKKKKK/^¼800 o xûí·ÓÒÒRSSù˜bàQ„ð_éééÉËË;yòdEE…|µe77·åË—gdd¬^½ZðÏmÀ¤5<<\QQQPPPTTd0ä�Z­vÙ²ekÖ¬Y³f�¯¯¯²“!|‹ÅRZZš››ûÓO?ɧ½«Õê ddd¼÷Þ{<‰À�ܸq£   °°ðÂ… ò‹...III«V­zç�w^~ùe¥CÃf³UUU=zôäÉ“òu“ÕjuJJJVVÖêÕ«9s ­³³³°°0??¿¬¬L~Ó©J¥Š��_»víºuë("DÿƒÁ`ÈÉÉ9räH[[›¼%::zÆ ï¾ûî¬Y³”� _ýýýgÏžÍÏÏ?{ö¬ýPb|||fffffæœ9s”xa¡$I’ÅbùùçŸ>\VV&¿]¯×gee½ÿþûJOL¬¡¡¡ÒÒÒüüüÓ§O÷õõI’¤R©-Z”™™™‘‘áçç§ô€ÀÄ=„ ßÿý±cÇä�}Ðjµk׮ݴiÓÒ¥K9%¢...>qâDAA�ý øë¯¿ž���žžÎ^ÂY Âááá“'O~óÍ7¿ýö›¼%66vãÆ�YYYΜ9süøñsçÎÉÇg̘±~ýúìììØØX¥§Æ™p!lkk;xðàáÇ»ºº$IòòòZ¿~ýÆ�cbb” ˜tþþûïcÇŽýðÃõõõò–ùóçøá‡YYY>>>ŠŽŒQB8::Z^^þÝwßåççË'ÆÅÅmÙ²eýúõœ\ üWÍÍÍ?þøcNNNgg§$IjµzÙ²e[¶lY³f�F£Qz:à¹8ÍfóáÇ¿úê«ëׯK’¤Õj333·nÝš�� ôh€ƒ±Z­………999%%%òɈþþþ›6mÚºu+o«†ãræ�Ư¿þúСCò§àôÑG7nœ9s¦Ò£ŽíÎ�;G�ÍÉÉinn–$I£Ñ¬[·nÇŽ‰‰‰J�<3ç ammí¾}ûòòòä_Z“““wîÜ™žžÎA�ñU]]ýå—_æççË?k‰‰‰;vìX·n¯—Â�8Um6[aaáÞ½{+++%IÒh4;wîŒ��Wz4À™µ··8pàСCòiH³fÍÚºuëÇÌexáœ$„£££EEEŸþy]]�$IÓ§OÏÎÎÞµk¼0‹åĉ_|ñECCƒ$I:�nÛ¶mŸ~ú©§§§Ò£Oãð!´X,GŽÙ»w¯ü^˜ÀÀÀ]»vmÞ¼Y§Ó)= ¨_~ùeïÞ½¥¥¥’$y{{ïÙ³gÛ¶mS§NUz.àñ)„ƒaÿþýò)ð ,ؼyó™3göíÛ×ÑÑ!IRhhèž={6lØàææ¦ô¤ãcÌz·oßîÜ—d½N¶ÞK—.}öÙg¿þú«$I!!!ûöí«¬¬tâõÂ�ÙDQQјþt:�|˜èèèãÇ�?xð@éÇÓc×[\\¬ô\…õ:ëzÏ�;¿{÷n•J%Âzáˆc�Ð`0„‡‡Û/�o§Õj<øÁŒùstOZ¯N§knnv¾ß£Y¯ÌY×ÛÖÖ1444f»³®Ç1N'Ø¿ÿ?Ÿ5$Iniiq² JO^¯Ùl>pàÀ‹Ÿg¢±^™³®÷Ûo¿ýg%ç]/Žcì.Y²D>ÒÀ™,]º´¢¢Bé) :ÇØ#t¾}>À$á!|Êu›>ùä¥�³Ž¿Ý»w³^Öë4ž²Þ <é.à…qŒ—F�Fcxx¸Ùl³ÝÃ㥥eöìÙŠL5qX¯Œõ:ÑÖ ‡ã{„sæÌÉÍÍs޼‡‡Gnn®Sþ±^‰õ:ÑÖ ‡ã{„2£ÑxàÀ�Ë—/K’”””´}ûvçþ)b½¬×™ˆ¶^8G !ãÎ1^`‚B€Ð!@h„ 4B!�„FB#„¡B€Ð!@h„ 4B!�„FB#„¡B€Ð!@h„ 4B!�„FB#„¡B€Ð!@h„ 4B!�„FB#„¡B€Ð!@h„ 4B!�„FB#„¡B€Ð!@h„ 4B!�„FB#„¡B€Ð!@h„ 4B!�„FB#„¡B€Ð!@h„ 4B!íÿ�ê!÷П{DIEND®B`‚¤mime©image/png¬rootassigneeÀ²last_run_timestampËAÚ�r�5Úº°persist_js_state·has_pluto_hook_features§cell_idÙ$fc705b81-7310-44cc-ad9f-dc2cf8a9b645¹depends_on_disabled_cells§runtimeÎ7�‘µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$6d2b3dbc-0686-49f0-904a-56c3ce63b4ddЦqueued¤logs�§running¦output†¤bodyƒªattributes�¥styleÙ#display: flex; flex-direction: row;£tag£div¨children’’ƒªattributes�¥style­flex-grow: 1;£tag£div¨children‘’Ù†

Initializes MPI, remove mpiexec, etc... from argc and argv.

©text/htmlÙ,application/vnd.pluto.reactdomelement+object’Ùn
MPI_Init(&argc, &argv)
©text/html¤mimeÙ,application/vnd.pluto.reactdomelement+object¬rootassigneeÀ²last_run_timestampËAÚ�rŽ;þ7°persist_js_state·has_pluto_hook_features§cell_idÙ$6d2b3dbc-0686-49f0-904a-56c3ce63b4dd¹depends_on_disabled_cells§runtimeÎ+2µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$e172f5c5-8b96-4efd-9cf3-805c58d1a6a3Цqueued¤logs�§running¦output†¤bodyÙ+definition (generic function with 1 method)¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ�r�¨¡ñ°persist_js_state·has_pluto_hook_features§cell_idÙ$e172f5c5-8b96-4efd-9cf3-805c58d1a6a3¹depends_on_disabled_cells§runtimeÎ µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$ce7bf747-7116-4e76-9004-f234317046c3Цqueued¤logs‘ˆ¤lineÿ£msg’Ú~[1] I have received 1 B in 0.000059 sec [1] I have received 2 B in 0.000002 sec [1] I have received 4 B in 0.000000 sec [1] I have received 8 B in 0.000000 sec [1] I have received 16 B in 0.000000 sec [1] I have received 32 B in 0.000000 sec [1] I have received 64 B in 0.000000 sec [1] I have received 128 B in 0.000000 sec [1] I have received 256 B in 0.000000 sec [1] I have received 512 B in 0.000000 sec [1] I have received 1024 B in 0.000001 sec [1] I have received 2048 B in 0.000003 sec [1] I have received 4096 B in 0.000020 sec [1] I have received 8192 B in 0.000014 sec [1] I have received 16384 B in 0.000013 sec [1] I have received 32768 B in 0.000034 sec [1] I have received 65536 B in 0.000051 sec [1] I have received 131072 B in 0.000094 sec [1] I have received 262144 B in 0.000181 sec [1] I have received 524288 B in 0.000352 sec [1] I have received 1048576 B in 0.000792 sec ªtext/plain§cell_idÙ$ce7bf747-7116-4e76-9004-f234317046c3¦kwargs�¢id´PlutoRunner_d1acb81e¤fileÙP/home/runner/.julia/packages/Pluto/F6SNP/src/runner/PlutoRunner/src/io/stdout.jl¥group¦stdout¥level®LogLevel(-555)§running¦output†¤bodyÚÌ
  int tag = 0;
  for(int size = 1; size <= (1<<20); size <<= 1){
    char* buf = malloc(size);
    if (procid == 0) {
        MPI_Send(buf, size, MPI_CHAR, procid + 1, tag++, comm);
    }
    else {
      double tic = MPI_Wtime();
      MPI_Recv(buf, size, MPI_CHAR, procid - 1, tag++, comm, MPI_STATUS_IGNORE);
      double toc = MPI_Wtime();
      printf("[%d] I have received %d B in %f sec\n", procid, size, (toc-tic));
    }
  }
¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�qªa°persist_js_state·has_pluto_hook_features§cell_idÙ$ce7bf747-7116-4e76-9004-f234317046c3¹depends_on_disabled_cells§runtimeΡgÙµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$d722a86d-6d51-4d91-ac22-53af94c91497Цqueued¤logs�§running¦output†¤bodyƒªattributes�¥styleÙ&display: flex; flex-direction: column;£tag£div¨children’’ƒªattributes�¥style­flex-grow: 1;£tag£div¨children‘’Ù˜

Get the id of processes. procid is different for different processes.

©text/htmlÙ,application/vnd.pluto.reactdomelement+object’Ù‡
int procid;
MPI_Comm_rank(MPI_COMM_WORLD, &procid);
©text/html¤mimeÙ,application/vnd.pluto.reactdomelement+object¬rootassigneeÀ²last_run_timestampËAÚ�rŽA4¹°persist_js_state·has_pluto_hook_features§cell_idÙ$d722a86d-6d51-4d91-ac22-53af94c91497¹depends_on_disabled_cells§runtimeΟö©µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$273ad3a6-cb32-49bb-8702-fdaf8597e812Цqueued¤logs�§running¦output†¤bodyÙ‚

Different processes may be on the same node

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�¸T°persist_js_state÷has_pluto_hook_features§cell_idÙ$273ad3a6-cb32-49bb-8702-fdaf8597e812¹depends_on_disabled_cells§runtimeÎ5îµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$6041a909-d26c-4ab1-836b-29953c578759Цqueued¤logs�§running¦output†¤bodyÚ

What is the number of edges ? What is the bisection width ?

Same as fat-tree.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�GcI°persist_js_state·has_pluto_hook_features§cell_idÙ$6041a909-d26c-4ab1-836b-29953c578759¹depends_on_disabled_cells§runtime餵published_object_keys�¸depends_on_skipped_cells§erroredÂÙ$b94cd399-0370-49e9-a522-056f3af22955Цqueued¤logs�§running¦output†¤bodyÚþô¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r��æ!°persist_js_state·has_pluto_hook_features§cell_idÙ$b94cd399-0370-49e9-a522-056f3af22955¹depends_on_disabled_cells§runtimeÎ/ávµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$58e12afd-6eb0-4731-bd57-d9ae7ab4e164Цqueued¤logs�§running¦output†¤bodyÚV^

LINMA2710 - Scientific Computing Distributed Computing with MPI

P.-A. Absil and B. Legat

      ¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�þ,°persist_js_state·has_pluto_hook_features§cell_idÙ$58e12afd-6eb0-4731-bd57-d9ae7ab4e164¹depends_on_disabled_cells§runtimeθ2eµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$141d162c-c817-498f-be16-f1cd35d82487Цqueued¤logs�§running¦output†¤bodyÚï

How to collect the partial sums ?

MPI_Reduce

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�rŽì®Ú°persist_js_state·has_pluto_hook_features§cell_idÙ$141d162c-c817-498f-be16-f1cd35d82487¹depends_on_disabled_cells§runtimeÎáuµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$e44b0038-d68f-4a49-9da2-67fbcbe098c3Цqueued¤logs�§running¦output†¤bodyÈ�‰PNG  IHDRXˆ´¥�bKGDÿÿÿ ½§“RIDATxœíÙ1Nãh†a³ÚŽä(Ès Ôˆƒ$§H�(‘¨àÐ'Wu¶ ÍjVZ &²ßç)�æÿ ë�í‹Óé4@Õ_ç>œ“�&„¤ !iB@š�&„¤ !iB@š�&„¤ !iB@š�&„¤ !iB@š�&„¤ !iB@š�&„¤ !iB@š�&„¤ !iB@š�&„¤ !iB@š�&„¤ !iB@š�&„¤ !iB@š�&„¤ !iB@š�&„¤ !iB@š�&„¤ !iB@š�&„¤ !iB@š�&„¤ !iB@š�ö÷¹ð?ì÷ûÍfóúú: ÃjµZ¯×‹Åâ܇úFöÚ;%µ½ŒÉi$.//>ùl6{||<÷¹¾‹½öNIm/ãrq:�¾º­_o¿ß/—Ë���_®Ïf³···éý¯´÷“½ÓPÛËèŒãáf³ù÷]4 ÃñxÜn·þ<ßÍÞOöNCm/£3Ž'ÂÛÛÛçççsŸøb?~üxzz:÷)¨ÇáÅÅŹ�À4�#„××׿ûéþþþÜßY¿ÞÝÝ�½öNÆì]­V¿û þ˜q¼=Ëåòx<þr}>Ÿ¿¿¿_]]�åTßÇÞOöNCm/£3Ž'ÂÅb±Ûíf³ÙÏçóùn·›ä]dï`ï„Ôö2:ãx"üt8¶ÛíËËË0 777ëõzÚw‘½öNIm/#2¦À—Ç«Qø&B@š�&„¤ !iB@š�&„¤ !iB@š�&„¤ !iB@š�&„¤ !iB@š�&„¤ !iB@š�&„¤ !iB@š�&„¤ !iB@š�&„¤ !iB@š�&„¤ !iB@š�&„¤ !iB@š�&„¤ !iB@š�&„¤ !iB@š�&„¤ !iB@š�&„¤ !iB@š�&„¤ !iB@Ú? ÂÄ̪lIEND®B`‚¤mime©image/png¬rootassigneeÀ²last_run_timestampËAÚ�r�3¹c°persist_js_state·has_pluto_hook_features§cell_idÙ$e44b0038-d68f-4a49-9da2-67fbcbe098c3¹depends_on_disabled_cells§runtimeÎScµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$b5a3e471-af4a-466f-bbae-96306bcc7563Цqueued¤logs�§running¦output†¤bodyƒªattributes�¥styleÙ&display: flex; flex-direction: column;£tag£div¨children’’ƒªattributes�¥style­flex-grow: 1;£tag£div¨children‘’Ùƒ

Get the number of processes. nprocs is the same on all processes.

©text/htmlÙ,application/vnd.pluto.reactdomelement+object’Ù‡
int nprocs;
MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
©text/html¤mimeÙ,application/vnd.pluto.reactdomelement+object¬rootassigneeÀ²last_run_timestampËAÚ�rŽ?‘°persist_js_state·has_pluto_hook_features§cell_idÙ$b5a3e471-af4a-466f-bbae-96306bcc7563¹depends_on_disabled_cells§runtimeÎ�µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$21b6133f-db59-4885-9b3d-331c3d6ef306Цqueued¤logs�§running¦output†¤bodyÙ>

Compiling

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�ÆI°persist_js_state÷has_pluto_hook_features§cell_idÙ$21b6133f-db59-4885-9b3d-331c3d6ef306¹depends_on_disabled_cells§runtimeÎ]‰µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$beee4908-d519-413a-964f-149bb82cdbb8Цqueued¤logs�§running¦output†¤bodyÙ6

Slurm

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�Ôw)°persist_js_state÷has_pluto_hook_features§cell_idÙ$beee4908-d519-413a-964f-149bb82cdbb8¹depends_on_disabled_cells§runtimeκµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$091dd042-580b-4fda-8086-e048663aed6cЦqueued¤logs�§running¦output†¤bodyÚò&
  • NVIDIA Nsight Systems can profile CUDA code but also MPI

  • Available on manneback after loading CUDA with

[laptop]$ ssh manneback
[blegat@mbackf1 ~]$ nsys
-bash: nsys: command not found
[blegat@mbackf1 ~]$ ml CUDA
[blegat@mbackf1 ~]$ nsys
¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�ªr‚°persist_js_state·has_pluto_hook_features§cell_idÙ$091dd042-580b-4fda-8086-e048663aed6c¹depends_on_disabled_cells§runtimeÎ$ðµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$60bc118f-6795-43f9-97a2-865fd1704895Цqueued¤logs�§running¦output†¤bodyÙ>

Allreduce

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�ÊéB°persist_js_state÷has_pluto_hook_features§cell_idÙ$60bc118f-6795-43f9-97a2-865fd1704895¹depends_on_disabled_cells§runtimeÎexµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$16f8d28b-f201-4fe5-8446-68d7d9ddfb3cЦqueued¤logs�§running¦output†¤bodyÚ{ ¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�Hoô°persist_js_state·has_pluto_hook_features§cell_idÙ$16f8d28b-f201-4fe5-8446-68d7d9ddfb3c¹depends_on_disabled_cells§runtimeÍE;µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$35aa1295-642f-4525-bf19-df2a42ff39d6Цqueued¤logs“ˆ¤lineÿ£msg’Ù”Compiling : `mpicc -O3 -I/home/runner/.julia/artifacts/207eb5b8330e24674fe59b50d72f4b3d946219c8/include /tmp/jl_M33aCm/main.c -o /tmp/jl_M33aCm/bin`ªtext/plain§cell_idÙ$35aa1295-642f-4525-bf19-df2a42ff39d6¦kwargs�¢id´SimpleClang_e77d60b3¤fileÙA/home/runner/.julia/packages/SimpleClang/N4VZY/src/SimpleClang.jl¥group«SimpleClang¥level¤Infoˆ¤lineÿ£msg’Ù+Running : `mpiexec -n 2 /tmp/jl_M33aCm/bin`ªtext/plain§cell_idÙ$35aa1295-642f-4525-bf19-df2a42ff39d6¦kwargs�¢id´SimpleClang_9f8d091b¤fileÙA/home/runner/.julia/packages/SimpleClang/N4VZY/src/SimpleClang.jl¥group«SimpleClang¥level¤Infoˆ¤lineÿ£msg’ÙŸproc id : 0 / 2 0:3 proc id : 1 / 2 4:8 proc id : 1 / 2 : [local = 35.000000] : [total = 0.000000] proc id : 0 / 2 : [local = 10.000000] : [total = 45.000000] ªtext/plain§cell_idÙ$35aa1295-642f-4525-bf19-df2a42ff39d6¦kwargs�¢id´PlutoRunner_d1acb81e¤fileÙP/home/runner/.julia/packages/Pluto/F6SNP/src/runner/PlutoRunner/src/io/stdout.jl¥group¦stdout¥level®LogLevel(-555)§running¦output†¤bodyÚè
  for (int i = stride * procid; i < last; i++)
    local_sum += vec[i];
  float total = 0;
  MPI_Reduce(&local_sum, &total, 1, MPI_FLOAT, MPI_SUM, 0, comm);
  if (verbose >= 1)
    fprintf(stderr, "proc id : %d / %d : [local = %f] : [total = %f]\n", procid, nprocs, local_sum, total);
¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�Sà‡°persist_js_state·has_pluto_hook_features§cell_idÙ$35aa1295-642f-4525-bf19-df2a42ff39d6¹depends_on_disabled_cells§runtimeÎ+íÙµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$e832ce25-94e2-4743-854d-02b52cc7b56dЦqueued¤logs�§running¦output†¤bodyÚ¨ ¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�rŽòhϰpersist_js_state·has_pluto_hook_features§cell_idÙ$e832ce25-94e2-4743-854d-02b52cc7b56d¹depends_on_disabled_cells§runtimeÎ`çܵpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$9612a1ef-fd3a-4a58-87b0-b2255ac86331Цqueued¤logs�§running¦output†¤bodyÙH

Graph diameter

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�Ôý¬°persist_js_state÷has_pluto_hook_features§cell_idÙ$9612a1ef-fd3a-4a58-87b0-b2255ac86331¹depends_on_disabled_cells§runtimeÎÎsµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$d7117a24-aba6-4479-a40e-5005310a6b38Цqueued¤logs�§running¦output†¤bodyÚy ¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�8—ö°persist_js_state·has_pluto_hook_features§cell_idÙ$d7117a24-aba6-4479-a40e-5005310a6b38¹depends_on_disabled_cells§runtimeÍAúµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$0e640e07-82c7-4dab-a8f1-2f634bbebdeaЦqueued¤logs�§running¦output†¤bodyƒªattributes�¥styleÙ#display: flex; flex-direction: row;£tag£div¨children’’Û Á¨©text/html’Û#/©text/html¤mimeÙ,application/vnd.pluto.reactdomelement+object¬rootassigneeÀ²last_run_timestampËAÚ�r�›ß°persist_js_state·has_pluto_hook_features§cell_idÙ$0e640e07-82c7-4dab-a8f1-2f634bbebdea¹depends_on_disabled_cells§runtimeήµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$f2ebc6fb-e07c-4922-897d-9bbe0f5fa1d0Цqueued¤logs�§running¦output†¤bodyƒªattributes�¥styleÙ#display: flex; flex-direction: row;£tag£div¨children“’ÙÒ

The bisection width is:

$$\min_{S \subset V : \lfloor |V|/2 \rfloor \le |S| \le \lceil |V|/2 \rceil} \quad w(S, V \setminus S)$$

©text/html’ƒªattributes�¥style­flex-grow: 1;£tag£div¨children‘’¡ ©text/htmlÙ,application/vnd.pluto.reactdomelement+object’Ùû

The bisection bandwidth is:

$$\min_{S \subset V : \lfloor |V|/2 \rfloor \le |S| \le \lceil |V|/2 \rceil} \quad \texttt{bw}(S, V \setminus S)$$

©text/html¤mimeÙ,application/vnd.pluto.reactdomelement+object¬rootassigneeÀ²last_run_timestampËAÚ�r� ÜH°persist_js_state·has_pluto_hook_features§cell_idÙ$f2ebc6fb-e07c-4922-897d-9bbe0f5fa1d0¹depends_on_disabled_cells§runtimeÎŒNŒµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$55e96151-2aa1-4ea0-b672-2038c57d911eЦqueued¤logs�§running¦output†¤bodyÛ™q ¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�¡(A°persist_js_state·has_pluto_hook_features§cell_idÙ$55e96151-2aa1-4ea0-b672-2038c57d911e¹depends_on_disabled_cells§runtimeÎøµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$67dee339-98b4-4714-88b2-8098a13235f2Цqueued¤logs�§running¦output†¤bodyÚ9

There are two protocols:

  • Rendezvous protocol

    1. the sender sends a header;

    2. the receiver returns a ‘ready-to-send’ message;

    3. the sender sends the actual data.

  • Eager protocol the message is buffered so MPI_Send can return eagerly, before the receiver is even ready

Eager protocol is used if the data size is smaller than the eager limit. To force the rendezvous protocol, use MPI_Ssend.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�Îf°persist_js_state÷has_pluto_hook_features§cell_idÙ$67dee339-98b4-4714-88b2-8098a13235f2¹depends_on_disabled_cells§runtimeΨӵpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$4e32f7fb-cd5a-4190-9c92-ba4029313475Цqueued¤logs�§running¦output†¤bodyÛRÙØ¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�Šd™°persist_js_state·has_pluto_hook_features§cell_idÙ$4e32f7fb-cd5a-4190-9c92-ba4029313475¹depends_on_disabled_cells§runtimeÎöû�µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$dbc19cbb-1349-4904-b655-2452aa7e2452Цqueued¤logs�§running¦output†¤bodyƒªattributes�¥styleÙ&display: flex; flex-direction: column;£tag£div¨children’’Ú}

Before

procid1234
$x_{1,1}$$x_{1,2}$$x_{1,3}$$x_{1,4}$
$x_{2,1}$$x_{2,2}$$x_{2,3}$$x_{2,4}$
$x_{3,1}$$x_{3,2}$$x_{3,3}$$x_{3,4}$
$x_{4,1}$$x_{4,2}$$x_{4,3}$$x_{4,4}$
©text/html’Ú

After MPI_Reduce_scatter

procid1234
$x_{1,1} + \cdots + x_{1,4}$
$x_{2,1} + \cdots + x_{2,4}$
$x_{3,1} + \cdots + x_{3,4}$
$x_{4,1} + \cdots + x_{4,4}$
©text/html¤mimeÙ,application/vnd.pluto.reactdomelement+object¬rootassigneeÀ²last_run_timestampËAÚ�rŽë�ü°persist_js_state·has_pluto_hook_features§cell_idÙ$dbc19cbb-1349-4904-b655-2452aa7e2452¹depends_on_disabled_cells§runtimeÎLI<µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$0d69e94b-492a-4acc-adba-a2126b871724Цqueued¤logs�§running¦output†¤bodyƒªattributes�¥styleÙ&display: flex; flex-direction: column;£tag£div¨children’’ÚÁ

Before

procid1234
$x_1$$x_2$$x_3$$x_4$
©text/html’Ú7

After MPI_Allreduce

procid1234
$x_1 + \cdots + x_4$$x_1 + \cdots + x_4$$x_1 + \cdots + x_4$$x_1 + \cdots + x_4$
©text/html¤mimeÙ,application/vnd.pluto.reactdomelement+object¬rootassigneeÀ²last_run_timestampËAÚ�rŽìZ>°persist_js_state·has_pluto_hook_features§cell_idÙ$0d69e94b-492a-4acc-adba-a2126b871724¹depends_on_disabled_cells§runtimeÎ�Ÿµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$4309dc43-aeb8-4ec7-94fe-0e320b784349Цqueued¤logs�§running¦output†¤bodyÙJ

Special case of multidimensional array

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�Ùù°persist_js_state÷has_pluto_hook_features§cell_idÙ$4309dc43-aeb8-4ec7-94fe-0e320b784349¹depends_on_disabled_cells§runtimeΪŒµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$1551122c-70ae-4e37-b3fb-4be91fcc4afbЦqueued¤logs�§running¦output†¤bodyÛp†

How to order the nodes so that consecutive nodes in the order are adjacent in the graph ?

Map nodes to binary number and use Gray code.

¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�¹çK°persist_js_state·has_pluto_hook_features§cell_idÙ$1551122c-70ae-4e37-b3fb-4be91fcc4afb¹depends_on_disabled_cells§runtimeÎ2Aµpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$3e98c0ca-1b47-4631-83d7-cd0c8c0a431dЦqueued¤logs�§running¦output†¤body ¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ�r�þf°persist_js_state·has_pluto_hook_features§cell_idÙ$3e98c0ca-1b47-4631-83d7-cd0c8c0a431d¹depends_on_disabled_cells§runtimeÎ’`µpublished_object_keys�¸depends_on_skipped_cells§erroredÂÙ$3ec3c058-a94d-4717-b99f-66373f2fa31dЦqueued¤logs�§running¦output†¤bodyÛ+¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ�r�¿ ª°persist_js_state·has_pluto_hook_features§cell_idÙ$3ec3c058-a94d-4717-b99f-66373f2fa31d¹depends_on_disabled_cells§runtimeÎ,—µpublished_object_keys�¸depends_on_skipped_cells§errored±cell_dependenciesÞŽÙ$c55dcd4a-8438-4679-9c4a-78cceec6835d„´precedence_heuristic §cell_idÙ$c55dcd4a-8438-4679-9c4a-78cceec6835d´downstream_cells_map�¤path’Ù$e44b0038-d68f-4a49-9da2-67fbcbe098c3Ù$fc705b81-7310-44cc-ad9f-dc2cf8a9b645²upstream_cells_mapÞ­Luxor.Drawing�¤line�¦circle�¤Bool�ªstrokepath�¥curve�¬Luxor.finish�¥Point�¤sign�°Luxor.background�¡-�¥@draw�¬Luxor.sethue�¡+�¡*�¬Luxor.origin�¤move�­Luxor.preview�¥Luxor‘Ù$8df4ff2f-d176-4b4e-a525-665b5d07ea52Ù$6be49c46-4900-4457-81b4-0704cd7da0af„´precedence_heuristic §cell_idÙ$6be49c46-4900-4457-81b4-0704cd7da0af´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¨Foldable�¨getindex�Ù$c1285653-38ba-418b-bdf5-cda99440998d„´precedence_heuristic §cell_idÙ$c1285653-38ba-418b-bdf5-cda99440998d´downstream_cells_map€²upstream_cells_map…§@md_str�¥aside�¨Foldable�£tip�¨getindex�Ù$4fdb4cd6-a794-4b14-84b0-72f484c6ea86„´precedence_heuristic §cell_idÙ$4fdb4cd6-a794-4b14-84b0-72f484c6ea86´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$a59db59c-d34e-4abd-8865-9907607e06a8„´precedence_heuristic §cell_idÙ$a59db59c-d34e-4abd-8865-9907607e06a8´downstream_cells_map€²upstream_cells_map„§@md_str�¥aside�©citeintro‘Ù$063f0acc-c023-46d0-9ed9-fbd7fbdcfa3b¨getindex�Ù$5a566137-fbd1-45b2-9a55-e4aded366bb3„´precedence_heuristic §cell_idÙ$5a566137-fbd1-45b2-9a55-e4aded366bb3´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$ad3559d1-6180-4eaa-b97d-3c1f10f036b9„´precedence_heuristic §cell_idÙ$ad3559d1-6180-4eaa-b97d-3c1f10f036b9´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$88f33f35-d922-4d98-af4a-ebb79d9b7dc6„´precedence_heuristic §cell_idÙ$88f33f35-d922-4d98-af4a-ebb79d9b7dc6´downstream_cells_map�©mpicc_cmd‘Ù$c0daf219-cb87-4203-b835-49ab7eb955be²upstream_cells_map‚§@md_str�¨getindex�Ù$b540d5e3-6686-479a-b2c7-c1f65b85b6ba„´precedence_heuristic §cell_idÙ$b540d5e3-6686-479a-b2c7-c1f65b85b6ba´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$f6f9447c-9bc9-432d-bd80-2c39f9d842f8„´precedence_heuristic §cell_idÙ$f6f9447c-9bc9-432d-bd80-2c39f9d842f8´downstream_cells_map€²upstream_cells_map‚¢=>�£img‘Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7Ù$9a100ccf-1ad3-4d2c-bbe0-e297969eb69e„´precedence_heuristic §cell_idÙ$9a100ccf-1ad3-4d2c-bbe0-e297969eb69e´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$a1b2d090-d498-4d5d-90a0-8cdc648dc833„´precedence_heuristic §cell_idÙ$a1b2d090-d498-4d5d-90a0-8cdc648dc833´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$8b83570a-6982-47e5-a167-a6d6afee0f7d„´precedence_heuristic §cell_idÙ$8b83570a-6982-47e5-a167-a6d6afee0f7d´downstream_cells_map€²upstream_cells_map†§@md_str�¤hbox�¤Dict�£Div�¢=>�¨getindex�Ù$e3474aea-ee14-4c78-ae46-5badc66a543a„´precedence_heuristic §cell_idÙ$e3474aea-ee14-4c78-ae46-5badc66a543a´downstream_cells_map�¦list_1‘Ù$c0daf219-cb87-4203-b835-49ab7eb955be²upstream_cells_mapƒ§@md_str�¨Foldable�¨getindex�Ù$21d507f6-02f8-4f8b-84f1-bcb84731df66„´precedence_heuristic §cell_idÙ$21d507f6-02f8-4f8b-84f1-bcb84731df66´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$de72d596-0daf-4629-bbb5-20bb8a67cbed„´precedence_heuristic §cell_idÙ$de72d596-0daf-4629-bbb5-20bb8a67cbed´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¨Foldable�¨getindex�Ù$c253bb24-ad76-4b58-8dfc-7dc2576e3db5„´precedence_heuristic §cell_idÙ$c253bb24-ad76-4b58-8dfc-7dc2576e3db5´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$e4d1de1d-d57a-48ab-ad7a-c09b427daa03„´precedence_heuristic §cell_idÙ$e4d1de1d-d57a-48ab-ad7a-c09b427daa03´downstream_cells_map€²upstream_cells_map„§@md_str�¨Foldable�£img‘Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7¨getindex�Ù$133f4c7d-33e0-4e13-b716-f538125436ca„´precedence_heuristic §cell_idÙ$133f4c7d-33e0-4e13-b716-f538125436ca´downstream_cells_map€²upstream_cells_map„§@md_str�¤img1‘Ù$1152dec8-3810-42b1-bb2a-8755dcaef56c±TwoColumnWideLeft�¨getindex�Ù$3a50ca06-06e8-4a61-ade2-afbfc52ca655„´precedence_heuristic §cell_idÙ$3a50ca06-06e8-4a61-ade2-afbfc52ca655´downstream_cells_map€²upstream_cells_map„§@md_str�¥aside�¨citepara‘Ù$3e98c0ca-1b47-4631-83d7-cd0c8c0a431d¨getindex�Ù$6c1984f6-4e36-4637-b0da-c7dd8b0f9ff0„´precedence_heuristic §cell_idÙ$6c1984f6-4e36-4637-b0da-c7dd8b0f9ff0´downstream_cells_map�¦list_2‘Ù$c0daf219-cb87-4203-b835-49ab7eb955be²upstream_cells_mapƒ§@md_str�¨Foldable�¨getindex�Ù$de20bf96-7d33-4a78-8147-f0b7f8488e46„´precedence_heuristic §cell_idÙ$de20bf96-7d33-4a78-8147-f0b7f8488e46´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¨Foldable�¨getindex�Ù$51d70f9a-cd67-44b9-8fd1-5ab70b526c7a„´precedence_heuristic §cell_idÙ$51d70f9a-cd67-44b9-8fd1-5ab70b526c7a´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$98392c40-6542-4a26-8552-c0960bbaa6a6„´precedence_heuristic §cell_idÙ$98392c40-6542-4a26-8552-c0960bbaa6a6´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$39b055f5-3dbf-403c-b21e-210e3813d8b0„´precedence_heuristic §cell_idÙ$39b055f5-3dbf-403c-b21e-210e3813d8b0´downstream_cells_map€²upstream_cells_map�£img‘Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7Ù$b0ca0392-71b8-4f44-8c6c-0978a02a0e6c„´precedence_heuristic §cell_idÙ$b0ca0392-71b8-4f44-8c6c-0978a02a0e6c´downstream_cells_map€²upstream_cells_mapƒ§Example‘Ù$c45ff9b5-35d9-4a9d-a801-c762333a1f02¯compile_and_run�¶procname_num_processes‘Ù$a103c5af-42fe-4f8c-b78c-6946895105d7Ù$26aa369f-e5c7-4fe5-8b6b-903f4f4e91ba„´precedence_heuristic §cell_idÙ$26aa369f-e5c7-4fe5-8b6b-903f4f4e91ba´downstream_cells_map€²upstream_cells_map‚§Example‘Ù$c45ff9b5-35d9-4a9d-a801-c762333a1f02¯compile_and_run�Ù$a103c5af-42fe-4f8c-b78c-6946895105d7„´precedence_heuristic §cell_idÙ$a103c5af-42fe-4f8c-b78c-6946895105d7´downstream_cells_map�¶procname_num_processes‘Ù$b0ca0392-71b8-4f44-8c6c-0978a02a0e6c²upstream_cells_map‹§@md_str�¤Core�¡:�¨Base.get�¥@bind�¦Slider�¤Base�«PlutoRunner�·PlutoRunner.create_bond�¯Core.applicable�¨getindex�Ù$d8bb1d43-bf42-4a09-bdeb-5db406ef1ccd„´precedence_heuristic §cell_idÙ$d8bb1d43-bf42-4a09-bdeb-5db406ef1ccd´downstream_cells_map€²upstream_cells_map‡¤Dict�¤hbox�§@md_str�£Div�¢=>�£img‘Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7¨getindex�Ù$82230d6c-25ce-4d12-8842-e0651fc4b143„´precedence_heuristic §cell_idÙ$82230d6c-25ce-4d12-8842-e0651fc4b143´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$fc43b343-79cd-4342-8d80-8ea72cf34942„´precedence_heuristic §cell_idÙ$fc43b343-79cd-4342-8d80-8ea72cf34942´downstream_cells_map€²upstream_cells_map†§@md_str�¤hbox�¤Dict�£Div�¢=>�¨getindex�Ù$d2104fbd-ba22-4501-b03a-8809271d598b„´precedence_heuristic §cell_idÙ$d2104fbd-ba22-4501-b03a-8809271d598b´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$8a527c17-bf2b-4e6b-937f-ef3a269c5112„´precedence_heuristic §cell_idÙ$8a527c17-bf2b-4e6b-937f-ef3a269c5112´downstream_cells_map€²upstream_cells_map‚¢=>�£img‘Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7Ù$be0e3ba0-18cc-4b9a-a56d-2566f5148fae„´precedence_heuristic §cell_idÙ$be0e3ba0-18cc-4b9a-a56d-2566f5148fae´downstream_cells_map€²upstream_cells_map„§@md_str�¢=>�£img‘Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7¨getindex�Ù$2ff573a3-4a84-4497-9305-2d97e35e5e3d„´precedence_heuristic §cell_idÙ$2ff573a3-4a84-4497-9305-2d97e35e5e3d´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¨Foldable�¨getindex�Ù$1b617828-e2b2-4a94-a120-59fa533d3e11„´precedence_heuristic §cell_idÙ$1b617828-e2b2-4a94-a120-59fa533d3e11´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$c3590376-06ed-45a4-af0b-2d46f1a387c8„´precedence_heuristic §cell_idÙ$c3590376-06ed-45a4-af0b-2d46f1a387c8´downstream_cells_map€²upstream_cells_mapˆ§@md_str�¤hbox�­Base.getindex�¦@c_str�¤Base�£Div�¤Dict�¢=>�Ù$35ba1eea-56ae-4b74-af96-21ec5a93c455„´precedence_heuristic §cell_idÙ$35ba1eea-56ae-4b74-af96-21ec5a93c455´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$488b0c17-4f0f-43bf-a16c-b9faa7ae0595„´precedence_heuristic §cell_idÙ$488b0c17-4f0f-43bf-a16c-b9faa7ae0595´downstream_cells_map€²upstream_cells_map‚¥aside�©citeintro‘Ù$063f0acc-c023-46d0-9ed9-fbd7fbdcfa3bÙ$10a1b3a7-21c7-4f97-93e1-006ad3aea40d„´precedence_heuristic §cell_idÙ$10a1b3a7-21c7-4f97-93e1-006ad3aea40d´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$b68eb860-a5b4-4e9e-9fbf-6eb6ce43ae69„´precedence_heuristic §cell_idÙ$b68eb860-a5b4-4e9e-9fbf-6eb6ce43ae69´downstream_cells_map€²upstream_cells_map…§@md_str�¨Foldable�¢=>�£img‘Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7¨getindex�Ù$3dc860be-016d-49ee-8535-7d9457c70f85„´precedence_heuristic §cell_idÙ$3dc860be-016d-49ee-8535-7d9457c70f85´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¨Foldable�¨getindex�Ù$2e4dc3f9-a132-444f-a35d-f583823a7dfd„´precedence_heuristic §cell_idÙ$2e4dc3f9-a132-444f-a35d-f583823a7dfd´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¨Foldable�¨getindex�Ù$8981b5e2-2497-478e-ab28-a14b62f6f916„´precedence_heuristic §cell_idÙ$8981b5e2-2497-478e-ab28-a14b62f6f916´downstream_cells_map€²upstream_cells_mapƒ£run�§cmd_gen�¤@cmd�Ù$34a10003-2c32-4332-b3e6-ce70eec0cbbe„´precedence_heuristic §cell_idÙ$34a10003-2c32-4332-b3e6-ce70eec0cbbe´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$a0566fdb-a08d-4bcf-9b2f-ed211c9f111f„´precedence_heuristic §cell_idÙ$a0566fdb-a08d-4bcf-9b2f-ed211c9f111f´downstream_cells_map€²upstream_cells_map‚¥aside�©citeintro‘Ù$063f0acc-c023-46d0-9ed9-fbd7fbdcfa3bÙ$655e980d-b4e9-4f56-a5ae-380072242d27„´precedence_heuristic §cell_idÙ$655e980d-b4e9-4f56-a5ae-380072242d27´downstream_cells_map€²upstream_cells_map‚¤hbox�£img‘Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7Ù$4788d8b4-2efa-4489-80c3-71f405513644„´precedence_heuristic §cell_idÙ$4788d8b4-2efa-4489-80c3-71f405513644´downstream_cells_map�±sum_num_processes‘Ù$35aa1295-642f-4525-bf19-df2a42ff39d6²upstream_cells_map‹§@md_str�¤Core�¡:�¨Base.get�¥@bind�¦Slider�¤Base�«PlutoRunner�·PlutoRunner.create_bond�¯Core.applicable�¨getindex�Ù$233c13ff-f008-40b0-a6c5-c5395b2215ec„´precedence_heuristic §cell_idÙ$233c13ff-f008-40b0-a6c5-c5395b2215ec´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¨Foldable�¨getindex�Ù$6fc34de1-469b-41a9-9677-ff3182f7a498„´precedence_heuristic §cell_idÙ$6fc34de1-469b-41a9-9677-ff3182f7a498´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¨Foldable�¨getindex�Ù$b53ec488-ff25-4647-ab00-fbf90963a795„´precedence_heuristic §cell_idÙ$b53ec488-ff25-4647-ab00-fbf90963a795´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$c3c848ff-526a-450d-9b1c-5d9d3ccccf28„´precedence_heuristic §cell_idÙ$c3c848ff-526a-450d-9b1c-5d9d3ccccf28´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$063f0acc-c023-46d0-9ed9-fbd7fbdcfa3b„´precedence_heuristic §cell_idÙ$063f0acc-c023-46d0-9ed9-fbd7fbdcfa3b´downstream_cells_map�©citeintrošÙ$70e88569-cd5c-40e8-9198-6bf6578fb0a2Ù$921b5a18-0733-4032-a543-9d60e254b1b2Ù$d7117a24-aba6-4479-a40e-5005310a6b38Ù$8f46daf1-9ca2-4a08-99aa-4ed68af218b8Ù$a0566fdb-a08d-4bcf-9b2f-ed211c9f111fÙ$61af27f1-9f83-42f1-a419-06d12ea62133Ù$488b0c17-4f0f-43bf-a16c-b9faa7ae0595Ù$16f8d28b-f201-4fe5-8446-68d7d9ddfb3cÙ$a59db59c-d34e-4abd-8865-9907607e06a8Ù$f2417047-33fc-4489-8e89-115bc6b46c13²upstream_cells_map�¡*�Ù$4569aa05-9963-4976-ac63-caf3f3979e83„´precedence_heuristic §cell_idÙ$4569aa05-9963-4976-ac63-caf3f3979e83´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7„´precedence_heuristic §cell_idÙ$7565e3da-84ce-42b6-8d4b-3615576f33b7´downstream_cells_map…ªsave_image�¤Path‘Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7§imgpath�£URL‘Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7£imgÜÙ$c04bcc96-e5fe-4d6e-a12e-40dcde58c62eÙ$4e32f7fb-cd5a-4190-9c92-ba4029313475Ù$b94cd399-0370-49e9-a522-056f3af22955Ù$370f0f20-e373-4028-bca1-83e93678cbcbÙ$0e640e07-82c7-4dab-a8f1-2f634bbebdeaÙ$8a527c17-bf2b-4e6b-937f-ef3a269c5112Ù$39f48c25-6efb-4ff2-aedc-9d3e722dad24Ù$55e96151-2aa1-4ea0-b672-2038c57d911eÙ$be0e3ba0-18cc-4b9a-a56d-2566f5148faeÙ$d8bb1d43-bf42-4a09-bdeb-5db406ef1ccdÙ$091dd042-580b-4fda-8086-e048663aed6cÙ$7fc70992-973a-43c6-904a-dd1b622a5ed8Ù$23bfbe95-7ba2-41b9-bd8b-dc4baa3ad53aÙ$39b055f5-3dbf-403c-b21e-210e3813d8b0Ù$b68eb860-a5b4-4e9e-9fbf-6eb6ce43ae69Ù$f6f9447c-9bc9-432d-bd80-2c39f9d842f8Ù$1551122c-70ae-4e37-b3fb-4be91fcc4afbÙ$655e980d-b4e9-4f56-a5ae-380072242d27Ù$e4d1de1d-d57a-48ab-ad7a-c09b427daa03Ù$4aac6ab5-053a-4f60-9e2e-e8d61ff0cecbÙ$3ec3c058-a94d-4717-b99f-66373f2fa31dÙ$1152dec8-3810-42b1-bb2a-8755dcaef56c²upstream_cells_mapÞ¡!�·HypertextLiteral.Bypass�µPlutoUI.LocalResource�§PlutoUI‘Ù$8df4ff2f-d176-4b4e-a525-665b5d07ea52¨joinpath�¸HypertextLiteral.content�ªstartswith�¦String�£end�²PlutoTeachingTools‘Ù$8df4ff2f-d176-4b4e-a525-665b5d07ea52¤@htl�¿HypertextLiteral.attribute_pair�Ù&PlutoTeachingTools.RobustLocalResource�¤Path‘Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7·HypertextLiteral.Result�°HypertextLiteral‘Ù$8df4ff2f-d176-4b4e-a525-665b5d07ea52£URL‘Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7¡*�¨@__DIR__�¢in�¥split�Ù$7fc70992-973a-43c6-904a-dd1b622a5ed8„´precedence_heuristic §cell_idÙ$7fc70992-973a-43c6-904a-dd1b622a5ed8´downstream_cells_map€²upstream_cells_map…§@md_str�¨Foldable�¢=>�£img‘Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7¨getindex�Ù$fa024a5d-52a6-459d-894d-13a60ec723d2„´precedence_heuristic §cell_idÙ$fa024a5d-52a6-459d-894d-13a60ec723d2´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¨Foldable�¨getindex�Ù$f7f097cb-d7bd-49eb-a030-ac26f8f61a67„´precedence_heuristic §cell_idÙ$f7f097cb-d7bd-49eb-a030-ac26f8f61a67´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$3a2bfd4e-0ce6-4a79-a578-fc1b4ef563c5„´precedence_heuristic §cell_idÙ$3a2bfd4e-0ce6-4a79-a578-fc1b4ef563c5´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¨Foldable�¨getindex�Ù$a79c410a-bebf-434c-9730-568e0ff4f4c7„´precedence_heuristic §cell_idÙ$a79c410a-bebf-434c-9730-568e0ff4f4c7´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$7cf59087-efca-4f03-90dc-f2acefdcbc8a„´precedence_heuristic §cell_idÙ$7cf59087-efca-4f03-90dc-f2acefdcbc8a´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$5d72bf87-7f3a-4229-9d7a-2e63c115087d„´precedence_heuristic §cell_idÙ$5d72bf87-7f3a-4229-9d7a-2e63c115087d´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¨Foldable�¨getindex�Ù$e796b093-9c1d-4656-9acb-918de53f7e4d„´precedence_heuristic §cell_idÙ$e796b093-9c1d-4656-9acb-918de53f7e4d´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$954f1ab1-1e2f-458b-96d7-a1746631fac7„´precedence_heuristic §cell_idÙ$954f1ab1-1e2f-458b-96d7-a1746631fac7´downstream_cells_map�¤tree‘Ù$1bac238f-79c8-4f9f-a187-bacb288de3b0²upstream_cells_mapÞ­Luxor.Drawing�¤line�¦circle�¬Luxor.finish�¥Point�¤sign�°Luxor.background�¡-�¥@draw�¬Luxor.sethue�¡+�¡*�¬Luxor.origin�¤text�­Luxor.preview�¥Luxor‘Ù$8df4ff2f-d176-4b4e-a525-665b5d07ea52Ù$a771f33f-7ed1-41aa-bee0-c215729a8c8d„´precedence_heuristic §cell_idÙ$a771f33f-7ed1-41aa-bee0-c215729a8c8d´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$8da580fe-6b56-4d8f-ad43-aed7b728a06e„´precedence_heuristic §cell_idÙ$8da580fe-6b56-4d8f-ad43-aed7b728a06e´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$39f48c25-6efb-4ff2-aedc-9d3e722dad24„´precedence_heuristic §cell_idÙ$39f48c25-6efb-4ff2-aedc-9d3e722dad24´downstream_cells_map€²upstream_cells_map„§@md_str�¢=>�£img‘Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7¨getindex�Ù$e119c2d3-1e24-464f-b812-62f28c00a913„´precedence_heuristic §cell_idÙ$e119c2d3-1e24-464f-b812-62f28c00a913´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$a258eec9-f4f6-49bd-8470-8541836f5f6b„´precedence_heuristic §cell_idÙ$a258eec9-f4f6-49bd-8470-8541836f5f6b´downstream_cells_map€²upstream_cells_map†§@md_str�¤hbox�¤Dict�£Div�¢=>�¨getindex�Ù$79b405a5-54b5-4727-a0cd-b79522ad109f„´precedence_heuristic §cell_idÙ$79b405a5-54b5-4727-a0cd-b79522ad109f´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$93f0c63c-b597-4f89-809c-7af0476f319a„´precedence_heuristic §cell_idÙ$93f0c63c-b597-4f89-809c-7af0476f319a´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$944d827e-bc6a-4de8-b959-5fde8790bedc„´precedence_heuristic §cell_idÙ$944d827e-bc6a-4de8-b959-5fde8790bedc´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$c04bcc96-e5fe-4d6e-a12e-40dcde58c62e„´precedence_heuristic §cell_idÙ$c04bcc96-e5fe-4d6e-a12e-40dcde58c62e´downstream_cells_map€²upstream_cells_map„§@md_str�¢=>�£img‘Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7¨getindex�Ù$c420ad25-6af1-4fb4-823a-b6bbd4e10f7f„´precedence_heuristic §cell_idÙ$c420ad25-6af1-4fb4-823a-b6bbd4e10f7f´downstream_cells_map€²upstream_cells_map†§@md_str�¤hbox�¤Dict�£Div�¢=>�¨getindex�Ù$a6c337c4-0c81-4463-ad4f-9a4528d953ab„´precedence_heuristic §cell_idÙ$a6c337c4-0c81-4463-ad4f-9a4528d953ab´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$921b5a18-0733-4032-a543-9d60e254b1b2„´precedence_heuristic §cell_idÙ$921b5a18-0733-4032-a543-9d60e254b1b2´downstream_cells_map€²upstream_cells_mapƒ§@md_str�©citeintro‘Ù$063f0acc-c023-46d0-9ed9-fbd7fbdcfa3b¨getindex�Ù$2257220c-6f0e-4edf-9fea-7e388b84df9b„´precedence_heuristic §cell_idÙ$2257220c-6f0e-4edf-9fea-7e388b84df9b´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$c45ff9b5-35d9-4a9d-a801-c762333a1f02„´precedence_heuristic §cell_idÙ$c45ff9b5-35d9-4a9d-a801-c762333a1f02´downstream_cells_map„§Example•Ù$b0ca0392-71b8-4f44-8c6c-0978a02a0e6cÙ$35aa1295-642f-4525-bf19-df2a42ff39d6Ù$ce7bf747-7116-4e76-9004-f234317046c3Ù$26aa369f-e5c7-4fe5-8b6b-903f4f4e91baÙ$c45ff9b5-35d9-4a9d-a801-c762333a1f02·SimpleClang.compile_lib�¤code�»SimpleClang.compile_and_run‘Ù$c45ff9b5-35d9-4a9d-a801-c762333a1f02²upstream_cells_map�¥split�¥CCode�§dirname�¨joinpath�§Example‘Ù$c45ff9b5-35d9-4a9d-a801-c762333a1f02¥error�¦String�»SimpleClang.compile_and_run‘Ù$c45ff9b5-35d9-4a9d-a801-c762333a1f02£end�«SimpleClang‘Ù$8df4ff2f-d176-4b4e-a525-665b5d07ea52¨@__DIR__�¢==�§CppCode�¦CLCode�¤read�Ù$4aac6ab5-053a-4f60-9e2e-e8d61ff0cecb„´precedence_heuristic §cell_idÙ$4aac6ab5-053a-4f60-9e2e-e8d61ff0cecb´downstream_cells_map€²upstream_cells_map‚¢=>�£img‘Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7Ù$61af27f1-9f83-42f1-a419-06d12ea62133„´precedence_heuristic §cell_idÙ$61af27f1-9f83-42f1-a419-06d12ea62133´downstream_cells_map€²upstream_cells_map‚¥aside�©citeintro‘Ù$063f0acc-c023-46d0-9ed9-fbd7fbdcfa3bÙ$52d428d5-cb33-4f2a-89eb-3a8ce3f5bb81„´precedence_heuristic §cell_idÙ$52d428d5-cb33-4f2a-89eb-3a8ce3f5bb81´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¨Foldable�¨getindex�Ù$d7e31ced-4eb2-4221-b83f-462e8f32fe89„´precedence_heuristic §cell_idÙ$d7e31ced-4eb2-4221-b83f-462e8f32fe89´downstream_cells_map€²upstream_cells_map„§@md_str�¥aside�¨Foldable�¨getindex�Ù$2c84bd84-b54d-4594-b9f8-35db2124d7e8„´precedence_heuristic §cell_idÙ$2c84bd84-b54d-4594-b9f8-35db2124d7e8´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$32f740e7-9338-4c42-8eaf-ce8022412c50„´precedence_heuristic §cell_idÙ$32f740e7-9338-4c42-8eaf-ce8022412c50´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$db16e939-b490-497b-a03f-80ce2e8485af„´precedence_heuristic §cell_idÙ$db16e939-b490-497b-a03f-80ce2e8485af´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¨Foldable�¨getindex�Ù$7d37fbea-baa3-43ec-b003-a4707017a4cf„´precedence_heuristic §cell_idÙ$7d37fbea-baa3-43ec-b003-a4707017a4cf´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$568057f5-b0b8-4225-8e4b-5eec911a52ef„´precedence_heuristic §cell_idÙ$568057f5-b0b8-4225-8e4b-5eec911a52ef´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$370f0f20-e373-4028-bca1-83e93678cbcb„´precedence_heuristic §cell_idÙ$370f0f20-e373-4028-bca1-83e93678cbcb´downstream_cells_map€²upstream_cells_map�£img‘Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7Ù$1bac238f-79c8-4f9f-a187-bacb288de3b0„´precedence_heuristic §cell_idÙ$1bac238f-79c8-4f9f-a187-bacb288de3b0´downstream_cells_map€²upstream_cells_map�¤tree‘Ù$954f1ab1-1e2f-458b-96d7-a1746631fac7Ù$40606ee3-38cc-4123-9b86-b774bf89e499„´precedence_heuristic §cell_idÙ$40606ee3-38cc-4123-9b86-b774bf89e499´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$8df4ff2f-d176-4b4e-a525-665b5d07ea52„´precedence_heuristic§cell_idÙ$8df4ff2f-d176-4b4e-a525-665b5d07ea52´downstream_cells_map‰¬StaticArrays�«SimpleClang‘Ù$c45ff9b5-35d9-4a9d-a801-c762333a1f02§PlutoUI’Ù$58e12afd-6eb0-4731-bd57-d9ae7ab4e164Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7°HypertextLiteral’Ù$58e12afd-6eb0-4731-bd57-d9ae7ab4e164Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7²ExperimentalLayout�®BenchmarkTools�¨Markdown‘Ù$e172f5c5-8b96-4efd-9cf3-805c58d1a6a3¥Luxor’Ù$c55dcd4a-8438-4679-9c4a-78cceec6835dÙ$954f1ab1-1e2f-458b-96d7-a1746631fac7²PlutoTeachingTools’Ù$58e12afd-6eb0-4731-bd57-d9ae7ab4e164Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7²upstream_cells_map€Ù$23bfbe95-7ba2-41b9-bd8b-dc4baa3ad53a„´precedence_heuristic §cell_idÙ$23bfbe95-7ba2-41b9-bd8b-dc4baa3ad53a´downstream_cells_map€²upstream_cells_map…§@md_str�¨Foldable�¢=>�£img‘Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7¨getindex�Ù$49b596b8-891d-4f3f-a6a4-a62cc8237df3„´precedence_heuristic §cell_idÙ$49b596b8-891d-4f3f-a6a4-a62cc8237df3´downstream_cells_map€²upstream_cells_mapƒ§@md_str�ªdefinition‘Ù$e172f5c5-8b96-4efd-9cf3-805c58d1a6a3¨getindex�Ù$cf799c26-1cea-4b38-9a15-8497813bd668„´precedence_heuristic §cell_idÙ$cf799c26-1cea-4b38-9a15-8497813bd668´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$70e88569-cd5c-40e8-9198-6bf6578fb0a2„´precedence_heuristic §cell_idÙ$70e88569-cd5c-40e8-9198-6bf6578fb0a2´downstream_cells_map€²upstream_cells_mapƒ§@md_str�©citeintro‘Ù$063f0acc-c023-46d0-9ed9-fbd7fbdcfa3b¨getindex�Ù$5441e428-b320-433c-acde-15fe6bf58537„´precedence_heuristic §cell_idÙ$5441e428-b320-433c-acde-15fe6bf58537´downstream_cells_map€²upstream_cells_mapƒ£run�§cmd_gen�¤@cmd�Ù$bfab5c2d-61c3-468b-9ddf-4aaa49cb7785„´precedence_heuristic §cell_idÙ$bfab5c2d-61c3-468b-9ddf-4aaa49cb7785´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$7d9ac5f9-39bf-4052-ad8a-ac0fec15c64a„´precedence_heuristic §cell_idÙ$7d9ac5f9-39bf-4052-ad8a-ac0fec15c64a´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$86394e1c-0ff4-449a-8940-4b5906d8b6f0„´precedence_heuristic §cell_idÙ$86394e1c-0ff4-449a-8940-4b5906d8b6f0´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¨Foldable�¨getindex�Ù$97d3cf3f-ddac-4850-8b05-bdc0c4741f61„´precedence_heuristic §cell_idÙ$97d3cf3f-ddac-4850-8b05-bdc0c4741f61´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¨Foldable�¨getindex�Ù$b9a9e335-1328-4c63-a213-ce21263bc201„´precedence_heuristic §cell_idÙ$b9a9e335-1328-4c63-a213-ce21263bc201´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¨Foldable�¨getindex�Ù$9b4cae31-c319-444e-98c8-2c0bfc6dfa0c„´precedence_heuristic §cell_idÙ$9b4cae31-c319-444e-98c8-2c0bfc6dfa0c´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$7b1d26c6-9499-4e44-84c8-c272737a175e„´precedence_heuristic §cell_idÙ$7b1d26c6-9499-4e44-84c8-c272737a175e´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$360091c4-d3a0-462d-abcf-b9bbb9480871„´precedence_heuristic §cell_idÙ$360091c4-d3a0-462d-abcf-b9bbb9480871´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$f2417047-33fc-4489-8e89-115bc6b46c13„´precedence_heuristic §cell_idÙ$f2417047-33fc-4489-8e89-115bc6b46c13´downstream_cells_map€²upstream_cells_map„§@md_str�¥aside�©citeintro‘Ù$063f0acc-c023-46d0-9ed9-fbd7fbdcfa3b¨getindex�Ù$1152dec8-3810-42b1-bb2a-8755dcaef56c„´precedence_heuristic §cell_idÙ$1152dec8-3810-42b1-bb2a-8755dcaef56c´downstream_cells_map�¤img1‘Ù$133f4c7d-33e0-4e13-b716-f538125436ca²upstream_cells_map�£img‘Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7Ù$8f46daf1-9ca2-4a08-99aa-4ed68af218b8„´precedence_heuristic §cell_idÙ$8f46daf1-9ca2-4a08-99aa-4ed68af218b8´downstream_cells_map€²upstream_cells_map‚¥aside�©citeintro‘Ù$063f0acc-c023-46d0-9ed9-fbd7fbdcfa3bÙ$143dca7c-f9a4-472a-a4bc-4578e4e8413b„´precedence_heuristic §cell_idÙ$143dca7c-f9a4-472a-a4bc-4578e4e8413b´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$c0daf219-cb87-4203-b835-49ab7eb955be„´precedence_heuristic §cell_idÙ$c0daf219-cb87-4203-b835-49ab7eb955be´downstream_cells_map€²upstream_cells_map…§@md_str�¨getindex�¦list_2‘Ù$6c1984f6-4e36-4637-b0da-c7dd8b0f9ff0¦list_1‘Ù$e3474aea-ee14-4c78-ae46-5badc66a543a©mpicc_cmd‘Ù$88f33f35-d922-4d98-af4a-ebb79d9b7dc6Ù$d04b9af5-f004-4ca4-b1c9-2c86d46cb37d„´precedence_heuristic §cell_idÙ$d04b9af5-f004-4ca4-b1c9-2c86d46cb37d´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$fc705b81-7310-44cc-ad9f-dc2cf8a9b645„´precedence_heuristic §cell_idÙ$fc705b81-7310-44cc-ad9f-dc2cf8a9b645´downstream_cells_map€²upstream_cells_map�¤path‘Ù$c55dcd4a-8438-4679-9c4a-78cceec6835dÙ$6d2b3dbc-0686-49f0-904a-56c3ce63b4dd„´precedence_heuristic §cell_idÙ$6d2b3dbc-0686-49f0-904a-56c3ce63b4dd´downstream_cells_map€²upstream_cells_mapˆ§@md_str�¤hbox�­Base.getindex�¦@c_str�¤Base�£Div�¤Dict�¢=>�Ù$e172f5c5-8b96-4efd-9cf3-805c58d1a6a3„´precedence_heuristic §cell_idÙ$e172f5c5-8b96-4efd-9cf3-805c58d1a6a3´downstream_cells_map�ªdefinition‘Ù$49b596b8-891d-4f3f-a6a4-a62cc8237df3²upstream_cells_mapƒ³Markdown.Admonition�«Markdown.MD�¨Markdown‘Ù$8df4ff2f-d176-4b4e-a525-665b5d07ea52Ù$ce7bf747-7116-4e76-9004-f234317046c3„´precedence_heuristic §cell_idÙ$ce7bf747-7116-4e76-9004-f234317046c3´downstream_cells_map€²upstream_cells_map‚§Example‘Ù$c45ff9b5-35d9-4a9d-a801-c762333a1f02¯compile_and_run�Ù$d722a86d-6d51-4d91-ac22-53af94c91497„´precedence_heuristic §cell_idÙ$d722a86d-6d51-4d91-ac22-53af94c91497´downstream_cells_map€²upstream_cells_mapˆ§@md_str�­Base.getindex�¦@c_str�¤Base�¤Dict�¤vbox�£Div�¢=>�Ù$273ad3a6-cb32-49bb-8702-fdaf8597e812„´precedence_heuristic §cell_idÙ$273ad3a6-cb32-49bb-8702-fdaf8597e812´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$6041a909-d26c-4ab1-836b-29953c578759„´precedence_heuristic §cell_idÙ$6041a909-d26c-4ab1-836b-29953c578759´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¨Foldable�¨getindex�Ù$b94cd399-0370-49e9-a522-056f3af22955„´precedence_heuristic §cell_idÙ$b94cd399-0370-49e9-a522-056f3af22955´downstream_cells_map€²upstream_cells_map�£img‘Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7Ù$58e12afd-6eb0-4731-bd57-d9ae7ab4e164„´precedence_heuristic §cell_idÙ$58e12afd-6eb0-4731-bd57-d9ae7ab4e164´downstream_cells_map€²upstream_cells_map‰²PlutoTeachingTools‘Ù$8df4ff2f-d176-4b4e-a525-665b5d07ea52§PlutoUI‘Ù$8df4ff2f-d176-4b4e-a525-665b5d07ea52·HypertextLiteral.Result�°HypertextLiteral‘Ù$8df4ff2f-d176-4b4e-a525-665b5d07ea52·HypertextLiteral.Bypass�¸HypertextLiteral.content�Ù$PlutoTeachingTools.ChooseDisplayMode�¤@htl�·PlutoUI.TableOfContents�Ù$141d162c-c817-498f-be16-f1cd35d82487„´precedence_heuristic §cell_idÙ$141d162c-c817-498f-be16-f1cd35d82487´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¨Foldable�¨getindex�Ù$e44b0038-d68f-4a49-9da2-67fbcbe098c3„´precedence_heuristic §cell_idÙ$e44b0038-d68f-4a49-9da2-67fbcbe098c3´downstream_cells_map€²upstream_cells_map�¤path‘Ù$c55dcd4a-8438-4679-9c4a-78cceec6835dÙ$b5a3e471-af4a-466f-bbae-96306bcc7563„´precedence_heuristic §cell_idÙ$b5a3e471-af4a-466f-bbae-96306bcc7563´downstream_cells_map€²upstream_cells_mapˆ§@md_str�­Base.getindex�¦@c_str�¤Base�¤Dict�¤vbox�£Div�¢=>�Ù$21b6133f-db59-4885-9b3d-331c3d6ef306„´precedence_heuristic §cell_idÙ$21b6133f-db59-4885-9b3d-331c3d6ef306´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$beee4908-d519-413a-964f-149bb82cdbb8„´precedence_heuristic §cell_idÙ$beee4908-d519-413a-964f-149bb82cdbb8´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$091dd042-580b-4fda-8086-e048663aed6c„´precedence_heuristic §cell_idÙ$091dd042-580b-4fda-8086-e048663aed6c´downstream_cells_map€²upstream_cells_map„§@md_str�¢=>�£img‘Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7¨getindex�Ù$60bc118f-6795-43f9-97a2-865fd1704895„´precedence_heuristic §cell_idÙ$60bc118f-6795-43f9-97a2-865fd1704895´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$16f8d28b-f201-4fe5-8446-68d7d9ddfb3c„´precedence_heuristic §cell_idÙ$16f8d28b-f201-4fe5-8446-68d7d9ddfb3c´downstream_cells_map€²upstream_cells_map‚¥aside�©citeintro‘Ù$063f0acc-c023-46d0-9ed9-fbd7fbdcfa3bÙ$35aa1295-642f-4525-bf19-df2a42ff39d6„´precedence_heuristic §cell_idÙ$35aa1295-642f-4525-bf19-df2a42ff39d6´downstream_cells_map€²upstream_cells_mapƒ§Example‘Ù$c45ff9b5-35d9-4a9d-a801-c762333a1f02±sum_num_processes‘Ù$4788d8b4-2efa-4489-80c3-71f405513644¯compile_and_run�Ù$e832ce25-94e2-4743-854d-02b52cc7b56d„´precedence_heuristic §cell_idÙ$e832ce25-94e2-4743-854d-02b52cc7b56d´downstream_cells_map€²upstream_cells_map„§@md_str�¥aside�¨Foldable�¨getindex�Ù$9612a1ef-fd3a-4a58-87b0-b2255ac86331„´precedence_heuristic §cell_idÙ$9612a1ef-fd3a-4a58-87b0-b2255ac86331´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$d7117a24-aba6-4479-a40e-5005310a6b38„´precedence_heuristic §cell_idÙ$d7117a24-aba6-4479-a40e-5005310a6b38´downstream_cells_map€²upstream_cells_map‚¥aside�©citeintro‘Ù$063f0acc-c023-46d0-9ed9-fbd7fbdcfa3bÙ$0e640e07-82c7-4dab-a8f1-2f634bbebdea„´precedence_heuristic §cell_idÙ$0e640e07-82c7-4dab-a8f1-2f634bbebdea´downstream_cells_map€²upstream_cells_mapƒ¤hbox�¢=>�£img‘Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7Ù$f2ebc6fb-e07c-4922-897d-9bbe0f5fa1d0„´precedence_heuristic §cell_idÙ$f2ebc6fb-e07c-4922-897d-9bbe0f5fa1d0´downstream_cells_map€²upstream_cells_map‰¤Dict�­Base.getindex�¤hbox�§@md_str�©@html_str�£Div�¤Base�®Base.Docs.HTML�¢=>�Ù$55e96151-2aa1-4ea0-b672-2038c57d911e„´precedence_heuristic §cell_idÙ$55e96151-2aa1-4ea0-b672-2038c57d911e´downstream_cells_map€²upstream_cells_mapƒ¥aside�¢=>�£img‘Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7Ù$67dee339-98b4-4714-88b2-8098a13235f2„´precedence_heuristic §cell_idÙ$67dee339-98b4-4714-88b2-8098a13235f2´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$4e32f7fb-cd5a-4190-9c92-ba4029313475„´precedence_heuristic §cell_idÙ$4e32f7fb-cd5a-4190-9c92-ba4029313475´downstream_cells_map€²upstream_cells_map�£img‘Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7Ù$dbc19cbb-1349-4904-b655-2452aa7e2452„´precedence_heuristic §cell_idÙ$dbc19cbb-1349-4904-b655-2452aa7e2452´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¤vbox�¨getindex�Ù$0d69e94b-492a-4acc-adba-a2126b871724„´precedence_heuristic §cell_idÙ$0d69e94b-492a-4acc-adba-a2126b871724´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¤vbox�¨getindex�Ù$4309dc43-aeb8-4ec7-94fe-0e320b784349„´precedence_heuristic §cell_idÙ$4309dc43-aeb8-4ec7-94fe-0e320b784349´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$1551122c-70ae-4e37-b3fb-4be91fcc4afb„´precedence_heuristic §cell_idÙ$1551122c-70ae-4e37-b3fb-4be91fcc4afb´downstream_cells_map€²upstream_cells_map…§@md_str�¨Foldable�¢=>�£img‘Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7¨getindex�Ù$3e98c0ca-1b47-4631-83d7-cd0c8c0a431d„´precedence_heuristic §cell_idÙ$3e98c0ca-1b47-4631-83d7-cd0c8c0a431d´downstream_cells_map�¨citepara‘Ù$3a50ca06-06e8-4a61-ade2-afbfc52ca655²upstream_cells_map�¡*�Ù$3ec3c058-a94d-4717-b99f-66373f2fa31d„´precedence_heuristic §cell_idÙ$3ec3c058-a94d-4717-b99f-66373f2fa31d´downstream_cells_map€²upstream_cells_map�£img‘Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7´cell_execution_orderÜŽÙ$8df4ff2f-d176-4b4e-a525-665b5d07ea52Ù$58e12afd-6eb0-4731-bd57-d9ae7ab4e164Ù$bfab5c2d-61c3-468b-9ddf-4aaa49cb7785Ù$063f0acc-c023-46d0-9ed9-fbd7fbdcfa3bÙ$3e98c0ca-1b47-4631-83d7-cd0c8c0a431dÙ$5a566137-fbd1-45b2-9a55-e4aded366bb3Ù$a6c337c4-0c81-4463-ad4f-9a4528d953abÙ$cf799c26-1cea-4b38-9a15-8497813bd668Ù$6d2b3dbc-0686-49f0-904a-56c3ce63b4ddÙ$b5a3e471-af4a-466f-bbae-96306bcc7563Ù$d722a86d-6d51-4d91-ac22-53af94c91497Ù$c3590376-06ed-45a4-af0b-2d46f1a387c8Ù$52d428d5-cb33-4f2a-89eb-3a8ce3f5bb81Ù$273ad3a6-cb32-49bb-8702-fdaf8597e812Ù$82230d6c-25ce-4d12-8842-e0651fc4b143Ù$7d9ac5f9-39bf-4052-ad8a-ac0fec15c64aÙ$a103c5af-42fe-4f8c-b78c-6946895105d7Ù$21b6133f-db59-4885-9b3d-331c3d6ef306Ù$35ba1eea-56ae-4b74-af96-21ec5a93c455Ù$8981b5e2-2497-478e-ab28-a14b62f6f916Ù$5441e428-b320-433c-acde-15fe6bf58537Ù$70e88569-cd5c-40e8-9198-6bf6578fb0a2Ù$40606ee3-38cc-4123-9b86-b774bf89e499Ù$9b4cae31-c319-444e-98c8-2c0bfc6dfa0cÙ$8b83570a-6982-47e5-a167-a6d6afee0f7dÙ$5d72bf87-7f3a-4229-9d7a-2e63c115087dÙ$7b1d26c6-9499-4e44-84c8-c272737a175eÙ$fc43b343-79cd-4342-8d80-8ea72cf34942Ù$233c13ff-f008-40b0-a6c5-c5395b2215ecÙ$ad3559d1-6180-4eaa-b97d-3c1f10f036b9Ù$c420ad25-6af1-4fb4-823a-b6bbd4e10f7fÙ$db16e939-b490-497b-a03f-80ce2e8485afÙ$4fdb4cd6-a794-4b14-84b0-72f484c6ea86Ù$a258eec9-f4f6-49bd-8470-8541836f5f6bÙ$6fc34de1-469b-41a9-9677-ff3182f7a498Ù$de20bf96-7d33-4a78-8147-f0b7f8488e46Ù$e119c2d3-1e24-464f-b812-62f28c00a913Ù$dbc19cbb-1349-4904-b655-2452aa7e2452Ù$2ff573a3-4a84-4497-9305-2d97e35e5e3dÙ$6be49c46-4900-4457-81b4-0704cd7da0afÙ$60bc118f-6795-43f9-97a2-865fd1704895Ù$0d69e94b-492a-4acc-adba-a2126b871724Ù$b9a9e335-1328-4c63-a213-ce21263bc201Ù$a1b2d090-d498-4d5d-90a0-8cdc648dc833Ù$a771f33f-7ed1-41aa-bee0-c215729a8c8dÙ$141d162c-c817-498f-be16-f1cd35d82487Ù$7cf59087-efca-4f03-90dc-f2acefdcbc8aÙ$4788d8b4-2efa-4489-80c3-71f405513644Ù$e832ce25-94e2-4743-854d-02b52cc7b56dÙ$79b405a5-54b5-4727-a0cd-b79522ad109fÙ$d2104fbd-ba22-4501-b03a-8809271d598bÙ$4569aa05-9963-4976-ac63-caf3f3979e83Ù$34a10003-2c32-4332-b3e6-ce70eec0cbbeÙ$d7e31ced-4eb2-4221-b83f-462e8f32fe89Ù$c3c848ff-526a-450d-9b1c-5d9d3ccccf28Ù$67dee339-98b4-4714-88b2-8098a13235f2Ù$3a50ca06-06e8-4a61-ade2-afbfc52ca655Ù$32f740e7-9338-4c42-8eaf-ce8022412c50Ù$93f0c63c-b597-4f89-809c-7af0476f319aÙ$568057f5-b0b8-4225-8e4b-5eec911a52efÙ$a79c410a-bebf-434c-9730-568e0ff4f4c7Ù$c1285653-38ba-418b-bdf5-cda99440998dÙ$88f33f35-d922-4d98-af4a-ebb79d9b7dc6Ù$e3474aea-ee14-4c78-ae46-5badc66a543aÙ$6c1984f6-4e36-4637-b0da-c7dd8b0f9ff0Ù$c0daf219-cb87-4203-b835-49ab7eb955beÙ$51d70f9a-cd67-44b9-8fd1-5ab70b526c7aÙ$944d827e-bc6a-4de8-b959-5fde8790bedcÙ$3a2bfd4e-0ce6-4a79-a578-fc1b4ef563c5Ù$beee4908-d519-413a-964f-149bb82cdbb8Ù$b540d5e3-6686-479a-b2c7-c1f65b85b6baÙ$9a100ccf-1ad3-4d2c-bbe0-e297969eb69eÙ$921b5a18-0733-4032-a543-9d60e254b1b2Ù$9612a1ef-fd3a-4a58-87b0-b2255ac86331Ù$98392c40-6542-4a26-8552-c0960bbaa6a6Ù$c253bb24-ad76-4b58-8dfc-7dc2576e3db5Ù$1b617828-e2b2-4a94-a120-59fa533d3e11Ù$f2ebc6fb-e07c-4922-897d-9bbe0f5fa1d0Ù$8da580fe-6b56-4d8f-ad43-aed7b728a06eÙ$fa024a5d-52a6-459d-894d-13a60ec723d2Ù$360091c4-d3a0-462d-abcf-b9bbb9480871Ù$3dc860be-016d-49ee-8535-7d9457c70f85Ù$c55dcd4a-8438-4679-9c4a-78cceec6835dÙ$e44b0038-d68f-4a49-9da2-67fbcbe098c3Ù$7d37fbea-baa3-43ec-b003-a4707017a4cfÙ$fc705b81-7310-44cc-ad9f-dc2cf8a9b645Ù$86394e1c-0ff4-449a-8940-4b5906d8b6f0Ù$d7117a24-aba6-4479-a40e-5005310a6b38Ù$2257220c-6f0e-4edf-9fea-7e388b84df9bÙ$2e4dc3f9-a132-444f-a35d-f583823a7dfdÙ$8f46daf1-9ca2-4a08-99aa-4ed68af218b8Ù$2c84bd84-b54d-4594-b9f8-35db2124d7e8Ù$4309dc43-aeb8-4ec7-94fe-0e320b784349Ù$a0566fdb-a08d-4bcf-9b2f-ed211c9f111fÙ$e796b093-9c1d-4656-9acb-918de53f7e4dÙ$d04b9af5-f004-4ca4-b1c9-2c86d46cb37dÙ$97d3cf3f-ddac-4850-8b05-bdc0c4741f61Ù$61af27f1-9f83-42f1-a419-06d12ea62133Ù$143dca7c-f9a4-472a-a4bc-4578e4e8413bÙ$954f1ab1-1e2f-458b-96d7-a1746631fac7Ù$1bac238f-79c8-4f9f-a187-bacb288de3b0Ù$21d507f6-02f8-4f8b-84f1-bcb84731df66Ù$b53ec488-ff25-4647-ab00-fbf90963a795Ù$de72d596-0daf-4629-bbb5-20bb8a67cbedÙ$488b0c17-4f0f-43bf-a16c-b9faa7ae0595Ù$10a1b3a7-21c7-4f97-93e1-006ad3aea40dÙ$f7f097cb-d7bd-49eb-a030-ac26f8f61a67Ù$6041a909-d26c-4ab1-836b-29953c578759Ù$16f8d28b-f201-4fe5-8446-68d7d9ddfb3cÙ$a59db59c-d34e-4abd-8865-9907607e06a8Ù$f2417047-33fc-4489-8e89-115bc6b46c13Ù$7565e3da-84ce-42b6-8d4b-3615576f33b7Ù$c04bcc96-e5fe-4d6e-a12e-40dcde58c62eÙ$4e32f7fb-cd5a-4190-9c92-ba4029313475Ù$b94cd399-0370-49e9-a522-056f3af22955Ù$370f0f20-e373-4028-bca1-83e93678cbcbÙ$0e640e07-82c7-4dab-a8f1-2f634bbebdeaÙ$8a527c17-bf2b-4e6b-937f-ef3a269c5112Ù$39f48c25-6efb-4ff2-aedc-9d3e722dad24Ù$55e96151-2aa1-4ea0-b672-2038c57d911eÙ$be0e3ba0-18cc-4b9a-a56d-2566f5148faeÙ$d8bb1d43-bf42-4a09-bdeb-5db406ef1ccdÙ$091dd042-580b-4fda-8086-e048663aed6cÙ$7fc70992-973a-43c6-904a-dd1b622a5ed8Ù$23bfbe95-7ba2-41b9-bd8b-dc4baa3ad53aÙ$39b055f5-3dbf-403c-b21e-210e3813d8b0Ù$b68eb860-a5b4-4e9e-9fbf-6eb6ce43ae69Ù$f6f9447c-9bc9-432d-bd80-2c39f9d842f8Ù$1551122c-70ae-4e37-b3fb-4be91fcc4afbÙ$655e980d-b4e9-4f56-a5ae-380072242d27Ù$e4d1de1d-d57a-48ab-ad7a-c09b427daa03Ù$4aac6ab5-053a-4f60-9e2e-e8d61ff0cecbÙ$3ec3c058-a94d-4717-b99f-66373f2fa31dÙ$1152dec8-3810-42b1-bb2a-8755dcaef56cÙ$133f4c7d-33e0-4e13-b716-f538125436caÙ$c45ff9b5-35d9-4a9d-a801-c762333a1f02Ù$b0ca0392-71b8-4f44-8c6c-0978a02a0e6cÙ$35aa1295-642f-4525-bf19-df2a42ff39d6Ù$ce7bf747-7116-4e76-9004-f234317046c3Ù$26aa369f-e5c7-4fe5-8b6b-903f4f4e91baÙ$e172f5c5-8b96-4efd-9cf3-805c58d1a6a3Ù$49b596b8-891d-4f3f-a6a4-a62cc8237df3´last_hot_reload_timeË©shortpath¨3_mpi.jl®process_status¥ready¤pathÙ7/home/runner/work/LINMA2710/LINMA2710/Lectures/3_mpi.jl­pluto_version¦v1.0.3®last_save_timeËAÚ�r‰µã¬ªcell_orderÜŽÙ$58e12afd-6eb0-4731-bd57-d9ae7ab4e164Ù$bfab5c2d-61c3-468b-9ddf-4aaa49cb7785Ù$063f0acc-c023-46d0-9ed9-fbd7fbdcfa3bÙ$3e98c0ca-1b47-4631-83d7-cd0c8c0a431dÙ$5a566137-fbd1-45b2-9a55-e4aded366bb3Ù$a6c337c4-0c81-4463-ad4f-9a4528d953abÙ$c04bcc96-e5fe-4d6e-a12e-40dcde58c62eÙ$cf799c26-1cea-4b38-9a15-8497813bd668Ù$6d2b3dbc-0686-49f0-904a-56c3ce63b4ddÙ$b5a3e471-af4a-466f-bbae-96306bcc7563Ù$d722a86d-6d51-4d91-ac22-53af94c91497Ù$c3590376-06ed-45a4-af0b-2d46f1a387c8Ù$52d428d5-cb33-4f2a-89eb-3a8ce3f5bb81Ù$273ad3a6-cb32-49bb-8702-fdaf8597e812Ù$4e32f7fb-cd5a-4190-9c92-ba4029313475Ù$82230d6c-25ce-4d12-8842-e0651fc4b143Ù$7d9ac5f9-39bf-4052-ad8a-ac0fec15c64aÙ$b0ca0392-71b8-4f44-8c6c-0978a02a0e6cÙ$a103c5af-42fe-4f8c-b78c-6946895105d7Ù$21b6133f-db59-4885-9b3d-331c3d6ef306Ù$35ba1eea-56ae-4b74-af96-21ec5a93c455Ù$8981b5e2-2497-478e-ab28-a14b62f6f916Ù$5441e428-b320-433c-acde-15fe6bf58537Ù$70e88569-cd5c-40e8-9198-6bf6578fb0a2Ù$40606ee3-38cc-4123-9b86-b774bf89e499Ù$b94cd399-0370-49e9-a522-056f3af22955Ù$9b4cae31-c319-444e-98c8-2c0bfc6dfa0cÙ$8b83570a-6982-47e5-a167-a6d6afee0f7dÙ$5d72bf87-7f3a-4229-9d7a-2e63c115087dÙ$7b1d26c6-9499-4e44-84c8-c272737a175eÙ$fc43b343-79cd-4342-8d80-8ea72cf34942Ù$233c13ff-f008-40b0-a6c5-c5395b2215ecÙ$ad3559d1-6180-4eaa-b97d-3c1f10f036b9Ù$c420ad25-6af1-4fb4-823a-b6bbd4e10f7fÙ$db16e939-b490-497b-a03f-80ce2e8485afÙ$4fdb4cd6-a794-4b14-84b0-72f484c6ea86Ù$a258eec9-f4f6-49bd-8470-8541836f5f6bÙ$6fc34de1-469b-41a9-9677-ff3182f7a498Ù$de20bf96-7d33-4a78-8147-f0b7f8488e46Ù$e119c2d3-1e24-464f-b812-62f28c00a913Ù$dbc19cbb-1349-4904-b655-2452aa7e2452Ù$2ff573a3-4a84-4497-9305-2d97e35e5e3dÙ$6be49c46-4900-4457-81b4-0704cd7da0afÙ$60bc118f-6795-43f9-97a2-865fd1704895Ù$0d69e94b-492a-4acc-adba-a2126b871724Ù$b9a9e335-1328-4c63-a213-ce21263bc201Ù$a1b2d090-d498-4d5d-90a0-8cdc648dc833Ù$a771f33f-7ed1-41aa-bee0-c215729a8c8dÙ$370f0f20-e373-4028-bca1-83e93678cbcbÙ$141d162c-c817-498f-be16-f1cd35d82487Ù$7cf59087-efca-4f03-90dc-f2acefdcbc8aÙ$35aa1295-642f-4525-bf19-df2a42ff39d6Ù$4788d8b4-2efa-4489-80c3-71f405513644Ù$e832ce25-94e2-4743-854d-02b52cc7b56dÙ$79b405a5-54b5-4727-a0cd-b79522ad109fÙ$d2104fbd-ba22-4501-b03a-8809271d598bÙ$0e640e07-82c7-4dab-a8f1-2f634bbebdeaÙ$4569aa05-9963-4976-ac63-caf3f3979e83Ù$34a10003-2c32-4332-b3e6-ce70eec0cbbeÙ$ce7bf747-7116-4e76-9004-f234317046c3Ù$d7e31ced-4eb2-4221-b83f-462e8f32fe89Ù$c3c848ff-526a-450d-9b1c-5d9d3ccccf28Ù$67dee339-98b4-4714-88b2-8098a13235f2Ù$3a50ca06-06e8-4a61-ade2-afbfc52ca655Ù$32f740e7-9338-4c42-8eaf-ce8022412c50Ù$8a527c17-bf2b-4e6b-937f-ef3a269c5112Ù$93f0c63c-b597-4f89-809c-7af0476f319aÙ$568057f5-b0b8-4225-8e4b-5eec911a52efÙ$26aa369f-e5c7-4fe5-8b6b-903f4f4e91baÙ$a79c410a-bebf-434c-9730-568e0ff4f4c7Ù$39f48c25-6efb-4ff2-aedc-9d3e722dad24Ù$55e96151-2aa1-4ea0-b672-2038c57d911eÙ$be0e3ba0-18cc-4b9a-a56d-2566f5148faeÙ$c0daf219-cb87-4203-b835-49ab7eb955beÙ$c1285653-38ba-418b-bdf5-cda99440998dÙ$88f33f35-d922-4d98-af4a-ebb79d9b7dc6Ù$e3474aea-ee14-4c78-ae46-5badc66a543aÙ$6c1984f6-4e36-4637-b0da-c7dd8b0f9ff0Ù$51d70f9a-cd67-44b9-8fd1-5ab70b526c7aÙ$944d827e-bc6a-4de8-b959-5fde8790bedcÙ$3a2bfd4e-0ce6-4a79-a578-fc1b4ef563c5Ù$beee4908-d519-413a-964f-149bb82cdbb8Ù$d8bb1d43-bf42-4a09-bdeb-5db406ef1ccdÙ$b540d5e3-6686-479a-b2c7-c1f65b85b6baÙ$091dd042-580b-4fda-8086-e048663aed6cÙ$9a100ccf-1ad3-4d2c-bbe0-e297969eb69eÙ$921b5a18-0733-4032-a543-9d60e254b1b2Ù$9612a1ef-fd3a-4a58-87b0-b2255ac86331Ù$98392c40-6542-4a26-8552-c0960bbaa6a6Ù$49b596b8-891d-4f3f-a6a4-a62cc8237df3Ù$c253bb24-ad76-4b58-8dfc-7dc2576e3db5Ù$1b617828-e2b2-4a94-a120-59fa533d3e11Ù$f2ebc6fb-e07c-4922-897d-9bbe0f5fa1d0Ù$8da580fe-6b56-4d8f-ad43-aed7b728a06eÙ$fa024a5d-52a6-459d-894d-13a60ec723d2Ù$360091c4-d3a0-462d-abcf-b9bbb9480871Ù$e44b0038-d68f-4a49-9da2-67fbcbe098c3Ù$3dc860be-016d-49ee-8535-7d9457c70f85Ù$7fc70992-973a-43c6-904a-dd1b622a5ed8Ù$c55dcd4a-8438-4679-9c4a-78cceec6835dÙ$7d37fbea-baa3-43ec-b003-a4707017a4cfÙ$fc705b81-7310-44cc-ad9f-dc2cf8a9b645Ù$86394e1c-0ff4-449a-8940-4b5906d8b6f0Ù$23bfbe95-7ba2-41b9-bd8b-dc4baa3ad53aÙ$d7117a24-aba6-4479-a40e-5005310a6b38Ù$2257220c-6f0e-4edf-9fea-7e388b84df9bÙ$39b055f5-3dbf-403c-b21e-210e3813d8b0Ù$2e4dc3f9-a132-444f-a35d-f583823a7dfdÙ$b68eb860-a5b4-4e9e-9fbf-6eb6ce43ae69Ù$8f46daf1-9ca2-4a08-99aa-4ed68af218b8Ù$2c84bd84-b54d-4594-b9f8-35db2124d7e8Ù$4309dc43-aeb8-4ec7-94fe-0e320b784349Ù$f6f9447c-9bc9-432d-bd80-2c39f9d842f8Ù$1551122c-70ae-4e37-b3fb-4be91fcc4afbÙ$a0566fdb-a08d-4bcf-9b2f-ed211c9f111fÙ$e796b093-9c1d-4656-9acb-918de53f7e4dÙ$d04b9af5-f004-4ca4-b1c9-2c86d46cb37dÙ$655e980d-b4e9-4f56-a5ae-380072242d27Ù$133f4c7d-33e0-4e13-b716-f538125436caÙ$97d3cf3f-ddac-4850-8b05-bdc0c4741f61Ù$61af27f1-9f83-42f1-a419-06d12ea62133Ù$143dca7c-f9a4-472a-a4bc-4578e4e8413bÙ$1bac238f-79c8-4f9f-a187-bacb288de3b0Ù$e4d1de1d-d57a-48ab-ad7a-c09b427daa03Ù$954f1ab1-1e2f-458b-96d7-a1746631fac7Ù$21d507f6-02f8-4f8b-84f1-bcb84731df66Ù$4aac6ab5-053a-4f60-9e2e-e8d61ff0cecbÙ$b53ec488-ff25-4647-ab00-fbf90963a795Ù$de72d596-0daf-4629-bbb5-20bb8a67cbedÙ$488b0c17-4f0f-43bf-a16c-b9faa7ae0595Ù$10a1b3a7-21c7-4f97-93e1-006ad3aea40dÙ$f7f097cb-d7bd-49eb-a030-ac26f8f61a67Ù$3ec3c058-a94d-4717-b99f-66373f2fa31dÙ$6041a909-d26c-4ab1-836b-29953c578759Ù$16f8d28b-f201-4fe5-8446-68d7d9ddfb3cÙ$a59db59c-d34e-4abd-8865-9907607e06a8Ù$f2417047-33fc-4489-8e89-115bc6b46c13Ù$8df4ff2f-d176-4b4e-a525-665b5d07ea52Ù$1152dec8-3810-42b1-bb2a-8755dcaef56cÙ$7565e3da-84ce-42b6-8d4b-3615576f33b7Ù$c45ff9b5-35d9-4a9d-a801-c762333a1f02Ù$e172f5c5-8b96-4efd-9cf3-805c58d1a6a3­julia_version§v1.12.6±published_objects€¥nbpkgНinstall_time_nsÏ óGü¬instantiatedòinstalled_versionsŠ«SimpleClang¥0.1.0¬StaticArrays¦1.9.17§PlutoUI¦0.7.79Ù!__internal_julia_manifest_version¦1.12.6°HypertextLiteral¥1.0.0¸__internal_julia_version¦1.12.6®BenchmarkTools¥1.6.3¥Luxor¥4.4.1¨Markdown¦stdlib²PlutoTeachingTools¥0.4.7°terminal_outputs‰¬StaticArraysÚ Resolving... ===  Project No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_davjuulzzu/Project.toml`  Manifest No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_davjuulzzu/Manifest.toml` Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...«SimpleClangÚ Resolving... ===  Project No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_davjuulzzu/Project.toml`  Manifest No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_davjuulzzu/Manifest.toml` Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...ªnbpkg_syncÚ Resolving... ===  Project No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_davjuulzzu/Project.toml`  Manifest No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_davjuulzzu/Manifest.toml` Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...§PlutoUIÚ Resolving... ===  Project No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_davjuulzzu/Project.toml`  Manifest No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_davjuulzzu/Manifest.toml` Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...°HypertextLiteralÚ Resolving... ===  Project No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_davjuulzzu/Project.toml`  Manifest No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_davjuulzzu/Manifest.toml` Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...®BenchmarkToolsÚ Resolving... ===  Project No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_davjuulzzu/Project.toml`  Manifest No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_davjuulzzu/Manifest.toml` Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...¨MarkdownÚ Resolving... ===  Project No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_davjuulzzu/Project.toml`  Manifest No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_davjuulzzu/Manifest.toml` Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...¥LuxorÚ Resolving... ===  Project No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_davjuulzzu/Project.toml`  Manifest No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_davjuulzzu/Manifest.toml` Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...²PlutoTeachingToolsÚ Resolving... ===  Project No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_davjuulzzu/Project.toml`  Manifest No packages added to or removed from `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_davjuulzzu/Manifest.toml` Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...§enabled÷restart_recommended_msgÀ´restart_required_msgÀ­busy_packages�¶waiting_for_permissionÂÙ,waiting_for_permission_but_probably_disabled«cell_inputsÞŽÙ$c55dcd4a-8438-4679-9c4a-78cceec6835d„§cell_idÙ$c55dcd4a-8438-4679-9c4a-78cceec6835d¤codeÚrfunction path(ring::Bool; s = 80, offset = 0.04) off(a, b) = a + sign(b - a) * offset p(i, j) = Point(i * s, j * s) c(m, i, j) = circle(p(i, j), 0.06s, action = :fill) a(i1, j1, i2, j2) = line(p(off(i1, i2), off(j1, j2)), p(off(i2, i1), off(j2, j1)), action = :stroke) function ac(i1, j1, i2, j2, m) a(i1, j1, i2, j2) c(m, i2, j2) end @draw begin c("1", -3, 0) ac(-3, 0, -2, 0, "2") ac(-2, 0, -1, 0, "3") ac(-1, 0, 0, 0, "4") ac(0, 0, 1, 0, "5") if ring move(p(off(1, 0), off(0, -1))) curve(p(off(1, 2), off(0, -1)), p(-1, -1), p(off(-3, -2), off(0, -1))) strokepath() end end 7.5s 1.7s end;¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$6be49c46-4900-4457-81b4-0704cd7da0af„§cell_idÙ$6be49c46-4900-4457-81b4-0704cd7da0af¤codeÚ÷Foldable( md""" Would it be more efficient to have a specialized implementation instead of combining existing collectives ? """, md""" Let the size of each ``x_{i,j}`` be ``n/p`` bytes. 1. `MPI_Reduce` acts on the concatenation ``x_{:,j}`` which has length ``n`` bytes hence the complexity is ``\log_2(p)(\alpha + \beta n + \gamma n)`` 2. `MPI_Scatter` has the same complexity as `MPI_Gather` (since it's the same but backwards in time) : ``\log_2(p) \alpha + \beta n`` In total, we have the complexity ``\log_2(p) (\alpha + \beta n + \gamma n)``. Can we do better ? Start exchanging between 1 and 2 and simultaneously exchanging between 3 and 4. The complexity is ``\alpha + 2(\beta + \gamma) n/4``. | `procid` | 1 | 2 | 3 | 4 | |----------|---|---|---|---| | | ``x_{1,1} + x_{1,2}`` | | ``x_{1,3} + x_{1,4}`` | | | | | ``x_{2,1} + x_{2,2}`` | | ``x_{2,3} + x_{2,4}`` | | | ``x_{3,1} + x_{3,2}`` | | ``x_{3,3} + x_{3,4}`` | | | | | ``x_{4,1} + x_{4,2}`` | | ``x_{4,3} + x_{4,4}`` | Next, we exchange between 1 and 3 and simultaneously between 2 and 4. The complexity is ``\alpha + (\beta + \gamma) n/4``. In total, we have complexity ```math \begin{align} \log_2(p) \alpha + (\beta + \gamma) n(p/2 + \cdots + 4 + 2 + 1)/p & = \log_2(p) \alpha + (\beta + \gamma) n(p-1)/p\\ & \approx \log_2(p) \alpha + (\beta + \gamma) n. \end{align} ``` This is better than the approaches combining existing collectives above since we removed the ``\log_2(p)`` in front of ``\beta`` and ``\gamma``. """, )¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$c1285653-38ba-418b-bdf5-cda99440998d„§cell_idÙ$c1285653-38ba-418b-bdf5-cda99440998d¤codeÚðaside(tip(Foldable(md"Use `module spider` to see which version are available", md""" ``` [blegat@lm4-f001 ~]$ module spider gompi ---------------------------- gompi: ---------------------------- Description: GNU Compiler Collection (GCC) based compiler toolchain, including OpenMPI for MPI support. Versions: gompi/2021b gompi/2022b gompi/2023a gompi/2023b ---------------------------- For detailed information about a specific "gompi" package (including how to load the modules) use the module's full name. Note that names that have a trailing (E) are extensions provided by other modules. For example: $ module spider gompi/2023b ---------------------------- ``` """)), v_offset = -300)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$4fdb4cd6-a794-4b14-84b0-72f484c6ea86„§cell_idÙ$4fdb4cd6-a794-4b14-84b0-72f484c6ea86¤code±md"## All gather"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$a59db59c-d34e-4abd-8865-9907607e06a8„§cell_idÙ$a59db59c-d34e-4abd-8865-9907607e06a8¤codeÙ@aside(md"""From $(citeintro("Figure 2.27"))""", v_offset = -200)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$5a566137-fbd1-45b2-9a55-e4aded366bb3„§cell_idÙ$5a566137-fbd1-45b2-9a55-e4aded366bb3¤codeÙ)md"# Single Program Multiple Data (SPMD)"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$ad3559d1-6180-4eaa-b97d-3c1f10f036b9„§cell_idÙ$ad3559d1-6180-4eaa-b97d-3c1f10f036b9¤code­md"## Reduce"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$88f33f35-d922-4d98-af4a-ebb79d9b7dc6„§cell_idÙ$88f33f35-d922-4d98-af4a-ebb79d9b7dc6¤codeÙÞmpicc_cmd = md""" ```sh [blegat@lm4-f001 ~]$ mpicc -bash: mpicc: command not found [blegat@lm4-f001 ~]$ module load gompi/2023a [blegat@lm4-f001 ~]$ mpicc gcc: fatal error: no input files compilation terminated. ``` """;¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$b540d5e3-6686-479a-b2c7-c1f65b85b6ba„§cell_idÙ$b540d5e3-6686-479a-b2c7-c1f65b85b6ba¤codeÙ+md"## Profiling with NVIDIA Nsight Systems"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$f6f9447c-9bc9-432d-bd80-2c39f9d842f8„§cell_idÙ$f6f9447c-9bc9-432d-bd80-2c39f9d842f8¤codeÙ£img("https://raw.githubusercontent.com/VictorEijkhout/TheArtOfHPC_vol1_scientificcomputing/refs/heads/main/booksources/graphics/hypercubes.jpg", :width => "400pt")¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$9a100ccf-1ad3-4d2c-bbe0-e297969eb69e„§cell_idÙ$9a100ccf-1ad3-4d2c-bbe0-e297969eb69e¤code®md"# Topology"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$a1b2d090-d498-4d5d-90a0-8cdc648dc833„§cell_idÙ$a1b2d090-d498-4d5d-90a0-8cdc648dc833¤codeµmd"# Distributed sum"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$8b83570a-6982-47e5-a167-a6d6afee0f7d„§cell_idÙ$8b83570a-6982-47e5-a167-a6d6afee0f7d¤codeÚhbox([ md"""Before | `procid` | 1 | 2 | 3 | 4 | |----------|---|---|---|---| | | ``x`` | | | | """, Div(md"` `", style = Dict("margin" => "50pt")), md"""After | `procid` | 1 | 2 | 3 | 4 | |----------|---|---|---|---| | | ``x`` | ``x`` | ``x`` | ``x`` | """, ])¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$e3474aea-ee14-4c78-ae46-5badc66a543a„§cell_idÙ$e3474aea-ee14-4c78-ae46-5badc66a543a¤codeÙçlist_1 = Foldable(md"`[blegat@lm4-f001 ~]$ module list`", md""" ``` Currently Loaded Modules: 1) tis/2018.01 (S) 2) releases/2023a (S) 3) StdEnv Where: S: Module is Sticky, requires --force to unload or purge ``` """);¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$21d507f6-02f8-4f8b-84f1-bcb84731df66„§cell_idÙ$21d507f6-02f8-4f8b-84f1-bcb84731df66¤code¯md"## Fat-tree"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$de72d596-0daf-4629-bbb5-20bb8a67cbed„§cell_idÙ$de72d596-0daf-4629-bbb5-20bb8a67cbed¤codeÙ–Foldable(md"What is the number of edges ? What is the bisection width ?", md""" Number of edges is ``n\log_2(n)`` and bisection width is ``n/2``. """)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$c253bb24-ad76-4b58-8dfc-7dc2576e3db5„§cell_idÙ$c253bb24-ad76-4b58-8dfc-7dc2576e3db5¤codeºmd"## Bisection bandwidth"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$e4d1de1d-d57a-48ab-ad7a-c09b427daa03„§cell_idÙ$e4d1de1d-d57a-48ab-ad7a-c09b427daa03¤codeÙáFoldable(md"What is the diameter and bisection width of ``n`` computer nodes ?", md""" Diameter is ``2\log_2(n)`` and bisection width is 1. $(img("https://upload.wikimedia.org/wikipedia/commons/d/da/Bisected_tree.jpg") ) """)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$133f4c7d-33e0-4e13-b716-f538125436ca„§cell_idÙ$133f4c7d-33e0-4e13-b716-f538125436ca¤codeÚFTwoColumnWideLeft( md""" There can be ``n`` simultaneous communications at the same time, provided that each input communicates with a different output. The figure on the right provides an example of such non-conflicting communications with the black dots indicating that the input of that row communicates to the corresponding output (case (a) of above figure). The switch at row 1 and column 2 is just propagating the input data horizontally and output data vertically (case (b) of above figure). The switch at row 0 and column 5 is receiving no data. """, img1("crossbar.jpg"), )¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$3a50ca06-06e8-4a61-ade2-afbfc52ca655„§cell_idÙ$3a50ca06-06e8-4a61-ade2-afbfc52ca655¤codeÙBaside(md"""See $(citepara("Section 4.1.4.2"))""", v_offset = -100)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$6c1984f6-4e36-4637-b0da-c7dd8b0f9ff0„§cell_idÙ$6c1984f6-4e36-4637-b0da-c7dd8b0f9ff0¤codeÚ_list_2 = Foldable(md"`[blegat@lm4-f001 ~]$ module list`", md""" ``` Currently Loaded Modules: 1) tis/2018.01 (S) 11) libpciaccess/0.17-GCCcore-12.3.0 2) releases/2023a (S) 12) hwloc/2.9.1-GCCcore-12.3.0 3) StdEnv 13) OpenSSL/1.1 4) GCCcore/12.3.0 14) libevent/2.1.12-GCCcore-12.3.0 5) zlib/1.2.13-GCCcore-12.3.0 15) UCX/1.14.1-GCCcore-12.3.0 6) binutils/2.40-GCCcore-12.3.0 16) libfabric/1.18.0-GCCcore-12.3.0 7) GCC/12.3.0 17) PMIx/4.2.4-GCCcore-12.3.0 8) numactl/2.0.16-GCCcore-12.3.0 18) UCC/1.2.0-GCCcore-12.3.0 9) XZ/5.4.2-GCCcore-12.3.0 19) OpenMPI/4.1.5-GCC-12.3.0 10) libxml2/2.11.4-GCCcore-12.3.0 20) gompi/2023a Where: S: Module is Sticky, requires --force to unload or purge ``` """);¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$de20bf96-7d33-4a78-8147-f0b7f8488e46„§cell_idÙ$de20bf96-7d33-4a78-8147-f0b7f8488e46¤codeÚOFoldable( md""" Would it be more efficient to have a specialized implementation instead of combining existing collectives ? """, md""" Let the size of ``x_i`` be ``n/p`` bytes. 1. `MPI_Gather` has complexity ``\log_2(p)\alpha + \beta n`` 2. `MPI_Bcast` acts on the concatenation ``x_:`` which has length ``n`` bytes so the complexity is ``\log_2(p) (\alpha + \beta n)`` In total, we have the complexity ``\log_2(p) (\alpha + \beta n)``. Can we do better ? Start exchanging between 1 and 2 and simultaneously exchanging between 3 and 4. The complexity is ``\alpha + \beta n/4``. | `procid` | 1 | 2 | 3 | 4 | |----------|---|---|---|---| | | ``x_1`` | ``x_1`` | | | | | ``x_2`` | ``x_2`` | | | | | | | ``x_3`` | ``x_3`` | | | | | ``x_4`` | ``x_4`` | Next, we exchange between 1 and 3 and simultaneously between 2 and 4. The complexity is ``\alpha + 2\beta n/4``. In total, we have complexity ```math \begin{align} \log_2(p) \alpha + \beta n(1 + 2 + 4 + \cdots + p/2)/p & = \log_2(p) \alpha + \beta n(p-1)/p\\ & \approx \log_2(p) \alpha + \beta n. \end{align} ``` """, )¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$51d70f9a-cd67-44b9-8fd1-5ab70b526c7a„§cell_idÙ$51d70f9a-cd67-44b9-8fd1-5ab70b526c7a¤code¶md"## Launching a job"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$98392c40-6542-4a26-8552-c0960bbaa6a6„§cell_idÙ$98392c40-6542-4a26-8552-c0960bbaa6a6¤codeÚ“md""" * Consider graph ``G`` with nodes ``v`` corresponding to computer nodes or switches. * There is an edge ``(u, v) \in E`` if there is an ethernet cable **directly** connecting ``u`` and ``v``. * ``e \in E`` are ethernet cables of bandwidth ``w_e`` * Distance (unweighted) from node ``u \in V`` to node ``v \in V`` is ``d(G, u, v)`` - Does not depend on bandwidth ``w_e`` of edges of the path """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$39b055f5-3dbf-403c-b21e-210e3813d8b0„§cell_idÙ$39b055f5-3dbf-403c-b21e-210e3813d8b0¤codeÙŒimg("https://raw.githubusercontent.com/VictorEijkhout/TheArtOfHPC_vol1_scientificcomputing/refs/heads/main/booksources/graphics/torus.jpeg")¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$b0ca0392-71b8-4f44-8c6c-0978a02a0e6c„§cell_idÙ$b0ca0392-71b8-4f44-8c6c-0978a02a0e6c¤codeÙ„compile_and_run(Example("MPI/procname.c"); mpi = true, verbose = 1, show_run_command = true, num_processes = procname_num_processes)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$26aa369f-e5c7-4fe5-8b6b-903f4f4e91ba„§cell_idÙ$26aa369f-e5c7-4fe5-8b6b-903f4f4e91ba¤codeÙKcompile_and_run(Example("MPI/mpi_bench2.c"), mpi = true, num_processes = 2)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$a103c5af-42fe-4f8c-b78c-6946895105d7„§cell_idÙ$a103c5af-42fe-4f8c-b78c-6946895105d7¤codeÙamd"`num_processes` = $(@bind procname_num_processes Slider(2:8, default = 2, show_value = true))"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$d8bb1d43-bf42-4a09-bdeb-5db406ef1ccd„§cell_idÙ$d8bb1d43-bf42-4a09-bdeb-5db406ef1ccd¤codeÚ£hbox([Div(md""" * `srun` : Synchronous (blocked) job ``` [blegat@lm4-f001 ~]$ srun --time=1 pwd srun: job 3491072 queued and waiting for resources srun: job 3491072 has been allocated resources /home/users/b/l/blegat ``` * `$ sbatch submit.sh` : Asynchronous job, get status with * `$ squeue --me` * More details on the [README](https://github.com/blegat/LINMA2710) """, style = Dict("flex-grow" => "1", "margin-right" => "30px")), md""" $(img("https://upload.wikimedia.org/wikipedia/commons/3/3a/Slurm_logo.svg", :width => "160px", :height => "160px")) See [CÉCI documentation](https://support.ceci-hpc.be/doc/_contents/QuickStart/SubmittingJobs/SlurmTutorial.html) """, ])¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$82230d6c-25ce-4d12-8842-e0651fc4b143„§cell_idÙ$82230d6c-25ce-4d12-8842-e0651fc4b143¤codeÙ)md"## Processor name identifies the node"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$fc43b343-79cd-4342-8d80-8ea72cf34942„§cell_idÙ$fc43b343-79cd-4342-8d80-8ea72cf34942¤codeÚ»hbox([ md"""Before | `procid` | 1 | 2 | 3 | 4 | |----------|---|---|---|---| | | ``x_1`` | | | | | | | ``x_2`` | | | | | | | ``x_3`` | | | | | | | ``x_4`` | """, Div(md"` `", style = Dict("margin" => "50pt")), md"""After | `procid` | 1 | 2 | 3 | 4 | |----------|---|---|---|---| | | ``x_1`` | | | | | | ``x_2`` | | | | | | ``x_3`` | | | | | | ``x_4`` | | | | """, ])¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$d2104fbd-ba22-4501-b03a-8809271d598b„§cell_idÙ$d2104fbd-ba22-4501-b03a-8809271d598b¤code½md"## Blocking communication"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$8a527c17-bf2b-4e6b-937f-ef3a269c5112„§cell_idÙ$8a527c17-bf2b-4e6b-937f-ef3a269c5112¤codeÙ«img("https://raw.githubusercontent.com/VictorEijkhout/TheArtOfHPC_vol2_parallelprogramming/refs/heads/main/booksources/graphics/send-nonblocking.jpeg", :height => "200pt")¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$be0e3ba0-18cc-4b9a-a56d-2566f5148fae„§cell_idÙ$be0e3ba0-18cc-4b9a-a56d-2566f5148fae¤codeÙkmd"""## $(img("https://github.com/TACC/Lmod/raw/main/logos/2x/Lmod-4color%402x.png", :height => "30px"))"""¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$2ff573a3-4a84-4497-9305-2d97e35e5e3d„§cell_idÙ$2ff573a3-4a84-4497-9305-2d97e35e5e3d¤codeÙ°Foldable(md"Can `MPI_Reduce_scatter` be implemented by combining existing collectives ?", md"`MPI_Reduce_scatter` can be implemented by `MPI_Reduce` followed by `MPI_Scatter`")¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$1b617828-e2b2-4a94-a120-59fa533d3e11„§cell_idÙ$1b617828-e2b2-4a94-a120-59fa533d3e11¤codeÚÑmd""" Bandwidth ``\texttt{bw}(u, v)`` is the bandwidth of the cable if ``(u, v) \in E`` or 0 otherwise. Given ``S, T \subseteq V`` two disjoint subsets of nodes ``S \cap T = \varnothing``, ```math \begin{align} \text{Width} &\qquad & w(S, T) & = |\{ (u, v) \in E \mid u \in S, v \in T \}|\\ \text{Bandwidth} & & \texttt{bw}(S, T) & = \sum_{u\in S, v\in T} \texttt{bw}(u,v) \end{align} ``` The width is exactly the number of edges between the two sets of nodes. """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$c3590376-06ed-45a4-af0b-2d46f1a387c8„§cell_idÙ$c3590376-06ed-45a4-af0b-2d46f1a387c8¤codeÙghbox([ Div(md""" Free up memory. """; style = Dict("flex-grow" => "1")), c""" MPI_Finalize(); """, ])¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$35ba1eea-56ae-4b74-af96-21ec5a93c455„§cell_idÙ$35ba1eea-56ae-4b74-af96-21ec5a93c455¤codeÙOmd""" You could simply add `lmpi` but using `mpicc` and `mpic++` is easier. """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$488b0c17-4f0f-43bf-a16c-b9faa7ae0595„§cell_idÙ$488b0c17-4f0f-43bf-a16c-b9faa7ae0595¤codeÙ4aside(citeintro("Section 2.7.6.3"), v_offset = -150)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$10a1b3a7-21c7-4f97-93e1-006ad3aea40d„§cell_idÙ$10a1b3a7-21c7-4f97-93e1-006ad3aea40d¤code°md"## Butterfly"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$b68eb860-a5b4-4e9e-9fbf-6eb6ce43ae69„§cell_idÙ$b68eb860-a5b4-4e9e-9fbf-6eb6ce43ae69¤codeÚ’Foldable(md"What is the bisection width of a ``n \times n`` 2D array ?", md""" It is ``n = \sqrt{|V|}``: $(img("https://upload.wikimedia.org/wikipedia/commons/2/2f/Bisected_mesh.jpg", :width => "300pt")) $(Foldable(md"What is the bisection width of a ``n^d`` ``d``D array ?", md"It is 1 for ``d = 1``, ``n`` for ``d = 2`` and ``n^2`` for ``d = 3``. In general, it is ``n^{d-1} = |V|^{(d-1)/d}``")) """)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$3dc860be-016d-49ee-8535-7d9457c70f85„§cell_idÙ$3dc860be-016d-49ee-8535-7d9457c70f85¤codeÙnFoldable(md"What is the graph diameter ?", md"``|V| - 1`` if ``u`` and ``v`` are extreme points of the array")¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$2e4dc3f9-a132-444f-a35d-f583823a7dfd„§cell_idÙ$2e4dc3f9-a132-444f-a35d-f583823a7dfd¤codeÚ"Foldable(md"What is the graph diameter of a ``n \times n`` 2D array ?", md""" It is ``2(n-1)``, attained for opposite vertices of the square. $(Foldable(md"What is the graph diameter of a ``n^d`` ``d``D array ?", md"It is ``d(n-1)``, attained for opposite vertices of the hypercube.")) """)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$8981b5e2-2497-478e-ab28-a14b62f6f916„§cell_idÙ$8981b5e2-2497-478e-ab28-a14b62f6f916¤code²run(`mpicc -show`)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$34a10003-2c32-4332-b3e6-ce70eec0cbbe„§cell_idÙ$34a10003-2c32-4332-b3e6-ce70eec0cbbe¤code®md"## Example"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$a0566fdb-a08d-4bcf-9b2f-ed211c9f111f„§cell_idÙ$a0566fdb-a08d-4bcf-9b2f-ed211c9f111f¤codeÙ2aside(citeintro("Section 2.7.5"), v_offset = -150)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$655e980d-b4e9-4f56-a5ae-380072242d27„§cell_idÙ$655e980d-b4e9-4f56-a5ae-380072242d27¤codeÙÏhbox([ img("https://ars.els-cdn.com/content/image/3-s2.0-B9781558608528500043-f01-09-9781558608528.jpg"), img("https://ars.els-cdn.com/content/image/3-s2.0-B9781558608528500043-f01-10-9781558608528.jpg"), ])¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$4788d8b4-2efa-4489-80c3-71f405513644„§cell_idÙ$4788d8b4-2efa-4489-80c3-71f405513644¤codeÙ\md"`num_processes` = $(@bind sum_num_processes Slider(2:8, default = 2, show_value = true))"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$233c13ff-f008-40b0-a6c5-c5395b2215ec„§cell_idÙ$233c13ff-f008-40b0-a6c5-c5395b2215ec¤codeÚõFoldable( md"Lower bound complexity with ``p`` processes if each ``x_i`` has length ``n/p`` bytes ?", md""" Lower bound : ``\log_2(p) \alpha`` using *spanning tree* algorithm and ``\beta n`` as all messages need to be sent at least once. First send ``x_2`` from 2 to 1 and simultaneously send ``x_4`` from 4 to 3. Complexity is ``\alpha + \beta n/4`` | `procid` | 1 | 2 | 3 | 4 | |----------|---|---|---|---| | | ``x_1`` | | | | | | ``x_2`` | ``x_2`` | | | | | | | ``x_3`` | | | | | | ``x_4`` | ``x_4`` | Then send ``(x_3, x_4)`` from 3 to 1. Complexity is ``\alpha + 2\beta n/4`` | `procid` | 1 | 2 | 3 | 4 | |----------|---|---|---|---| | | ``x_1`` | | | | | | ``x_2`` | ``x_2`` | | | | | ``x_3`` | | ``x_3`` | | | | ``x_4`` | | ``x_4`` | ``x_4`` | In total, it is ``2\alpha + 3\beta n/4``. In general, we have ```math \log_2(p)\alpha + \beta n(1 + 2 + 4 + \cdots + p/2)/p = \log_2(p)\alpha + \beta n(p - 1)/p \approx \log_2(p)\alpha + \beta n ``` What about having each node sending directly to 1 ? | `procid` | 1 | 2 | 3 | 4 | |----------|---|---|---|---| | | ``x_1`` | | | | | | ``x_2`` | ``x_2`` | | | | | | | ``x_3`` | | | | | | | ``x_4`` | Then | `procid` | 1 | 2 | 3 | 4 | |----------|---|---|---|---| | | ``x_1`` | | | | | | ``x_2`` | ``x_2`` | | | | | ``x_3`` | | ``x_3`` | | | | | | | ``x_4`` | Then | `procid` | 1 | 2 | 3 | 4 | |----------|---|---|---|---| | | ``x_1`` | | | | | | ``x_2`` | ``x_2`` | | | | | ``x_3`` | | ``x_3`` | | | | ``x_4`` | | | ``x_4`` | Here, we have ``3\alpha + 3\beta n/4``. The coefficient is higher in front of ``\alpha``. However, is the same in front of ``\beta``. Indeed, even though the spanning tree above communicate more bytes through the network, as the communication from node 2 to node 1 and node 4 to node 3 are done in parallel, this isn't affecting the coefficient in front of ``\beta``. """ )¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$6fc34de1-469b-41a9-9677-ff3182f7a498„§cell_idÙ$6fc34de1-469b-41a9-9677-ff3182f7a498¤codeÙ¤Foldable(md"Can `MPI_Allgather` be implemented by combining existing collectives ?", md"`MPI_Allgather` can be implemented by `MPI_Gather` followed by `MPI_Bcast`")¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$b53ec488-ff25-4647-ab00-fbf90963a795„§cell_idÙ$b53ec488-ff25-4647-ab00-fbf90963a795¤codeÙ™md""" *blocking factor* : Ratio between upper links and lower links. Ratio is 1 for fat-tree to prevent bottlenecks if all nodes start communicating. """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$c3c848ff-526a-450d-9b1c-5d9d3ccccf28„§cell_idÙ$c3c848ff-526a-450d-9b1c-5d9d3ccccf28¤codeÙ#md"## Eager vs rendezvous protocol"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$063f0acc-c023-46d0-9ed9-fbd7fbdcfa3b„§cell_idÙ$063f0acc-c023-46d0-9ed9-fbd7fbdcfa3b¤codeÙ*citeintro(what) = "[Eij10; " * what * "]";¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$4569aa05-9963-4976-ac63-caf3f3979e83„§cell_idÙ$4569aa05-9963-4976-ac63-caf3f3979e83¤codeÙâmd""" Blocking send/received with `MPI_Send` and `MPI_Recv`. The network cannot buffer the whole message (unless it is short). The sender needs to wait for the receiver to be ready and then transfers its copy of the data. """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$7565e3da-84ce-42b6-8d4b-3615576f33b7„§cell_idÙ$7565e3da-84ce-42b6-8d4b-3615576f33b7¤codeÚtbegin struct Path path::String end function imgpath(path::Path) file = path.path if !('.' in file) file = file * ".png" end return joinpath(joinpath(@__DIR__, "images", file)) end function img(path::Path, args...; kws...) return PlutoUI.LocalResource(imgpath(path), args...) end struct URL url::String end function save_image(url::URL, html_attributes...; name = split(url.url, '/')[end], kws...) path = joinpath("cache", name) return PlutoTeachingTools.RobustLocalResource(url.url, path, html_attributes...), path end function img(url::URL, args...; kws...) r, _ = save_image(url, args...; kws...) return @htl("$r") end function img(file::String, args...; kws...) if startswith(file, "http") img(URL(file), args...; kws...) else img(Path(file), args...; kws...) end end end ¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$7fc70992-973a-43c6-904a-dd1b622a5ed8„§cell_idÙ$7fc70992-973a-43c6-904a-dd1b622a5ed8¤codeÙ¼Foldable(md"What is the bisection width ?", md""" The bisection width is 1 : $(img("https://upload.wikimedia.org/wikipedia/commons/7/79/Bisected_linear_array.jpg", :width => "300pt")) """)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$fa024a5d-52a6-459d-894d-13a60ec723d2„§cell_idÙ$fa024a5d-52a6-459d-894d-13a60ec723d2¤codeÙòFoldable(md"What are the differences with Min-Cut ?", md""" In Min-Cut, we fix a node in ``S``, a node in ``V \setminus S`` and the cardinality of `S` is not constrained. These differences allow Min-Cut to be solvable in polynomial time. """)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$f7f097cb-d7bd-49eb-a030-ac26f8f61a67„§cell_idÙ$f7f097cb-d7bd-49eb-a030-ac26f8f61a67¤codeÚvmd"Fat-tree needs large switches, the root one of previous slide had 8 links. This is as many links as the number of processes, that's not scalable. An alternative is butterfly network for which each switch uses at most 4 links. In the figures above, the boxes with `P` represent a process, the ones with `M` represent their local memory and the other ones are the routers."¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$3a2bfd4e-0ce6-4a79-a578-fc1b4ef563c5„§cell_idÙ$3a2bfd4e-0ce6-4a79-a578-fc1b4ef563c5¤codeÚ'Foldable(md"How to fix it ?", md""" We should load `gompi` or at least `OpenMPI`: ```sh [blegat@lm4-f001 examples]$ module load OpenMPI [blegat@lm4-f001 examples]$ mpicc procname.c [blegat@lm4-f001 examples]$ mpiexec -n 4 a.out Process 1/4 is running on node <> Process 3/4 is running on node <> Process 0/4 is running on node <> Process 2/4 is running on node <> ``` $(Foldable(md"Why are they all on same node ?", md"We are on the *login node*, we need to run jobs on the *compute nodes* using Slurm !")) """)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$a79c410a-bebf-434c-9730-568e0ff4f4c7„§cell_idÙ$a79c410a-bebf-434c-9730-568e0ff4f4c7¤codeÙ "15pt")) cluster from [the list](https://www.ceci-hpc.be/clusters.html) + `manneback` for GPU. You only have access to Tier-2 clusters. This sadly leaves out: - Tier-1 clusters such as Lucia - Tier-0 cluster such as $(img("https://www.lumi-supercomputer.eu/wp-content/uploads/2020/02/lumi_logo.png", :height => "15pt")) from $(img("https://upload.wikimedia.org/wikipedia/commons/8/8f/HPC_JU_logo_RGB.svg", :height => "20pt")) * Connect with SSH using `ssh lemaitre4` or `ssh manneback`. """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$e119c2d3-1e24-464f-b812-62f28c00a913„§cell_idÙ$e119c2d3-1e24-464f-b812-62f28c00a913¤codeµmd"## Reduce scatter"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$a258eec9-f4f6-49bd-8470-8541836f5f6b„§cell_idÙ$a258eec9-f4f6-49bd-8470-8541836f5f6b¤codeÚhbox([ md"""Before | `procid` | 1 | 2 | 3 | 4 | |----------|---|---|---|---| | | ``x_1`` | | | | | | | ``x_2`` | | | | | | | ``x_3`` | | | | | | | ``x_4`` | """, Div(md"` `", style = Dict("margin" => "50pt")), md"""After `MPI_Allgather` | `procid` | 1 | 2 | 3 | 4 | |----------|---|---|---|---| | | ``x_1`` | ``x_1`` | ``x_1`` | ``x_1`` | | | ``x_2`` | ``x_2`` | ``x_2`` | ``x_2`` | | | ``x_3`` | ``x_3`` | ``x_3`` | ``x_3`` | | | ``x_4`` | ``x_4`` | ``x_4`` | ``x_4`` | """, ])¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$79b405a5-54b5-4727-a0cd-b79522ad109f„§cell_idÙ$79b405a5-54b5-4727-a0cd-b79522ad109f¤code´md"# Point-to-point"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$93f0c63c-b597-4f89-809c-7af0476f319a„§cell_idÙ$93f0c63c-b597-4f89-809c-7af0476f319a¤codeÙšmd""" `MPI_Isend` and `MPI_Irecv` where `I` stands for `immediate` or `incomplete`. `MPI_Wait` can be used to wait for the send and receive to finish. """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$944d827e-bc6a-4de8-b959-5fde8790bedc„§cell_idÙ$944d827e-bc6a-4de8-b959-5fde8790bedc¤codeÙ£md""" ```sh [laptop]$ ssh lemaitre4 [blegat@lm4-f001 ~]$ cd LINMA2710/examples [blegat@lm4-f001 examples]$ mpicc procname.c -bash: mpicc: command not found ``` """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$c04bcc96-e5fe-4d6e-a12e-40dcde58c62e„§cell_idÙ$c04bcc96-e5fe-4d6e-a12e-40dcde58c62e¤codeÚ®md""" * MPI $(img("https://avatars.githubusercontent.com/u/14836989", name = "MPI.png", :height => "20pt")) is an open standard for distributed computing * [Many implementations](https://www.mpi-forum.org/implementation-status/): - MPICH, from $(img("https://upload.wikimedia.org/wikipedia/commons/6/65/ArgonneLaboratoryLogo.png", :height => "20pt")) and $(img("https://upload.wikimedia.org/wikipedia/commons/6/69/Mississippi_State_University_logo.svg", :height => "20pt")) - Open MPI $(img("https://upload.wikimedia.org/wikipedia/commons/6/6f/Open_MPI_logo.png", :height => "20pt")) (not to be confused with $(img("https://upload.wikimedia.org/wikipedia/commons/e/eb/OpenMP_logo.png", :width => "45pt"))) - commercial implementations from $(img("https://upload.wikimedia.org/wikipedia/commons/4/46/Hewlett_Packard_Enterprise_logo.svg", :height => "20pt")), $(img("https://upload.wikimedia.org/wikipedia/commons/6/6a/Intel_logo_%282020%2C_dark_blue%29.svg", :height => "15pt")), $(img("https://upload.wikimedia.org/wikipedia/commons/9/96/Microsoft_logo_%282012%29.svg", :height => "15pt")), and $(img("https://upload.wikimedia.org/wikipedia/commons/9/96/NEC_logo.svg", :height => "15pt")) """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$c420ad25-6af1-4fb4-823a-b6bbd4e10f7f„§cell_idÙ$c420ad25-6af1-4fb4-823a-b6bbd4e10f7f¤codeÚ.hbox([ md"""Before | `procid` | 1 | 2 | 3 | 4 | |----------|---|---|---|---| | | ``x_1`` | ``x_2`` | ``x_3`` | ``x_4`` | """, Div(md"` `", style = Dict("margin" => "50pt")), md"""After | `procid` | 1 | 2 | 3 | 4 | |----------|---|---|---|---| | | ``x_1 + x_2 + x_3 + x_4`` | | | | """, ])¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$a6c337c4-0c81-4463-ad4f-9a4528d953ab„§cell_idÙ$a6c337c4-0c81-4463-ad4f-9a4528d953ab¤codeÙ&md"## Message Passing Interface (MPI)"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$921b5a18-0733-4032-a543-9d60e254b1b2„§cell_idÙ$921b5a18-0733-4032-a543-9d60e254b1b2¤codeÚNmd""" * Specializing on topology is important for communication libraries like MPI/NCCL. For instance, Deepseek-V3 by-passed NCCL and used PTX directly to hardcode how their hardware should be used. * Specified in [Slurm's `topology.conf` file](https://slurm.schedmd.com/topology.conf.html). * Source : $(citeintro("Section 2.7")) """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$2257220c-6f0e-4edf-9fea-7e388b84df9b„§cell_idÙ$2257220c-6f0e-4edf-9fea-7e388b84df9b¤codeÙ'md"## Multidimensional array and torus"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$c45ff9b5-35d9-4a9d-a801-c762333a1f02„§cell_idÙ$c45ff9b5-35d9-4a9d-a801-c762333a1f02¤codeÚªbegin struct Example name::String end function code(example::Example) code = read(joinpath(dirname(@__DIR__), "examples", example.name), String) ext = split(example.name, '.')[end] if ext == "c" return CCode(code) elseif ext == "cpp" || ext == "cc" return CppCode(code) elseif ext == "cl" return CLCode(code) else error("Unrecognized extension `$ext`.") end end function SimpleClang.compile_and_run(example::Example; kws...) return SimpleClang.compile_and_run(code(example); kws...) end function SimpleClang.compile_lib(example::Example; kws...) return SimpleClang.compile_lib(code(example); kws...) end end¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$4aac6ab5-053a-4f60-9e2e-e8d61ff0cecb„§cell_idÙ$4aac6ab5-053a-4f60-9e2e-e8d61ff0cecb¤codeÙ¡img("https://raw.githubusercontent.com/VictorEijkhout/TheArtOfHPC_vol1_scientificcomputing/refs/heads/main/booksources/graphics/fattree5.jpg", :width => "500pt")¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$61af27f1-9f83-42f1-a419-06d12ea62133„§cell_idÙ$61af27f1-9f83-42f1-a419-06d12ea62133¤codeÙ4aside(citeintro("Section 2.7.6.1"), v_offset = -200)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$52d428d5-cb33-4f2a-89eb-3a8ce3f5bb81„§cell_idÙ$52d428d5-cb33-4f2a-89eb-3a8ce3f5bb81¤codeÚFoldable( md"Each process runs the **same** executable. So how can we make them do different things ?", md"Even if the code is the same, `MPI_Comm_rank` will give different `procid` so the part of the program depending on the value of `procid` will differ.", )¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$d7e31ced-4eb2-4221-b83f-462e8f32fe89„§cell_idÙ$d7e31ced-4eb2-4221-b83f-462e8f32fe89¤codeÚXaside(Foldable(md"Is this timing bandwidth accurately ?", md"No, the time also includes the time that process 0 has to wait until process 1 is ready to start receiving. If the message is too small, it will just buffer the message and `MPI_Send` could return before the other process even reached `MPI_Recv`, see next slide." ), v_offset = -500)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$2c84bd84-b54d-4594-b9f8-35db2124d7e8„§cell_idÙ$2c84bd84-b54d-4594-b9f8-35db2124d7e8¤code°md"## Hypercube"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$32f740e7-9338-4c42-8eaf-ce8022412c50„§cell_idÙ$32f740e7-9338-4c42-8eaf-ce8022412c50¤codeÙ md"## Nonblocking communication"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$db16e939-b490-497b-a03f-80ce2e8485af„§cell_idÙ$db16e939-b490-497b-a03f-80ce2e8485af¤codeÚÍFoldable( md"Lower bound complexity with ``p`` processes if each ``x_i`` has length $n$ bytes and the arithmetic complexity is ``\gamma`` ?", md"""Lower bound : ``\log_2(p) (\alpha + \beta n) + \log_2(p) \gamma n`` using *spanning tree* algorithm: First communication (2 → 1 and 4 → 3 at the same time): | `procid` | 1 | 2 | 3 | 4 | |----------|---|---|---|---| | | ``x_1 + x_2`` | | ``x_3 + x_4`` | | Then second communication (3 → 1) """ )¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$7d37fbea-baa3-43ec-b003-a4707017a4cf„§cell_idÙ$7d37fbea-baa3-43ec-b003-a4707017a4cf¤code¬md"## Rings"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$568057f5-b0b8-4225-8e4b-5eec911a52ef„§cell_idÙ$568057f5-b0b8-4225-8e4b-5eec911a52ef¤code®md"## Example"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$370f0f20-e373-4028-bca1-83e93678cbcb„§cell_idÙ$370f0f20-e373-4028-bca1-83e93678cbcb¤codeÙ�img("https://raw.githubusercontent.com/VictorEijkhout/TheArtOfHPC_vol2_parallelprogramming/refs/heads/main/booksources/graphics/mpi-array.png")¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$1bac238f-79c8-4f9f-a187-bacb288de3b0„§cell_idÙ$1bac238f-79c8-4f9f-a187-bacb288de3b0¤code¦tree()¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$40606ee3-38cc-4123-9b86-b774bf89e499„§cell_idÙ$40606ee3-38cc-4123-9b86-b774bf89e499¤code±md"# Collectives"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$8df4ff2f-d176-4b4e-a525-665b5d07ea52„§cell_idÙ$8df4ff2f-d176-4b4e-a525-665b5d07ea52¤codeÙ‹using SimpleClang, PlutoUI, PlutoUI.ExperimentalLayout, HypertextLiteral, Luxor, StaticArrays, BenchmarkTools, PlutoTeachingTools, Markdown¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$23bfbe95-7ba2-41b9-bd8b-dc4baa3ad53a„§cell_idÙ$23bfbe95-7ba2-41b9-bd8b-dc4baa3ad53a¤codeÙ³Foldable(md"What is the bisection width ?", md""" The bisection width is 2: $(img("https://upload.wikimedia.org/wikipedia/commons/5/51/Bisected_ring.jpg", :width => "300pt")) """)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$49b596b8-891d-4f3f-a6a4-a62cc8237df3„§cell_idÙ$49b596b8-891d-4f3f-a6a4-a62cc8237df3¤codeÙ^definition("Graph diameter", md"*Graph diameter* is ``d(G) := \max_{u, v \in V} d(G, u, v)``")¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$cf799c26-1cea-4b38-9a15-8497813bd668„§cell_idÙ$cf799c26-1cea-4b38-9a15-8497813bd668¤code±md"## MPI basics"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$70e88569-cd5c-40e8-9198-6bf6578fb0a2„§cell_idÙ$70e88569-cd5c-40e8-9198-6bf6578fb0a2¤codeÚmd""" ## Bandwidth and Latency The time it takes to transfer ``n`` bytes is usually modeled with ```math T(n) = \alpha + \beta n ``` where ``\alpha`` is the *latency* (fixed-cost) and ``\beta`` is the *time per byte*, so the inverse of the bandwidth, (linear cost). This simple model does not incorporate the fact that communicating between nodes that are not directly connected needs to pass through intermediate nodes or routers. Therefore, using these formula only gives a **lower bound** to the actual time. This bound is achieved for a fully-connected topology but for other topologies, they should really only be considered as a lower bound. So consider the bounds obtained in the Collectives section below as lower bounds. See $(citeintro("Section 2.7.8")) for more details. """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$5441e428-b320-433c-acde-15fe6bf58537„§cell_idÙ$5441e428-b320-433c-acde-15fe6bf58537¤code³run(`mpic++ -show`)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÂÙ$bfab5c2d-61c3-468b-9ddf-4aaa49cb7785„§cell_idÙ$bfab5c2d-61c3-468b-9ddf-4aaa49cb7785¤codeÚ(md""" * [Eij10] V. Eijkhout. [Introduction to High Performance Scientific Computing](https://theartofhpc.com/istc.html). 3 Edition, Vol. 1 (Lulu.com, 2010). * [Eij17] V. Eijkhout. [Parallel Programming in MPI and OpenMP](https://theartofhpc.com/pcse.html). 2 Edition, Vol. 2 (Lulu.com, 2017). """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$7d9ac5f9-39bf-4052-ad8a-ac0fec15c64a„§cell_idÙ$7d9ac5f9-39bf-4052-ad8a-ac0fec15c64a¤codeÙ_md""" Processes that are on the same node share the same `processor_name` (the `hostname`). """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$86394e1c-0ff4-449a-8940-4b5906d8b6f0„§cell_idÙ$86394e1c-0ff4-449a-8940-4b5906d8b6f0¤codeÙ9Foldable(md"What is the graph diameter ?", md"``|V|/2``")¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$97d3cf3f-ddac-4850-8b05-bdc0c4741f61„§cell_idÙ$97d3cf3f-ddac-4850-8b05-bdc0c4741f61¤codeÚ-Foldable(md"What are the number of switches, edges, graph diameter and bisection width for ``n`` computer nodes ?", md""" * There are ``n^2`` switches one per intersection. This makes this architecture only suitable for small ``n``. * The number of edges is : ``|E| = 2n^2`` which consists of ``n`` connections from an input to a switch, ``n`` connections from a switch to an output and ``2n(n-1)`` connections between switches. * The diameter is 2 if we don't count the in-between switches or ``2n`` if we count them. * The bisection width is ``n/2``. """)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$b9a9e335-1328-4c63-a213-ce21263bc201„§cell_idÙ$b9a9e335-1328-4c63-a213-ce21263bc201¤codeÚEFoldable( md"Can `MPI_Allreduce` be implemented by combining existing collectives ?", md""" Let the size of each ``x_i`` be ``n`` bytes. `MPI_Allreduce` can be implemented either by combining `MPI_Reduce` followed by `MPI_Bcast` or `MPI_Reduce_scatter` followed by `MPI_Allgather`. The first choice would lead to a complexity of ``\log_2(p)(\alpha + \beta n + \gamma n )``. The second would lead to a complexity of ``\log_2(p)\alpha + \beta n + \gamma n``. This second approach is faster for large ``p`` since we removed ``\log_2(p)`` in front of ``\beta`` and ``\gamma``. """, )¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$9b4cae31-c319-444e-98c8-2c0bfc6dfa0c„§cell_idÙ$9b4cae31-c319-444e-98c8-2c0bfc6dfa0c¤code°md"## Broadcast"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$7b1d26c6-9499-4e44-84c8-c272737a175e„§cell_idÙ$7b1d26c6-9499-4e44-84c8-c272737a175e¤code­md"## Gather"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$360091c4-d3a0-462d-abcf-b9bbb9480871„§cell_idÙ$360091c4-d3a0-462d-abcf-b9bbb9480871¤code³md"## Linear array"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$f2417047-33fc-4489-8e89-115bc6b46c13„§cell_idÙ$f2417047-33fc-4489-8e89-115bc6b46c13¤codeÙ@aside(md"""From $(citeintro("Figure 2.30"))""", v_offset = -200)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$1152dec8-3810-42b1-bb2a-8755dcaef56c„§cell_idÙ$1152dec8-3810-42b1-bb2a-8755dcaef56c¤codeÙ img1(f, args...) = img("https://raw.githubusercontent.com/VictorEijkhout/TheArtOfHPC_vol1_scientificcomputing/refs/heads/main/booksources/graphics/$f", args...)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$8f46daf1-9ca2-4a08-99aa-4ed68af218b8„§cell_idÙ$8f46daf1-9ca2-4a08-99aa-4ed68af218b8¤codeÙ2aside(citeintro("Section 2.7.4"), v_offset = -150)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$143dca7c-f9a4-472a-a4bc-4578e4e8413b„§cell_idÙ$143dca7c-f9a4-472a-a4bc-4578e4e8413b¤code«md"## Tree"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$c0daf219-cb87-4203-b835-49ab7eb955be„§cell_idÙ$c0daf219-cb87-4203-b835-49ab7eb955be¤codeÙOmd""" ``` [local computer]$ ssh lemaitre4 ``` $list_1 $mpicc_cmd $list_2 """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$d04b9af5-f004-4ca4-b1c9-2c86d46cb37d„§cell_idÙ$d04b9af5-f004-4ca4-b1c9-2c86d46cb37d¤codeÚEmd""" * Each node input is a row and each node output is a column; [source of figure below](https://www.sciencedirect.com/topics/computer-science/crossbar-network). * Each intersection is a switch. The cases (a) and (c) represent conflicting cases where two inputs want to simultaneously communicate with the same output. """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$fc705b81-7310-44cc-ad9f-dc2cf8a9b645„§cell_idÙ$fc705b81-7310-44cc-ad9f-dc2cf8a9b645¤codeªpath(true)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$6d2b3dbc-0686-49f0-904a-56c3ce63b4dd„§cell_idÙ$6d2b3dbc-0686-49f0-904a-56c3ce63b4dd¤codeÙšhbox([ Div(md"Initializes MPI, remove `mpiexec`, etc... from `argc` and `argv`."; style = Dict("flex-grow" => "1")), c""" MPI_Init(&argc, &argv) """, ])¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$e172f5c5-8b96-4efd-9cf3-805c58d1a6a3„§cell_idÙ$e172f5c5-8b96-4efd-9cf3-805c58d1a6a3¤codeÙzfunction definition(name, content) return Markdown.MD(Markdown.Admonition("key-concept", "Def: $name", [content])) end¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$ce7bf747-7116-4e76-9004-f234317046c3„§cell_idÙ$ce7bf747-7116-4e76-9004-f234317046c3¤codeÙKcompile_and_run(Example("MPI/mpi_bench1.c"), mpi = true, num_processes = 2)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$d722a86d-6d51-4d91-ac22-53af94c91497„§cell_idÙ$d722a86d-6d51-4d91-ac22-53af94c91497¤codeÙÅvbox([ Div(md"Get the id of processes. `procid` is **different** for **different** processes."; style = Dict("flex-grow" => "1")), c""" int procid; MPI_Comm_rank(MPI_COMM_WORLD, &procid); """, ])¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$273ad3a6-cb32-49bb-8702-fdaf8597e812„§cell_idÙ$273ad3a6-cb32-49bb-8702-fdaf8597e812¤codeÙ2md"## Different processes may be on the same node"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$6041a909-d26c-4ab1-836b-29953c578759„§cell_idÙ$6041a909-d26c-4ab1-836b-29953c578759¤codeÙfFoldable(md"What is the number of edges ? What is the bisection width ?", md""" Same as fat-tree. """)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$b94cd399-0370-49e9-a522-056f3af22955„§cell_idÙ$b94cd399-0370-49e9-a522-056f3af22955¤codeÙ‘img("https://raw.githubusercontent.com/VictorEijkhout/TheArtOfHPC_vol2_parallelprogramming/refs/heads/main/booksources/graphics/collectives.jpg")¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$58e12afd-6eb0-4731-bd57-d9ae7ab4e164„§cell_idÙ$58e12afd-6eb0-4731-bd57-d9ae7ab4e164¤codeÙü@htl("""

LINMA2710 - Scientific Computing Distributed Computing with MPI

P.-A. Absil and B. Legat

$(PlutoTeachingTools.ChooseDisplayMode()) $(PlutoUI.TableOfContents(depth=1)) """)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$141d162c-c817-498f-be16-f1cd35d82487„§cell_idÙ$141d162c-c817-498f-be16-f1cd35d82487¤codeÙAFoldable(md"How to collect the partial sums ?", md"`MPI_Reduce`")¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$e44b0038-d68f-4a49-9da2-67fbcbe098c3„§cell_idÙ$e44b0038-d68f-4a49-9da2-67fbcbe098c3¤code«path(false)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$b5a3e471-af4a-466f-bbae-96306bcc7563„§cell_idÙ$b5a3e471-af4a-466f-bbae-96306bcc7563¤codeÙ½vbox([ Div(md"Get the number of processes. `nprocs` is the **same** on all processes."; style = Dict("flex-grow" => "1")), c""" int nprocs; MPI_Comm_size(MPI_COMM_WORLD, &nprocs); """, ])¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$21b6133f-db59-4885-9b3d-331c3d6ef306„§cell_idÙ$21b6133f-db59-4885-9b3d-331c3d6ef306¤code°md"## Compiling"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$beee4908-d519-413a-964f-149bb82cdbb8„§cell_idÙ$beee4908-d519-413a-964f-149bb82cdbb8¤code¬md"## Slurm"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$091dd042-580b-4fda-8086-e048663aed6c„§cell_idÙ$091dd042-580b-4fda-8086-e048663aed6c¤codeÚámd""" * NVIDIA Nsight Systems $(img("https://developer.download.nvidia.com/images/nvidia-nsight-systems-icon-gbp-shaded-256.png", :width => "20pt")) can profile CUDA code but also MPI * Available on `manneback` after loading `CUDA` with $(img("https://github.com/TACC/Lmod/raw/main/logos/2x/Lmod-4color%402x.png", :height => "20px")) ```sh [laptop]$ ssh manneback [blegat@mbackf1 ~]$ nsys -bash: nsys: command not found [blegat@mbackf1 ~]$ ml CUDA [blegat@mbackf1 ~]$ nsys ``` """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$60bc118f-6795-43f9-97a2-865fd1704895„§cell_idÙ$60bc118f-6795-43f9-97a2-865fd1704895¤code°md"## Allreduce"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$16f8d28b-f201-4fe5-8446-68d7d9ddfb3c„§cell_idÙ$16f8d28b-f201-4fe5-8446-68d7d9ddfb3c¤codeÙ4aside(citeintro("Section 2.7.6.2"), v_offset = -250)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$35aa1295-642f-4525-bf19-df2a42ff39d6„§cell_idÙ$35aa1295-642f-4525-bf19-df2a42ff39d6¤codeÙecompile_and_run(Example("MPI/mpi_sum.c"), mpi = true, num_processes = sum_num_processes, verbose = 1)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$e832ce25-94e2-4743-854d-02b52cc7b56d„§cell_idÙ$e832ce25-94e2-4743-854d-02b52cc7b56d¤codeÙ¯aside(Foldable(md"Why is it the first process that gets the sum ?", md"We gave 0 to the 6th argument of `MPI_Reduce`, this decides which node gets the sum."), v_offset = -100)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$9612a1ef-fd3a-4a58-87b0-b2255ac86331„§cell_idÙ$9612a1ef-fd3a-4a58-87b0-b2255ac86331¤codeµmd"## Graph diameter"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$d7117a24-aba6-4479-a40e-5005310a6b38„§cell_idÙ$d7117a24-aba6-4479-a40e-5005310a6b38¤codeÙ2aside(citeintro("Section 2.7.3"), v_offset = -150)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$0e640e07-82c7-4dab-a8f1-2f634bbebdea„§cell_idÙ$0e640e07-82c7-4dab-a8f1-2f634bbebdea¤codeÚZhbox([ img("https://raw.githubusercontent.com/VictorEijkhout/TheArtOfHPC_vol2_parallelprogramming/refs/heads/main/booksources/graphics/send-ideal.png", :height => "150pt"), img("https://raw.githubusercontent.com/VictorEijkhout/TheArtOfHPC_vol2_parallelprogramming/refs/heads/main/booksources/graphics/send-blocking.png", :height => "160pt"), ])¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$f2ebc6fb-e07c-4922-897d-9bbe0f5fa1d0„§cell_idÙ$f2ebc6fb-e07c-4922-897d-9bbe0f5fa1d0¤codeÚ�#definition("Bisection bandwidth", hbox([ md""" The *bisection width* is: ```math \min_{S \subset V : \lfloor |V|/2 \rfloor \le |S| \le \lceil |V|/2 \rceil} \quad w(S, V \setminus S) ``` """, Div(html" ", style = Dict("flex-grow" => "1")), md""" The *bisection **band**width* is: ```math \min_{S \subset V : \lfloor |V|/2 \rfloor \le |S| \le \lceil |V|/2 \rceil} \quad \texttt{bw}(S, V \setminus S) ``` """])#)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$55e96151-2aa1-4ea0-b672-2038c57d911e„§cell_idÙ$55e96151-2aa1-4ea0-b672-2038c57d911e¤codeÙ|aside(img("https://upload.wikimedia.org/wikipedia/en/3/3e/The_LUMI_supercomputer.jpg", :height => "100pt"), v_offset = -140)¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$67dee339-98b4-4714-88b2-8098a13235f2„§cell_idÙ$67dee339-98b4-4714-88b2-8098a13235f2¤codeÚ¤md""" There are two protocols: * Rendezvous protocol 1. the sender sends a header; 2. the receiver returns a ‘ready-to-send’ message; 3. the sender sends the actual data. * Eager protocol the message is buffered so `MPI_Send` can return eagerly, before the receiver is even ready Eager protocol is used if the data size is smaller than the *eager limit*. To force the rendezvous protocol, use `MPI_Ssend`. """¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$4e32f7fb-cd5a-4190-9c92-ba4029313475„§cell_idÙ$4e32f7fb-cd5a-4190-9c92-ba4029313475¤codeÙ�img("https://raw.githubusercontent.com/VictorEijkhout/TheArtOfHPC_vol2_parallelprogramming/refs/heads/main/booksources/graphics/mpi-node2.png")¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$dbc19cbb-1349-4904-b655-2452aa7e2452„§cell_idÙ$dbc19cbb-1349-4904-b655-2452aa7e2452¤codeÚ©vbox([ md"""Before | `procid` | 1 | 2 | 3 | 4 | |----------|---|---|---|---| | | ``x_{1,1}`` | ``x_{1,2}`` | ``x_{1,3}`` | ``x_{1,4}`` | | | ``x_{2,1}`` | ``x_{2,2}`` | ``x_{2,3}`` | ``x_{2,4}`` | | | ``x_{3,1}`` | ``x_{3,2}`` | ``x_{3,3}`` | ``x_{3,4}`` | | | ``x_{4,1}`` | ``x_{4,2}`` | ``x_{4,3}`` | ``x_{4,4}`` | """, #Div(md"` `", style = Dict("margin" => "50pt")), md"""After `MPI_Reduce_scatter` | `procid` | 1 | 2 | 3 | 4 | |----------|---|---|---|---| | | ``x_{1,1} + \cdots + x_{1,4}`` | | | | | | | ``x_{2,1} + \cdots + x_{2,4}`` | | | | | | | ``x_{3,1} + \cdots + x_{3,4}`` | | | | | | | ``x_{4,1} + \cdots + x_{4,4}`` | """, ])¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$0d69e94b-492a-4acc-adba-a2126b871724„§cell_idÙ$0d69e94b-492a-4acc-adba-a2126b871724¤codeÚ}vbox([ md"""Before | `procid` | 1 | 2 | 3 | 4 | |----------|---|---|---|---| | | ``x_1`` | ``x_2`` | ``x_3`` | ``x_4`` | """, #Div(md"` `", style = Dict("margin" => "50pt")), md"""After `MPI_Allreduce` | `procid` | 1 | 2 | 3 | 4 | |----------|---|---|---|---| | | ``x_1 + \cdots + x_4`` |``x_1 + \cdots + x_4`` | ``x_1 + \cdots + x_4`` | ``x_1 + \cdots + x_4`` | """, ])¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$4309dc43-aeb8-4ec7-94fe-0e320b784349„§cell_idÙ$4309dc43-aeb8-4ec7-94fe-0e320b784349¤codeÙ*md"Special case of multidimensional array"¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$1551122c-70ae-4e37-b3fb-4be91fcc4afb„§cell_idÙ$1551122c-70ae-4e37-b3fb-4be91fcc4afb¤codeÚFoldable( md""" How to order the nodes so that consecutive nodes in the order are adjacent in the graph ? """, md""" Map nodes to binary number and use [Gray code](https://en.wikipedia.org/wiki/Gray_code). $(img("https://raw.githubusercontent.com/VictorEijkhout/TheArtOfHPC_vol1_scientificcomputing/refs/heads/main/booksources/graphics/hypercubenumber.jpg", :width => "300pt")) """ )¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$3e98c0ca-1b47-4631-83d7-cd0c8c0a431d„§cell_idÙ$3e98c0ca-1b47-4631-83d7-cd0c8c0a431d¤codeÙ)citepara(what) = "[Eij17; " * what * "]";¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedÃÙ$3ec3c058-a94d-4717-b99f-66373f2fa31d„§cell_idÙ$3ec3c058-a94d-4717-b99f-66373f2fa31d¤codeÙ‘img("https://raw.githubusercontent.com/VictorEijkhout/TheArtOfHPC_vol1_scientificcomputing/refs/heads/main/booksources/graphics/butterflys.jpeg")¨metadataƒ©show_logsèdisabled®skip_as_script«code_foldedënotebook_idÙ$59e5308a-9258-11f1-84a2-31aa71d9cdc4«in_temp_dir¨metadata€