Skip to content

A simple demonstration program to calculate the value of PI using both MPI (multiprocess) and OPENMP (multithread)

Notifications You must be signed in to change notification settings

dutta-alankar/openmp-mpi-pi-calc-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

openmp-mpi-pi-calc-demo

A simple demonstration program to calculate the value of PI using both MPI (multiprocess) and OPENMP (multithread)

      ################################  

    ##################################  

   ###################################  

   ####    #####         ####           

  ###      #####        #####           

  #        #####        #####           

  #        #####        ####            

           ####         ####            

           ####         ####            

           ####         ####            

          #####        #####            

          #####        #####            

          ####         #####            

          ####         #####            

         #####         #####            

        ######         #####            

        #####          #####        ##  

       #######         ######       ##  

      #######           ##############  

     #######            #############   

     #######             ###########    

     ######               #########     


This is a hybrid program that achieves parallelization using multiple processors and also multiple threads on each processor.

It does the following integration using rectangles to numerically estimate the value of PI:

Usage:

To compile: mpicc pi_omp_mpi.c -o pi_omp_mpi -fopenmp

To run: mpiexec -n <processors> ./pi_omp_mpi -steps <steps> -threads <threads>

About

A simple demonstration program to calculate the value of PI using both MPI (multiprocess) and OPENMP (multithread)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages