Skip to content

Commit

Permalink
reorganize sources
Browse files Browse the repository at this point in the history
  • Loading branch information
pnavaro committed Sep 26, 2024
1 parent fb8fcf3 commit 856703b
Show file tree
Hide file tree
Showing 33 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ website:
navbar:
logo: images/logo.png
left:
- href: index.qmd
- href: src/index.qmd
text: Introduction
- href: com_point_a_point.qmd
- href: src/com_point_a_point.qmd
text: Communications point à point
- href: com_collectives.qmd
- href: src/com_collectives.qmd
text: Communications collectives
- href: exercice.qmd
- href: src/exercice.qmd
text: Conclusion
tools:
- icon: github
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions com_collectives.qmd → src/com_collectives.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Il y a trois types de sous-programmes :
2. Réception de ce message à l’adresse message pour les processus autre que `rank`.

```R
{{< include bcast.R >}}
{{< include ../codes/bcast.R >}}
```

::: {.callout-warning}
Expand All @@ -71,7 +71,7 @@ La ième tranche est envoyée au ième processus.
![](images/broadcastvsscatter.png)

```R
{{< include scatter.R >}}
{{< include ../codes/scatter.R >}}
```

```bash
Expand Down Expand Up @@ -126,7 +126,7 @@ Opérations pour réductions réparties
- "minloc" : Recherche de l’indice du minimum

```R
{{< include reduce.R >}}
{{< include ../codes/reduce.R >}}
```

```bash
Expand Down
8 changes: 4 additions & 4 deletions com_point_a_point.qmd → src/com_point_a_point.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Il existe des versions non bloquantes `mpi.isend` et `mpi.irecv` ainsi qu'une ve
## Exemple

```R
{{< include send_recv.R >}}
{{< include ../codes/send_recv.R >}}
```

```bash
Expand All @@ -69,13 +69,13 @@ rang 1 renvoie le message vers le processus de rang 0.
## Solutions

```r
{{< include corrections/ping_pong_1.R >}}
{{< include ../corrections/ping_pong_1.R >}}
```

```r
{{< include corrections/ping_pong_2.R >}}
{{< include ../corrections/ping_pong_2.R >}}
```

```r
{{< include corrections/ping_pong_3.R >}}
{{< include ../corrections/ping_pong_3.R >}}
```
8 changes: 4 additions & 4 deletions exercice.qmd → src/exercice.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ format:
Dans cet exemple, on crée autant de vecteurs que de processus initialisés à la valeur du rang. Ces vecteurs sont collectés dans une matrice construite par colonnes.

```R
{{< include demo_pbdmpi.R >}}
{{< include ../codes/demo_pbdmpi.R >}}
```

```bash
Expand Down Expand Up @@ -63,7 +63,7 @@ COMM.RANK = 0
On veut paralléliser l'exemple suivant avec Rmpi que j'ai trouvé [ici](https://snoweye.github.io/R_note/inc_menu/Rmpi.html)

```R
{{< include loop_rowSums.r >}}
{{< include ../codes/loop_rowSums.r >}}
```

Voici la version MPMD venant de la même source, essayer d'en faire une version SPMD et comparer les performances.
Expand All @@ -72,11 +72,11 @@ Voici la version MPMD venant de la même source, essayer d'en faire une version
- Votre code est-il plus conçis ?

```R
{{< include rmpi_rowSums.r >}}
{{< include ../codes/rmpi_rowSums.r >}}
```

## Solution

```r
{{< include corrections/rowsum.R >}}
{{< include ../corrections/rowsum.R >}}
```
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
10 changes: 5 additions & 5 deletions index.qmd → src/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Bibliothèques scientifiques parallèles
Cloner le dépôt <https://github.com/GroupeCalcul/ANFRCalculRmpi> pour récupérer les exemples.

```c
{{< include hello_mpi.c >}}
{{< include ../codes/hello_mpi.c >}}
```
## Compilation et exécution d’un code MPI en C
Expand Down Expand Up @@ -114,7 +114,7 @@ Pour les langages interprétés, il est nécessaire de lancer plusieurs sessions
pour utiliser MPI.

```python
{{< include hello_mpi.py >}}
{{< include ../codes/hello_mpi.py >}}
```

```bash
Expand All @@ -130,7 +130,7 @@ Hello, World! I am process 0 of 4 on ar039133.math.univ-rennes1.fr
![](images/spmd.png)

```R
{{< include hello_mpi.R >}}
{{< include ../codes/hello_mpi.R >}}
```
::: {.callout-note}
Pour une raison qui m'est inconnue, si on laisse la valeur `comm=1` par défaut, l'exemple ne fonctionne pas.
Expand Down Expand Up @@ -165,7 +165,7 @@ cd ANFRCalculRmpi
fichier `hello_mpi.sh` nécessaire à l'utilisation d'[OAR](https://oar.imag.fr)

```bash
{{< include hello_mpi.sh >}}
{{< include ../codes/hello_mpi.sh >}}
```

Ce script doit être exécutable
Expand Down Expand Up @@ -217,7 +217,7 @@ Hello world from task 001 of 004, on host dahu146
![](images/mpmd.png)

```R
{{< include hello_mpmd.R >}}
{{< include ../codes/hello_mpmd.R >}}
```

```bash
Expand Down

0 comments on commit 856703b

Please sign in to comment.