java - 命令行中的 nvvp

标签 java cuda profiler

我尝试运行 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.

最佳答案

以下内容适用于我的案例

setenv_JAVA_OPTIONS“-Xms512m -Xmx1024m”

然而,_JAVA_OPTIONS 似乎可以在不同的系统中拥有多个名称,因此在使用它之前先找到正确的名称。当它选择正确的变量时,它显示以下内容

nvvp ./cb_dgemm_prof
Picked up _JAVA_OPTIONS: -Xms512m -Xmx1024m

如果变量设置不正确,您可能看不到上面的行。

关于java - 命令行中的 nvvp,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19663179/

相关文章:

c++ - 缓存和内存总线性能的工具或代码

node.js - 如何读取 nodejs 内部分析器滴答处理器输出

java - 在使用海量数据的同时使用 Hashmaps 和 ArrayLists 有多糟糕?

java - Apache POI : Getting wrong number/string values reading from xlsx while xls is workfing fine

java - SimpleDateFormat 在格式化为字符串时添加随机毫秒

矩阵批量乘法的Cuda程序

java - 有没有类似 Spring TestExecutionListener for TestSuite 的东西?

c++ - 哪个 Nsight 版本可以在 Visual Studio 2010 中使用 CUDA 5.5?

python - 通过 ssh 连接在 Cuda 设备上使用 NumbaPro

javascript - 我如何分析线程化的 javascript?