Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot launch Nvidia nsight

Initially the Java vm would not even start, but I fixed that by editing the nsight.ini file and removing

-XX:MaxPermSize=256m

and updating the

-Dosgi.requiredJavaVersion

so I now get the splash screen and can select a workspace directory.

I do so, and get a progress bar but it promptly crashes and gives no indication other than to look in the log file, the start of which says:

!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)

I installed nsight at the same time as cuda using the NVIDA .deb package repository they provide on their website.

I added it using:

dpkg -i <cuda_file>.deb

and installed using:

sudo apt update
sudo apt install cuda

Normal eclipse installations work perfectly, so any advice anyone has would be greatly appreciated!

like image 327
Ben Turner Avatar asked Dec 09 '16 20:12

Ben Turner


2 Answers

Expending on comments on Ben Turner answer, this what worked for me (Ubuntu 18.04, cuda 10.1). from this thread on Nvidia forum, just install:

sudo apt install openjdk-8-jdk

and that's it.

running from terminal:

nsight -vm /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java

and if you want to start Nsight from GUI, modify /usr/share/applications/nsight.desktop like so

Exec=/usr/local/cuda-10.1/bin/nsight -vm /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
like image 84
Haim Itzhayek Avatar answered Sep 18 '22 20:09

Haim Itzhayek


Solution summary:

Use Java 7/8, not Java 9/10/11, for Nsight Ecplipse Edition at present.

Details:

I installed the CUDA 10.0, with auto-installed Nsight 10.0 and java-11-openjdk(its java version is 10.0.2 actually), on Ubuntu 18.04, and I got this error too. Then I found when I used oracle jdk 7/8(make the link from /usr/bin/java to my oracle jdk 7/8 path), Nsight worked well, but jdk 11 not.

And by seeing your java 9 in the error log, so we should use the Java 7/8, not 9/10/11, for Nsight at present, because the Nsight Eclipse and its plugins is not up-to-date for java 9/10/11.

Notes:

You may want to change the exec cmd("Exec=/usr/local/cuda-10.0/bin/nsight") in the "/usr/share/applications/nsight.desktop", to avoid other issues for system java compatibility.

I just change the cmd to "Exec=/ddisk/program/cuda/nsight.sh", and set the java 7/8 home in the shell script, and then run the "nsight" . Because if I change the /usr/bin/java link directly on my Ubuntu 18.04, it leads the Thunderbird's secure message extension "Enigmail"(pep-json-server) to high CPU and Mem usage.

#!/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
like image 26
Pingmin Fenlly Liu Avatar answered Sep 21 '22 20:09

Pingmin Fenlly Liu