Link error with JCudpp with 3.0 -x86_64

Hi all,

I’m experiencing a native library link error when running JCudaRuntimeSample.java and JCudppSample.java. JCublasSample works OK, and the JCudaRuntimeSample runs OK up to the JCudpp section. Here’s the output and error:

[LEFT]Creating input data
Initializing device data using JCuda
Performing FFT using JCufft
Performing caxpy using JCublas
Performing scan using JCudpp
[SIZE=1]Error while loading native library with base name “JCudpp”
Operating system name: Windows XP
Architecture : amd64
Architecture bit size: 64
Exception in thread “main” java.lang.UnsatisfiedLinkError: Could not load native library[/LEFT]

at jcuda.LibUtils.loadLibrary(
[/SIZE][LEFT][SIZE=1]LibUtils.java:74[/SIZE][SIZE=1])[/SIZE]
[LEFT][SIZE=1]at jcuda.jcudpp.JCudpp.assertInit([/LEFT]
[/LEFT]
[/SIZE][LEFT][SIZE=1]JCudpp.java:175[/SIZE][SIZE=1])[/SIZE]
[LEFT][SIZE=1]at jcuda.jcudpp.JCudpp.cudppPlan([/LEFT]
[/LEFT]
[/SIZE][LEFT][SIZE=1]JCudpp.java:214[/SIZE][SIZE=1])[/SIZE]
[LEFT][SIZE=1]at samples.JCudaRuntimeSample.main([/LEFT]
[/LEFT]
[/SIZE][LEFT][SIZE=1]JCudaRuntimeSample.java:91[/SIZE][SIZE=1])[/SIZE]

I’m using Cuda 3.0 with the new 64-bit jCuda binary release for 3.0.

Any help on the cause of this would be much appreciated.
[/LEFT]

Hello

The CUDPP library is a standalone library. In contrast to CUBLAS and CUFFT it is not distributed automatically with the CUDA Toolkit. To use JCudpp, an installation of CUDPP is required (actually, it requires only the cudpp DLL, because this is referenced from the JCudpp DLL).

I considered putting the CUDPP DLL into the binary distribution, but the compilation of CUDPP for different systems may be tricky, and the resulting DLL is LARGE (>50MB).

However, the CUDA SDK contains a ready-to-use DLL for CUDPP. I think I found an appropriate solution: I compiled the JCudpp DLL so that it uses the CUDPP DLL which is contained in the SDK (namely the “NVIDIA GPU Computing SDK\C\bin\win64\Release\cudpp64_30_14.dll”). I will upload the updated binaries this evening, and post a note here once they are uploaded.

bye
Marco

Hi Marco,

Thanks for letting me know. I’ll see if I can include the cuddpp dll in the path to get it to run, and thanks for building a new binary with the library included!

Hello

I have just uploaded the updated binaries (only the JCudpp DLL for both Windows versions has changed - for Linux I will do a similar update ASAP).

The JCudpp DLL now refers to the CUDPP DLL that is distributed with the NVIDIA SDK, Version 3.0, Build 14, namely to the file
NVIDIA GPU Computing SDK\C\bin\win64\Release\cudpp64_30_14.dll

This file should be „visible“ for the DLL to be loaded, that is, the path must either be included in the PATH, or, if in doubt, for a first test, this file may also be copied into the same directory as the JCudpp DLL.

I tested it with Windows 64 and 32 bit and it worked fine - it would be great if you could confirm this :slight_smile:

bye
Marco

Hey Marco,

Thanks for uploading the binaries. It’s working now just fine, along with all other samples.

Thanks for helping this CUDA-newbie through the hurdles!

hi,

I am totally new to CUDA and also to this forum so sorry if I’m missing something and asking stupid questions. I have managed to run cuda sample as described before and then i run on this cudpp issue. Now I have 2 problems:

  1. i cant see the link marco13 provided to download Jcudpp new build. Is there somebody who can reupload it? (or maybe it’s here but i dont know where to search for it and download it)

  2. I downloaded the newest “GPU Computing SDK code samples” that are available on http://developer.nvidia.com/object/cuda_3_2_toolkit_rc.html. The thing is, that the release version is 3.2 i cannot find the file “NVIDIA GPU Computing SDK\C\bin\win64\Release\cudpp64_30_14.dll” (obviously, it is not there). I cannot find and download the 3.0 version mentioned before. How can I solve this?

Any help would be appreciated. I need to make this run cause i need it for my diploma project. thank you.

Andrej

Hello Andrej,

The new JCudpp builds are the ones which is already found on the website. (To clarify this: Earlier versions of JCudpp had been linked against a CUDPP DLL which I compiled on my own for Win32, but I could not build for all other Operating Systems/Architectures. So I decided to link against the library that is contained in the SDK, which is available for all OSes/Architectures.)

The version numbering of JCuda (coincidentally?) follows the CUDA version numbers. So when it is looking for the “cudpp64_3014.dll", you have downloaded JCuda 0.3.0. If you have also downloaded the latest SDK, it should contain a cudpp6432_??.dll”. This library will be referred to by JCuda 0.3.2, which is not yet available.

I see that you cann hardly download an older (<3.2) version of the Driver/Toolkit/SDK, so you will probably have to wait for JCuda 0.3.2. I can not definitely say when this will be available (hopefully soon). If it is urgent, you can write me a mail/PN, so I can provide an “early access” version for you.

bye
Marco

Hello,
I have the same problem, but on a linux platform:

$ java -classpath ./:./jcuda-0.3.1.jar:./jcudpp-0.3.1.jar:./jcublas-0.3.1.jar:./jcufft-0.3.1.jar -Djava.library.path=. JCudaRuntimeSample
Picked up JAVA_TOOL_OPTIONS: -Xmx512m
Creating input data
Initializing device data using JCuda
Performing FFT using JCufft
Performing caxpy using JCublas
Performing scan using JCudpp
Error while loading native library with base name “JCudpp”
Operating system name: Linux
Architecture : amd64
Architecture bit size: 64
Exception in thread “main” java.lang.UnsatisfiedLinkError: Could not load native library
at jcuda.LibUtils.loadLibrary(LibUtils.java:79)
at jcuda.jcudpp.JCudpp.assertInit(JCudpp.java:175)
at jcuda.jcudpp.JCudpp.cudppPlan(JCudpp.java:214)
at JCudaRuntimeSample.main(JCudaRuntimeSample.java:83)

What do I have to do to link against the linux Cudpp version of the CUDA SDK?

Hello

Maybe I should mention this from time to time: If you don’t need JCudpp, this error message does not matter. JCuda itself, JCufft and JCublas are working fine. JCudpp is always a little bit difficult, because it is not included in the CUDA Toolkit, but only in the SDK. Maybe I should remove it from the basic sample. I have the impression that it causes some confusion… -_-

So if you don’t want to do things like segmented scans or sparse matrix-vector multiplications (which will anyhow be covered by JCusparse pretty soon :slight_smile: ) you don’t need JCudpp.

But IF you need JCudpp: Make sure that you have the CUDPP library from the SDK version 3.1 in a directory that is „visible“ when you start the program. That means that you should have added the directory which contains the cudpp31_9*.SO file to the LD_LIBRARY path, or alternatively, copy this CUDPP .SO file into the same directory as the native JCudpp library.

bye
Marco