Exasim
Exasim copied to clipboard
Julia GPU compilation warnings NavierStokes/naca
warning message pops up in Julia/python versions, not in Matlab. [#26]
gpuInitu.cu(12): warning: variable "xdg2" was declared but never referenced detected during: instantiation of "void kernelgpuInitu(T *, T *, T *, T *, int, int, int, int, int, int) [with T=double]" (26): here instantiation of "void gpuInitu(T *, T *, T *, T *, int, int, int, int, int, int) [with T=double]" (29): here
gpuInitu.cu(11): warning: variable "xdg1" was declared but never referenced detected during: instantiation of "void kernelgpuInitu(T *, T *, T *, T *, int, int, int, int, int, int) [with T=float]" (26): here instantiation of "void gpuInitu(T *, T *, T *, T *, int, int, int, int, int, int) [with T=float]" (30): here
gpuInitu.cu(12): warning: variable "xdg2" was declared but never referenced detected during: instantiation of "void kernelgpuInitu(T *, T *, T *, T *, int, int, int, int, int, int) [with T=float]" (26): here instantiation of "void gpuInitu(T *, T *, T *, T *, int, int, int, int, int, int) [with T=float]" (30): here
Right, the compilation string for gpuApp contains the "-w" flag in compilecode.m but this isn't in the py or jl versions. So an immediate hotfix would be to add this flag to the other compilecode files, but I personally don't think this should be default behavior. I think warnings should show by default and be blocked if the user finds them annoying.
So I'd recommend adding the -w flag for now (which can be passed in with pde.gpuappflags since #30 was merged) and I'll try to fix the warnings by not declaring unused variables