0


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 is invoked by Jcuda, I want to start to debug, which is relatively difficult using a Java wrapper for Cuda. Thus, I want to use “memcheck”, which requires to have a *.bat file which invokes my Java program. This is the point where I get lost. I do not manage to create a runnable jar file, which I can run with the java command in my *.bat file. My Question is, is there another way I could debug my Cuda code, but without creating a runnable jar file? –If not, how can I create a runnable jar file from maven?

I am aware that other people had that question too, but no answer worked for me, which makes me suspect that the dll files have to do with it. I tried to package the project with maven (maven built… -> goal: package). When I navigate to the target directory where my jar file was created via my command prompt the program does not run:

java in cmd prompt

The reply means that no main manifest attribute can be found. Here is the snapshot of my pom file which is supposed to define the main class:

Build in pom file

Thank you for your help. This is my first post here on stack overflow, so please point out inconsistencies in my question.

Mr M
  • 69
  • 8
  • Instead of linking to images, could you please copy-paste the relevant parts. Links may get broken over time. Thanks. – lrnzcig Mar 07 '16 at 14:45
  • True; unfortunately I do not have that option as a new user here. – Mr M Mar 07 '16 at 18:48
  • What do you mean? You can paste the code and the output as text and use the formatter to make it look nice. Do you know what I mean? – lrnzcig Mar 07 '16 at 18:55
  • Hey, yes I understand, thank you, I was talking about adding images now though, not code. – Mr M Mar 07 '16 at 19:53
  • btw, I'm recommending you to try out Mavenized version of JCuda - it could simplify it a bit https://github.com/MysterionRise/mavenized-jcuda – Mysterion Mar 10 '16 at 11:22
  • There may be some discussion/clarification necessary. If this can not be disucssed here, you can consider asking about this at the [JCuda forum](http://forum.byte-welt.net/forumdisplay.php?f=90&langid=2) (even in German ;-)). But a basic hint: When you want to run the program with `java -jar`, then there has to be a "main class" defined in the manifest. Simpler (for your case) might be to simply add the JAR to the classpath, and execute the class that contains your main method, roughly: `java -cp yourJar.jar;jcudaJar.jar yourpackage.YourClassWIthMainMethod`. – Marco13 Mar 26 '16 at 16:11

0 Answers0