Skip to content

Program to run parallel processes simulating a parking lot using MPI. Ampliation of Operative Systems, 2021 🚗

License

Notifications You must be signed in to change notification settings

AlvaroMartinezQ/mpi_parking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

PARKING MPI

OPERATIVE SYSTEMS

Report Bug · Request Feature

Table of Contents

About The Project

Parking simulation with MPI, development of operative systems, 2020 - 2021.

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

Technologies used to build the software and how to install them.

  • Linux
  • C compiler (usually included in any Linux/Ubuntu distribution)
  • Git, install it directly from core
sudo apt-get update
sudo apt-get install git
  • MPI (Message Passing Interface)

Executor parallel program(mpirun)

sudo apt-get install openmpi-bin

Debugger

sudo apt-get install xterm

Installation

  1. Make yourself a folder where you would like to work

  2. Clone the repo

git clone https://github.com/<github_username>/<repo_name>.git

Contributing

Any new code should be pushed into a new branch. Please do not push any commits directly into the master or dev branches!

  1. Create your Feature Branch (git checkout -b feature-feature_name)
  2. Commit your Changes (git commit -m 'feature: <description of the feature>')
  3. Push to the Branch (git push origin feature-feature_name)
  4. Open a Pull Request

If you want to merge branches follow these steps:

First, from the branch you want to merge:

  1. Check updates (git pull)
  2. Merge the main development branch you want FIRST into YOUR branch, in this case 'dev' (git merge dev)
  3. If no conflicts pop up, change to the main development branch (git checkout dev)

Second and last from the main development branch do as follows:

  1. Check updates (git pull)
  2. Merge the branch you finished working with (git merge [branch_to_be_merged])
  3. Push the new development branch to the repo (git push)
  4. Delete your working branch from your local development enviroment (git branch -d [branch to be deleted])
  5. Delete your working branch from the repo (git push -d origin [branch to be deleted])

Usage

The new way:

  1. Compile the files with the Makefile file running the following command
make
  1. Run the program using again the Makefile
make run

If you want to remove the compiled source, run the following command

make clean

The old way:

In order to run .c files first configure your hostfile.config file

  1. Create the file (if you don't have it)
touch hostfile.config
  1. Add the number of nodes you want to run the program with, for example
localhost slots=15
  1. Compile .c files into .o
mpicc [filename].c -o [filename].o
  1. Run the nodes, numbers in the following line are just an example and can be changed
mpirun --hostfile hostfile.config -np 1 orquestador 10 2 : -np 10 coche : -np 4 camion

Contact

Acknowledgements

About

Program to run parallel processes simulating a parking lot using MPI. Ampliation of Operative Systems, 2021 🚗

Topics

Resources

License

Stars

Watchers

Forks