0

I am having Aparapi translating Java code to OpenCL. However I wonder how I can see the generated OpenCL code. The website says "by using adding -Dcom.amd.aparapi.enableShowGeneratedOpenCL=true to your command line when you start your JVM". Being new to this technology, I am not sure how exactly you can do this? Can anyone please help by elaborating the process?

Added part:

Thank you. But what should I do in case of hadoop? I am trying to generate the OpneCL code for a hadoop program that I am running this way:

hadoop jar .java

I have tried adding -Dcom.amd.aparapi.enableShowGeneratedOpenCL=true before and after jar word, both did not work. Here is what I got.

Exception in thread "main" java.io.IOException: Error opening job jar: -Dcom.amd.aparapi.enableShowGeneratedOpenCL=true at org.apache.hadoop.util.RunJar.main(RunJar.java:90) Caused by: java.io.FileNotFoundException: -Dcom.amd.aparapi.enableShowGeneratedOpenCL=true (No such file or directory) at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.(ZipFile.java:215) at java.util.zip.ZipFile.(ZipFile.java:145) at java.util.jar.JarFile.(JarFile.java:153) at java.util.jar.JarFile.(JarFile.java:90) at org.apache.hadoop.util.RunJar.main(RunJar.java:88)

user3341779
  • 29
  • 2
  • 6

1 Answers1

2

Just add the property to the command line which you use to start java.

Specifically somewhere you have a command line like this

java -classpath  yourpackage.YourApp

Just add the property like this

java -Dcom.amd.aparapi.enableShowGeneratedOpenCL=true -classpath  yourpackage.YourApp
gfrost
  • 948
  • 8
  • 5
  • Thank you. But what should I do in case of hadoop? I am trying to generate the OpneCL code for a hadoop program that I am running this way: – user3341779 Jul 17 '14 at 18:31