Difference between revisions of "Message Passing Interface (MPI)"

From UCT EE Wiki
Jump to navigation Jump to search
(Created page with "Category:Frameworks Category:Software = Overview = = Installation = == Ubuntu and other Debian based Operating Systems == This has been tested on WSL and Raspbian...")
 
m (Added info about compiling and running a standard MPI program)
 
(3 intermediate revisions by one other user not shown)
Line 3: Line 3:
  
 
= Overview =  
 
= Overview =  
 +
Message Passing Interface (MPI) is a standardized and portable message-passing standard designed by a group of researchers from academia and industry to function on a wide variety of parallel computing architectures.
  
 
= Installation =  
 
= Installation =  
 +
== Debian based Operating Systems ==
 +
This has been tested on Raspbian. 
  
== Ubuntu and other Debian based Operating Systems ==
+
<code>$ sudo apt-get install openmpi-common openmpi-bin libopenmpi-dev </code>
This has been tested on WSL and Raspbian, too.
 
  
<code>$ sudo apt install mpich</code>
+
= Compiling and Running =
 +
 
 +
To compile (from command line / Bash), on most installations, you generally would use:
 +
 
 +
  mpicc -o exename myfile.c    # this would combile file myfile and the generated executable would be called exename
 +
 
 +
To start multiple instances of the program  (as in the default number of nodes, which would be the number of cores your computer has) and to start running the program you would do:
 +
 
 +
mpirun ./exename    # this is to execute the generated exename executable in the current directory
 +
 
 +
To start a particular number of instances, in this case 4 nodes, and to start running them you would use:
 +
 
 +
mpirun -n 4 ./exename  # start exename with 4 nodes
 +
 
 +
 
 +
= Tutorial =
 +
See [https://computing.llnl.gov/tutorials/mpi/ this link] for usage notes.

Latest revision as of 20:00, 17 March 2025


Overview[edit]

Message Passing Interface (MPI) is a standardized and portable message-passing standard designed by a group of researchers from academia and industry to function on a wide variety of parallel computing architectures.

Installation[edit]

Debian based Operating Systems[edit]

This has been tested on Raspbian.

$ sudo apt-get install openmpi-common openmpi-bin libopenmpi-dev

Compiling and Running[edit]

To compile (from command line / Bash), on most installations, you generally would use:

 mpicc -o exename myfile.c    # this would combile file myfile and the generated executable would be called exename

To start multiple instances of the program (as in the default number of nodes, which would be the number of cores your computer has) and to start running the program you would do:

mpirun ./exename    # this is to execute the generated exename executable in the current directory

To start a particular number of instances, in this case 4 nodes, and to start running them you would use:

mpirun -n 4 ./exename   # start exename with 4 nodes


Tutorial[edit]

See this link for usage notes.