I’ve create Maven project, that have all jar dependencies + so files. They’re copied into target/lib so, after that main class could be run easily and without any setup stuff. Enjoy!
Thanks for this contribution! I also considered “Mavenizing” JCuda, but … I did this with JOCL, and it seemed like a hassle: Properly managing the dependency to the native library seemed to be difficult - and compiling the library was out of the scope of Maven anyhow.
However, declaring the dependency to the precompiled libraries seems like a feasible approach. The alternative would be the same that I finally used for JOCL, namely to put all the native libraries into the JAR and extract them at runtime. But considering the large number of native libs for JCuda, and the fact that their versions exactly have to match the version of the installed CUDA version, I doubt that this is practically applicable, so I have not seriously tried this for JCuda yet.
I’ll give this repo a try on some windows machine on monday. For now, I only quickly looked over the POM, and have one question: The user will probably be able to choose the string for <libJ.version>linux-x86_64</libJ.version> manually. But is there also a way to detect and set this at runtime, although it is located in the main <properties> tag?
Yeah, I see your project. It looks a bit out-of-date. Probably we could collaborate to create super parent project for JCuda.
To give you a try on windows machine, I need to add windows versions of native libs (I’m going to do it in a few days)
And finally, about runtime detection. Sound like a really good idea. I guess, I could do this, with usage of some maven plugin. Let me try it later today.
Also, could you answer me, which versions of JCuda is more popular? Does it make sense to use JCuda for Cuda 4.0, etc.?
I’m thinking about creating several repos in pom, to handle different versions of Cuda + libs for all available arch + that detection option we talking about
I’m not entirely sure what you mean by “popular”. At the moment, there is something that I consider as an important issue (but it is hard to alleviate this problem) : Namely that someone who wants to use JCuda has to use the JCuda version that matches the version of the CUDA toolkit that he has installed. So if someone has CUDA 5.5, then he will need JCuda 0.5.5, and e.g. JCuda 0.5.0 will most likely not work in all cases. (A “release”/distribution could include the native JCuda libraries and the matching CUDA libraries, but this does hardly make sense for a developer). I think that most developers who use JCuda/CUDA will use the most recent version that is available. There is simply no reason for someone to install CUDA 4.0 today. Throughout the time, such a repository could “accumulate” the version history. But if your question aimed at that: I think it will not be worth the effort to fill the repo with older JCuda versions now.
I just update the project with full set of env versions in repo. I need community help to find bugs, etc. Especially at Windows env, since I don’t have it. Follow README
I’ve just pushed new changes. With auto detection of os version. It works on 64 bit Unix and probably should work on everything else. But once again I need help with that.
For the MacOS binaries, I have to rely on contibutions from others. For previous versions, the binaries have nearly always be provided by someone, but for version 5.5, nobody has assembled them for MacOS yet…
BTW: I updated the title, and the links in this thread to point to the new repo
It should not be hard to compile it on Mac (although I have not done it myself yet). Using CMake, it should be rather easy. I could only guess why nobody has contributed the MacOS libs for the latest version yet.
And strictly speaking, one does not need an NVIDIA card to compile the libraries, but of course, one will have to install CUDA (for the header files and libraries), so … someone with an AMD card will most likely not want to do that
I’ll add the link to the website soon, I’ll have to check a few more things first.
No problem, I have just added the link to the main page (as a “News” entry), and at top of the “Downloads” section. I think there it will be most recognizable.