Exasim icon indicating copy to clipboard operation
Exasim copied to clipboard

Julia GPU compilation warnings NavierStokes/naca

Open e-dinesh opened this issue 3 years ago • 1 comments

warning message pops up in Julia/python versions, not in Matlab. [#26] resulted in the warnings (below) but seems the simulation is not affected (to be verified). <<< compile code... ar: creating opuApp.a a - opuApp.o 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=double]" (26): here instantiation of "void gpuInitu(T *, T *, T *, T *, int, int, int, int, int, int) [with T=double]" (29): 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=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

e-dinesh avatar Feb 02 '22 16:02 e-dinesh

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

rloekvh avatar Feb 03 '22 16:02 rloekvh