Ah. You installed the OpenMPI binaries too right? Those are built
with VS2010. I bet the way your paths are set up it's using the
installed version of mpiexec that wants VS2010 runtimes, not the
mpiexec you compiled today that will use the VS2008 runtimes that
you have.

OK, here's a quick fix you can try so you don't have to mess with
paths. Go into the installed\bin directory from your OpenMPI
version, select everything, and copy it to the directory where your
new project puts its executables (probably the Debug directory).
Then run your mpiexec .... from within that Debug directory and it
will use all your OpenMPI exes and dlls because it will look there
first.

2) Extract that to somewhere on your hard drive.
My path was C:\projects6\openmpi-1.6. I renamed
it to C:\projects6\openmpi-1.6-64. You can use
7-Zip to extract tgz archives on Windows.

3) Start the CMake GUI. Set the source and build
directories. Mine were
C:/projects6/openmpi-1.6-64 and
C:/projects6/openmpi-1.6-64/build

4) Press Configure. Say Yes if it asks you to
create the build directory.

5) Look at the generator view that comes up. I
chose Visual Studio 9 2008 Win64 but you can
select whatever you have on your system. Click
Specify Native Compilers. This will make sure you
get the right compilers.

In the C and C++ compiler, I put "C:\Program Files
(x86)\Microsoft Visual Studio
9.0\VC\bin\amd64\cl.exe". You can navigate to
which one you have.

In the Fortran compiler, I put "C:/Program Files
(x86)/Intel/Composer XE 2011
SP1/bin/intel64/ifort.exe". You can navigate to
which one you have.

Press Finish once you have selected the compilers
and the config will start. Takes a couple of
minutes on my laptop.

First things first. If you want a Release build,
you have to change a CMake setting. The 5th line
down in the red window will say CMAKE_BUILD_TYPE.
Change the text (type it in) to say Release if you
want a Release build, otherwise the final install
step won't work.

Also, further down the red window there's some
options you should change. Scroll down through
that window, there's a lot to choose from. I
usually check OMPI_RELEASE_BUILD,
OMPI_WANT_F77_BINDINGS and
OMPI_WANT_F90_BINDINGS. OMPI_WANT_CXX_BINDINGS
should already be checked. (Note to Jeff &
Shiqing: We should probably work out a good set of
standard choices if there are others on top of
these).

6) Press Configure again, and CMake will go
through identifying the Fortran compiler if you
asked for Fortran bindings and a few other
things. It should work fine with the options
above.

7) Assuming that it was fine, press Generate.
That produces an OpenMPI.sln project for Visual
Studio, it's in whatever directory you specified
as your build directory.

8) Open the sln in Visual Studio. Open the
Properties of "Solution 'OpenMPI'". Look at
Configuration Properties - Configuration. Check
the Configuration button at the top, it might say
Debug, but it should say Release if you changed
CMAKE_BUILD_TYPE earlier. If it says Debug,
change the drop-down to Release. Click OK. Then
open the Properties again and make sure what you
selected is right, otherwise change it, press OK
again. Visual Studio does that sometimes.

9) Moment of Truth. Right-click on "Solution
'OpenMPI'" and select Build Solution. The compile
should start.

10) Wait.

11) Wait some more.

12) Grab a snack (or a beer.....), this will take
a while, 15-20 minutes.

13) If the build was successful (it should be),
there's one last step. Right-click on the INSTALL
sub-project and click Build. That will organise
the header files, libraries and binaries into a
set of directories, under whatever directory you
said your source is in with CMake. On mine it was
C:\projects6\openmpi-1.6\installed. In there
you'll see bin, include, lib and share
directories. That's a complete OpenMPI build with
everything you need.

If you'd like to try this and provide feedback, we
can tweak the instructions until they're
bulletproof. I can help you build with whatever
compilers you have on your system, just post back
to the list. I don't do Cygwin though. Doing HPC
on Windows is weird enough..... :-)

I
just gave up and stuck with
Unix/Linux. Eclipse IDE offers a very
nice plugin for developing and
debugging MPI code named Parallel
Tools Platform. Something not
available in Visual Studio, except for
similar one made by Intel, but I
believe you have to use their
compiler.

You
could always run Eclipse remotely from
any Windows OS using a Secure Shell
client and Xming (A Windows based X
Server). That is what I do, and no
more wasting time trying to get OMPI
trying to run on Windows.

This may, or may not be helpful, but I
have tried the Windows offerings. I
have never gotten anything to function
was expected. Compiling, or the
available binaries. I think they just
don't work at all.

My suggestion which I feel would be
easier, and less headache way would be
to install something like CygWin,
which would give you a Unix/Linux like
environment running under Windows.

You would only need to compile it in
CygWin just like the Linux/Unix docs
say to do.

I'm not sure how you can uninstall
the other one, may be 'make uninstall'
from the source? Or you may also ask
in their mailing list.

Another solution might use the full
path for the executables, like
"c:\Program
Files\OpenMPI_v1.6-win32\bin\mpicc
hello.c" or under Cygwin:
"/cygdrive/c/Program\
Files/OpenMPI_v1.6-win32/bin/mpicc.exe
hello.c".

The output looks strange. If you use
the installer under Cygwin, mpicc
shouldn't try to link with
liblammpio.* or any library in
/usr/local/lib. So I guess the mpicc
is messed up with some previously
installed MPI implementations. Could
you please verify that 'which mpicc'
is the one you installed?

Anyway, here I sent some screen shots
that how it should look like under
Cygwin.

I ran OpenMPI_v1.6-1_win64.exe.
Now I get this message:
C9995799@SOUMIWHP5003567
~/openmpi-1.6
$ mpicc hello.c -o hello
WARNING: mpicc expected to
find liblammpio.* in /usr/local/lib
WARNING: MPI-2 IO support will
be disabled
gcc: hello.c: No such file or
directory
mpicc: No such file or
directory
--
Vimal