Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.
/ parallel-pi Public archive

Calculating PI Value In Different Parallel Framework.

License

Notifications You must be signed in to change notification settings

yuxincs/parallel-pi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parallel Pi

Github Actions

Calculating PI Value In Different Parallel Framework.

Preliminaries

We use Riemann Sum with Midpoint Rule to calculate the integration, which includes loops that may be optimized using parallel computing.

Frameworks

PThread

Use pthread as the parallel framework.

OpenMP

Use OpenMP as the parallel framework to calculate Pi.

Note that in macOS the default clang does not support OpenMP, thus it needs to be built with gcc or llvm.

gcc could be directly installed by

brew install gcc

and llvm could be installed via

brew install llvm

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published