Skip to content

Parallel programming with OpenMP to make the Sieve of Eratosthenes

License

Notifications You must be signed in to change notification settings

luanorlandi/Parallel-Sieve-Quicksort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parallel Sieve of Eratosthenes and Quicksort

Project to make the Sieve of Eratosthenes and Quicksort algorithm with OpenMP and OpenMPI.

Sieve of Eratosthenes

Compile

The project uses OpenMP, a open library for parallel programming. You will need it to compile.

  $ gcc -g -Wall -fopenmp -o sieve sieve.c -lm

Run

  $ ./sieve n t

'n' is the maximum number for the sieve 't' is the number of threads

Quicksort

The PSRS (Parallel sorting by regular sampling) algorithm is implemented for this. The project uses OpenMP and OpenMPI, open libraries for parallel programming. You will need both to compile.

Compile

The project uses OpenMP, a open library for parallel programming. You will need it to compile.

  $ mpicc -g -Wall -fopenmp -o quicksort quicksort.c -lm

Run

  $ mpirun quicksort -np n t

'n' in the number of processes 't' is the number of threads

About

Parallel programming with OpenMP to make the Sieve of Eratosthenes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages