无法启动 Nvidia nsight
Cannot launch Nvidia nsight
最初 Java 虚拟机甚至无法启动,但我通过编辑 nsight.ini 文件并删除
解决了这个问题
-XX:MaxPermSize=256m
并更新
-Dosgi.requiredJavaVersion
所以我现在得到启动画面并且可以select一个工作区目录。
我这样做了,并得到了一个进度条,但它很快就崩溃了,除了查看日志文件外没有任何指示,日志文件的开头写着:
!SESSION 2016-12-09 20:30:40.686 -----------------------------------------------
eclipse.buildId=unknown
java.version=9-internal
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB
Command-line arguments: -os linux -ws gtk -arch x86_64
!ENTRY com.nvidia.cuda.ide.build 4 0 2016-12-09 20:30:46.292
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: com.nvidia.cuda.ide.build [9]
Unresolved requirement: Require-Bundle: org.eclipse.cdt.managedbuilder.core
-> Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.core; bundle-version="8.3.0.201409172108"; singleton:="true"
org.eclipse.cdt.managedbuilder.core [108]
Unresolved requirement: Require-Bundle: org.eclipse.cdt.core; bundle-version="[5.0.0,6.0.0)"
-> Bundle-SymbolicName: org.eclipse.cdt.core; bundle-version="5.7.0.nvidia-qualifier"; singleton:="true"
org.eclipse.cdt.core [88]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.7))"
at org.eclipse.osgi.container.Module.start(Module.java:434)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
!ENTRY com.nvidia.cuda.ide.cdt 4 0 2016-12-09 20:30:46.294
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: com.nvidia.cuda.ide.cdt [10]
Unresolved requirement: Require-Bundle: org.eclipse.cdt.managedbuilder.core; bundle-version="8.0.0"
-> Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.core; bundle-version="8.3.0.201409172108"; singleton:="true"
org.eclipse.cdt.managedbuilder.core [108]
Unresolved requirement: Require-Bundle: org.eclipse.cdt.core; bundle-version="[5.0.0,6.0.0)"
-> Bundle-SymbolicName: org.eclipse.cdt.core; bundle-version="5.7.0.nvidia-qualifier"; singleton:="true"
org.eclipse.cdt.core [88]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.7))"
at org.eclipse.osgi.container.Module.start(Module.java:434)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
!ENTRY com.nvidia.cuda.ide.debug 4 0 2016-12-09 20:30:46.297
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: com.nvidia.cuda.ide.debug [11]
Unresolved requirement: Require-Bundle: org.eclipse.cdt.core; bundle-version="5.3.0"
-> Bundle-SymbolicName: org.eclipse.cdt.core; bundle-version="5.7.0.nvidia-qualifier"; singleton:="true"
org.eclipse.cdt.core [88]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.7))"
at org.eclipse.osgi.container.Module.start(Module.java:434)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
!ENTRY com.nvidia.cuda.ide.editor 4 0 2016-12-09 20:30:46.309
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: com.nvidia.cuda.ide.editor [12]
Unresolved requirement: Require-Bundle: org.eclipse.cdt.ui; bundle-version="[5.8.0.nvidia,5.8.1)"
-> Bundle-SymbolicName: org.eclipse.cdt.ui; bundle-version="5.8.0.nvidia-qualifier"; singleton:="true"
org.eclipse.cdt.ui [111]
Unresolved requirement: Require-Bundle: org.eclipse.cdt.core; bundle-version="[5.2.0,6.0.0)"
-> Bundle-SymbolicName: org.eclipse.cdt.core; bundle-version="5.7.0.nvidia-qualifier"; singleton:="true"
org.eclipse.cdt.core [88]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.7))"
at org.eclipse.osgi.container.Module.start(Module.java:434)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
!ENTRY com.nvidia.cuda.ide.remote 4 0 2016-12-09 20:30:46.311
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: com.nvidia.cuda.ide.remote [13]
Unresolved requirement: Import-Package: org.eclipse.remote.core
-> Export-Package: org.eclipse.remote.core; bundle-symbolic-name="org.eclipse.remote.core"; bundle-version="1.0.0.201409111520"; version="0.0.0"
org.eclipse.remote.core [263]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.7))"
at org.eclipse.osgi.container.Module.start(Module.java:434)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
我使用他们在其网站上提供的 NVIDA .deb 软件包存储库与 cuda 同时安装了 nsight。
我添加它使用:
dpkg -i <cuda_file>.deb
并安装使用:
sudo apt update
sudo apt install cuda
正常的 eclipse 安装工作完美,所以任何人的任何建议都将不胜感激!
事实证明,openjdk-8-jdk 包并不是使用 nsight 所需要的。
您需要安装 oracle-java8-installer:
sudo apt install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt update
sudo apt install oracle-java8-installer
完成后,nsight 奇迹般地活了过来!
解决方案总结:
目前 Nsight Eclipse 版本使用 Java 7/8,而不是 Java 9/10/11。
详情:
我安装了 CUDA 10.0,自动安装了 Nsight 10.0 和 java-11-openjdk(它的 java 版本实际上是 10.0.2),在 Ubuntu 18.04,我也遇到了这个错误。然后我发现当我使用 oracle jdk 7/8(使 link 从 /usr/bin/java 到我的 oracle jdk 7/8 路径)时,Nsight 运行良好,但是 jdk11不。
并且通过在错误日志中看到您的 java 9,所以我们目前应该为 Nsight 使用 Java 7/8,而不是 9/10/11,因为 Nsight Eclipse并且它的插件不是 java 9/10/11 的最新版本。
备注:
您可能需要更改“/usr/share/applications/nsight.desktop”中的 exec cmd("Exec=/usr/local/cuda-10.0/bin/nsight"),以避免系统 java 兼容性的其他问题。
我只是把cmd改成"Exec=/ddisk/program/cuda/nsight.sh",然后在shell脚本里设置java 7/8 home,然后运行 "nsight" 。因为如果我直接在 Ubuntu 18.04 上更改 /usr/bin/java link,它会导致 Thunderbird 的安全消息扩展 "Enigmail"(pep-json-server) 变高CPU 和内存使用情况。
#!/bin/bash
# nsight.sh
# Java paths.
# NOTE: We should use java 7 or 8 for Nsight Eclipse Edition 10.0.
#export JAVA_HOME=/ddisk/program/java/latest
export JAVA_HOME=/ddisk/program/java/java7
#export JAVA_HOME=/ddisk/program/java/java8
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=$JAVA_HOME/lib:$JRE_HOME/lib:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar
export PATH=$JAVA_HOME/bin:$PATH
# Run the Nsight Eclipse.
#nsight
/usr/local/cuda/bin/nsight
扩展对 Ben Turner 答案的评论,这对我有用(Ubuntu 18.04,cuda 10.1)。来自 Nvidia 论坛上的 this 线程,只需安装:
sudo apt install openjdk-8-jdk
就是这样。
运行 来自终端:
nsight -vm /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
如果您想从 GUI 启动 Nsight,请像这样修改 /usr/share/applications/nsight.desktop
Exec=/usr/local/cuda-10.1/bin/nsight -vm /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
最初 Java 虚拟机甚至无法启动,但我通过编辑 nsight.ini 文件并删除
解决了这个问题-XX:MaxPermSize=256m
并更新
-Dosgi.requiredJavaVersion
所以我现在得到启动画面并且可以select一个工作区目录。
我这样做了,并得到了一个进度条,但它很快就崩溃了,除了查看日志文件外没有任何指示,日志文件的开头写着:
!SESSION 2016-12-09 20:30:40.686 -----------------------------------------------
eclipse.buildId=unknown
java.version=9-internal
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB
Command-line arguments: -os linux -ws gtk -arch x86_64
!ENTRY com.nvidia.cuda.ide.build 4 0 2016-12-09 20:30:46.292
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: com.nvidia.cuda.ide.build [9]
Unresolved requirement: Require-Bundle: org.eclipse.cdt.managedbuilder.core
-> Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.core; bundle-version="8.3.0.201409172108"; singleton:="true"
org.eclipse.cdt.managedbuilder.core [108]
Unresolved requirement: Require-Bundle: org.eclipse.cdt.core; bundle-version="[5.0.0,6.0.0)"
-> Bundle-SymbolicName: org.eclipse.cdt.core; bundle-version="5.7.0.nvidia-qualifier"; singleton:="true"
org.eclipse.cdt.core [88]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.7))"
at org.eclipse.osgi.container.Module.start(Module.java:434)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
!ENTRY com.nvidia.cuda.ide.cdt 4 0 2016-12-09 20:30:46.294
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: com.nvidia.cuda.ide.cdt [10]
Unresolved requirement: Require-Bundle: org.eclipse.cdt.managedbuilder.core; bundle-version="8.0.0"
-> Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.core; bundle-version="8.3.0.201409172108"; singleton:="true"
org.eclipse.cdt.managedbuilder.core [108]
Unresolved requirement: Require-Bundle: org.eclipse.cdt.core; bundle-version="[5.0.0,6.0.0)"
-> Bundle-SymbolicName: org.eclipse.cdt.core; bundle-version="5.7.0.nvidia-qualifier"; singleton:="true"
org.eclipse.cdt.core [88]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.7))"
at org.eclipse.osgi.container.Module.start(Module.java:434)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
!ENTRY com.nvidia.cuda.ide.debug 4 0 2016-12-09 20:30:46.297
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: com.nvidia.cuda.ide.debug [11]
Unresolved requirement: Require-Bundle: org.eclipse.cdt.core; bundle-version="5.3.0"
-> Bundle-SymbolicName: org.eclipse.cdt.core; bundle-version="5.7.0.nvidia-qualifier"; singleton:="true"
org.eclipse.cdt.core [88]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.7))"
at org.eclipse.osgi.container.Module.start(Module.java:434)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
!ENTRY com.nvidia.cuda.ide.editor 4 0 2016-12-09 20:30:46.309
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: com.nvidia.cuda.ide.editor [12]
Unresolved requirement: Require-Bundle: org.eclipse.cdt.ui; bundle-version="[5.8.0.nvidia,5.8.1)"
-> Bundle-SymbolicName: org.eclipse.cdt.ui; bundle-version="5.8.0.nvidia-qualifier"; singleton:="true"
org.eclipse.cdt.ui [111]
Unresolved requirement: Require-Bundle: org.eclipse.cdt.core; bundle-version="[5.2.0,6.0.0)"
-> Bundle-SymbolicName: org.eclipse.cdt.core; bundle-version="5.7.0.nvidia-qualifier"; singleton:="true"
org.eclipse.cdt.core [88]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.7))"
at org.eclipse.osgi.container.Module.start(Module.java:434)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
!ENTRY com.nvidia.cuda.ide.remote 4 0 2016-12-09 20:30:46.311
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: com.nvidia.cuda.ide.remote [13]
Unresolved requirement: Import-Package: org.eclipse.remote.core
-> Export-Package: org.eclipse.remote.core; bundle-symbolic-name="org.eclipse.remote.core"; bundle-version="1.0.0.201409111520"; version="0.0.0"
org.eclipse.remote.core [263]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.7))"
at org.eclipse.osgi.container.Module.start(Module.java:434)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
我使用他们在其网站上提供的 NVIDA .deb 软件包存储库与 cuda 同时安装了 nsight。
我添加它使用:
dpkg -i <cuda_file>.deb
并安装使用:
sudo apt update
sudo apt install cuda
正常的 eclipse 安装工作完美,所以任何人的任何建议都将不胜感激!
事实证明,openjdk-8-jdk 包并不是使用 nsight 所需要的。
您需要安装 oracle-java8-installer:
sudo apt install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt update
sudo apt install oracle-java8-installer
完成后,nsight 奇迹般地活了过来!
解决方案总结:
目前 Nsight Eclipse 版本使用 Java 7/8,而不是 Java 9/10/11。
详情:
我安装了 CUDA 10.0,自动安装了 Nsight 10.0 和 java-11-openjdk(它的 java 版本实际上是 10.0.2),在 Ubuntu 18.04,我也遇到了这个错误。然后我发现当我使用 oracle jdk 7/8(使 link 从 /usr/bin/java 到我的 oracle jdk 7/8 路径)时,Nsight 运行良好,但是 jdk11不。
并且通过在错误日志中看到您的 java 9,所以我们目前应该为 Nsight 使用 Java 7/8,而不是 9/10/11,因为 Nsight Eclipse并且它的插件不是 java 9/10/11 的最新版本。
备注:
您可能需要更改“/usr/share/applications/nsight.desktop”中的 exec cmd("Exec=/usr/local/cuda-10.0/bin/nsight"),以避免系统 java 兼容性的其他问题。
我只是把cmd改成"Exec=/ddisk/program/cuda/nsight.sh",然后在shell脚本里设置java 7/8 home,然后运行 "nsight" 。因为如果我直接在 Ubuntu 18.04 上更改 /usr/bin/java link,它会导致 Thunderbird 的安全消息扩展 "Enigmail"(pep-json-server) 变高CPU 和内存使用情况。
#!/bin/bash
# nsight.sh
# Java paths.
# NOTE: We should use java 7 or 8 for Nsight Eclipse Edition 10.0.
#export JAVA_HOME=/ddisk/program/java/latest
export JAVA_HOME=/ddisk/program/java/java7
#export JAVA_HOME=/ddisk/program/java/java8
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=$JAVA_HOME/lib:$JRE_HOME/lib:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar
export PATH=$JAVA_HOME/bin:$PATH
# Run the Nsight Eclipse.
#nsight
/usr/local/cuda/bin/nsight
扩展对 Ben Turner 答案的评论,这对我有用(Ubuntu 18.04,cuda 10.1)。来自 Nvidia 论坛上的 this 线程,只需安装:
sudo apt install openjdk-8-jdk
就是这样。
运行 来自终端:
nsight -vm /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
如果您想从 GUI 启动 Nsight,请像这样修改 /usr/share/applications/nsight.desktop
Exec=/usr/local/cuda-10.1/bin/nsight -vm /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java