amanikiruga / parallelized-prime-sieve

An OpenMP multicore and OpenACC GPU parallelized Sieve of Eratosthenes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sieve of Eratosthenes Parallelized

This project parallelizes the sieve of eratosthenes in aims of getting speedups on both multicore and GPU systems.

How to run

You can compile the code by running make to use the provided makefile.

Multicore OpenMP

  • Set the number of threads using the environment variable OMP_NUM_THREADS
    • eg. export OMP_NUM_THREADS=x where x is the number of threads.

GPU OpenACC

  • You will need access to a GPU and specifically Nvidia, there is limited support for other manufacturers.
  • Optionally set the environment variable PGI_ACC_TIME to 1 to get more detailed analysis on how the code was parallelized
    • export PGI_ACC_TIME=1

About

An OpenMP multicore and OpenACC GPU parallelized Sieve of Eratosthenes

License:MIT License


Languages

Language:C++ 71.4%Language:C 12.7%Language:Shell 8.9%Language:Makefile 7.0%