我正在尝试从此链接(https://github.com/mxmlnkn/rootbeer1)运行Rootbeer主版本。它与类似问题(Unable to cast a class error)中使用的版本(更新版本)略有不同。
我已经成功编译了它,并创建了Rootbeer.jar(按照说明打包)。
我收到以下错误。您能建议如何解决吗? 由于此错误,我无法运行任何示例。 我确实尽了所有我能想到的尝试,但无法克服此错误。 任何帮助,将不胜感激。
ScalarAddApp示例的输出,如果在Eclipse中执行:
start array[0]: 0
start array[1]: 1
start array[2]: 2
start array[3]: 3
start array[4]: 4
start array[5]: 5
start array[6]: 6
start array[7]: 7
start array[8]: 8
start array[9]: 9
Exception in thread "main" java.lang.ClassCastException: ScalarAddKernel cannot be cast to org.trifort.rootbeer.runtime.CompiledKernel
at org.trifort.rootbeer.runtime.CUDAContext.setKernel(CUDAContext.java:146)
at org.trifort.rootbeer.runtime.Rootbeer.run(Rootbeer.java:95)
at ScalarAddApp.multArray(ScalarAddApp.java:28)
at ScalarAddApp.main(ScalarAddApp.java:53)
在命令提示符下执行的命令输出:
java -Xmx8g -jar Rootbeer.jar ScalarAddApp.jar App-GPU.jar
warning: sm_12 and sm_11 not supported with recursion. use -norecursion to enable.
warning: sm_12 and sm_11 not supported with doubles. use -nodoubles to enable.
caching package names for: C:\Users\Shreshth\eclipse-workspace\rootbeer1-master\examples\ScalarAddApp\dist\ScalarAddApp.jar
caching package names for: C:\Users\Shreshth\eclipse-workspace\rootbeer1-master\examples\ScalarAddApp\dist\Rootbeer.jar
caching package names for: C:\Program Files\Java\jre1.8.0_171\lib\rt.jar
cpool == null
java.lang.NullPointerException
at
soot.rbclassload.RootbeerClassLoader.loadHierarchySootClasses(RootbeerClassLoader.java:963) at
soot.rbclassload.RootbeerClassLoader.loadNecessaryClasses(RootbeerClassLoader.java:294)
at org.trifort.rootbeer.entry.RootbeerCompiler.setupSoot(RootbeerCompiler.java:219)
at org.trifort.rootbeer.entry.RootbeerCompiler.compile(RootbeerCompiler.java:251)
at org.trifort.rootbeer.entry.RootbeerCompiler.compile(RootbeerCompiler.java:268)
at org.trifort.rootbeer.entry.Main.run(Main.java:367)
at org.trifort.rootbeer.entry.Main.main(Main.java:417)
caching package names for: ScalarAddApp.jar
remapping class: java.util.concurrent.atomic.AtomicLong
java.lang.NullPointerException
at soot.rbclassload.RootbeerClassLoader.remapClasses(RootbeerClassLoader.java:998)
at
soot.rbclassload.RootbeerClassLoader.loadNecessaryClasses(RootbeerClassLoader.java:295)
at org.trifort.rootbeer.entry.RootbeerCompiler.setupSoot(RootbeerCompiler.java:219)
at org.trifort.rootbeer.entry.RootbeerCompiler.compile(RootbeerCompiler.java:251)
at org.trifort.rootbeer.entry.RootbeerCompiler.compile(RootbeerCompiler.java:268)
at org.trifort.rootbeer.entry.Main.run(Main.java:367)
at org.trifort.rootbeer.entry.Main.main(Main.java:417)