[Paraview] Compilation error under Linux with MPI and Python
dkxls23 at gmail.com
Thu Feb 6 05:11:36 EST 2014
The problem actually occurs only for openmpi versions > 1.6, I
successfully compiled now ParaView under openSUSE 12.3 (openmpi 1.6).
I also found a quick-and-dirty, workaround for openmpi 1.7.2 by manually
adding libdl to the libraries in CMakeCache.txt:
Maybe a ParaView developer can add libdl to the linking targets for
mpi4py to fix the problem properly.
On 02/06/2014 05:02 AM, Orion Poplawski wrote:
> On 02/05/2014 01:14 PM, Armin Wehrfritz wrote:
>> I get this error when compiling Paraview 4.1.0 under Linux x64:
>>> [ 230s] CMakeFiles/mpi4py.MPI.dir/src/MPI.c.o: In function
>>> [ 230s] MPI.c:(.text+0x6eb1): undefined reference to `dlopen'
>>> [ 230s] MPI.c:(.text+0x6ecd): undefined reference to `dlopen'
>>> [ 230s] MPI.c:(.text+0x6ee3): undefined reference to `dlopen'
>>> [ 230s] MPI.c:(.text+0x6ef9): undefined reference to `dlopen'
>>> [ 230s] CMakeFiles[ 4%] /mpi4py.MPI.dir/src/MPI.c.o: In function
>>> [ 230s] MPI.c:(.text+0x1349b): undefined reference to `dlopen'
>>> [ 230s] CMakeFiles/mpi4py.MPI.dir/src/MPI.c.o:MPI.c:(.text+0x135bd):
>>> more undefined references to `dlopen' follow
>>> [ 230s] collect2: error: ld returned 1 exit status
>>> [ 230s] make: *** [lib/site-packages/mpi4py/MPI.so] Error 1
>>> [ 230s] make: ***
>>> [ThirdParty/mpi4py/vtkmpi4py/CMakeFiles/mpi4py.MPI.dir/all] Error 2
>>> [ 230s] make: *** Waiting for unfinished jobs....
>> The error seems related to newer versions of openmpi in combination with
>> and Python.
>> When compiling under openSUSE 12.2 (openmpi 1.5.4) everything works
>> fine, but under openSUSE 12.3 (openmpi 1.6) and openSUSE 13.1 (openmpi
>> 1.7.2) the compilation fails.
>> Apparently, in newer versions of openmpi, the wrapper doesn't add '-ldl'
>> anymore to the linker flags.
>> See also here:
>> I'm not sure if this should be fixed in openmpi or paraview, but I would
>> appreciate any hint on how to fix it.
>> Best regards,
> It needs to be fixed in paraview - it bundles mpi4py, and mpi4py uses
> dlopen(), so mpi4py needs to be linked to -ldl. Not sure the
> appropriate way to fix that in paraview though.
More information about the ParaView