MPICH2 README

本文档提供了MPICH2在Microsoft Windows环境下的系统需求、安装步骤及如何编译和运行MPI程序的详细指南。

MPICH2 for Microsoft Windows

Email bugs and error reports to:

mpich2-maint@mcs.anl.gov

 

SYSTEM REQUIREMENTS:

1) MS Development Environment, Visual Studio or gcc to compile C/C++ MPI programs.

2) Intel Fortran 8.0 or g77 to compile Fortran MPI programs.

3) Administrator privileges on your machines to install the process manager, smpd.exe.

 

THE INSTALLER:

You must install MPICH2 on all machines that you want to run MPI programs on.   Run the installer on each machine individually.

The installer creates the following mpich2 directory structure on your machine:

mpich2/bin

mpich2/include

mpich2/lib

The include and lib directories contain the libraries needed to compile MPI programs.  The mpich2 dlls are copied to the Windows/system32 directory.  The bin directory contains smpd.exe which is the MPICH2 process manager used to launch MPI programs.  mpiexec.exe, also found in the bin directory, is used to start MPICH2 jobs.

 

COMPILING:

Compiling an MPI program:

1)  Create a project for Visual Studio 2003, or Intel Fortran 8.0

2)  Add mpich2/include to the include path

3)  Add mpich2/lib to the library path

4)  For C applications add mpi.lib to your target link command.

5)  For Fortran applications add fmpich2.lib to the link command.

6)  Compile

7)  Place your application and all the dlls it depends on in a shared location or copy them to all the nodes.

8)  Run the application using mpiexec

 

For Visual Fortran 6 use fmpich2s.lib:

  • fmpich2.lib contains all caps cdecl: MPI_INIT
  • fmpich2s.lib contains all caps stdcall: MPI_INIT@4
  • fmpich2g.lib or fmpich2g.a contain lowercase cdecl: mpi_init__

For gcc/g77

1)  create a makefile

2)  add –I…mpich2/include

3)  add –L…mpich2/lib

4)  add –lmpi (for g77: -lfmpich2g)

5)  add the rules for your source files

6)  same as 6,7,8 above

 

RUNNING MPI JOBS:

mpiexec is a command line application used to launch MPI jobs.  Bring up a command prompt to run it.  Execute "mpiexec" to see the available options.

The simplest mpiexec command is like this:

mpiexec -n 3 myapp.exe

 

MINIMAL INSTALLATION:

If you want to have worker nodes that do not have any tools on them, you can simply copy smpd.exe to each node and execute "smpd.exe -install". 

smpd.exe is the only application required on each machine to launch MPICH2 jobs.   But, MPICH2 applications require the mpich2 dlls.  This requirement can be satisfied by copying the mpich2 dlls to the windows/system32 directory on each node.  Then any mpich2 application can run on those systems.  This is what the installer does.  If you don't want to copy the mpich2 dlls to each machine, then you need to place the dlls in the same location as the executable you are going to launch.

For example, if you have a directory called //myserver/mysharedfolder and you have myapp.exe and *mpich2*.dll in that directory then you can execute this command:  "mpiexec -n 4 //myserver/mysharedfolder/myapp.exe"

Note: There are several mpich2 dlls and depending on your build target (Fortran, C, Debug or Release) you will need the corresponding dlls in the application directory.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值