Skip to main content
If you continue browsing this website, you agree to our policies:
  • Nutzungsbedingungen
  • Datenschutzerklärung
Continue
x
JKU Moodle
  • Home
  • All courses
  • More
You are currently using guest access
Log in
JKU Moodle
Home All courses
Expand all Collapse all
  1. 2017S342295
  2. Assignments
  3. Assignment 4 (June 20)

Assignment 4 (June 20)

Completion requirements
Opened: Friday, 19 May 2017, 12:00 AM
Due: Tuesday, 20 June 2017, 11:55 PM

Your task in this assignment is to parallelize a simple subset sum program, which given a (randomly generated set) of numbers, searches for a subset with maximal sum of their elements not larger than half the sum of all numbers.  You can either use Cilk or Lace.

The sequential implementation uses global arrays 'current' and 'best' to hold the picked elements and best found subset. The first challenge is to localize theses data structure to the working threads in a recursive way. For Cilk leaf coarsening might be necessary. Also having global statistics counters ('recursions' and 'leafs') might need some additional ideas.

Finding sequential optimizations is not necessary, but if you add some to the sequential code, you should also keep (or better port) them to the parallel code.

  • parcomp-exercises-cilklace-subsetsum.zip parcomp-exercises-cilklace-subsetsum.zip
    8 June 2017, 5:23 PM
Policies
Powered by Moodle
Knowledge Base for Students
Knowledge Base for Employees
Johannes Kepler Universität Linz
Impressum