Counting entries in Excel table

Creating an executable JAR with JCuda may be difficult. I never tried it, but you somehow have to get rid of the native libraries. These probably have to be added in the JAR and then unpacked into a temporary file at runtime. The “LibUtils” class (see the JCuda source code) is intended to support this, but it is not yet fully implemented.

Concerning the GUI: Have you ever worked with Swing? Have you read, e.g. http://docs.oracle.com/javase/tutorial/uiswing/components/table.html or http://docs.oracle.com/javase/tutorial/uiswing/components/filechooser.html ? You could create a TableModel that delegates to the existing TableData class, if you want to…

Hi Marco. I have used Netbeans to do the GUI in the attachment. I have done with Netbeans also the jar (with the proper command) but i’m not sure that it works (without have to configure/install nothing). Can you help me ?

I’ll have a look at this during the weekend or beginning of next week. Are there any specific questions?

No Marco. I just want to know what (and how) i have to do, to make a jar that it is possible to execute with all libraries (jcuda, jxl and maybe also CUDA) without (many) problems. Thanks.

Again, I have never tried to create a standalone JAR with JCuda. I’m not sure when I will have the time to test this. The difficult thing about that is that each JCuda version needs exactly the right CUDA version to be installed. The CUDA .DLLs are named according to the version, e.g. “cudart32_41_28.dll”. If the right version is not installed on the target system, the JAR will not work. Additionally, one would have to include ALL binaries (for Windows, Linux and MaxOS) in the JAR, which is hardly feasible. Why does it have to be a single JAR? You might have to anticipate that the user will have to download the JCuda version that matches the CUDA version he has installed…

I just looked at the ZIP that you posted… well… that’s a screenshot -_- It seems like you just put the output of the original programm into TextAreas…
I’m not so sure what your actual intention is…

Hi Marco. My actual intention is just to show the output instead to view it in the netbeans’ output. Now i just want to know, with certainty, if is not possible to execute the jar without install or configure nothing (or the least possible) because you wrote that it is not yet fully implemented. That is all Marco.

In any case, the CUDA Driver and Toolkit have to be installed.
And in any case, the right JCuda DLL for the installed CUDA version has to be used.

If you do not know the CUDA version of the target machine, it will hardly be possible, because you would need a JAR containing ALL JCuda versions for ALL Operating systems, which would have at least 50MB at the moment. If you really wanted to create such a JAR, it might be possible to extract the right DLL at runtime, so that it could be used, but I have not tested this yet, and it might be some hassle. Especially since it is not clear what should happen if the program uses a CUDA function of version 3.0 on a machine that only has CUDA 2.1 installed. There are constraints that you can hardly get around.

Of course, I’d also find it more desirable to have fewer restrictions concerning the matching of CUDA and JCuda versions, but since the CUDA DLLs are highly specific for one version, this is hardly feasible.

When asking about your actual intention, I also wondered what the outcome of the whole project should be. Do you want to create an application that anybody can download and start, without having to install anything? (Reminder: The thread title is „Counting entries in Excel table“ … :wink: )

Thanks for your explanation Marco, you are right. If it is possible, yes, i’d like to create an application that anybody can download and start, without having to install anything (but the time is almost over so if is too much complicated don’t worry). Bye.

You might consider doing the same thing in OpenCL (i.e. in JOCL). The JOCL JAR file is self-contained (i.e. it has all DLLs) and it would be easier to make it possible that anybody who has an OpenCL implementation could download and start it. (Even someone with an AMD card, on which CUDA would not work in general).
Changing the program to use OpenCL instead of CUDA would not be so hard.

No problem Marco. Thanks anyway.

Do you thing using OpenCL/JOCL could be an option? I could possibly add a class that does the computation with JOCL beginning of next week, if this is not too late.

Doesn’t do nothing, it is okay such as now. Thanks Marco.