Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

compilation error with boost python and -xopenmp

807575Sep 21 2010 — edited Sep 29 2010
Hello,
i have been trying compiling our research code with the sun studio compiler 12.2.

Our code relies on boost-python, as our application is a library that is then loaded when running python. My system is ubuntu 10.04 64bit.

the program compiles and runs correctly if i do not activate the -xopenmp flag.

when i activate the -xopenmp flag the following (apparently boost related) error appears


"/home/rrossi/compiled_libraries/boost_1_44/include/boost/python/detail/def_helper.hpp", line 186: Error: Cannot return const boost::python::return_internal_reference<1, boost::python::default_call_policies> from a function that should return const char*.
"/home/rrossi/compiled_libraries/boost_1_44/include/boost/python/class.hpp", line 545: Where: While instantiating "boost::python::detail::def_helper<boost::python::return_internal_reference<1, boost::python::default_call_policies>, boost::python::detail::not_specified, boost::python::detail::not_specified, boost::python::detail::not_specified>::doc() const".
"/home/rrossi/compiled_libraries/boost_1_44/include/boost/python/class.hpp", line 545: Where: Instantiated from non-template code.
1 Error(s) detected.

note that no warning was issued if "-xopenmp" was not used, and that the code in question is not parallel!!




apart for this two Assertions are later issued by the compiler

Assertion: (../lnk/bindutil.cc, line 343)
while processing /home/rrossi/kratos/applications/incompressible_fluid_application/custom_python/add_custom_strategies_to_python.cpp at line 0.

our code can be seen at the page
http://kratos.cimne.upc.es/trac/browser/kratos/applications/incompressible_fluid_application/custom_python/add_custom_strategies_to_python.cpp



the second assertion is

Assertion: (../lnk/bindutil.cc, line 343)
while processing /home/rrossi/scratch/SolarisStudio12.2-linux-x86-tar-ML/solstudio12.2/prod/include/CC/stlport4/stl/_limits.c at line 0.



i will try to have a look to the first errors, however the assertions are really showstoppers...

any suggestion would be really welcome

thank you in advance
Riccardo
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 27 2010
Added on Sep 21 2010
16 comments
460 views