Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we use OpenMpi on Docker Container? #3625

Closed
yoshihingis opened this issue May 31, 2017 · 3 comments
Closed

Can we use OpenMpi on Docker Container? #3625

yoshihingis opened this issue May 31, 2017 · 3 comments

Comments

@yoshihingis
Copy link

Dear OpenMpi team staff

I tried to make very simple Dockerfile to check the operation of OpenMpi on the docker container.

But I got the caution about the risk of "root run".
Hence I added the option "--allow-run-as-root",because we can start up docker container as root.

But I could not build Docker Image of "OpenMpi test".
I got error as below at the end of Dockerfile build.

(1)Could you give me any advices about this error?
(2)Can we use OpenMpi on Docke container?

I'd really apprieciate it if you give me any advices.

Regards,

1.Dcokerfile build error

-----> Running in 57f18dea10ed

The value of the MCA parameter "plm_rsh_agent" was set to a path
that could not be found:

plm_rsh_agent: ssh : rsh

Please either unset the parameter, or check that the path is correct

The command '/bin/sh -c mpirun --allow-run-as-root -np 4 ./hello' returned a non-zero code: 213

2.Dockerfile

FROM ubuntu:14.04

ENV http_proxy my company http proxy
ENV https_proxy my company https proxy

RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential
git \
wget \
make \
nano \
wget \
file \
python-dev \
python-pip \
cython && \
rm -rf /var/lib/apt/lists/*

WORKDIR /home/

#RUN file -z openmpi-2.1.1.tar.gz

RUN wget http://www.open-mpi.org/software/ompi/v2.1/downloads/openmpi-2.1.1.tar.gz

RUN tar xzvf openmpi-2.1.1.tar.gz

WORKDIR openmpi-2.1.1

RUN ./configure
RUN make -j4
RUN make install
RUN ldconfig

RUN which mpicc
RUN mpicc -show
RUN which mpiexec
RUN mpiexec --version

WORKDIR /home/
RUN mkdir OpenMpi
WORKDIR /home/OpenMPi

RUN wget http://www.open-mpi.org/papers/workshop-2006/hello.c

RUN mpicc hello.c -o hello

RUN mpirun --allow-run-as-root -np 4 ./hello

@rhc54
Copy link
Contributor

rhc54 commented Jun 1, 2017 via email

@ggouaillardet
Copy link
Contributor

the error message suggests ssh client is not installed in your container.
if you need containers, singularity is very likely your best choice since it was designed with HPC in mind,
and is supported by Open MPI.
while there is nothing that prevents you from running Open MPI in a docker container, you are on your own when it comes to spawn containers and allow inter-containers traffic.

@yoshihingis
Copy link
Author

Dear ggouaillardet,
Thank you for your advice.
I installed ssh into my docker container ,my test code operated correctly with No errors.

TTitscher added a commit to nutofem/nuto that referenced this issue Mar 15, 2018
TTitscher added a commit to nutofem/nuto that referenced this issue Mar 16, 2018
mmalahe added a commit to mmalahe/hpp that referenced this issue May 25, 2018
Wentzell added a commit to TRIQS/packaging that referenced this issue Jul 10, 2018
JiaweiZhuang added a commit to JiaweiZhuang/IPM_Docker that referenced this issue Feb 22, 2019
JohannesBuchner added a commit to JohannesBuchner/staged-recipes that referenced this issue Oct 6, 2022
JohannesBuchner added a commit to JohannesBuchner/pypmc-feedstock that referenced this issue Oct 6, 2022
nilsvu added a commit to nilsvu/spectre that referenced this issue Oct 10, 2023
OpenMPI implicitly depends on it. See issue:
open-mpi/ompi#3625
nilsvu added a commit to nilsvu/spectre that referenced this issue Oct 11, 2023
OpenMPI implicitly depends on it. See issue:
open-mpi/ompi#3625
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants