Skip to content

Commit

Permalink
LH: homework 1 doc
Browse files Browse the repository at this point in the history
  • Loading branch information
lhuang-pvamu committed Oct 1, 2018
1 parent c2ec70b commit 236b4ee
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
7 changes: 7 additions & 0 deletions docs/homework/homework.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Parallel Computing Labs
=======================

.. toctree::
:maxdepth: 2

homework1
27 changes: 27 additions & 0 deletions docs/homework/homework1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Parallel Computing Homeowrk 1
========================

A prime pair or twin prime is a prime number that has a prime gap of two, in other words, the difference between the two prime numbers are two, for example the twin prime pair (41, 43). You need to write an OpenMP program to find the total number of prime pairs between 2 and 50,000,000. Your grade will be not only determined by the correctness of the total number, but also depends on your program performance. Your program should print the number of prime pairs and the total execution time of your program. Report the speedup of your program using 1, 2, 4, and 8 threads respectively.

Build your code::
cd homework/hw1
make
Run your sequential version::
./prime

Run your OpenMP parallel version::
./prime_omp

Run both of them::
make run


You need to revise the prime.cpp and prime_omp.cpp files respectively to create a sequential program and an OpenMP parallel program to complete the homework.

The following is the grading percentage for evaluating your program.::
Correctness: 60%
Performance: 40%

Please submit all of your program source codes and a short report for performance observation.

2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ You need Linux or Mac OS to build and run these labs.
:caption: Contents:

labs/labs.rst

homework/homework.rst


.. Indices and tables
Expand Down

0 comments on commit 236b4ee

Please sign in to comment.