Difference between revisions of "MPI Hello World"

Jump to navigation Jump to search
46 bytes added ,  01:07, 21 December 2022
no edit summary
 
</nowiki>
 
and keep adding lines until you get to <tt> pnode40pnode64 slots=4 max_slots=8 </tt>.
 
The next step assumes you have set up your ssh keys as described in [[Cluster SSH access]]
 
With 4064 nodes listed in your <tt> cluster_hosts </tt> file, run your program again with
 
mpirun --hostfile cluster_hosts ./hello_mpi
 
You should see the output shown below, which is 160256 lines long, four responses from each host, one for each core described.
 
Once you are able to run this program successfully, your MPI setup is working. This will be necessary before you can run other MPI-based programs, such as ipyparallel programs which use MPI.
 
Note: the example below was run on 40 nodes.
 
<nowiki>

Navigation menu