Syncleus / aparapi

The New Official Aparapi: a framework for executing native Java and Scala code on the GPU.
http://aparapi.com
Apache License 2.0
466 stars 59 forks source link

A fatal error has been detected by the Java Runtime Environment #145

Open pep-pig opened 5 years ago

pep-pig commented 5 years ago

This is my first time to try Aparapi. This is my development enviroment info:

Info
Win10
NVIDIA Quadro Series K2200 with CUDA10
Aparapi 1.10.0
JDK 1.8.0

I input the command nvcc -version in power shell,and got info:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:04_Central_Daylight_Time_2018
Cuda compilation tools, release 10.0, V10.0.130

The test code:

import com.aparapi.Kernel;
import com.aparapi.Range;

public class AparapiTest {
    public static void main(String[] args) {
        final float inA[] = new float[100];
        final float inB[] = new float[100];

        final float[] result = new float[inA.length];

        Kernel kernel = new Kernel() {
            @Override
            public void run() {
                int i = getGlobalId();
                System.out.println(i);
                result[i] = inA[i] + inB[i];
            }
        };
        Range range = Range.create(result.length);
        kernel.execute(range);
        kernel.dispose();
    }
}

And the error info is:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffa3fdf0819, pid=14168, tid=0x0000000000000558
#
# JRE version: Java(TM) SE Runtime Environment (8.0_171-b11) (build 1.8.0_171-b11)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.171-b11 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  [igdrclneo64.dll+0x30819]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# H:\OneDrive\aparapiTry\hs_err_pid14168.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

How can this problem occurred? is there anything wrong with my devolopment enviroment? or there is something wrong in my testcode?

CoreRasurae commented 5 years ago

@vonlippmann Are you running your code from command line, or from an IDE? If running from an IDE, try running from the command line, just check if it still reproduces the issue. I would also suggest for you to download the sources of aparapi, aparapi-native, aparapi-jni and recompile them in your local machine. At least recompiling aparapi.

pep-pig commented 5 years ago

I tried but failed. I suddenly think maybe my project is not suitable for GPU computing. So i given up for trying aparapi temporarily. Thank you all the same!

syncleus-bot commented 5 years ago

Neural networks can be very suitable for you but only for certain NN topographies. Usually anytime the onnection density is sparse but the layer size if very large. Small neural networks in my expiernce don't show much improvement (I mostly use aparapi for machine learning including neural networks).

On Mon, Feb 25, 2019, 2:15 PM fengjb notifications@github.com wrote:

I tried but failed. I suddenly think maybe my project is not suitable for GPU computing. So i given up for trying aparapi temporarily. Thank you all the same!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Syncleus/aparapi/issues/145#issuecomment-467006774, or mute the thread https://github.com/notifications/unsubscribe-auth/AWNYb3KpqTWgI8A4k4n4V9mOdV7K_Ablks5vQ-HzgaJpZM4bPfTI .

pep-pig commented 5 years ago

Neural networks can be very suitable for you but only for certain NN topographies. Usually anytime the onnection density is sparse but the layer size if very large. Small neural networks in my expiernce don't show much improvement (I mostly use aparapi for machine learning including neural networks). On Mon, Feb 25, 2019, 2:15 PM fengjb @.***> wrote: I tried but failed. I suddenly think maybe my project is not suitable for GPU computing. So i given up for trying aparapi temporarily. Thank you all the same! — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#145 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AWNYb3KpqTWgI8A4k4n4V9mOdV7K_Ablks5vQ-HzgaJpZM4bPfTI .

CNN can be accelerated by GPU indeed , but my project is not about deeplearning now. My project is currently about topology optimization, there are many logic control in my code ,the main numeric computing is to solve a large linear system of equations which may be difficult to simply use aparapi to realize GPU computing.

syncleus-bot commented 5 years ago

Systems of equations are actually very well suited for gpus too usually. Particularly if their linear equations as I've seen the matric operations done on gpus with a good deal of speed up. I can't speak to your specific case however.

On Mon, Feb 25, 2019, 2:46 PM fengjb notifications@github.com wrote:

Neural networks can be very suitable for you but only for certain NN topographies. Usually anytime the onnection density is sparse but the layer size if very large. Small neural networks in my expiernce don't show much improvement (I mostly use aparapi for machine learning including neural networks). … <#m7946220945276250668> On Mon, Feb 25, 2019, 2:15 PM fengjb @.***> wrote: I tried but failed. I suddenly think maybe my project is not suitable for GPU computing. So i given up for trying aparapi temporarily. Thank you all the same! — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#145 (comment) https://github.com/Syncleus/aparapi/issues/145#issuecomment-467006774>, or mute the thread https://github.com/notifications/unsubscribe-auth/AWNYb3KpqTWgI8A4k4n4V9mOdV7K_Ablks5vQ-HzgaJpZM4bPfTI .

CNN can be accelerated by GPU indeed , but my project is not about deeplearning now. My project is currently about topology optimization, there are many logic control in my code ,the main numeric computing is to solve a large linear system of equations which may be difficult to simply use aparapi to realize GPU computing.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Syncleus/aparapi/issues/145#issuecomment-467016538, or mute the thread https://github.com/notifications/unsubscribe-auth/AWNYb7zSvKfL0e47iM94dkJ_rJGwHLSjks5vQ-k2gaJpZM4bPfTI .