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. PHY1610 - Winter 2022
  3. 9. Parallel Wave Analysis

9. Parallel Wave Analysis

Completion requirements
Opened: Sunday, 3 April 2022, 12:00 AM
Due: Sunday, 10 April 2022, 11:59 PM

For this assignment, start with a serial code "analysewave.cpp" that can analyze the output of the wave1d application.

The code can be compiled with the Makefile and can be run by giving two arguments: the name of the input netcdf file and the name of the output file to create. E.g.

  ./analysewave longresult.nc output.txt

The file "longresult.nc" can be found in the directory /scinet/course/phy1610/analysewave, along with the code. Copy this directory over to your $SCRATCH on the teach cluster. Note that the netcdf file is fairly big (4.5GB).

Your task is to parallelize the analysewave code.cpp using two methods:

  1. OpenMP, using "parallel for" and reduction variables.
  2. MPI, using domain decomposition and MPI_Reduce calls.

Create two versions of the code, called analysewave-omp.cpp and analysewave-mpi.cpp. Using job scripts, measure the runtime of analysewave-omp as a function of the number of threads from 1 to 16. Also measure, in a job script, the runtime of analysewave-mpi as a function of the number of processes from 1 to 32 (for which you will need multiple nodes).

You should see rather non-Amdahl-like behaviour. Put the timing results in a file "report.txt", and add an explanation of the observed behaviour in a short (~ 2 paragraph) report.

Submit the Makefile, the two new versions analysewave-omp.cpp and analysewave-mpi.cpp, and your timing results and explanation in the file report.txt.

analysewave.cpp analysewave.cpp
3 April 2022, 11:20 PM
Makefile Makefile
3 April 2022, 11:20 PM
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