Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
9 years ago

Trouble running OpenCL HelloWorld example on emulated s5_ref

I'm struggling to get the Hello World example running on emulated s5_ref. I have successfully compiled the kernel with no errors, and have also compiled the host applications (using Visual Studio 2013 - I gave up trying on Visual Studio 2015 although I think it can be done with a bit more effort). When I run the host application in debug mode it fails on the following line:

platform = findPlatform("Altera");

The code runs OK, but it always returns a null pointer and the program exits with the "ERROR: Unable to find Altera OpenCL platform." message. I have tried moving the compiled aocx file into the same folder as the source code but this does not help.

Any ideas?

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Anyone have any suggestions that might allow me to debug this problem?

    Many thanks, Kurt
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    How do you run the host program?

    If you compile with the -march=emulator flag the compiler will tell you how to run the host program.

    you need to call it with env CL_CONTEXT_EMULATOR_DEVICE_ALTERA=<board> <host program> <host program options>.