cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

juliomh
Journeyman III

Problem building program

Hello, I've been having a problem with a large kernel I wrote. I can run it from Visual Studio or from the command line.

However, if I try to run it from gDebugger of CodeAnalyst, when clBuildProgram is called, it just shows an enigmatic: "Error: syntax error". I think is an output of the CL library (not mine), but the strange thing is that it returns without error, and allows me to execute the kernel without error (although in this case, it does not do anything).

I have searched about this message: "Error: syntax error" and I haven't found anything. Anyone has faced the same problem??

Thanks.

Julio

0 Likes
4 Replies
binying
Challenger

Is it possible for you to narrow down the problem and upload the code s that it can be reproduced?

0 Likes

Ok, I've narrowed it to.. an empty kernel!

Is there any problem with typedef or enum?

typedef float deftype;

typedef enum{MT_HARD, MT_SOFT} ModuleType;

typedef struct {

    int parent;

    int left;

    int right;

   

    ModuleType type;

    deftype x1;

    deftype y1;

    deftype x2;

    deftype y2;

    deftype width;

    deftype height;

    deftype area;

    deftype minAR;

    deftype maxAR;

} Node;

typedef struct {

    int front;

    int back;

} Contour;

typedef struct {

    unsigned int x;

    unsigned int y;

    unsigned int z;

    unsigned int c;

} kiss_state_t;

__kernel void MoveAndCost(

    __global int *numNodes,

    __global Node *nodes,

    __global int *rootNode,

    __global Node *workingNodes,

    __global int *workingRootNode,

    __global int *numMoves,

    __global deftype *bestCost,

    __global kiss_state_t *state,

    __global int *stackNodes,

    __global Contour *contour,

    volatile __global int *mutex)

{

}

0 Likes

"Is there any problem with typedef or enum?" No, I don't think so.


Btw, ur code u pasted compiles well on my KernelAnalyzer.

-------------------

  1. typedef float deftype; 
  2.  
  3. typedef enum{MT_HARD, MT_SOFT} ModuleType; 
  4.  

...

  1.     volatile __global int *mutex) 
  2.  
0 Likes

Yep, I compiles okay with KernelAnalyzer, and it executes ok from Visual Studio or the command line. It's only from the gdebugger or CodeAnalyst that fails. I wonder if these programs use a different underlying library to perform the debugging and this is what is failing...

0 Likes