Go to content ALT+c

High Performance Scientific Computing (Mar. 2015) HPC162
Enrollment is closed

Tuesday March 17, 2015 - 10:14

4.1 Assignment 9: GNUParallel and Scaling

Please perform the following steps:

Once you've done this you're ready to get the code for the assignment. From the command line on the GPC, move to your scratch directory, and then type:

> git clone /scinet/course/scientific_computing/2015/sc3/homework1


This will make a copy of the homework1 directory in your scratch directory. Then type

> cd homework1

> source setup

> make

This will load the needed modules, and make the executable needed for the assignment. The directory homework1 should now contain a program called 'blurppm', and 266 images to be blurred. It is used thus:

> ./blurppm INPUTPPM OUTPUTPPM BLURRADIUS NUMBEROFTHREADS

Before you start the assignment, perform a simple test. Start by requesting an interactive node from the debug queue:

> qsub -I -X -q debug -l nodes=1:ppn=8,walltime=2:00:00

> cd $SCRATCH/homework1

> ./blurppm 001.ppm new001.ppm 30 1

> display 001.ppm &

> display new001.ppm &

The last two commands should display the original and blurred images. Note that you need an X server running on your local machine for the 'display' command to work correctly. Linux and Mac machines should be fine, though you must ssh into SciNet and GPC with the '-X' or '-Y' flag. Windows machines may have problems. For Windows we recommend using MobaXterm, which comes with a built-in X server. Contact us if you run into trouble and need help.

The purpose of the assignment is to do timing tests, and explore how judicious use of threads and GNU parallel can improve throughput. An example of the use of the time command is given below:

> time ./blurppm 001.ppm new001.ppm 30 1

real 0m52.900s

user 0m52.881s

sys 0m0.008s

You are interested in the 'real' time.

For both of these assignment parts, make sure you are NOT working on a devel node! Make sure you are working on your own compute node. Either log into an interactive session, as shown above, or submit a submission script to the queue.

Part 1:

  • Time blurppm with BLURRADIUS ranging from 1 to 41 in steps of 8, and NUMBEROFTHREADS ranging from 1 to 8, for a single file of your choice. Record the (real) duration of each run.
  • Make plots of the duration and speed-up as a function of NUMBEROFTHREADS, for each value of BLURRADIUS.
  • Submit your script for generating the results, and plots.

Part 2:

  • On a single compute node, use GNU parallel to run blurppm on all 266 images with a radius of 20. Use 8 processes with 1 thread each. Time the result.
  • Write your own "subjob manager script", as per slide 18 in today's class. Run blurppm again on all 266 images with radius 20, using one thread, again using 8 processors. Time the result and compare to the GNU parallel case above. Discuss the timing differences.

Submit your scripts, timing data, and comments on the results.

Last Modified: Friday Mar 13, 2015 - 09:37. Revision: 1. Release Date: Thursday Mar 12, 2015 - 14:00.


Content Navigation


Course Calendar


Course Events



Questions? Contact Support.
Web site engine's code is copyright Ā© ATutorĀ®. About ATutor.
For guidance on using ATutor see the official ATutor Handbook.