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

fix C++11 CUDA 8 nvcc compile time odeint error #152

Closed

Conversation

psychocoderHPC
Copy link

fix https://svn.boost.org/trac/boost/ticket/13049

disable usage of noexcept with BOOST_NO_CXX11_NOEXCEPT for nvcc from CUDA 8

fix https://svn.boost.org/trac/boost/ticket/13049

disable usage of noexcept with `BOOST_NO_CXX11_NOEXCEPT` for nvcc from CUDA 8
@jzmaddock
Copy link
Collaborator

Is this only device code that is effected, or does it hit the host meta-compiler as well?

@psychocoderHPC
Copy link
Author

This bug effects host code (see example) which is compiled with nvcc out of a *.cu file.

@jzmaddock
Copy link
Collaborator

Reproduced and fixed in 9b8de65

@akors
Copy link

akors commented Aug 9, 2017

Hi! Unfortunately, your fix broke compilation with CUDA 9. The reason for that is that you use the symbol __CUDACC_VER__ for version checking, but the symbol has been deprecated in CUDA 9.

Line 64 in crt/common_functions.h of the CUDA toolkit now reads:

#define __CUDACC_VER__ "__CUDACC_VER__ is no longer supported.  Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead."

The fix seems simple enough, instead of checking for the whole version, you could check separately for __CUDACC_VER_MAJOR__ and __CUDACC_VER_MINOR__ .

@psychocoderHPC
Copy link
Author

@akors You are right, but the deprecation breaks all checks in include/boost/config/compiler/nvcc.hpp.
Therefore the full file needs an update.

@akors
Copy link

akors commented Aug 9, 2017

Ok, that's a shame. Here's the Trac ticket URL: https://svn.boost.org/trac10/ticket/13152

@psychocoderHPC
Copy link
Author

thx for opening the ticket: btw NVIDIA breaks all old boost versions with this change.

@akors
Copy link

akors commented Aug 9, 2017

ouch, it might be worth opening a CUDA bug report as long as CUDA 9 is still in RC!

Good idea! I just did that too, the internal link is https://developer.nvidia.com/nvidia_bug/1971621 , in case anyone has access to that.

@psychocoderHPC
Copy link
Author

I tested the beta version of CUDA 9.0067 with a little program:

#include <iostream>
#include <cuda_runtime.h>

int main()
{
        std::cout<<__CUDACC_VER__<<std::endl;
}

compiel and run

nvcc main.cu
./a.out
90067 #this is the output

This means that the define is available in the beta, we need to check the latest rc.

@ax3l
Copy link
Contributor

ax3l commented Aug 9, 2017

The problem appears first with the second CUDA 9 release candidate, CUDA 9.0.103.

@jzmaddock
Copy link
Collaborator

Can you guys please verify that #175 fixes this?

Many thanks, John Maddock.

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.

None yet

4 participants