0% found this document useful (0 votes)
109 views3 pages

Sorting 32 - Bit Floating Point Values

The document describes two parallel programming assignments: 1) Write an OpenMP program to sort an array of 32-bit floating point numbers in ascending order. Performance should be measured as thread concurrency, array size, and input characteristics are varied. 2) Write a parallel program to find the unique strings in a text file and count the frequency of each unique string. Performance should again be measured under different conditions. Both problems require discussing the parallelization strategy and any assumptions or drawbacks.

Uploaded by

Mohammed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
109 views3 pages

Sorting 32 - Bit Floating Point Values

The document describes two parallel programming assignments: 1) Write an OpenMP program to sort an array of 32-bit floating point numbers in ascending order. Performance should be measured as thread concurrency, array size, and input characteristics are varied. 2) Write a parallel program to find the unique strings in a text file and count the frequency of each unique string. Performance should again be measured under different conditions. Both problems require discussing the parallelization strategy and any assumptions or drawbacks.

Uploaded by

Mohammed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

1.

Sorting 32-bit floating point values



(a) Given an array of 32-bit floating-point values,
write a parallel program (using OpenMP) to sort
them in ascending order. The sort does not need
to be in-place (i.e., you can use additional storage
for the output). The sort need not be stable. You
may use any parallel sorting algorithm.

(15 points: 7 for correctness, 8 for
scalability/speedup/performance w.r.t. serial code)

(b) Discuss the parallelization strategy in the report.
What assumptions did you make about the input array?
Are there any drawbacks to your parallelization
approach?
(10 points)

(c) Report performance as you vary thread
concurrency, problem size (array size), and input array
characteristics (e.g., in addition to uniform random
floats, consider input sequences that are already sorted,
almost sorted, sorted in reverse, with high percentage
of repeats).
(10 points)


2. Finding unique strings

(a) You are given a text file as input, with a string in


each line of the file. You cannot make
assumptions on the lengths of the strings, or the
size of the file. Your goal is to write a parallel
program to determine the number of unique
strings in the file, and the number of times each
unique string appears in the file. You may use a
set representation for this purpose, or
alternately, sort all strings in some ordering, and
count the unique strings. All steps of the
approach need to be parallelized, no matter
which scheme (set representation or sorting)
you use.

(15 points: 7 for correctness, 8 for
scalability/speedup/performance w.r.t serial code)

(b) Discuss the parallelization strategy in the report.
What assumptions did you make about the input string
sequences? Are there any drawbacks to your
parallelization approach?
(10 points)

(c) Report performance as you vary thread
concurrency, problem size (I will provide a few
representative text files), and input text file
characteristics (e.g., consider text files with strings that
are already ordered, strings that are almost sorted, files
with all unique strings, files with a high percentage of
duplicates, etc.).

(10 points)

You might also like