Git Product home page Git Product logo

docker.openmpi's Introduction

docker.openmpi

With the code in this repository, you can build a Docker container that provides the OpenMPI runtime and tools along with various supporting libaries, including the MPI4Py Python bindings. The container also runs an OpenSSH server so that multiple containers can be linked together and used via mpirun.

Start an MPI Container Cluster

While containers can in principle be started manually via docker run, we suggest that your use Docker Compose, a simple command-line tool to define and run multi-container applications. We provde a sample docker-compose.yml file in the repository:

mpi_head:
  image: openmpi
  ports: 
   - "22"
  links: 
   - mpi_node

mpi_node: 
  image: openmpi

The file defines an mpi_head and an mpi_node. Both containers run the same openmpi image. The only difference is, that the mpi_head container exposes its SHH server to the host system, so you can log into it to start your MPI applications.

The following command will start one mpi_head container and three mpi_node containers:

$> docker-compose up -d
$> docker-compose scale mpi_node=16 mpi_head=1

And to /etc/hosts file compiled from docker-compose automagically

$> docker-compose stop mpi_head
$> yes | docker-compose rm -v mpi_head
$> docker-compose up -d

Once all containers are running, connect to mpi_head with:

$> chmod 400 ssh/id_rsa.mpi
$> ssh -i ssh/id_rsa.mpi -p $( source echo_head_port.sh ) [email protected]

For testing an mpi4py example using the mpi_nodes:

cd mpi4py_benchmarks
cat /etc/hosts | grep mpi_node --color=none | awk '{print $1}' | sort -u > machines && cat ./machines
mpiexec -hostfile machines -n 16 python helloworld.py   	

For testing dispel4py with mpi mapping:

mpiexec -n 6 -hostfile machines dispel4py mpi dispel4py.examples.graph_testing.pipeline_test	

docker.openmpi's People

Contributors

defoe-code avatar rosafilgueira avatar stefanofiorentino avatar oweidner avatar

Stargazers

 avatar Rahul Gupta Tankasala avatar Filippo Valle avatar Dongju avatar Ordi avatar Ming Jin avatar Michael Kuchnik avatar Yang Yu avatar Marco Z avatar

Watchers

James Cloos avatar  avatar Amrey Krause 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.