Compiler warning: ptxas warning ptxas warning : Double is not supported. Demoting to float

Hi,

When compiling an example program, I get this warning message:

marklagatuz$ make -f Makefile1
/usr/local/cuda/bin/nvcc -I /usr/local/cuda/include -o defIntegral_D.o -c defIntegral_D.cu
ptxas /tmp/tmpxft_00000949_00000000-2_defIntegral_D.ptx, line 65; warning : Double is not supported. Demoting to float
/usr/local/cuda/bin/nvcc -I /usr/local/cuda/include -o defIntegral_H.o -c defIntegral_H.cu
/usr/local/cuda/bin/nvcc -o defIntegral defIntegral_D.o defIntegral_H.o
marklagatuz$

Here is my makefile:

CUDA Installation Path

CUDA_INSTALL_PATH = /usr/local/cuda

Compiler

NVCC = $(CUDA_INSTALL_PATH)/bin/nvcc

Includes

INCLUDE = $(CUDA_INSTALL_PATH)/include

Program or Executable

PROGRAM = defIntegral

Device Code

DEVICE = _D

Host Code

HOST = _H

Create Executable by linking *.o (host and device object’s)

$(PROGRAM) : $(PROGRAM)$(DEVICE).o $(PROGRAM)$(HOST).o
$(NVCC) -o $(PROGRAM) $^

Compile device code to an object

$(PROGRAM)$(DEVICE).o : $(PROGRAM)$(DEVICE).cu
$(NVCC) -I $(INCLUDE) -o $@ -c $<

Compile host code to an object

$(PROGRAM)$(HOST).o : $(PROGRAM)$(HOST).cu
$(NVCC) -I $(INCLUDE) -o $@ -c $<

Remove *.o files and executables

clean :
rm *.o $(PROGRAM)

I don’t have any double variables declared within the example program. I’m confused on why this warning is popping up. I’m running on OS X 10.6.3 on an Intel Core 2 Duo with 9400 + 9600GT installed. The driver, toolkit, and SDK were successfully installed in their default locations. My example program works, but the warning message is an annoyance. haha!

If anybody can shed some light on this message, I would appreciate it! Thanks!

Does that program have any floating point constants in it? By default such constants are double precision, which the compiler automatically demotes to float (and prints the warning you see) when you compile with double precision disabled. A simple “1.0” rather than “1.0f” can trigger this warning. In such cases it is harmless.

Does that program have any floating point constants in it? By default such constants are double precision, which the compiler automatically demotes to float (and prints the warning you see) when you compile with double precision disabled. A simple “1.0” rather than “1.0f” can trigger this warning. In such cases it is harmless.

Yes. My program contains floating point constants. Thanks for the info and the help!

Yes. My program contains floating point constants. Thanks for the info and the help!

I am also getting this same error, have you found a solution?

Sorry about the comment, I didn’t see seibert’s reply. Thanks.