pierre-weiss / VSNR_2D-3D_GPU

A Fiji plugin based on CUDA (you need an NVIDIA graphics card)
GNU General Public License v3.0
6 stars 2 forks source link

Invalid memory access for VSNR_3D #5

Open pawlowska opened 4 years ago

pawlowska commented 4 years ago

When running VSNR_3D, I get 'invalid memory access' error. The error below is when trying to process a 172MB stack on 96GB PC with default interations/blocks settings.

(Fiji Is Just) ImageJ 2.1.0/1.53c; Java 1.8.0_172 [64-bit]; Windows 7 6.1; 4257MB of 85552MB (4%)

java.lang.Error: Invalid memory access
    at com.sun.jna.Native.invokeVoid(Native Method)
    at com.sun.jna.Function.invoke(Function.java:408)
    at com.sun.jna.Function.invoke(Function.java:354)
    at com.sun.jna.Library$Handler.invoke(Library.java:244)
    at $Proxy12.VSNR_3D_FIJI_GPU(Unknown Source)
    at VSNR_3D$Image3D.denoise(VSNR_3D.java:629)
    at VSNR_3D.denoiseCuda3D(VSNR_3D.java:450)
    at VSNR_3D.run(VSNR_3D.java:98)
    at ij.plugin.filter.PlugInFilterRunner.processOneImage(PlugInFilterRunner.java:265)
    at ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java:114)
    at ij.IJ.runUserPlugIn(IJ.java:237)
    at ij.IJ.runPlugIn(IJ.java:198)
    at ij.Executer.runCommand(Executer.java:150)
    at ij.Executer.run(Executer.java:68)
    at java.lang.Thread.run(Thread.java:748)
pierre-weiss commented 4 years ago

Can you try with 1 single block ?

pawlowska commented 4 years ago

I just did. Setting number of blocks to 1 doesn't help.

nranthony commented 3 years ago

Hi @pierre-weiss , I also get the same error, even with 1 block. I get the below when I try 2D on my stack also.

Any pointers much appreciated.

(Fiji Is Just) ImageJ 2.1.0/1.53c; Java 1.8.0_172 [64-bit]; Windows 10 10.0; 1665MB of 15000MB (11%)

java.lang.Error: Invalid memory access
    at com.sun.jna.Native.invokeVoid(Native Method)
    at com.sun.jna.Function.invoke(Function.java:408)
    at com.sun.jna.Function.invoke(Function.java:354)
    at com.sun.jna.Library$Handler.invoke(Library.java:244)
    at $Proxy12.VSNR_2D_FIJI_GPU(Unknown Source)
    at VSNR_2D$Image2D.denoise(VSNR_2D.java:516)
    at VSNR_2D.denoiseCuda2D(VSNR_2D.java:363)
    at VSNR_2D.run(VSNR_2D.java:83)
    at ij.plugin.filter.PlugInFilterRunner.processOneImage(PlugInFilterRunner.java:265)
    at ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java:114)
    at ij.IJ.runUserPlugIn(IJ.java:237)
    at ij.IJ.runPlugIn(IJ.java:198)
    at ij.Executer.runCommand(Executer.java:150)
    at ij.Executer.run(Executer.java:65)
    at java.lang.Thread.run(Thread.java:748)
pawlowska commented 3 years ago

@nranthony I am trying to remember what I did to go around this error... One thing for sure: once it occurs, you have to restart Fiji.

pierre-weiss commented 3 years ago

Dear nranthony,

unfortunately, I really cannot try anything for now on my side due to a work overload. Are you working on Linux/Windows ? All my codes have been tested with Ubuntu on Nvidia graphics card. With Ubuntu 20.04 it seems that you can simply use the Nvidia proprietary drivers (Softwares&Updates -> proprietary drivers) for the codes to work. I don't have any experience on Windows and can't really test anything.

nranthony commented 3 years ago

I understand. Thanks for letting me know. I'll add to my list to see if I can recompile on Win10. Do you happen to have a Maven Netbeans project by any chance, or any other software IDE that you might be using? Thanks for your time.

pawlowska commented 3 years ago

@pierre-weiss the dll's I compiled for CUDA11 are still waiting as a pull request, you can consider merging them :) @nranthony what exactly do you need for Win10? I made new dlls and I also wrote down how I did it

pawlowska commented 3 years ago

@nranthony okay, here's the thing: on the same PC (Win10, same dataset), I am able to get either 'Invalid memory access' or a denoised result depending on input parameters.

nranthony commented 3 years ago

@pawlowska , thanks for the follow up. Good to know about the parameters. I apologize in advance for any delays my end; always pulled in many directions.

pawlowska commented 3 years ago

@nranthony no worries. Anyway, I'm not good at Java, but the code in this repository does have a pom.xml file, isn't this supposed to be enough...?