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

Compilation error: c++ version #17

Open
iancrossfield opened this issue Dec 7, 2022 · 3 comments
Open

Compilation error: c++ version #17

iancrossfield opened this issue Dec 7, 2022 · 3 comments

Comments

@iancrossfield
Copy link

When compiling HELIOS-K (simply make SM=61), I encountered several times the following fatal error:

/usr/local/cuda/bin/../targets/x86_64-linux/include/thrust/detail/config/cpp_dialect.h:128:13: warning: Thrust requires at least C++14. Define THRUST_IGNORE_DEPRECATED_CPP_DIALECT to suppress this message. [enabled by default]
      THRUST_COMPILER_DEPRECATION(C++14);
             ^
.....
make: *** [heliosk] Error 1
@iancrossfield
Copy link
Author

The issue is solved by editing the Makefile and adding to include the option
-std=c++11
in the nvcc line, i.e.:
nvcc $(ARCH) -std=c++11 --compiler-options -Wall -o heliosk $(source) $(BUILD_DATA)

HELIOS-K then seems to compile successfully.

@sigrimm
Copy link
Collaborator

sigrimm commented Dec 12, 2022

Thanks for reporting this, and for your solution.
However, I will not include your change into the repository, because this is very system depending. And the change could cause compilation errors on other systems.

It seems that your CUDA version doesn't agree with your c++ version. Another solution could be to load the correct c++ version before compiling CUDA code.

@iancrossfield
Copy link
Author

No worries, @sigrimm -- I assumed it was mainly my problem, and primarily reported it here just in case other people encounter similar issues in the future. (unrelated note: did you get my emailed question about opacities?) - Thanks!

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

2 participants