docker.openmpi
docker.openmpi copied to clipboard
Are the mpi_node's used automatically?
I can't see anywhere, where the nodes are provided to mpi. Are the nodes being used automatically?
Hi,
Let's break down what's happening:
In the docker-compose.yml
file, there are two services defined: mpi_head
and mpi_node
. Both use the same openmpi
Docker image.
The mpi_head
service has the "ports" configuration that exposes port 22, allowing you to SSH into it from your host system.
The mpi_node
service doesn't have any specific port configuration. This is because it's not meant to be accessed directly but rather to be used as a worker node by the mpi_head
container.
Here's how the nodes are used:
The mpi_head
container, which has SSH access, is the master node. You can log into this container and use it to orchestrate and control MPI jobs.
The mpi_node
containers are automatically used as worker nodes by the mpi_head
container when you execute MPI jobs with mpirun
. The communication between the mpi_head
and mpi_node containers is handled by the OpenMPI runtime.
When you run an MPI job using mpirun
from the mpi_head
container, it will distribute and manage the tasks across all the nodes specified, including the mpi_node
containers. You don't need to explicitly specify nodes when running the MPI job; it will be managed by OpenMPI.
So, the nodes (including mpi_node
) are used automatically by the OpenMPI runtime when you run MPI applications. You interact with the mpi_head
container, and it handles the distribution of tasks to the worker nodes for parallel computing.