[SciPy-user] Python on Intel Xeon Dual Core Machine

David Cournapeau david@ar.media.kyoto-u.ac...
Sat Feb 9 05:35:12 CST 2008

Nathan Bell wrote:
> On Feb 8, 2008 2:13 AM, David Cournapeau <david@ar.media.kyoto-u.ac.jp> wrote:
>> But I checked again: dlopening a library with open mp does work: here is
>> an archive with a trivial program using a lib dlopened, works on ubuntu
>> with gcc 4.2:
>> http://www.ar.media.kyoto-u.ac.jp/members/david/archives/dynamic_openmp.tar.bz2
> Are you saying that you can compile this .so with Ubuntu's g++-4.2 and
> use it on the same system?  Or are you compiling it elsewhere and
> running on Ubuntu?  I get the same error as before:
> $ make
> gcc-4.2 -W -Wall   -c -o taylor.o taylor.c
> gcc-4.2 -c -fPIC -fopenmp -W -Wall -o compute.o compute.c
> gcc-4.2 -shared compute.o -o libcompute.so -Wl,-soname,libcompute.so -lgomp
> gcc-4.2 -o taylor taylor.o compute.o -lgomp -L. -Wl,-rpath,. -ldl
> $ python
> Python 2.5.1 (r251:54863, Oct  5 2007, 13:36:32)
> [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
Sorry, I may not have been clear: the small program taylor shows that 
opening a library (libcompute.so here) through dlopen does work on 
ubuntu with gcc 4.2, nothing else. It indeed does not work with python 
on my machine either.

The problem, I think, is that since ubuntu still uses gcc 4.1 to compile 
python, python cannot dlopen libraries which depends on gcc 4.2 specific 
runtime services (libgomp is not an usual library, it is a library 
implementing open mp for gcc, hence gcc version specific, contrary to 
say libgtk or any usual library).

So I would try compiling python with gcc 4.2 to see if this is indeed 
the problem.



More information about the SciPy-user mailing list