Giter Site home page Giter Site logo

mpi-histogram's Introduction

Using the MPI library, write a program that calculates a histogram for a given string of data x[1], x[2], x[3], ...x[k] and threshold values A[1], A[2], ...A[N] (k >> N).
A histogram is an array H[1...N] with the property that H[i] is the number of x such that A[i-1] <= x < A[i] for i = 2, ..., N and H[1] is equal to the number of values of x satisfying the condition x < A[1].

The parallel histogram computation is performed by N sorting processes SEG(1...N), the main process P and the statistical process STAT. Process P sends threshold values from table A to the sorting processes so that A[i] goes to SEG[i], and then sends a string of x values to SEG[1]. After sending the last value, process P sends an end signal and receives results from the STAT process. Each sorting process checks whether the received x value is less than its threshold value. If so, it sends a signal to the STAT process, otherwise it passes x to the next SEG process. The STAT process counts the received signals in the H table, which it finally sends to the P process.

Alt Text

mpi-histogram's People

Contributors

monsiw avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.