java.lang.RuntimeException: No CUDA devices were found in system

Part of pom.xml

<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<start-class>com.fusionhiring.jdasist.fh_jdassist.FhJdAssistApplication</start-class>
		<docker.image.prefix>${user.name}</docker.image.prefix>
		<java.version>1.8</java.version>
		<dl4j.version>1.0.0-M1</dl4j.version>
		<nd4j.backend>nd4j-cuda-11.0-platform</nd4j.backend>
		<logback.version>1.1.7</logback.version>
	</properties>
<dependency>
			<groupId>org.deeplearning4j</groupId>
			<artifactId>deeplearning4j-core</artifactId>
			<version>${dl4j.version}</version>
		</dependency>
		<dependency>
			<groupId>org.deeplearning4j</groupId>
			<artifactId>deeplearning4j-nlp</artifactId>
			<version>${dl4j.version}</version>
		</dependency>		
		<dependency>
		     <groupId>org.nd4j</groupId>
		      <artifactId>nd4j-cuda-11.0-platform</artifactId>
		       <version>1.0.0-M1.1</version>
		</dependency>
		<dependency>
			 <groupId>org.nd4j</groupId>
			 <artifactId>nd4j-cuda-11.0</artifactId>
			 <version>1.0.0-M1</version>
		</dependency> 
 		<dependency>
		 <groupId>org.deeplearning4j</groupId>
		 <artifactId>deeplearning4j-cuda-11.0</artifactId>
		 <version>${dl4j.version}</version>
		</dependency>

nvidia-smi
NVIDIA-SMI 470.182.03 Driver Version: 470.182.03 CUDA Version: 11.4
0 NVIDIA A100 80G…

nvidia-smi -L
GPU 0: NVIDIA A100 80GB PCIe (UUID: GPU-91af0eb3-d606-8a5c-052c-6db97b6185e6)

nvcc -V

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Thu_Jun_11_22:26:38_PDT_2020
Cuda compilation tools, release 11.0, V11.0.194
Build cuda_11.0_bu.TC445_37.28540450_0

I am always getting this while running RNN . Any help would be great at this point
Error : No CUDA devices were found in system

Log trace:

Warning: Versions of org.bytedeco:javacpp:1.5.5 and org.bytedeco:cuda:11.0-8.0-1.5.4 do not match.
java.lang.RuntimeException: No CUDA devices were found in system
at org.nd4j.linalg.jcublas.JCublasBackend.canRun(JCublasBackend.java:69)
at org.nd4j.linalg.jcublas.JCublasBackend.isAvailable(JCublasBackend.java:52)
at org.nd4j.linalg.factory.Nd4jBackend.load(Nd4jBackend.java:160)
at org.nd4j.linalg.factory.Nd4j.initContext(Nd4j.java:5092)
at org.nd4j.linalg.factory.Nd4j.(Nd4j.java:270)
at com.fusionhiring.jdasist.fh_jdassist.preprocess.FHJDVectorization.vectorizeSequences(FHJDVectorization.java:44)
at com.fusionhiring.jdasist.fh_jdassist.preprocess.FHJDGeneratorMain.getJD(FHJDGeneratorMain.java:25)
at com.fusionhiring.jdasist.fh_jdassist.preprocess.JDAssistController.getJobDescription(JDAssistController.java:14)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)

I vaguely remember that there are issues when using Spring Boot due to the way it does class loading.

How exactly are you running this?

Thanks @treo for your response.
Exactly its through spring boot.

curl -XGET “calling URL”

I mean, is it running as a single uber jar? If yes, try opening the jar with something like 7zip, and take a look inside to see if everything is in the right place. In particular if you’ll find more jar files inside, there may be problems with loading.

Yes its a uber jar, as its one small application of text generation using LSTM. The list of jars are in the below response.
In case if you know that a particular jar/jars are the problematic ones from the below list, you may let me know @treo , and i will give it a shot , removing those and checking again

