GithubHelp home page GithubHelp logo

masatoshihanai / mpidynamicscaling Goto Github PK

View Code? Open in Web Editor NEW
0.0 4.0 1.0 7 KB

Dynamic Scaling on MPI / Runtime MPI process provisioning and de-provisioning

License: MIT License

CMake 2.63% C++ 97.37%
mpi mpi-library dynamic-scaling cloud provisioning server-provisioning

mpidynamicscaling's Introduction

Dynamic Scaling on MPI : MPI Process Provisioning / De-provisioning at Runtime

This is a header-only library to simplify the implementation of dynamic scaling on MPI 2.0. You can add or remove MPI processes during runtime. The added processes can communicate to the running processes immediately.

  • Scale Out: Add new MPI processes to the running processes. The scaled processes join in the same MPI Intra-communicator as the running processes so that they can communicate each other.
  • Scale In: Remove MPI processes from the running processes.

Reference

M. Hanai and G. Theodoropoulos "Performance Evaluation of Dynamic Scaling on MPI" (arXiv 2020)

Quick Start

$ git clone [email protected]:masatoshihanai/MPIDynamicScaling.git
$ cd MPIDynamicScaling
$ mkdir build; cd build
$ cmake ..; make
$ mpirun -np 2 ./DynamicScalingExample 2 1 

How to use

We provide the usage for (1) scaling out and (2) scaling in. See also the example code example/main_example.cpp.

1. Scale Out

There are two APIs for scaling out.

  • scaleOut(MPI_Comm oldComm, int numAddProcs, string childCmd, MPI_Comm& newComm, vector<string> hosts) : This is used in the original program. The original program invokes new processes and waits for them to join the new intra-communicator.
    • oldComm is the original intra-communicator
    • newAddProcs is # additional MPI processes
    • childCmd is the path to Children's program.
    • newComm is the new intra-communicator including the additional processes. Their rank IDs are assigned incrementally.
    • hosts specifies additional hosts (optional). Each value is formatted as "host01" or "host01 slots=32" if you want to specify # slots.
  • initNewProcess(MPI_Comm& newComm): This is used for the new processes invoked via scaleOut(). The new processes join to the new intra-communicator.
    • newComm: is the new intra-communicator.

2. Scale In

There is one API for scaling in.

  • scaleIn(MPI_Comm& oldComm, bool isRemoving, MPI_Comm& newComm, bool& thisHostCanTerminate): The processes are removed after calling this function.
    • oldComm is the original communicator
    • isRemoving the process is removed if this value is true; otherwise the process keeps alive.
    • newComm is the new communicator excluding the removal processes.
    • thisHostCanTerminate is true if there are no MPI processes in this host (optional).

!!! Note !!! : The original MPI processes cannot be removed. Only ones added via scaleOut() can be removed.

How to integrate to your project

The library is hear-only. You may simply copy and include dynamic_scaling.hpp to your MPI code.

Tested Environment

  • Open MPI 2.1.1 gcc/g++ 9.1.0

Contact

mhanai at acm.org

mpidynamicscaling's People

Contributors

masatoshihanai avatar

Watchers

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