Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] error compiling openmpi-1.6.1 on Windows 7
From: Siegmar Gross (Siegmar.Gross_at_[hidden])
Date: 2012-08-27 10:02:31


Hi,

thank you very much for your reply. I compiled and installed
openmpi-1.6.1. Unfortunately I cannot compile programs because
"mpicc" uses wrong path names. I have set an environment for
openmpi-1.6.1 as you can see from the following output.

D:\...prog\mpi\small_prog>set | c:\cygwin\bin\grep openmpi
LIB=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\amd64;
  C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\lib\amd64;
  C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\x64;
  C:\Program Files\openmpi-1.6.1\lib

LIBPATH=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\amd64;
  C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\lib\amd64;
  C:\Program Files\openmpi-1.6.1\lib

Path=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64;
  C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcpackages;
  C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\;
  C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\;
  C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\x64;
  C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\x64;
  C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\;
  C:\Windows\System32;
  C:\Windows;
  C:\Windows\System32\Wbem;
  C:\Program Files\openmpi-1.6.1\bin;
  C:\cmd;.

I get the following error when I try to compile my program
because of "/LIBPATH:C:\Program Files (x86)\openmpi-1.6/lib".

D:\...\prog\mpi\small_prog>mpicc init_finalize.c
Microsoft (R) C/C++-Optimierungscompiler Version 16.00.40219.01 für x64
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
init_finalize.c
Microsoft (R) Incremental Linker Version 10.00.40219.01
Copyright (C) Microsoft Corporation. All rights reserved.
/out:init_finalize.exe
"/LIBPATH:C:\Program Files (x86)\openmpi-1.6/lib"
libmpi.lib
libopen-pal.lib
libopen-rte.lib
advapi32.lib
Ws2_32.lib
shlwapi.lib
init_finalize.obj
init_finalize.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp_MP
I_Finalize" in Funktion "main".
init_finalize.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp_MP
I_Init" in Funktion "main".
init_finalize.exe : fatal error LNK1120: 2 nicht aufgelöste externe Verweise.

When I start in a new command shell without my MPI environment,
I get the following outputs for "mpicc -show". The first one
is OK, but both others are wrong because they point to 32-bit
libraries instead of 64-bit ones. Why do both versions point
to openmpi-1.6? I downloaded and installed the precompiled
32- and 64-bit version 1.6 from open-mpi.org.

C:\Program Files>openmpi-1.5.1\bin\mpicc -show
cl.exe /I"C:/Program Files/openmpi-1.5.1/include" /TC /D "OMPI_IMPORTS" /D "OPAL_IMPORTS"
/D "ORTE_IMPORTS" /link /LIBPATH:"C:/Program Files/openmpi-1.5.1/lib" libmpi.lib libopen-p
al.lib libopen-rte.lib advapi32.lib Ws2_32.lib shlwapi.lib

C:\Program Files>openmpi-1.6\bin\mpicc -show
cl.exe /I"C:\Program Files (x86)\openmpi-1.6/include" /TC /DOMPI_IMPORTS /DOPAL_IMPORTS /D
ORTE_IMPORTS /link /LIBPATH:"C:\Program Files (x86)\openmpi-1.6/lib" libmpi.lib libopen-pa
l.lib libopen-rte.lib advapi32.lib Ws2_32.lib shlwapi.lib

C:\Program Files>openmpi-1.6.1\bin\mpicc -show
cl.exe /I"C:\Program Files (x86)\openmpi-1.6/include" /TC /DOMPI_IMPORTS /DOPAL_IMPORTS /D
ORTE_IMPORTS /link /LIBPATH:"C:\Program Files (x86)\openmpi-1.6/lib" libmpi.lib libopen-pa
l.lib libopen-rte.lib advapi32.lib Ws2_32.lib shlwapi.lib

Do you have any idea what I have done wrong? Thank you very
much for any help in advance.

Kind regards

Siegmar

