JCuda samples

Overview

jcuda-samples

This repository contains samples for the JCuda libraries.

Note: Some of the samples require third-party libraries, JCuda libraries that are not part of the jcuda-main package (for example, JCudaVec or JCudnn), or utility libraries that are not available in Maven Central. In order to compile these samples, additional setup steps may be necessary. The main goal of this repository is to collect and maintain the samples in a form that allows them to serve as a collection of snippets that can easily be copied and pasted into own projects to get started.

Comments
  • jcuda 10

    jcuda 10

    Windows 10

    jcuda-samples/JCudaSamples/src/main/java/jcuda/runtime/samples/JCudaPrintDeviceInfo.java

    Exception in thread "main" jcuda.CudaException: cudaErrorInsufficientDriver at jcuda.runtime.JCuda.checkResult(JCuda.java:481) at jcuda.runtime.JCuda.cudaGetDeviceCount(JCuda.java:527) at demo.JCudaPrintDeviceInfo.main(JCudaPrintDeviceInfo.java:14)

    opened by jf17 5
  • test error on win10 eclipse

    test error on win10 eclipse

    Exception in thread "main" java.lang.UnsatisfiedLinkError: Error while loading native library "JCublas2-0.8.0-windows-x86_64" Operating system name: Windows 10 Architecture : amd64 Architecture bit size: 64 ---(start of nested stack traces)--- Stack trace from the attempt to load the library as a file: java.lang.UnsatisfiedLinkError: C:\Users\chenjh\AppData\Local\Temp\JCublas2-0.8.0-windows-x86_64.dll: Can't find dependent libraries at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(Unknown Source) at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at jcuda.LibUtils.loadLibrary(LibUtils.java:143) at jcuda.jcublas.JCublas2.initialize(JCublas2.java:81) at jcuda.jcublas.JCublas2.(JCublas2.java:66) at jcuda.runtime.samples.JCudaRuntimeMappedMemory.main(JCudaRuntimeMappedMemory.java:48) Stack trace from the attempt to load the library as a resource: java.lang.UnsatisfiedLinkError: C:\Users\chenjh\AppData\Local\Temp\JCublas2-0.8.0-windows-x86_64.dll: Can't find dependent libraries at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(Unknown Source) at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.load0(Unknown Source) at java.lang.System.load(Unknown Source) at jcuda.LibUtils.loadLibraryResource(LibUtils.java:260) at jcuda.LibUtils.loadLibrary(LibUtils.java:158) at jcuda.jcublas.JCublas2.initialize(JCublas2.java:81) at jcuda.jcublas.JCublas2.(JCublas2.java:66) at jcuda.runtime.samples.JCudaRuntimeMappedMemory.main(JCudaRuntimeMappedMemory.java:48) ---(end of nested stack traces)---

    at jcuda.LibUtils.loadLibrary(LibUtils.java:193)
    at jcuda.jcublas.JCublas2.initialize(JCublas2.java:81)
    at jcuda.jcublas.JCublas2.<clinit>(JCublas2.java:66)
    at jcuda.runtime.samples.JCudaRuntimeMappedMemory.main(JCudaRuntimeMappedMemory.java:48)
    
    opened by jview 3
  • Cuda 11 support: UnsatisfiedLinkError

    Cuda 11 support: UnsatisfiedLinkError

    I would like to run some sample classes with Cuda 11 and JCuda 10.2.0. There seems to be compatibility problems:

    Exception in thread "main" java.lang.UnsatisfiedLinkError: Error while loading native library "JCurand-10.2.0-windows-x86_64"
    

    Are there any plans to support Cuda 11?

    opened by maroony 2
  • Universal Callable ad Runnable Wrappers and thread safety test

    Universal Callable ad Runnable Wrappers and thread safety test

    To run Java cuda applications as regular ( not main ) class Collable and Runable wrappers are the prerequisit. Running Collable and Runnable classes requirs thread safety test. Both are almost done. I will assign these issues to myself

    opened by PavelSosin-320 2
  • Insteed of 6 - the easy way to coordinate Java development by several teams

    Insteed of 6 - the easy way to coordinate Java development by several teams

    Threre are few simple steps which can ease coordination:

    1. Label rcurrent project state as release candidate to postpone dealing with release procedure
    2. Use intermediate Nexus repository before posting version to Maven Central. It is very simple to install Nexus and add Nexus repository to maven configuration for every developer. Nexus doesn't need even server because it can be deployed to any claud infra as Nexus Docker container. Everybody can submit changes to Nexus without formal release. Everybody can build his/her own project master branch using core project release candidate Development pipeline of every team can use Nexus in its development and automated testing
    opened by PavelSosin-320 2
  • JCusolverSpSample.java:[218,26] error: no suitable method found for createDoubleMatrixHostCSR

    JCusolverSpSample.java:[218,26] error: no suitable method found for createDoubleMatrixHostCSR

    Hi, on the current head, I am seeing this:

    
     mvn clean test
    ....
    
    [ERROR] COMPILATION ERROR : 
    [INFO] -------------------------------------------------------------
    [ERROR] /home/mw529/workspace/jcuda-samples/JCudaSamples/src/main/java/jcuda/jcusolver/samples/JCusolverSpSample.java:[218,26] error: no suitable method found for createDoubleMatrixHostCSR(int,int,double[],int[],int[])
    [ERROR]     method DoubleMatrices.createDoubleMatrixHostCSR(DoubleMatrixHost,double) is not applicable
          (actual and formal argument lists differ in length)
        method DoubleMatrices.createDoubleMatrixHostCSR(DoubleMatrixDeviceCSR) is not applicable
          (actual and formal argument lists differ in length)
        method DoubleMatrices.createDoubleMatrixHostCSR(int,int,int) is not applicable
          (actual and formal argument lists differ in length)
    /home/mw529/workspace/jcuda-samples/JCudaSamples/src/main/java/jcuda/jcusolver/samples/JCusolverSpSample.java:[897,29] error: no suitable method found for createDoubleMatrixHostCSR(int,int,double[],int[],int[])
    [INFO] 2 errors 
    
    

    Any suggestions?

    opened by mjw99 2
  • Version Problem?

    Version Problem?

    I have installed the CUDA 11.1.1. Then I run the samples, I get the problem :Exception in thread "main" java.lang.UnsatisfiedLinkError: Error while loading native library "JCudaRuntime-11.1.1-windows-x86_64"

    opened by winsway 20
  • GL examples cause operating system call error

    GL examples cause operating system call error

    My computer enviroment is no problem: win10 64bit + cuda10.0 + jcuda 10.0. Other samples are passed, but there are two bugs when I test all java source (directory: driver/gl.samples) related to opengl and JCudaRuntimeUnifiedMemory.java . The former reminds me with erro massage "CUDA_ERROR_OPERATING_SYSTEM on thread AWT-EventQueue-0", and after I debug it I only conclude that it comes from a wrong return of native methond "cuGraphicsGLRegisterBufferNative" ( it doesn't appear when I use visual studio 2012 to test the methond, I don't know why). The latter will fail with a not responding even a crash. Obviously, the system call isn't successful.

    opened by farzeber 4
