Skip to content

Instantly share code, notes, and snippets.

@kkaarrss
Last active August 3, 2019 23:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kkaarrss/77e73f98af0481f28b693a94d900a5ff to your computer and use it in GitHub Desktop.
Save kkaarrss/77e73f98af0481f28b693a94d900a5ff to your computer and use it in GitHub Desktop.
NoAvailableBackendException: Please ensure that you have an nd4j backend on your classpath
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.deeplearning4j.nn.conf.NeuralNetConfiguration$Builder.seed(NeuralNetConfiguration.java:671)
at Trainer.TrainerImpl.main(TrainerImpl.java:54)
Caused by: java.lang.RuntimeException: org.nd4j.linalg.factory.Nd4jBackend$NoAvailableBackendException: Please ensure that you have an nd4j backend on your classpath. Please see: http://nd4j.org/getstarted.html
at org.nd4j.linalg.factory.Nd4j.initContext(Nd4j.java:5768)
at org.nd4j.linalg.factory.Nd4j.<clinit>(Nd4j.java:202)
... 2 more
Caused by: org.nd4j.linalg.factory.Nd4jBackend$NoAvailableBackendException: Please ensure that you have an nd4j backend on your classpath. Please see: http://nd4j.org/getstarted.html
at org.nd4j.linalg.factory.Nd4jBackend.load(Nd4jBackend.java:213)
at org.nd4j.linalg.factory.Nd4j.initContext(Nd4j.java:5765)
... 3 more
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<slf4j.version>1.7.21</slf4j.version>
<spark.version>2.1.0</spark.version>
<guava.version>23.0</guava.version>
<jfreechart.version>1.0.19</jfreechart.version>
</properties>
<parent>
<groupId>Crypto</groupId>
<artifactId>Trader</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>primary-source</artifactId>
<packaging>jar</packaging>
<name>core project classes</name>
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.deeplearning4j</groupId>
<artifactId>deeplearning4j-core</artifactId>
<version>1.0.0-beta4</version>
</dependency>
<dependency>
<groupId>org.nd4j</groupId>
<artifactId>nd4j-cuda-9.2-platform</artifactId>
<version>1.0.0-beta4</version>
</dependency>
<!--dependency>
<groupId>org.nd4j</groupId>
<artifactId>nd4j-native-platform</artifactId>
<version>1.0.0-beta4</version>
</dependency-->
<dependency>
<groupId>org.deeplearning4j</groupId>
<artifactId>deeplearning4j-cuda-9.2</artifactId>
<version>1.0.0-beta4</version>
</dependency>
<dependency>
<groupId>org.datavec</groupId>
<artifactId>datavec-jdbc</artifactId>
<version>1.0.0-beta4</version>
</dependency>
<dependency>
<groupId>me.joshmcfarlin</groupId>
<artifactId>CryptoCompareAPI</artifactId>
<version>master-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.github.jeffreytai</groupId>
<artifactId>cryptocompare-api-wrapper</artifactId>
<version>1.0.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-web -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>5.1.8.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.9.1</version>
</dependency>
<dependency>
<groupId>com.squareup.retrofit2</groupId>
<artifactId>retrofit</artifactId>
<version>2.5.0</version>
</dependency>
<dependency>
<groupId>com.squareup.retrofit2</groupId>
<artifactId>converter-jackson</artifactId>
<version>2.5.0</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-sql_2.10</artifactId>
<version>${spark.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-mllib_2.10</artifactId>
<version>${spark.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.10</artifactId>
<version>${spark.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jfree</groupId>
<artifactId>jfreechart</artifactId>
<version>${jfreechart.version}</version>
</dependency>
<!-- Guava dependency -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<minmemory>128m</minmemory>
<maxmemory>512m</maxmemory>
</configuration>
</plugin>
</plugins>
</build>
</project>
@kkaarrss
Copy link
Author

kkaarrss commented Aug 3, 2019

RIP

2019-08-03 19_18_36-Administrator_ C__Windows_system32_cmd exe

@kkaarrss
Copy link
Author

kkaarrss commented Aug 3, 2019

Manually looked for the latest driver for the GTX 460 on the NVIDIA website. 391.35 is actually the last one from march 2018. Downloaded and installed it anyway. Also cleaned out the .javacpp folder in the user directory, which had some related stuff in it. Driver DLL version in CUDA-Z showed exactly the same version as before. In the end the same error occurs:

2019-08-03 19_32_54-NVIDIA installatieprogramma
2019-08-03 19_38_40-CUDA-Z 0 10 251 32 bit
2019-08-03 19_44_30-Administrator_ C__Windows_system32_cmd exe

Time for some meditation before the computer goes flying out of the window.

@kkaarrss
Copy link
Author

kkaarrss commented Aug 3, 2019

Compiling with Java 8 instead of Java 7: doesn't help.

@kkaarrss
Copy link
Author

kkaarrss commented Aug 3, 2019

I think there is my problem. The cuda driver is throwing errors. Guess I was under the false impression that CUDA-Z means everything is fine with the driver. Apparently the driver is too old but because there is no newer one Guess I will need to switch to an even older cuda then 9.2.

2019-08-04 00_27_06-Administrator_ C__Windows_system32_cmd exe

@kkaarrss
Copy link
Author

kkaarrss commented Aug 3, 2019

Downgrading to cuda 8.0 did the trick. But now ND4J just straight up tells me: CUDA backend requires compute capatibility of 3.0 and above to run.

Card is simply too old. I'll play around with downgrading cuda as well, because after all this time i would like to see it actually run something.. probably slower then the CPU anyway.

2019-08-04 01_26_02-Administrator_ C__Windows_system32_cmd exe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment