Giter Site home page Giter Site logo

parallel-word-count's Introduction

Parallel Word Count

The purpose of this project is to experiment parallel processing with the MPJ Express library. This program reads a text file and counts the number of occurrences in the text for a given word.

Here, we use the first core to read the file and distribute each line to the other cores. Each of these cores count the number of occurrences of the given word in the line they receive. Then, they return their result to the main core that combines them, printing the final result.

Requirements

JDK

Download and install the last version of Java SE Development Kit 8.

MPJ Express

Download the MPJ Express software on SourceForge.

Add MPJ_HOME to your environment variables:

export MPJ_HOME=/path/to/mpj

Update your PATH variable:

export PATH=$MPJ_HOME/bin:$PATH

For more information, read the official user guide for your operating system.

Compile

Compile with javac:

javac -d bin -cp .:$MPJ_HOME/lib/mpj.jar src/fr/upec/esipe/ParallelWordCount.java

Run

Run with mpjrun:

cd bin/
mpjrun -np <number of cores> fr.upec.esipe.ParallelWordCount <path/to/textfile> <word to count> 

Note that the number of cores has to be greater or equal to two.

parallel-word-count's People

Contributors

louisendelicher avatar

Watchers

 avatar  avatar  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.