Skip to main content
SciNet
  • Home
  • All Courses
  • Calendar
  • Certificates
  • SciNet
    Main Site Documentation my.SciNet
  • CCDB
  • More
Close
Toggle search input
English
English Français
You are currently using guest access
Log in
SciNet
Home All Courses Calendar Certificates SciNet Collapse Expand
Main Site Documentation my.SciNet
CCDB
Expand all Collapse all
  1. Dashboard
  2. HPC383 - Oct 2021
  3. Assignment

Assignment

Completion requirements
Opened: Wednesday, 27 October 2021, 12:00 AM
Due: Thursday, 28 October 2021, 11:55 PM

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.




Contact site support
You are currently using guest access (Log in)
Data retention summary


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.
Powered by Moodle