Forum Discussion

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

Emulate OpenCL Kernel on windows - 'env' is not found

Hi,

I am running the emulation of hello_world example under windows 64bit. While I can't find "env". Is that a binary executable file of Altera opencl sdk or a generated file from previous steps?

In details: I managed successfully to execute the command "aoc -v -march=emulator hello_world.cl", After that, I compiled the hello_world host program with Visual Studio.

But, when I try to run the command "env CL_CONTEXT_EMULATOR_DEVICE_ALTERA=s5_ref hello_world", I get the following error message:

'env' is not recognized as an internal or external command, operable program or batch file.

Could you help me to find a solution to this problem?

Thanks and Regards,

Michael

2 Replies

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

    --- Quote Start ---

    'env' is not recognized as an internal or external command, operable program or batch file.

    --- Quote End ---

    You have to add CL_CONTEXT_EMULATOR_DEVICE_ALTERA s5_ref to your environment variables and then run .exe file (without any additional commands).
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    You have to add CL_CONTEXT_EMULATOR_DEVICE_ALTERA s5_ref to your environment variables and then run .exe file (without any additional commands).

    --- Quote End ---

    Hi Chris,

    It works. I added CL_CONTEXT_EMULATOR_DEVICE_ALTERA s5_ref to my environment variables, and run the hello_world.exe (with the hello_world.aocx in the same directory, and WDAPI1021.dll/altera_s5_ref_mmd.dll in windows/system32).

    Thank you so much for the help. If you think there is better ideas to deal with the .dll please also kindly let me know.

    Thanks,

    Michael