#1634: CUDA breaks CCTK_BUILTIN_UNREACHABLE ---------------------+------------------------------------------------------ Reporter: sbrandt | Owner: Type: defect | Status: new Priority: minor | Milestone: Cactus_4.3.0 Component: Other | Version: development version Keywords: | ---------------------+------------------------------------------------------ Code containing CCTK_BUILTIN_UNREACHABLE does not compile with CUDA. In fact, there seems to be problems with calling abort() from CUDA as well. The attached patch allows compilation to proceed, but I suspect it will be hated.
#1634: CUDA breaks CCTK_BUILTIN_UNREACHABLE ----------------------+----------------------------------------------------- Reporter: sbrandt | Owner: Type: defect | Status: new Priority: minor | Milestone: Cactus_4.3.0 Component: Other | Version: development version Resolution: | Keywords: ----------------------+-----------------------------------------------------
Comment (by eschnett):
(1) In the long run, CUDA should become its own language, and should stop pretending to be C or C++. In the short run, testing __CUDACC__ is fine.
(2) Isn't CUDA like C++? If so, do you need to change the behaviour of C code?
(3) If asm("trap;") works always, then the macro should be always defined, and not only if C++ supports it.
#1634: CUDA breaks CCTK_BUILTIN_UNREACHABLE ----------------------+----------------------------------------------------- Reporter: sbrandt | Owner: Type: defect | Status: new Priority: minor | Milestone: Cactus_4.3.0 Component: Other | Version: development version Resolution: | Keywords: ----------------------+-----------------------------------------------------
Comment (by sbrandt):
So, in answer to (1). I'm sorry for what CUDA is doing. :)
In answer to (3), I realized I had that wrong shortly after I submitted the patch. The new patch corrects both (2) and (3).
#1634: CUDA breaks CCTK_BUILTIN_UNREACHABLE ----------------------+----------------------------------------------------- Reporter: sbrandt | Owner: Type: defect | Status: review Priority: minor | Milestone: Cactus_4.3.0 Component: Other | Version: development version Resolution: | Keywords: ----------------------+----------------------------------------------------- Changes (by eschnett):
* status: new => review
#1634: CUDA breaks CCTK_BUILTIN_UNREACHABLE ----------------------+----------------------------------------------------- Reporter: sbrandt | Owner: Type: defect | Status: reviewed_ok Priority: minor | Milestone: Cactus_4.3.0 Component: Other | Version: development version Resolution: | Keywords: ----------------------+----------------------------------------------------- Changes (by eschnett):
* status: review => reviewed_ok
#1634: CUDA breaks CCTK_BUILTIN_UNREACHABLE ----------------------+----------------------------------------------------- Reporter: sbrandt | Owner: Type: defect | Status: closed Priority: minor | Milestone: Cactus_4.3.0 Component: Other | Version: development version Resolution: fixed | Keywords: ----------------------+----------------------------------------------------- Changes (by sbrandt):
* status: reviewed_ok => closed * resolution: => fixed
Comment:
Fixed in revision 5121
trac@lists.einsteintoolkit.org