168
edits
</nowiki>
create a folder and save this file as <
You can compile this program with
mpicc -g hello_mpi.c -o hello_mpi
You now have an executable called <tt> hello_mpi </tt>
You can run the command with
mpirun ./hello_mpi
With no other arguments, mpirun will run all of the tasks on the local machine, usually one for each CPU core. You should see a hello world from each process, on each cpu core.
</nowiki>
Put that line in a file called
Now run your program with that hostfile, using
mpirun --hostfile localhost ./hello_mpi
<nowiki>
|