我尝试运行 nvvp 以在命令行中分析 cuda 代码
nvvp ./my_app
但是,我收到以下错误
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
我知道问题是 java 无法分配足够的堆来运行应用程序。根据我在 SO(以及互联网上的其他地方)中读到的有关此问题的内容,我尝试关注
java -Xmx128m nvvp ./myapp
它不能解决我的问题,我收到以下消息
Exception in thread "main" java.lang.NoClassDefFoundError: nvvp
Caused by: java.lang.ClassNotFoundException: nvvp
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
Could not find the main class: nvvp. Program will exit.