Programming Parallel Computers

HY 2023–2024

SO5: quicksort ★+

You need to log in to make submissions.

What you will need to do in this task

Please read the general instructions for this exercise first. Here are the additional instructions specific to this task:

Implement an efficient parallel sorting algorithm for the CPU, using the basic idea of quicksort.

What I will try to do with your code

I will first run all kinds of tests to see that your code works correctly. You can try it out locally by running ./grading test, but please note that your code has to compile and work correctly not only on your own computer but also on our machines.

If all is fine, I will run the benchmarks. You can try it out on your own computer by running ./grading benchmark, but of course the precise running time on your own computer might be different from the performance on our grading hardware.

Benchmarks

Name Parameters
benchmarks/1 n = 100000
the input contains 100000 integers, and the output should contain the same integers in order
benchmarks/2 n = 1000000
the input contains 1000000 integers, and the output should contain the same integers in order
benchmarks/3a n = 10000000
the input contains 10000000 integers, and the output should contain the same integers in order
benchmarks/3b n = 10000000
the input contains 10000000 integers, and the output should contain the same integers in order
benchmarks/3c n = 9999997
the input contains 9999997 integers, and the output should contain the same integers in order
benchmarks/3d n = 9999998
the input contains 9999998 integers, and the output should contain the same integers in order
benchmarks/3e n = 9999999
the input contains 9999999 integers, and the output should contain the same integers in order
benchmarks/3f n = 10000001
the input contains 10000001 integers, and the output should contain the same integers in order
benchmarks/3g n = 10000002
the input contains 10000002 integers, and the output should contain the same integers in order
benchmarks/3h n = 10000003
the input contains 10000003 integers, and the output should contain the same integers in order
benchmarks/4 n = 100000000
the input contains 100000000 integers, and the output should contain the same integers in order

Grading

In this task your submission will be graded using benchmarks/4: the input contains 100000000 integers, and the output should contain the same integers in order.

The point thresholds are as follows. If you submit your solution no later than on Saturday, 31 August 2024, at 23:59:59 (Helsinki), your score will be:

Running timePoints
≤ 3.500 sec 1
≤ 2.500 sec 2
≤ 1.500 sec 3
≤ 1.200 sec 4
≤ 1.000 sec 5

For late submissions you will not get any points.