david_aiken

clCreateProgramWithBinary and lifetime of binary dlls

Discussion created by david_aiken on Nov 1, 2009
Latest reply on Nov 1, 2009 by david_aiken

hi all..

I'm having problems with clCreateProgramWithBinary. I'm using clGetProgramInfo to retrieve the binaries and save them to a file. In this implementation the file contains the path to a dll in the user's temp directory, which is nice.

There are actually two files in the temp directory for each program i.e.

OCL9DF8.tmp

OCL9DF8.tmp.dll

As long as the executable is running, these files are present for each program. On exit from the program (exit(0) is used since it is using an older glut), it seems that if none of the kernels in a program are invoked, that program's files are removed from the directory, making the binary invalid.

As a result there is an error loading the binary on next startup and the source has to be rebuilt - which can be quite slow.

I'm using Vista 32-bit.

hope it helps to pin it down..

Outcomes