[vtk-developers] can't link to MPI libraries when building on Ubuntu 15.04, VTK6.3

Chaffra Affouda chaffra at gmail.com
Mon Sep 14 08:46:17 EDT 2015


Hi,

I am getting a lot of undefined references when linking. I know it is 
not linking to MPI or the right MPI but I cannot see how.
I have openmpi installed and mpicc is pointing to the openmpi version. 
Can any reproduce or help? Error is below

Thanks,
Chaffra

    Linking CXX shared library ../../lib/libvtkIOAMR-6.3.so
    CMakeFiles/vtkIOAMR.dir/vtkAMREnzoParticlesReader.cxx.o: In function 
`MPI::Op::Init(void (*)(void const*, void*, int, MPI::Datatype const&), 
bool)':
vtkAMREnzoParticlesReader.cxx:(.text._ZN3MPI2Op4InitEPFvPKvPviRKNS_8DatatypeEEb[_ZN3MPI2Op4InitEPFvPKvPviRKNS_8DatatypeEEb]+0x15): 
undefined reference to `ompi_mpi_cxx_op_intercept'
    CMakeFiles/vtkIOAMR.dir/vtkAMREnzoParticlesReader.cxx.o: In function 
`MPI::Intracomm::Create_graph(int, int const*, int const*, bool) const':
vtkAMREnzoParticlesReader.cxx:(.text._ZNK3MPI9Intracomm12Create_graphEiPKiS2_b[_ZNK3MPI9Intracomm12Create_graphEiPKiS2_b]+0x39): 
undefined reference to `MPI::Comm::Comm()'
    CMakeFiles/vtkIOAMR.dir/vtkAMREnzoParticlesReader.cxx.o: In function 
`MPI::Graphcomm::Clone() const':
vtkAMREnzoParticlesReader.cxx:(.text._ZNK3MPI9Graphcomm5CloneEv[_ZNK3MPI9Graphcomm5CloneEv]+0x35): 
undefined reference to  `MPI::Comm::Comm()'
    CMakeFiles/vtkIOAMR.dir/vtkAMREnzoParticlesReader.cxx.o: In function 
`MPI::Cartcomm::Clone() const':
vtkAMREnzoParticlesReader.cxx:(.text._ZNK3MPI8Cartcomm5CloneEv[_ZNK3MPI8Cartcomm5CloneEv]+0x35): 
undefined reference to   `MPI::Comm::Comm()'
    CMakeFiles/vtkIOAMR.dir/vtkAMREnzoParticlesReader.cxx.o: In function 
`MPI::Intercomm::Merge(bool) const':
vtkAMREnzoParticlesReader.cxx:(.text._ZNK3MPI9Intercomm5MergeEb[_ZNK3MPI9Intercomm5MergeEb]+0x37): 
undefined reference to  `MPI::Comm::Comm()'
    CMakeFiles/vtkIOAMR.dir/vtkAMREnzoParticlesReader.cxx.o: In function 
`MPI::Intracomm::Create(MPI::Group const&) const':
vtkAMREnzoParticlesReader.cxx:(.text._ZNK3MPI9Intracomm6CreateERKNS_5GroupE[_ZNK3MPI9Intracomm6CreateERKNS_5GroupE]+0x3a): 
undefined    reference to `MPI::Comm::Comm()'
CMakeFiles/vtkIOAMR.dir/vtkAMREnzoParticlesReader.cxx.o:vtkAMREnzoParticlesReader.cxx: 
(.text._ZNK3MPI9Intracomm5SplitEii[_ZNK3MPI9Intracomm5SplitEii]+0x36): 
more undefined references to `MPI::Comm::Comm()' follow
CMakeFiles/vtkIOAMR.dir/vtkAMREnzoParticlesReader.cxx.o:(.data.rel.ro._ZTVN3MPI8DatatypeE[_ZTVN3MPI8DatatypeE]+0x78): 
undefined reference to `    MPI::Datatype::Free()'
CMakeFiles/vtkIOAMR.dir/vtkAMREnzoParticlesReader.cxx.o:(.data.rel.ro._ZTVN3MPI3WinE[_ZTVN3MPI3WinE]+0x48): 
undefined reference to  `MPI::Win::Free()'
    collect2: error: ld returned 1 exit status
    IO/AMR/CMakeFiles/vtkIOAMR.dir/build.make:363: recipe for target 
'lib/libvtkIOAMR-6.3.so.1' failed
make[2]: *** [lib/libvtkIOAMR-6.3.so.1] Error 1
    CMakeFiles/Makefile2:6388: recipe for target 
'IO/AMR/CMakeFiles/vtkIOAMR.dir/all' failed
make[1]: *** [IO/AMR/CMakeFiles/vtkIOAMR.dir/all] Error 2
Makefile:107: recipe for target 'all' failed
make: *** [all] Error 2



More information about the vtk-developers mailing list