Question

I'm trying to run NVidia's OpenCL demo oclNbody.exe on ATI Radeo 4850 card and receive such errors:

Build Log: C:\DOCUME~1\DIMEDR~1\LOCALS~1\Temp\OCL27C.tmp.cl(33): error: identifier

      "float3" is undefined

REAL3 bodyBodyInteraction(REAL3 ai, REAL4 bi, REAL4 bj, REAL softeningSquared)

^

And so on for all REAL3 datatype using. I have seen the OpenCL specification 1.1 and it clearly says that float3 is supported. I've tried to change REAL3 with float3 with no luck. I have the latest drivers for my card. Using Windows XP SP3 OS

How can I fix or work around this error?

Was it helpful?

Solution 2

I have found a workaround:

  • use float 4 instead of float3;
  • #define ZERO4 {0.0f, 0.0f, 0.0f, 0.0f} and use it instead ZERO3
  • and decrease the number of workgroup to 64 (was 256)

and it worked!

OTHER TIPS

float3 and other 3-component vector types were not part of the OpenCL 1.0 spec; they were added in the 1.1 revision. According to AMD's driver compatibility page, the Radeon HD 4800 cards only support OpenCL 1.0.

The fact that the compiler tried to interpret float3 as an identifier shows that it is not a recognized type.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top