Questions tagged [jcuda]

Java bindings for the CUDA runtime and driver API. The JCuda Runtime API is mainly intended for the interaction with the Java bindings of the the CUDA Runtime libraries, like JCublas and JCufft instead of creating own kernels. Own CUDA kernels can be launched in JCuda using the Driver API.

With JCuda it is possible to interact with the CUDA runtime and driver API from Java programs. JCuda is the common platform for libraries such as JCublas, JCufft, JCudpp, JCurand and JCusparse. The JCuda Runtime API is mainly intended for the interaction with the Java bindings of the the CUDA Runtime libraries as mentioned above instead of creating own kernels. Java program cannot be compiled using NVCC(NVIDIA CUDA Compiler), hence own CUDA kernels can be launched in JCuda using the Driver API.

For Jcuda to work the CUDA driver and toolkit has to be first installed from http://developer.nvidia.com/cuda-toolkit-archive based on the desired version that suits your GPU. Then Jcuda can be downloaded from http://www.jcuda.org/downloads/downloads.html. Set the jar files location to the CLASSPATH (either a path that is java.library.path for the JVM, or the root directory of project).

Useful links

78 questions
0
votes
1 answer

How to execute this same function on CPU and GPU with JCuda

I work on the code from JCuda documentation. Currently, it's just adding vectors on GPU. What should I do to reuse function add on CPU (host)? I know that, I have to change __global__ to __host__ __device__ but I have no idea how can I call it in…
wwilkowski
  • 341
  • 4
  • 14
0
votes
0 answers

Error occurred during initialization of boot layer java.lang.module.ResolutionException: Module A contains package B, module B exports package B to A

I'm migrating my app from Java 1.8 to Java 11, got the following error on one of my external jar at runtime. Error occurred during initialization of boot layer java.lang.module.ResolutionException: Module image.viewer contains package jcuda,…
Aqeel Haider
  • 603
  • 7
  • 24
0
votes
1 answer

No JCudaRuntime-0.9.2-windows-x86_64 in java.library.path when trying to run JCuda sample

I have imported the following libraries in Gradle: compile group: 'org.jcuda', name: 'jcuda-natives', version: '0.9.2' compile group: 'org.jcuda', name: 'jcublas-natives', version: '0.9.2' compile group: 'org.jcuda', name: 'jcublas', version:…
Dims
  • 47,675
  • 117
  • 331
  • 600
0
votes
1 answer

cuCtxCreate fails if NVIDIA control panel sets optimization for computing

I run CUDA through JCuda API. When I use NVIDIA control panel to set optimization for computing (that is off by default) for participating JVM executable (java.exe), the program fails to create context in the call to cuCtxCreate. For optimization…
0
votes
1 answer

JCuda access violation when creating a texture object with the driver API

I have a JCuda project that's encountering an access violation whenever it tries to create a texture object using the driver API. Java HotSpot claims that the error is coming from nvcuda.dll. The underlying CUarray from which the texture is being…
cfuqua
  • 3
  • 2
0
votes
1 answer

"CUDA_ERROR_ILLEGAL_ADDRESS" when executing cuCtxSynchronize() in JCUDA

I am learning JCuda and studying with JCuda samples. When I studied a KMeans algorithm code using JCuda, I got a "CUDA_ERROR_ILLEGAL_ADDRESS" when executed line cuCtxSynchronize(); It confused me a lot. How can I solve it? Here is KMeansKernel.cu…
Andrew Lee
  • 75
  • 6
0
votes
1 answer

How to get CUDA event starting and ending time without using nvprof

I wrote some Java code that uses JCuda to execute some CUDA kernels. I would like to profile the application in order to understand how streams are overlapped and whatnot. I am able to use cuda event calls such as cudaEventElpasedTime to get the…
Xiangyu
  • 824
  • 9
  • 34
0
votes
1 answer

CUDA out of memory message after using just ~2.2GB of memory on a GTX1080

I'm doing matrix multiplication on a GTX1080 GPU using JCuda, version 0.8.0RC with CUDA 8.0. I load two matrices A and B into the device in row-major vector form, and read the product matrix from the device. But I'm finding that I run out of device…
Nicholas Newell
  • 97
  • 1
  • 1
  • 5
0
votes
0 answers

Error while doing jcuda addition program

I am novice to jCUDA. I am trying to compile a vector addition program from NVIDIA samples using eclipse on windows. Here is my program: import static jcuda.driver.JCudaDriver.*; import java.io.*; import jcuda.*; import jcuda.driver.*; /** * This…
Rupali
  • 1
  • 2
0
votes
0 answers

JCusolverSp_LinearSolver_Direct cannot compile with JCuda 0.7.5 or 0.7

On http://www.jcuda.org/samples/samples.html, currently there is JCusolverSamples20151013.zip for download. It seems that a current version of jcuda like 0.7.5 or 0.7 fits it. However, JCusolverSp_LinearSolver_Direct.java, one of the two java…
Tom
  • 3,168
  • 5
  • 27
  • 36
0
votes
1 answer

CUDA_ERROR_ILLEGAL_ADDRESS when accessing variables in CUDA kernel

I'm getting a CUDA_ERROR_ILLEGAL_ADDRESS exception when trying to run a kernel used for calculating Buddhabrot fractal orbits. extern "C" __global__ void exec(int iterations, int size, float* inputR, float* inputI, //…
Marv
  • 3,517
  • 2
  • 22
  • 47
0
votes
1 answer

In Hadoop-2.6.0, container was killed for not enough virtual memory

I am trying to implement jcuda code on hadoop,and it worked in local mode,but when I run the job on hadoop cluster,it gives me a error:the container was killed here is the specific error report: 16/04/29 10:18:07 INFO mapreduce.Job: Task Id :…
xiadc
  • 23
  • 3
0
votes
0 answers

Debugging CUDA with memcheck, using the JCuda wrapper

I am working on an image segmentation program which uses JCuda. The project is a Maven project, the dependencies for JCuda however are stored in dll files and are not managed with maven. Since I got a runtime error in my Cuda kernel (*.ptx), which…
Mr M
  • 69
  • 8
0
votes
1 answer

JCuda global shared memory causing errors

I'm trying to do something very very simple with shared memory in jcuda. My kernel: __shared__ int testMe; extern "C" __global__ void test() { testMe = 5; } Making shared memory global allows me to use it in device functions, unfortunately, I…
Dr.Knowitall
  • 10,080
  • 23
  • 82
  • 133
0
votes
1 answer

How can I pass a struct to a kernel in JCuda

I have already looked at this http://www.javacodegeeks.com/2011/10/gpgpu-with-jcuda-good-bad-and-ugly.html which says I must modify my kernel to take only single dimensional arrays. However I refuse to believe that it is impossible to create a…
Dr.Knowitall
  • 10,080
  • 23
  • 82
  • 133