Which libraries to include in IntelliJ

Hi guys,

This is probably a stupid question, but I have been having a lot of trouble with it so here goes. I’m working on a project in which I need to be using JCUDA libraries to write software, the only thing is, I am not sure which libraries/jar files I need to import into my IDE to successfully utilize JCUDA. I am using the IntelliJ JAVA IDE if that’s any help to anyone, and am willing to switch over to a different IDE (Eclipse/NetBeans) if it is any simpler. I already have CUDA lab installed on my pc and have ensured that CUDA is working successfully with the card I have installed (NVIDIA Tesla c2070). Can anyone here offer me any assistance in solving this issue?

Hello

It’s not entirely clear whether this question is about JARs in general, or the native libraries, or how to add them in IntelliJ in particular. But in general: You could basically add all JARs from the download package - but depending on what exactly you want to do, you won’t necessarily need them all.

In any case, you’ll need the main “jcuda” JAR (currently “jcuda-0.7.5b.jar”), and the corresponding “JCudaDriver” and “JCudaRuntime” native library.

Then, if you want to use CUBLAS, CUFFT, CURAND, CUSPARSE or CUSOLVER, you need the corresponding “jcublas”, “jcufft”, “jcurand”, “jcusparse” and “jcusolver” JAR and native library, respectively.

bye
Marco

Thanks for the response, I was more concerned with how to add the jar files and the native libraries into IntelliJ in particular, so I can utilize them in my project. I looked through the install of Jcuda that I got from (jcuda.org - Downloads) and I cant seem find what I actually need to be including.

Admittedly, I haven’t used IntelliJ IDEA myself, but adding JARs should be a rather standard thing in every IDE. Doesn’t something like
java - Correct way to add external jars (lib/*.jar) to an IntelliJ IDEA project - Stack Overflow
work for you?

Note: This is only the first step. Adding the native libraries may always be a bit fiddly (for every IDE, and for every JAR library that uses natives). But int should usually be possible to get it up and running by setting the java.library.path, as described in
How to set the java.library.path in intelliJ Idea - Stack Overflow

If something doesn’t work, try to describe precisely what your’re struggling with (maybe I can then also try it out in IDEA).