Skip to content

Calculating PI Value In Different Parallel Framework.

License

Notifications You must be signed in to change notification settings

Aditya31398/parallel-pi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parallel Pi Build Status

Calculating PI Value In Different Parallel Framework.

Basic Theory

We use mid-rectangle method to calculate the integration, which includes loops that may be optimized using parallel computing methods.

Directories

PThread

Use pthread as the parallel framework.

OpenMP

Use OpenMP as the parallel framework to calculate, note that in macOS the default clang does not support OpenMP , thus it needs to be built with gcc or clang-omp.

gcc-6 could be directly installed by

brew install gcc --without-multilib

and clang-omp could be installed via

brew install clang-omp

MPI

Use MPI as the parallel framework.

CUDA

Use CUDA to optimize the parallel computing process, which must be run under CUDA environment. i.e., you must have at least a nVidia card and nvcc installed to compile and run the code.

MPIOMP

Use mixed method of MPI and OpenMP to gain scalability and high parallel performance at the same time.

Experiment

All experiments are carried out under Linux with nvcc and nVidia cards installed.

And I chose 2^30 as the STEP_NUM for all framework.

Parallel parameters are listed below:

Framework Parameters
OpenMP 16 Threads
MPI 16 Processes
PThread 16 Threads
CUDA 512 Threads / 64 Blocks
MPIOMP 4 Processes / 4 Threads

License

MIT.

About

Calculating PI Value In Different Parallel Framework.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 58.1%
  • Cuda 35.3%
  • Makefile 6.6%