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

Installation error: Unknown option '-fopenmp' #311

Closed
skanti opened this issue Feb 5, 2021 · 7 comments
Closed

Installation error: Unknown option '-fopenmp' #311

skanti opened this issue Feb 5, 2021 · 7 comments

Comments

@skanti
Copy link

skanti commented Feb 5, 2021

Describe the bug
Hi Chris,
when building from source thru python setup.py install I get following error message:

nvcc fatal   : Unknown option '-fopenmp'

Any idea how come? I tried gcc8.4.0 and also few lower CUDA version but with the same outcome.

To Reproduce
python setup.py install

Expected behavior

'-fopenmp' should be known

Desktop (please complete the following information):

  • OS: Ubuntu 20.04
  • Python version: 1.8.0 (nightly)
  • CUDA version: 11.2
  • NVIDIA Driver version: 460.32.03
  • Minkowski Engine version 0.5.0
  • GCC version: 9.3.0
@chrischoy
Copy link
Contributor

Hi Armen,

Could you try pytorch 1.7?
I'm using the default pytorch c extension for compilation and do not provide -fopenmp for nvcc compilation arguments.
It seems that pytorch 1.8 is adding the -fopenmp without -Xcompiler, which is possibly the reason why you are getting this error.

@skanti
Copy link
Author

skanti commented Feb 5, 2021

The error can be fixed when passing -Xcompiler -fopenmp to nvcc in setup.py. Perhaps newer pytorch versions omit -Xcompiler

@plusk01
Copy link

plusk01 commented Apr 2, 2021

use ninja - see #208

@eusansone-dev
Copy link

Thank you so much!! Adding -Xcompiler -fopenmp to nvcc, that really works!!

@thesby
Copy link

thesby commented Dec 12, 2023

Thank you so much!! Adding -Xcompiler -fopenmp to nvcc, that really works!!

Where should I add this line?

@Xavier-wa
Copy link

Thank you so much!! Adding -Xcompiler -fopenmp to nvcc, that really works!!

Could you show me how to add it plz @eusansone-dev

@Zimiao1025
Copy link

Update cmake to v3.22.5 available for me

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

No branches or pull requests

7 participants