Passer au contenu principal
SciNet
  • Accueil
  • Tous les cours
  • Calendrier
  • Certificats
  • SciNet
    Site principal Documentation my.SciNet
  • CCDB
  • Plus
Fermer
Activer/désactiver la saisie de recherche
Français
English Français
Vous êtes connecté anonymement
Connexion
SciNet
Accueil Tous les cours Calendrier Certificats SciNet Replier Déplier
Site principal Documentation my.SciNet
CCDB
Tout déplier Tout replier
  1. Tableau de bord
  2. HPC383 - Oct 2021
  3. Assignment

Assignment

Conditions d’achèvement
Ouvert le : mercredi 27 octobre 2021, 00:00
À rendre : jeudi 28 octobre 2021, 23:55

Due date: Thursday, October 28th (2021) at 11:55 pm.

Log into Teach login node, teach01, with your Compute Canada account credentials or your lcl_uothpc383sNNNN temporary account and copy the course material to your scratch directory:

$ ssh -Y USER@teach.scinet.utoronto.ca

$ cd $SCRATCH

$ cp -r /scinet/course/mpi/advanced-mpi .

$ cd advanced-mpi

$ source setup

Inspect 2D diffusion equation serial code:

$ cd $SCRATCH/advanced-mpi/diffusion2d

    $ # source ../setup

    $ make diffusion2dc

    $ ./diffusion2dc

And 2D diffusion equation parallel code so you get familiar with their solutions:

    $ make diffusion2dc-mpi-nonblocking

    $ # or srun 

    $ mpirun -np 4 ./diffusion2dc-mpi-nonblocking

Part I: Use MPI derived datatypes instead of packing and unpacking the data manually:

$ cp diffusion2dc-mpi-nonblocking.c diffusion2dc-mpi-nonblocking-datatype.c

Build with "make diffusion2dc-mpi-nonblocking-datatype"

Test on 4..9 processors

Part II: Use MPI Cartesian topology routines to map the 2D cartesian grid of the diffusion equation domain into a 2D layout of processes. Get rid of the manually done mapping:

$ cp diffusion2dc-mpi-nonblocking-datatype.c diffusion2dc-mpi-nonblocking-carttopo.c

Build with "make diffusion2dc-mpi-nonblocking-carttopo"

Submit your two solutions, diffusion2dc-mpi-nonblocking-datatype.c and diffusion2dc-mpi-nonblocking-carttopo.c, to this website.

Tips: 

  • Switch off graphics (in Makefile, change "USEPGPLOT=-DPGPLOT" to "USEPGPLOT=")
  • Get familiar with the serial code in 2D and review the 1D one if needed.
  • If you get stuck debugging, try to decrease the problem size and the number of steps.




Contacter l’assistance du site
Vous êtes connecté anonymement (Connexion)
Résumé de conservation de données


All content on this website is made available under the Creative Commons Attribution 4.0 International licence, with the exception of all videos which are released under the Creative Commons Attribution-NoDerivatives 4.0 International licence.
Fourni par Moodle