> I didn't have this problem when building the binary release.
>
> But to solve the problem is very easy. You can just open
> \openmpi-1.6.1\ompi\mca\osc\rdma\osc_rdma_data_move.c, and go
> to line 1099, change "void*" to "void**". This will get rid of the error.
>
> For the warnings, they are just some redefinitions that cannot
> be avoided, they are totally harmless.
>
>
> Regards,
> Shiqing
>
>
>
>
> On 2012-08-27 1:02 PM, Siegmar Gross wrote:
> > Hi,
> >
> > I tried to compile openmpi-1.6.1 with CMake-2.8.3 and Visual Studio
> > 2010 on Windows 7. All service packs and patches from Microsoft are
> > installed.
> >
> > I changed the following options:
> >
> > CMAKE_BUILD_TYPE: "Debug" modified to "Release"
> > CMAKE_INSTALL_PREFIX: modified to "c:/Program Files (x86)/openmpi-1.6.1"
> > OMPI_ENABLE_THREAD_MULTIPLE: "no" changed to "yes"
> > OMPI_RELEASE_BUILD: "no" changed to "yes"
> > OPAL_ENABLE_HETEREOGENEOUS:SUPPORT: "no" changed to "yes"
> > OPAL_ENABLE_IPV6: "yes" changed to "no"
> > OPAL_ENABLE_MULTI_THREADS: "no" changed to "yes"
> >
> > I also selected "Release" in "Visual Studio". Unfortunately I got the
> > following error ("void *" cannot be converted to "void **").
> >
> > Fehler 77 error C2440: '=': 'void *' kann nicht in 'void **'
> > konvertiert werden
> > ...\openmpi-1.6.1\ompi\mca\osc\rdma\osc_rdma_data_move.c
> > 1099 1 libmpi
> >
> > Fehler 90 error LNK1181: Eingabedatei "..\..\..\Release\libmpi.lib"
> > kann nicht geöffnet werden.
> > ...\openmpi-1.6.1-Windows_VS2010_x32\ompi\tools\ompi-server\LINK
> > ompi-server
> >
> > Fehler 94 error LNK1181: Eingabedatei "..\..\..\Release\libmpi.lib"
> > kann nicht geöffnet werden.
> > ...\openmpi-1.6.1-Windows_VS2010_x32\ompi\tools\ompi_info\LINK
> > ompi_info
> >
> > Fehler 162 error LNK1181: Eingabedatei "..\..\..\Release\libmpi.lib"
> > kann nicht geöffnet werden.
> > ...\openmpi-1.6.1-Windows_VS2010_x32\ompi\mpi\cxx\LINK
> > libmpi_cxx
> >
> >
> > I get also a lot of warnings, from wich I have listed a few.
> >
> >
> > Warnung 1 warning C4005: 'PACKAGE_BUGREPORT': Makro-Neudefinition
> > ...\openmpi-1.6.1\opal\event\win32-code\config.h
> > 185 1 libopen-pal
> > Warnung 2 warning C4005: 'PACKAGE_NAME': Makro-Neudefinition
> > ...\openmpi-1.6.1\opal\event\win32-code\config.h
> > 188 1 libopen-pal
> > Warnung 3 warning C4005: 'PACKAGE_STRING': Makro-Neudefinition
> > ...\openmpi-1.6.1\opal\event\win32-code\config.h
> > 191 1 libopen-pal
> > Warnung 4 warning C4005: 'PACKAGE_TARNAME': Makro-Neudefinition
> > ...\openmpi-1.6.1\opal\event\win32-code\config.h
> > 194 1 libopen-pal
> > Warnung 5 warning C4005: 'PACKAGE_VERSION': Makro-Neudefinition
> > ...\openmpi-1.6.1\opal\event\win32-code\config.h
> > 197 1 libopen-pal
> > Warnung 6 warning C4005: '__func__': Makro-Neudefinition
> > ...\openmpi-1.6.1\opal\event\win32-code\config.h
> > 212 1 libopen-pal
> > Warnung 7 warning C4013: 'opal_event_warn' undefiniert;
> > Annahme: extern mit Rückgabetyp int
> > ...\openmpi-1.6.1\opal\event\WIN32-Code\win32.c
> > 170 1 libopen-pal
> > Warnung 8 warning C4005: 'INT8_MIN': Makro-Neudefinition
> > C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdint.h
> > 72 1 libopen-pal
> > Warnung 9 warning C4005: 'INT16_MIN': Makro-Neudefinition
> > C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdint.h
> > 73 1 libopen-pal
> > Warnung 10 warning C4005: 'INT32_MIN': Makro-Neudefinition
> > C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdint.h
> > 74 1 libopen-pal
> > Warnung 11 warning C4005: 'INT8_MAX': Makro-Neudefinition
> > C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdint.h
> > 76 1 libopen-pal
> > Warnung 12 warning C4005: 'INT16_MAX': Makro-Neudefinition
> > C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdint.h
> > 77 1 libopen-pal
> > Warnung 13 warning C4005: 'INT32_MAX': Makro-Neudefinition
> > C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdint.h
> > 78 1 libopen-pal
> > Warnung 14 warning C4005: 'UINT8_MAX': Makro-Neudefinition
> > C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdint.h
> > 79 1 libopen-pal
> > Warnung 15 warning C4005: 'UINT16_MAX': Makro-Neudefinition
> > C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdint.h
> > 80 1 libopen-pal
> > Warnung 16 warning C4005: 'UINT32_MAX': Makro-Neudefinition
> > C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdint.h
> > 81 1 libopen-pal
> > Warnung 17 warning C4018: '<': Konflikt zwischen 'signed' und 'unsigned'
> > ...\openmpi-1.6.1-Windows_VS2010_x32\opal\keyval_lex.c
> > libopen-pal
> > Warnung 18 warning C4273: '_isatty': Inkonsistente DLL-Bindung.
> > ...\openmpi-1.6.1-Windows_VS2010_x32\opal\keyval_lex.c
> > libopen-pal
> > ...
> >
> > What can I do to get around the error so that I can compile Open MPI?
> > Thank you very much for any suggestions in advance.
> >
> > Kind regards
> >
> > Siegmar
> >
> >
> > _______________________________________________
> > users mailing list
> > users_at_[hidden]
> > http://www.open-mpi.org/mailman/listinfo.cgi/users
> >
> >
>
>
> --
> ---------------------------------------------------------------
> Shiqing Fan
> High Performance Computing Center Stuttgart (HLRS)
> Tel: ++49(0)711-685-87234 Nobelstrasse 19
> Fax: ++49(0)711-685-65832 70569 Stuttgart
> http://www.hlrs.de/organization/people/shiqing-fan/
> email: fan_at_[hidden]
>