Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass openmp flag to linker #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Pass openmp flag to linker #36

wants to merge 1 commit into from

Conversation

akshayka
Copy link
Member

@akshayka akshayka commented May 29, 2020

On Ubuntu 20.04, if -fopenmp is passed when compiling but not when
linking, importing diffcp results in the following error

>>> import diffcp
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/akshay/src/cvxgrp/diffcp/diffcp/__init__.py", line 3, in
<module>
    from diffcp.cone_program import solve_and_derivative, \
  File "/home/akshay/src/cvxgrp/diffcp/diffcp/cone_program.py", line 3,
in <module>
    import diffcp.cones as cone_lib
  File "/home/akshay/src/cvxgrp/diffcp/diffcp/cones.py", line 6, in
<module>
    from _diffcp import dprojection, project_exp_cone, Cone, ConeType
ImportError:
/home/akshay/envs/diffcp/lib/python3.8/site-packages/_diffcp.cpython-38-x86_64-linux-gnu.so:
undefined symbol: omp_get_thread_num

On Ubuntu 20.04, if -fopenmp is passed when compiling but not when
linking, importing diffcp results in the following error

>>> import diffcp
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/akshay/src/cvxgrp/diffcp/diffcp/__init__.py", line 3, in
<module>
    from diffcp.cone_program import solve_and_derivative, \
  File "/home/akshay/src/cvxgrp/diffcp/diffcp/cone_program.py", line 3,
in <module>
    import diffcp.cones as cone_lib
  File "/home/akshay/src/cvxgrp/diffcp/diffcp/cones.py", line 6, in
<module>
    from _diffcp import dprojection, project_exp_cone, Cone, ConeType
ImportError:
/home/akshay/envs/diffcp/lib/python3.8/site-packages/_diffcp.cpython-38-x86_64-linux-gnu.so:
undefined symbol: omp_get_thread_num
@akshayka akshayka requested a review from sbarratt May 29, 2020 18:13
Copy link
Collaborator

@sbarratt sbarratt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants