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
1
vote
2 answers

Building Mavenized jCuda with maven

Well I have installed Nvidia driver and cuda 7 successfully and already built and run many jcuda (not mavenized) projects in eclipse. But I wanted to migrate to the mavenized version one. So, I cloned this repository and tried to build it. I am on…
AmirSojoodi
  • 1,080
  • 2
  • 12
  • 31
1
vote
0 answers

Can not find native library java.nativelibJCudaDriver-linux-x86_64.so

I am trying to implement JCUDA code on Hadoop. However while running the application, it gives unsatisfied link error: can not load the native library "JCudaDriver-linux-x86_64" with base name "JCudaDriver"' I have tried added the path to the…
1
vote
1 answer

how to export CUDA (jcuda) program

I just developped my first program with JCUDA (on eclipse) and i want to execute it on other machines that don't have the same nvidia-driver and compilers i used to develop it. How can I export just the executable to another machine and execute it…
1
vote
1 answer

Is libcudpp.so missing from CUDA 7.0?

I am using jCuda and tried to compile and run one of its examples(JCudppHashSample) available on jcuda on Ubuntu 14.04 with CUDA 7.0. But at compile time the library jcudpp says that there is no libcudpp available. And I am wondering is it missing…
AmirSojoodi
  • 1,080
  • 2
  • 12
  • 31
1
vote
3 answers

Error when executing a jcuda program in eclipse

I'm new with JCuda. I try to write a simple example in Eclipse on Linux. I have this error, but I haven't understand what it means. Here the code: import jcuda.Pointer; import jcuda.runtime.JCuda; public class cudaTest { public static void…
Sam Faith
  • 175
  • 5
1
vote
0 answers

Jcuda parallelize for loop

I am a newbie in cuda for Java. I have a simple task to do: parallelize a for loop. my for loop is pretty simple, I have an array of objects and I have to perform some "evaluation" to each object in the array: for (int i=0; i < vec.length;…
Maria
  • 41
  • 4
1
vote
1 answer

What is the significance of 'sharedMemBytes' argument in kernel call cuLaunchKernel()?

I am trying to implement simple matrix multiplication program using shared memory in JCuda. Following is my JCudaSharedMatrixMul.java code: import static jcuda.driver.JCudaDriver.cuCtxCreate; import static…
sandeep.ganage
  • 1,409
  • 2
  • 21
  • 47
1
vote
1 answer

JCuda Pinned Memory Example

JCuda + GEForce Gt640 Question: I'm trying to reduce the latency associated with copying memory from Device to Host after the result has been computed by the GPU. Doing the simple Vector Add program I found that the bulk of the latency is indeed…
1
vote
1 answer

using cuda device kernel from Java?

I am using Java with Jcuda library to access CUDA.. I was able to run a simple application ( like vectorAdd).. However, the code of my Kernel stated getting very large.. is there a way to use device function in the kerenel.cu file? I knew that it is…
1
vote
1 answer

jcuda or cuda: pros and cons of over versus the other

Me mother tongue is Java (I know I know, but you can't change who you are). So I wanted to get a pros / cons of doing CUDA vs. JCUDA. I just found out there is a jcuda.org Thanks in advance.
user1172468
  • 5,306
  • 6
  • 35
  • 62
1
vote
2 answers

Nested for loop with += assignement

I have the following code in Java: float in[][] = new float[2][2]; float B[] = new float[2]; float A[] = new float[2]; float res[] = new float[A[0].length]; for(float r : res){ r = 0; } for (int i = 0; i < A[0].length; i++) { for (int j…
jlengrand
  • 12,152
  • 14
  • 57
  • 87
1
vote
1 answer

cublasSgemmBatched usage with jcuda

I've been trying to use cublasSgemmBatched() function in jcuda for matrix multiplication and I'm not sure how to properly handle pointer passing and vectors of batched matrices. I will be really thankful if someone knows how to modify my code to…
0
votes
2 answers

Can't Run JCUDA 0.4.1 Over CUDA 4.0 On Windows 7 64-bit, Sun JDK 7, and IntelliJ 11.1

The question lays out all the pertinent versions. I'm trying to run one of the sample files at http://www.jcuda.org: JCublasMatrixInvert.java. I've got the NVIDIA CUDA drivers installed; I've downloaded the JCUDA 0.4.1 bindings and added their /lib…
duffymo
  • 305,152
  • 44
  • 369
  • 561
0
votes
1 answer

CUDA kernel coredump when invoked via JCuda

I am trying to invoke a CUDA kernel that calculates a vector dot product from Java via JCuda. The kernel works fine when invoked via C++, but with JCuda, I get a coredump from libcuda.so. I've compared the C++ and Java invocations, as well as…
Richard Sand
  • 642
  • 6
  • 20
0
votes
0 answers

Why are eigenvectors computed only every other function call in Cusolver?

I'm writing a program to compare the speed of JBlas and JCublas. When I call the below function the first time, everything works fine and v contains the correct eigenvectors. When I call it a second time, it takes a lot less time to compute but only…