我试图在rootbeer库中运行第一个例子,你可以从here找到它.
问题是,即使我按照他们的所有说明操作,当我尝试运行Jar时,我收到以下消息
root@ubuserver3:/home/ubuadmin/JavaJars/HelloWordGPU# java -jar HelloWorldGPU.jar
OpenJDK Client VM warning: You have loaded library /usr/lib/libcuda.so.319.37 which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
Exception in thread "main" java.lang.NullPointerException
at org.trifort.rootbeer.runtime.Rootbeer.run(Rootbeer.java:104)
at ScalarMult.test(ScalarMult.java:13)
at Main.main(Main.java:17)
我不是Linux人员,所以我不明白如何正确执行此命令.我也不明白它们的意思是什么,因为这是我第一次使用GPU编程.但我知道用错误的命令搞乱GPU是一个问题.
解决方法:
键入:execstack –version以检查是否已安装execstack.
如果找不到命令,请输入:sudo apt-get install execstack -y –force-yes
输入sudo execstack -c< file>
例如sudo execstack -c /usr/lib/libcuda.so