Hi,

thank anyone who can help me.

I need that my code run without be compiled in execution time.

When i run the host code, in this line a error of access in memory occurs.

errcode = clGetProgramInfo(program, CL_PROGRAM_BINARIES, binary_sizes[0] * sizeof(size_t), teste_aloprado,&quantidadecopiadaparamvalue);

The all code of that i tried follows:

errcode = clGetProgramInfo(program, CL_PROGRAM_BINARY_SIZES,num_dispositivos * sizeof(size_t), binary_sizes, &quantidadecopiadaparamvalue);
cout << "\nForam copiados: " << quantidadecopiadaparamvalue << "\n";

if( errcode == CL_SUCCESS )
cout << "\nA quantidade de Bytes é: " << binary_sizes[0];
else
cout << "\nNão retornou a quantidade de bytes.";




char **binary = (char **) malloc(num_dispositivos * sizeof(char*));
for(int i = 0; i < num_dispositivos; i++ )
{
binary[i] = (char *) malloc(binary_sizes[i] * sizeof(char));
}
//binary_sizes[0]*sizeof(char)
size_t *teste_aloprado = (size_t *) malloc(binary_sizes[0] * sizeof(size_t));
errcode = clGetProgramInfo(program, CL_PROGRAM_BINARIES, binary_sizes[0] * sizeof(size_t), teste_aloprado,&quantidadecopiadaparamvalue);