MPI Hello World with QNIBTerminal
Since I was asked (thanks Dmitry) via mail how to setup QNIBTerminal to run MPI jobs, I created a REAMDE within the
qnib/compute repository, but why not put it in a blog post (README.md is Markdown, my blog is Markdown...)?
To fire up a small mpi script one needs
- consul to bound tem all together (DNS wise and in regards of the slurm.conf)
- slurmctld as master
- at least two slurmd daemons to have a cluster (otherwise it would be only one :)
Fig was a project back when - the predecessor of
The fig file within the repository holds exactly this.
Let's fire it up and scale the nodes to 2.
Now we connect to the first node.
After some time sinfo should show all nodes. The names are random, because I use the scale feature of fig (docker-compose), which is not able to use different hostnames (as to my knowledge).
MPI the Thing
Now we compile the little mpi program
To run it in parallel SLURM comes to the rescue and provides all the environment needed, we just have to run it.
$ salloc -N2 bash salloc: Granted job allocation 2 $ mpirun /chome/cluser/hello_mpi Process 7 on cdf11fef8b1e out of 8 Process 4 on cdf11fef8b1e out of 8 Process 6 on cdf11fef8b1e out of 8 Process 5 on cdf11fef8b1e out of 8 Process 3 on 647c9ef10a16 out of 8 Process 2 on 647c9ef10a16 out of 8 Process 0 on 647c9ef10a16 out of 8 Process 1 on 647c9ef10a16 out of 8