boost-python shared object with openmp segfaults

boost-python shared object with openmp segfaults

Portrait de Cihan

We have a large open source software project that uses OpenMP and consists of a few libraries and python wrappers for those built using boost::python. Up until intel composer XE 12 everything was working fine but both with 13.1 and 13.5 we get a segmentation fault for a particular use-case. I was able to reproduce with a small example (see attachment). Note that the code example does not use OpenMP at all but compiling with the -openmp flag causes a segmentation fault, while leaving the flag off works as expected.
A valgrind run reveals that the crash is due to an invalid address within boost::throw_exception<bad_weak_ptr>.

To compile/link the example:

icpc -o testme.so -openmp -lpython2.7 -lboost_python -shared -fPIC testme.cpp

and then to use:

python -c "import testme; testme.printone()"

Has anyone seen this behaviour elsewhere? Is this a coding error or an issue with the compiler? Note that using gcc works.

Many thanks!

Fichier attachéTaille
Téléchargement testme.cpp666 octets
3 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.
Portrait de Sergey Kostrov

What version of Boost library are you using? Please specify and thanks.

Portrait de Cihan

Quote:

Sergey Kostrov wrote:

What version of Boost library are you using? Please specify and thanks.

We use boost 1.51.0, python 2.7.3 (both compiled with gcc).
Environment is SLES 11 x86_64 running on Intel Xeon E5462.

Connectez-vous pour laisser un commentaire.