2 Replies Latest reply on Nov 1, 2009 6:47 PM by david_aiken

    clCreateProgramWithBinary and lifetime of binary dlls

    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..