giovtorres / docker-centos7-slurm

Slurm Docker Container on CentOS 7
MIT License
87 stars 56 forks source link

installing MPI #1

Closed psteinb closed 6 years ago

psteinb commented 6 years ago

I would love to test some issues we see regarding the interplay of MPI and slurm. I am a bit new to docker, so I wonder how I would install (say) openmpi from the centos repos on the nodes which are spawned from the Dockerfile of this repo?

giovtorres commented 6 years ago

Hi @psteinb, sorry, I missed this message. Installing packages are the same. Just attach to the container and run yum install openmpi{,-devel}. Now, regarding testing and running MPI applications, I haven't tried to run any MPI workloads inside docker. I did a quick test (mpirun hostname) and I get the ORTE has lost communication with its daemon located on node: error message.

I had to make a few changes:

If i do all those things, then compile the ring_c.c example with mpicc in the examples directory, I get something:

[root@ernie ~]# salloc -N5
...
[root@ernie ~]# /usr/lib64/openmpi/bin/mpirun --allow-run-as-root ring_c
Process 0 sending 10 to 1, tag 201 (5 processes in ring)
Process 0 sent to 1
Process 0 decremented value: 9
Process 0 decremented value: 8
Process 0 decremented value: 7
Process 0 decremented value: 6
Process 0 decremented value: 5
Process 0 decremented value: 4
Process 0 decremented value: 3
Process 0 decremented value: 2
Process 0 decremented value: 1
Process 0 decremented value: 0
Process 0 exiting
Process 1 exiting
Process 2 exiting
Process 3 exiting
Process 4 exiting

Hope that helps.

Giovanni

psteinb commented 6 years ago

thanks @giotorres for these insights. I'll look into trying this. It looks very promising.