Sale!

PHY1610 Assignment 6: Profiling and Scaling Analysis solution

$24.99 $14.99

Original Work ?

Download Details:

  • Name: Assignment-6_-Profiling-Scaling-Analysis-nhntx2.zip
  • Type: zip
  • Size: 30.77 KB

Category: You will Instantly receive a download link upon Payment||Click Original Work Button for Custom work

Description

5/5 - (3 votes)

In this assignment, you are going to continue with the ants code of assignments 2 and 3. You are to
Ensure you have a SciNet account. If not, contact us.
On SciNet, git clone the directory /scinet/course/phy1610/ants
This version of the ants code is modularized and is changed compared to the code of assignment 2 and 3 in that it stops when there are no more ants on the tables, and it takes a command line argument which is the random seed; thus we can explore different initial conditions. The table size has also been increased.

On SciNet’s GPC, load the modules ‘gcc/4.8.1’ and ‘binutils/2.25’ (i.e., type “module load gcc/4.8.1 binutils” on the command line). With those modules loaded, add profiling flags (-g -pg -gstabs) to the Makefile and (re)compile the code, and profile the whole application both with the ‘time’ command as well using gprof to get a line-by-line profile.
Note that in a modular approach, each object file will have to have been compiled with “-g -pg -gstabs” for profiling to work, and in the linking command, again, you should have the “-g -pg -gstabs” options as well.

Note in which lines of the code the application spends most of its time; we will attack those lines in the next assignment.
The code comes with a script called clearingtime.sh, which uses the ants executable with an number of initial conditions (32 by default) and averages the first time at which the table is clear of ants. The initial conditions are independent and can be parallelized; by giving the number of processors as a parameter, you can run these case in parallel. Ie., “clearingtime.sh 5” would run the 32 cases, but 5 at the same time running on different processors.

You are to write a script to perform a scaling analysis of the speedup of the clearingtime.sh as a function of the number of processors P, with P ranging from 1 to 8. Be sure to do this analysis on a ‘debugjob’. The scaling analysis should result in a file with three columns: P, the elapsed wall time, and the speedup. The elapsed time of the script can be measured with the linux time command.
Make a plot of the scaling behaviour of clearingtime.sh, and deduce the serial fraction f of the clearingtime.sh script from your scaling analysis.
As in previous assignments, you should still use git version control for the makefile and the scaling analysis script.