[vtkusers] VTK + openMPI + CMake

Matthias Härtel metty87 at googlemail.com
Mon Nov 26 10:52:51 EST 2012


I get the same linking errors when i try to run a helloworld with mpi.

I have install from the "*OpenMPI_v1.6-1_win64.exe"* from here: 
http://www.open-mpi.de/software/ompi/v1.6/ and install it to C:\Program 
Files (x86)\OpenMPI_v1.6-x64

i try this cmake commands in the cmakelists:
find_package(MPI REQUIRED)
set(CMAKE_CXX_COMPILE_FLAGS ${CMAKE_CXX_COMPILE_FLAGS} ${MPI_COMPILE_FLAGS})
set(CMAKE_CXX_LINK_FLAGS ${CMAKE_CXX_LINK_FLAGS} ${MPI_LINK_FLAGS})
target_link_libraries(mytest ${MPI_LIBRARIES})


In Cmake i must set some entries manually: i set MPI_LIBRARY to 
"C:\Program Files (x86)\OpenMPI_v1.6-x64\lib\libmpi_cxx.lib" (try also 
the libmpi.lib). I set nothing to the EXTRA-LIBRARY, cause i dont know 
whats the right entry


In visual studio i check if there is an additional include path to 
"C:\Program Files (x86)\OpenMPI_v1.6-x64\include" and if the lib is 
added right.


when i try to compile some helloworld i get this linker error:
1>main.obj : error LNK2001: Nicht aufgelöstes externes Symbol 
"_ompi_mpi_comm_world".

So, do you know whats wrong?



Am 26.11.2012 16:13, schrieb Kevin H. Hobbs:
> On 11/26/2012 09:42 AM, Matthias Härtel wrote:
>> thanks for your answer!
>>
>> I looked at your link, but cant find useful informations for my problem...
>>
>> Any further hints?
>>
>
> The link is to the list of ParaView test builds that ran "TestMPI" this
> morning on the dashboard.
>
> To build ParaView VTK must also be built,  so it should give you useful
> information.
>
> Some of them run on windows.
>
> Each of the links in the "Build Name" column points to more information
> about the build.
>
> There should be a notes file associated with each build... Ah, I see it
> takes a bit of clicking to get to it.
>
> Here are some:
>
> http://open.cdash.org/viewNotes.php?buildid=2683533
> http://open.cdash.org/viewNotes.php?buildid=2683625
> http://open.cdash.org/viewNotes.php?buildid=2682562
> http://open.cdash.org/viewNotes.php?buildid=2682804
> http://open.cdash.org/viewNotes.php?buildid=2682807
> http://open.cdash.org/viewNotes.php?buildid=2683296
> http://open.cdash.org/viewNotes.php?buildid=2683675
> http://open.cdash.org/viewNotes.php?buildid=2682616
> http://open.cdash.org/viewNotes.php?buildid=2683519
>
> The notes files show essentially every CMake variable that was not set
> to the default.
>
> It looks to me like all that was set was PARAVIEW_USE_MPI:BOOL=ON.
>
> What error are you encountering?
>
> What have you tried?
>
> What CMake variables did you set?
>
> Where did you install openMPI?
>
> Can you run HelloWorld type MPI programs?
>
> ...
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20121126/8d21c2f8/attachment.htm>


More information about the vtkusers mailing list