Professional Documents
Culture Documents
Setup Run Mpi
Setup Run Mpi
For a basic tutorial on coding with MPI, check this tutorial at LLNL.
Here is another, shorter tutorial on compiling and running a simple MPI
program using MS-MPI.
Here is a link to the download page for MS-MPI.
If you are just looking to download MS MPI and smpd, then you can download
them here. If you are feeling saucy, then you can also download the entire MS
HPC (high performance computing) pack cluster, but you wont need most of
1
it if you just want to run and debug simple MPI programs.
Finally, here is a link to a forum where you can post questions/problems with
your MPI code. The is the official support forum for people using MS MPI.
1 But make sure that you have EXACTLY 1 version of MS MPI installed in either way! If you install both MS MPI and MS
HPC you risk having problem further down the line (see slide 7)
Setting up a native tools command
prompt.
In order for this to go smoothly, its useful to have access to a windows
command prompt, with the proper configurations.
This part will guide you through this process.
You can try and use your own cmd.exe. If you dont configure it properly,
windows will think that you are a plebeian user, and wont give you access to
some powerful commands that you want.
The following will let you open a command prompt that is properly configured
for your super-user needs.
Setting up a native tools command
prompt.
Open MSVS, and to go tools ->
External Tools
Setting up a native tools command
prompt.
Click Add, and fill in the following
fields:
Title: VS 2015 Native Tools-
Command Prompt [or whatever else
you want your tool to be called]
Command:
C:\Windows\System32\cmd.exe
Arguments: /k "C:\Program Files
(x86)\Microsoft Visual Studio
14.0\Common7\Tools\VsDevCmd.bat
Initial directory: $(SolutionDir)
Setting up a native tools command
prompt.
Now, you should have a new option
under Tools. Running your new tool
will open a command prompt which
is properly configured.
Take this opportunity to make sure
that mpiexec is in your systems
path
Type mpiexec into the command
prompt, and make sure that you see
something like the following
Setting up a native tools command
prompt.
You should also take this
opportunity to make sure that you
have exactly one version of mpiexec
and smpd installed.
Type where mpiexec and where
smpd in the command prompt and
make sure that you get 1 result.
If you have more than 1 version
installed, uninstall one or risk a
version mismatch.
Configuring your system PATH variable
MPI is very powerful, fun to program with, but a pain in the ass to install and
get working on your first project.
Hopefully this tutorial make the process of installing/configuring/using MSMPI
slightly less terrible.
If you have any questions, or this tutorial helped you in some way, dont be
afraid to let me know at michaelputhawala@gmail.com