Owner
Marco Hutter
Marco Hutter
The samples of RMI&JNDI Attack

RMI-JNDI-Attack-Samples The samples of RMI&JNDI attack RMI Client Attack Server Server Attack Client Registry Attack Client Registry Attack Server Cli

F4DE@Syclover 7 Aug 24, 2022
This repository consists of the code samples, assignments, and the curriculum for the Community Classroom complete Data Structures & Algorithms Java bootcamp.

DSA-Bootcamp-Java Subscribe to our channel Complete Playlist Syllabus Discord for discussions Telegram for announcements Connect with me     Follow Co

Kunal Kushwaha 10.2k Jan 1, 2023
These samples explore the different options that Spring Boot developers have for using Javascript and CSS on the client (browser) side of their application.

Table of Contents Getting Started Narrowing the Choices Create a New Application Webjars Show Me Some Javascript Normalizing Resource Paths Adding Tab

Dave Syer 18 Jul 29, 2022
Samples showing practical aspect of EventStoreDB, Event Sourcing

EventStoreDB samples EventStoreDB is an industrial-strength database technology used as the central data store for event-sourced systems. It is availa

Event Store 47 Oct 26, 2022
This repository consists of the code samples, assignments, and the curriculum for Data Structures & Algorithms in Java.

DSA_JAVA_REPO WELCOME TO THIS DSA REPO 100 DAYS OF CHALLENGE ⚡ Technologies Language ABOUT THE REPO It's contain basic syntex of java if you want to l

Sahitya Roy 6 Jan 21, 2022