nicehash / nheqminer

Equihash miner for NiceHash
https://www.nicehash.com
MIT License
768 stars 583 forks source link

gpu Binary file can cause a crash/fail if testing multiple platforms #143

Open maztheman opened 8 years ago

maztheman commented 8 years ago

issue is in ocl_silentarmy::start() function

If you are testing platform 0 with device 0 (intel iGpu), it generates a file called "silentarmy_gpu0.bin" If you then test platform 1 with device 0 (Amd Gpu), it tries to compile the previous binary file, and fails.

Suggest naming the binary file "silentarmy_gpuXXX_NNN.bin" where XXX is device_context.platform_id and NNN is gpu index.

From this: char kernelName[64]; sprintf(kernelName, "silentarmy_gpu%u.bin", (unsigned)i);

To This: char kernelName[64]; sprintf(kernelName, "silentarmygpu%u%u.bin", (unsigned)device_context.platform_id, (unsigned)i);