-
Notifications
You must be signed in to change notification settings - Fork 7
/
README.WINDOWS.txt
179 lines (129 loc) · 7.03 KB
/
README.WINDOWS.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
10 July 2009
---------------
This version of Open MPI compiles and runs under Microsoft Windows
platforms, including Windows XP, Windows HPC Server 2003/2008 and also
Windows 7 RC. It provides two remote process launch components, one is
using WMI, and the other is using Windows CCP API for Windows HPC
Servers. But it has received limited testing compared to other POSIX-like
environments, so feedbacks are important and helpful for us.
You can download an Open MPI tarball from the main web site
(http://www.open-mpi.org) or check out a developer copy via Subversion
(more information about SVN checkout available on the Open MPI web
site).
The rest of the document is divided on 3 sections. The first and
second sections are for "easy" setup, based on some files that are
distributed in Open MPI (32 and 64 bits versions). The third section
is only for advanced users or developers who want to deeply dig into
the software.
============================================================================
First approach: Using CMake
NOTE: CMake support is available in the Open MPI development
trunk and 1.3.3 release.
I. Build Open MPI
1. Download the latest version of CMake (at least v2.4).
2. In the CMake GUI, add the source path and build path of Open MPI
(out of source build is recommended).
3. Then configure, and after the first time configuration, all
available options will show up in the CMake GUI. Select the
options that you require.
4. Run configure again to generate all Windows solution files; they
will be generated in build path.
5. Go to the build directory, open the generated Windows solution
file, and compile.
6. Build the 'INSTALL' project to install files into the path that
has been set with CMAKE_INSTALL_PREFIX variable in CMake GUI.
7. (optional) To generate a installer, you should install NSIS, and build the
'PACKAGE' project in the Open MPI sulotion.
II. Build MPI applications with Open MPI
After successfully built and installed Open MPI, there are two ways
to compile and link your applications against the generated libraries:
Using Visual Studio IDE
1. In your application's Visual Studio solution, on the target project
that needs to link with MPI, add the installed Open MPI library path
(for example C:\Program Files\OpenMPI_v1.4\lib) into "Project Property Pages" ->
"Configuration Properties" -> Linker -> General -> "Additional Library Directories"
2. Also put the library names, for example libopen-mpi.lib, into
"Project Property Pages" -> "Configuration Properties" -> Linker ->
Input -> "Additional Dependencies". Please note that, if you built
debug version of Open MPI, the generated library names will have
suffix 'd', for example, libopen-mpid.lib.
Using Open MPI compiler wrappers in VS Command Prompt
1. Open up a Visual Studio Command Prompt, so that the Visual Studio
environment is set, and the VS compiler command cl.exe is available.
2. Set up Open MPI path environment variable, for example,
"set PATH=c:\Program Files\OpenMPI_v1.4\bin;%PATH%", or set it up in
the system settings. Please note, using an Open MPI installer, there
will be an option to set the system variables automatically.
3. Simply use one of the Open MPI compiler wrapper to compile and
link your application with one single command, for example:
c:\> mpicc app.c
III. Run MPI applications
To launch the application, use the mpirun command, for example:
c:\> mpirun -np 2 app.exe
or
c:\> mpirun -np 2 -host host1 host2 app.exe
Please note, in order to launch remote MPI processes using WMI, a few Windows
settings has to be configured on all nodes, please refer to the following links:
http://msdn.microsoft.com/en-us/library/aa393266(VS.85).aspx
http://community.spiceworks.com/topic/578
----------------------------------------------------------------------------
Second approach: Simple and straightforward
Step 1: Untar the contrib/platform/win32/ompi-static.tgz tarball in
the root directory of the Open MPI distribution.
Step 2: Go in the ompi/datatype subdirectory in the Open MPI
distribution and copy the following:
datatype_pack.c to datatype_pack_checksum.c
datatype_unpack.c to datatype_unpack_checksum.c
Step 3: Add the following to ompi/tools/ompi_info/ompi_info.h and
change the relevant information inside (i.e., replace
everything between @'s).
#define OPAL_CONFIGURE_USER "@USER_NAME@"
#define OPAL_CONFIGURE_HOST "@HOST_NAME@"
#define OPAL_CONFIGURE_DATE "@TODAY_DATE@"
#define OMPI_BUILD_USER OPAL_CONFIGURE_USER
#define OMPI_BUILD_HOST OPAL_CONFIGURE_HOST
#define OMPI_BUILD_DATE OPAL_CONFIGURE_DATE
#define OMPI_BUILD_CFLAGS "/Od /Gm /EHsc /RTC1 /MDd"
#define OMPI_BUILD_CPPFLAGS "-I${HOME}/ompi-trunk -I${HOME}/opal/include -I${HOME}/ompi-trunk/orte/include -I${HOME}/ompi-trunk/ompi/include"
#define OMPI_BUILD_CXXFLAGS "/Od /Gm /EHsc /RTC1 /MDd"
#define OMPI_BUILD_CXXCPPFLAGS "-I${HOME}/ompi-trunk -I../../.. -I$(HOME}/ompi-trunk/opal/include -I${HOME}/ompi-trunk/orte/include -I${HOME}/ompi-trunk/ompi/include"
#define OMPI_BUILD_FFLAGS ""
#define OMPI_BUILD_FCFLAGS ""
#define OMPI_BUILD_LDFLAGS " "
#define OMPI_BUILD_LIBS " "
#define OPAL_CC_ABSOLUTE "cl"
#define OMPI_CXX_ABSOLUTE "cl"
#define OMPI_F77_ABSOLUTE "none"
#define OMPI_F90_ABSOLUTE "none"
#define OMPI_F90_BUILD_SIZE "small"
Step 4: Open the Open MPI project (.sln file) from the root directory
of the distribution.
Step 5: Choose which version you want to build (from the project
manager).
Step 6: Add the build directory to your PATH.
----------------------------------------------------------------------------
Third approach: Advanced users
The rest of this document is only for advanced users / developers;
i.e., those who has spare time or an urgent necessity to compile their
own Windows version of Open MPI.
Compiling Open MPI natively on Windows requires several tools. Of
course, one need the Microsoft Visual Studio for their C/C++ compiler
as well as for the ml (assembler compiler) and the link utilities.
But the current version require some GNU tools as well. Here is the
list of such tools:
1. Download any Unix for Windows environment. Tested environments include
- cygwin http://www.cygwin.com/
- minGW http://www.mingw.org/
- Windows Services for Unix (SFU)
http://technet.microsoft.com/en-us/interopmigration/bb380242.aspx
2. Make the default shell ash.exe (install it if it's not installed by
default) as it will highly decrease the configuration and
compilation time.
3. Download a very recent Gnu Libtool (e.g., Libtool 2.2.6).
Now you should be set. The most difficult part is done. Just use your
favorite shell to get a window, go in the Open MPi directory and do
like in any UNIX environments: configure, make, and make install.
----------------------------------------------------------------------------
If you have any problems, find any bugs please feel free to report
them to Open MPI user's mailing list (see
http://www.open-mpi.org/community/lists/ompi.php).