Skip to content

A C-MPI parallel program that receives on an array X as input, returns its average, its variance and a new array based on: d[i]=((X[i]-min(X))/(max(X)-min(X))*100.

Notifications You must be signed in to change notification settings

Coursal/MPI_average_and_variance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

MPI_average_and_variance

A C-MPI parallel program that receives on an array X as input, returns its average, its variance and a new array based on: d[i]=((X[i]-min(X))/(max(X)-min(X))*100

Limitations:

  1. only MPI_Send()/MPI_Recv() functions used
  2. number of elements of X must be evenly divided by the number of the tasks

Guide to compile and run:

  1. download the .tar file from here: ftp://ftp.mcs.anl.gov/pub/mpi/old/mpich-1.2.4.tar.gz
  2. sudo apt-get install gcc
  3. sudo apt-get install libmpich2-dev
  4. mpicc -o ave_var ave_var.c
  5. mpiexec -n "number_of_tasks" ./ave_var

Tested on Lubuntu 12.04 (Precise Pangolin) on a virtual machine.

About

A C-MPI parallel program that receives on an array X as input, returns its average, its variance and a new array based on: d[i]=((X[i]-min(X))/(max(X)-min(X))*100.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages