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 - May 2023
  3. Assignment

Assignment

Conditions d’achèvement
Ouvert le : mercredi 17 mai 2023, 00:00
À rendre : jeudi 18 mai 2023, 23:55

Due date: Thursday, May 18th (2023) at 11:55 pm.

Log into Teach login node, teach01, with your lcl_uothpc383sNNNN temporary account (NNNN are integer numbers unique to your account) and copy the course material to your scratch directory:

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

(Send me a message if you have not received an email with these instructions yet!)

and copy the course material to your scratch directory:

$ 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 # if you see errors, most probably you didn't set up your environment properly. This line is just a reminder to source your setup if you have not done so yet.

$ make diffusion2dc

$ ./diffusion2dc

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

$ make diffusion2dc-mpi-nonblocking

$ mpirun -np 4 ./diffusion2dc-mpi-nonblocking  # or srun

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. Use srun to allocate compute node resources instead of running it on the login node.

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