kos

How to debug CAL ?

Discussion created by kos on Dec 28, 2008
Latest reply on Dec 29, 2008 by kos
I have a Cal_Result_Error as a result of calCtxRunProgram, and don't know why...

MY code :

CALmodule module = 0;
  Context = Params[0].first.dev.ContextHandle;
  CALresult r = calModuleLoad(&module, Context, image);
  CALfunc func = 0;
  calModuleGetEntry(&func,Context, module, "main");
  for(int i = 0; i < Params.size(); i++)
  {
  CALname Name = 0;
  calModuleGetName(&Name, Context, module, Params.second.c_str());
  calCtxSetMem(Context, Name, Params
.first.Memory);
  }
  CALdomain domain = {0, 0, Params[0].first.region.first, Params[0].first.region.second};
  e = 0;
  CALresult re = calCtxRunProgram(&e, Context, func, &domain);
func, Context - are good, another piece of similar code works good in another project, with the same values. I've tried different domains, result the same. In similar project context and func pointers that I've got from CAL runtime are the same - in different apps running at the same time, and one of that works, no matter is another app started or not.

Outcomes