merge of master with JK-lab after fixing the issues with reading opencl files in MAC os
OpenCL driver (AMD) was crashing with seg faults while reading the input opencl files from Rosetta. This happens only in Mac OS. Now, RegisterProgram function in GPU in rewritten to fix the problem.