Difference between revisions of "MPI Hello World"

Jump to navigation Jump to search
32 bytes added ,  13:39, 24 September 2022
no edit summary
Now, to run your mpi program on the cluster, you will need to create a hostfile.
First, lets create a simple hostfile that just runs four processes on the local machine
 
 
Put thatthe following line in a file called <tt>localhost </tt>.
 
<nowiki>
</nowiki>
 
Put that line in a file called <tt>localhost </tt>.
Now run your program with that hostfile, using
 
mpirun --hostfile localhost ./hello_mpi
 
</nowiki>
 
and keep adding lines until you get to <tt> pnode40 slots=4 max_slots=8 </tt>.
 
The next step assumes you have set up your ssh keys as described in [[Cluster SSH Access]]

Navigation menu