>
ª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¤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‘’Ú(
[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
©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“’Ú5Before
procid1 2 3 4 $x_1$ $x_2$ $x_3$ $x_4$
©text/html’ƒªattributes�¥stylemargin: 50pt;£tag£div¨children‘’Ù1©text/htmlÙ,application/vnd.pluto.reactdomelement+object’Ú4After
procid1 2 3 4 $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�¥styleflex-grow: 1;£tag£div¨children‘’Ù3©text/htmlÙ,application/vnd.pluto.reactdomelement+object’Ù_©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(`[4mmpicc[24m [4m-show[24m`, 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¤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$
procid1 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$
procid1 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
$$\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 ?
procid1 2 3 4 $x_1$ $x_2$ $x_2$ $x_3$ $x_4$
Then
procid1 2 3 4 $x_1$ $x_2$ $x_2$ $x_3$ $x_3$ $x_4$
Then
procid1 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$ .
¤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Ú
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):
After second communication (1 → 2 and 3 → 4 at the same time):
¤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¤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Ú°¤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“’Ú5Before
procid1 2 3 4 $x_1$ $x_2$ $x_3$ $x_4$
©text/html’ƒªattributes�¥stylemargin: 50pt;£tag£div¨children‘’Ù1©text/htmlÙ,application/vnd.pluto.reactdomelement+object’Ú·After MPI_Allgather
procid1 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$
©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Û î¤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
procid1 2 3 4 $x_1$ $x_2$ $x_3$ $x_4$
©text/html’ƒªattributes�¥stylemargin: 50pt;£tag£div¨children‘’Ù1©text/htmlÙ,application/vnd.pluto.reactdomelement+object’Ú„After
procid1 2 3 4 $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Ú[
Is this timing bandwidth accurately ?
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.
¤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):
procid1 2 3 4 $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×ÇÇGUOOÏ�;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À³YHV]]�˜˜øÈ#�¤¤¤Ô×׫Õ[\\üôÓ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ìÍÉ“'