Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17049 Discussions

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

Altera_Forum
Honored Contributor II
1,469 Views

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
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
720 Views

 

--- 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).
0 Kudos
Altera_Forum
Honored Contributor II
720 Views

 

--- 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
0 Kudos
Reply