videoinput-0.200-1.5.5.jar
txw2-2.3.5.jar
tomcat-embed-websocket-9.0.56.jar
tomcat-embed-el-9.0.56.jar
tomcat-embed-core-9.0.56.jar
threetenbp-1.3.3.jar
threadly-4.10.0.jar
tesseract-4.1.1-1.5.5.jar
t-digest-3.2.jar
stream-2.9.8.jar
spring-webmvc-5.3.14.jar
spring-web-5.3.14.jar
spring-tx-5.3.14.jar
spring-security-web-5.6.1.jar
spring-security-crypto-5.6.1.jar
spring-security-core-5.6.1.jar
spring-security-config-5.6.1.jar
spring-orm-5.3.14.jar
spring-jdbc-5.3.14.jar
spring-jcl-5.3.14.jar
spring-expression-5.3.14.jar
spring-data-jpa-2.6.0.jar
spring-data-commons-2.6.0.jar
spring-data-commons-2.6.0.jar
spring-context-5.3.14.jar
spring-boot-jarmode-layertools-2.6.2.jar
spring-boot-autoconfigure-2.6.2.jar
spring-boot-actuator-autoconfigure-2.6.2.jar
spring-boot-actuator-2.6.2.jar
spring-boot-2.6.2.jar
spring-beans-5.3.14.jar
spring-aspects-5.3.14.jar
spring-aop-5.3.14.jar
snakeyaml-1.29.jar
slf4j-api-1.7.32.jar
protobuf-1.0.0-M1.jar
oswego-concurrent-1.3.4.jar
oshi-json-3.4.2.jar
oshi-core-3.4.2.jar
opencv-platform-4.5.1-1.5.5.jar
opencv-platform-4.5.1-1.5.5.jar
opencv-4.5.1-1.5.5-windows-x86_64.jar
opencv-4.5.1-1.5.5-windows-x86.jar
opencv-4.5.1-1.5.5-macosx-x86_64.jar
opencv-4.5.1-1.5.5-linux-x86_64.jar
opencv-4.5.1-1.5.5-linux-x86.jar
opencv-4.5.1-1.5.5-linux-ppc64le.jar
opencv-4.5.1-1.5.5-linux-armhf.jar
opencv-4.5.1-1.5.5-linux-arm64.jar
opencv-4.5.1-1.5.5-ios-x86_64.jar
opencv-4.5.1-1.5.5-ios-arm64.jar
opencv-4.5.1-1.5.5-android-x86_64.jar
opencv-4.5.1-1.5.5-android-x86.jar
opencv-4.5.1-1.5.5-android-arm64.jar
opencv-4.5.1-1.5.5-android-arm.jar
opencsv-2.3.jar
openblas-platform-0.3.13-1.5.5.jar
openblas-0.3.13-1.5.5.jar
openblas-0.3.13-1.5.5-windows-x86_64.jar
openblas-0.3.13-1.5.5-windows-x86.jar
openblas-0.3.13-1.5.5-macosx-x86_64.jar
openblas-0.3.13-1.5.5-linux-x86_64.jar
openblas-0.3.13-1.5.5-linux-x86.jar
openblas-0.3.13-1.5.5-linux-ppc64le.jar
openblas-0.3.13-1.5.5-linux-armhf.jar
openblas-0.3.13-1.5.5-linux-arm64.jar
openblas-0.3.13-1.5.5-ios-x86_64.jar
openblas-0.3.13-1.5.5-ios-x86_64.jar
openblas-0.3.13-1.5.5-android-x86_64.jar
openblas-0.3.13-1.5.5-android-x86.jar
openblas-0.3.13-1.5.5-android-arm64.jar
openblas-0.3.13-1.5.5-android-arm.jar
neoitertools-1.0.0.jar
nd4j-native-api-1.0.0-M1.jar
nd4j-cuda-11.0-preset-1.0.0-M1.jar
nd4j-cuda-11.0-preset-1.0.0-M1-windows-x86_64.jar
nd4j-cuda-11.0-platform-1.0.0-M1.1.jar
nd4j-cuda-11.0-1.0.0-M1.jar
nd4j-cuda-11.0-1.0.0-M1.1-windows-x86_64.jar
nd4j-cuda-11.0-1.0.0-M1.1-linux-x86_64.jar
nd4j-common-1.0.0-M1.jar
nd4j-api-1.0.0-M1.jar
micrometer-core-1.8.1.jar
logback-core-1.1.7.jar
logback-classic-1.1.7.jar
log4j-to-slf4j-2.17.0.jar
log4j-api-2.17.0.jar
librealsense2-2.40.0-1.5.5.jar
librealsense-1.12.4-1.5.5.jar
libfreenect2-0.2.0-1.5.5.jar
libfreenect-0.5.7-1.5.5.jar
libdc1394-2.2.6-1.5.5.jar
leptonica-platform-1.80.0-1.5.5.jar
leptonica-1.80.0-1.5.5.jar
leptonica-1.80.0-1.5.5-windows-x86_64.jar
leptonica-1.80.0-1.5.5-windows-x86.jar
leptonica-1.80.0-1.5.5-macosx-x86_64.jar
leptonica-1.80.0-1.5.5-linux-x86_64.jar
leptonica-1.80.0-1.5.5-linux-x86.jar
leptonica-1.80.0-1.5.5-linux-ppc64le.jar
leptonica-1.80.0-1.5.5-linux-armhf.jar
leptonica-1.80.0-1.5.5-linux-arm64.jar
leptonica-1.80.0-1.5.5-android-x86_64.jar
leptonica-1.80.0-1.5.5-android-x86.jar
leptonica-1.80.0-1.5.5-android-arm64.jar
leptonica-1.80.0-1.5.5-android-arm.jar
LatencyUtils-2.0.3.jar
jul-to-slf4j-1.7.32.jar
joda-time-2.2.jar
jna-platform-4.3.0.jar
jna-4.3.0.jar
jfasttext-0.4.jar
jboss-logging-3.4.2.Final.jar
jaxb-runtime-2.3.5.jar
javax.json-1.0.4.jar
javacv-1.5.5.jar
javacpp-platform-1.5.5.jar
javacpp-1.5.5.jar
javacpp-1.5.5-windows-x86_64.jar
javacpp-1.5.5-windows-x86.jar
javacpp-1.5.5-macosx-x86_64.jar
javacpp-1.5.5-macosx-arm64.jar
javacpp-1.5.5-linux-x86_64.jar
javacpp-1.5.5-linux-x86.jar
javacpp-1.5.5-linux-ppc64le.jar
javacpp-1.5.5-linux-armhf.jar
javacpp-1.5.5-linux-arm64.jar
javacpp-1.5.5-ios-x86_64.jar
javacpp-1.5.5-ios-arm64.jar
javacpp-1.5.5-android-x86_64.jar
javacpp-1.5.5-android-x86.jar
javacpp-1.5.5-android-arm64.jar
javacpp-1.5.5-android-arm.jar
jandex-2.2.3.Final.jar
jakarta.xml.bind-api-2.3.3.jar
jakarta.transaction-api-1.3.3.jar
jakarta.persistence-api-2.2.3.jar
jakarta.annotation-api-1.3.5.jar
jakarta.activation-api-1.2.2.jar
jakarta.activation-1.2.2.jar
jai-imageio-core-1.3.0.jar
jackson-module-parameter-names-2.13.1.jar
jackson-datatype-jsr310-2.13.1.jar
jackson-datatype-jdk8-2.13.1.jar
jackson-databind-2.13.1.jar
jackson-core-2.13.1.jar
jackson-annotations-2.13.1.jar
jackson-annotations-2.13.1.jar
istack-commons-runtime-3.0.12.jar
imageio-tiff-3.1.1.jar
imageio-psd-3.1.1.jar
imageio-metadata-3.1.1.jar
imageio-jpeg-3.1.1.jar
imageio-core-3.1.1.jar
imageio-bmp-3.1.1.jar
HikariCP-4.0.3.jar
hibernate-core-5.6.3.Final.jar
hibernate-commons-annotations-5.1.2.Final.jar
HdrHistogram-2.1.12.jar
hdf5-platform-1.12.0-1.5.5.jar
hdf5-1.12.0-1.5.5.jar
hdf5-1.12.0-1.5.5-windows-x86_64.jar
hdf5-1.12.0-1.5.5-windows-x86.jar
hdf5-1.12.0-1.5.5-macosx-x86_64.jar
hdf5-1.12.0-1.5.5-linux-x86_64.jar
hdf5-1.12.0-1.5.5-linux-x86.jar
hdf5-1.12.0-1.5.5-linux-ppc64le.jar
hdf5-1.12.0-1.5.5-linux-armhf.jar
hdf5-1.12.0-1.5.5-linux-arm64.jar
h2-1.4.200.jar
guava-1.0.0-M1.jar
gson-2.8.9.jar
freemarker-2.3.31.jar
flycapture-2.13.3.31-1.5.5.jar
flatbuffers-java-1.10.0.jar
flandmark-1.07-1.5.5.jar
ffmpeg-platform-4.3.2-1.5.5.jar
ffmpeg-4.3.2-1.5.5.jar
ffmpeg-4.3.2-1.5.5-windows-x86_64.jar
ffmpeg-4.3.2-1.5.5-windows-x86.jar
ffmpeg-4.3.2-1.5.5-macosx-x86_64.jar
ffmpeg-4.3.2-1.5.5-linux-x86_64.jar
ffmpeg-4.3.2-1.5.5-linux-x86.jar
ffmpeg-4.3.2-1.5.5-linux-ppc64le.jar
ffmpeg-4.3.2-1.5.5-linux-armhf.jar
ffmpeg-4.3.2-1.5.5-linux-arm64.jar
ffmpeg-4.3.2-1.5.5-android-x86_64.jar
ffmpeg-4.3.2-1.5.5-android-x86.jar
ffmpeg-4.3.2-1.5.5-android-arm64.jar
ffmpeg-4.3.2-1.5.5-android-arm.jar
fastutil-6.5.7.jar
deeplearning4j-utility-iterators-1.0.0-M1.jar
deeplearning4j-ui-components-1.0.0-M1.jar
deeplearning4j-nn-1.0.0-M1.jar
deeplearning4j-nlp-1.0.0-M1.jar
deeplearning4j-modelimport-1.0.0-M1.jar
deeplearning4j-datavec-iterators-1.0.0-M1.jar
deeplearning4j-datasets-1.0.0-M1.jar
deeplearning4j-cuda-11.0-1.0.0-M1.jar
deeplearning4j-core-1.0.0-M1.jar
deeplearning4j-common-1.0.0-M1.jar
datavec-data-image-1.0.0-M1.jar
datavec-api-1.0.0-M1.jar
cuda-platform-redist-11.0-8.0-1.5.4.jar
cuda-platform-11.0-8.0-1.5.4.jar
cuda-11.0-8.0-1.5.4.jar
cuda-11.0-8.0-1.5.4-windows-x86_64.jar
cuda-11.0-8.0-1.5.4-windows-x86_64-redist.jar
cuda-11.0-8.0-1.5.4-linux-x86_64.jar
cuda-11.0-8.0-1.5.4-linux-x86_64-redist.jar
cuda-11.0-8.0-1.5.4-linux-ppc64le.jar
cuda-11.0-8.0-1.5.4-linux-ppc64le-redist.jar
commons-net-3.1.jar
commons-math3-3.5.jar
commons-lang3-3.12.0.jar
commons-lang-2.6.jar
commons-io-2.5.jar
commons-compress-1.18.jar
commons-collections4-4.1.jar
commons-codec-1.15.jar
common-lang-3.1.1.jar
common-io-3.1.1.jar
common-image-3.1.1.jar
classmate-1.5.1.jar
byteunits-0.9.1.jar
byte-buddy-1.11.22.jar
aspectjweaver-1.9.7.jar
artoolkitplus-2.3.1-1.5.5.jar
antlr-2.7.7.jar
android-json-0.0.20131108.vaadin1.jar

The problem isn’t the jars itself, but how spring boot packages and then loads things.

The only thing I can suggest is that you look into an alternative way to package the application.

See: The Executable Jar Format

1 Like

Will give it a try. Will run a normal java jar and then try. Thanks @treo for a way out !