mesmerize-core icon indicating copy to clipboard operation
mesmerize-core copied to clipboard

Kernel unexpectedly dying; line of code: viz_cnmf.show

Open CharlotteWenxin opened this issue 1 year ago • 10 comments

computer: window 11, 32GB RAM (15.6GB usable) processor: AMD Ryzen 7 7800X3D 8-Core Processor

I couldn't run viz_cnmf.show() with a 1200 frames movie. It was possible with a 600 frames movie with fewer much coutours.

I have dedicated video memory of 16GB.

CharlotteWenxin avatar Jun 28 '24 19:06 CharlotteWenxin

Can you please use the template and describe everything.

kushalkolar avatar Jun 28 '24 20:06 kushalkolar

I'm sorry I was not clear:

OS: Windows 11
mesmerize-core version: '0.4.0'
caiman version: ''1.11.1'
Hardware description: 16 GPU, 32GB RAM (15.6GB usable) processor: AMD Ryzen 7 7800X3D 8-Core Processor

The kernel died every time I tried to run viz_cnmf.show() with a 1200 frames cnmf processed movie. But it was possible with a 600 frames movie. I tried increase the dedicated VRAM to 16GB but the kernel still died when I ran viz_cnmf.show ().

Thank you very much for your help!

CharlotteWenxin avatar Jun 29 '24 12:06 CharlotteWenxin

What gpu do you have? How many components are you trying to visualize?

On Sat, Jun 29, 2024, 2:09 PM CharlotteWenxin @.***> wrote:

I'm sorry I was not clear:

OS: Windows 11 mesmerize-core version: '0.4.0' caiman version: ''1.11.1' Hardware description: 16 GPU, 32GB RAM (15.6GB usable) processor: AMD Ryzen 7 7800X3D 8-Core Processor

The kernel died every time I tried to run viz_cnmf.show() with a 1200 frames cnmf processed movie. But it was possible with a 600 frames movie. I tried increase the dedicated VRAM to 16GB but the kernel still died when I ran viz_cnmf.show ().

Thank you very much for your help!

— Reply to this email directly, view it on GitHub https://github.com/nel-lab/mesmerize-core/issues/307#issuecomment-2198129326, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACHXXRDFWJX6EZO2HHFS37DZJ2PXPAVCNFSM6AAAAABKCMQUPGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJYGEZDSMZSGY . You are receiving this because you commented.Message ID: @.***>

kushalkolar avatar Jun 29 '24 14:06 kushalkolar

I have integrated GPU and there are about 6000 components.

CharlotteWenxin avatar Jun 29 '24 14:06 CharlotteWenxin

You're probably running out of VRAM. Do you expect 6000 components?

On Sat, Jun 29, 2024, 4:22 PM CharlotteWenxin @.***> wrote:

I have integrated GPU and there are about 6000 components.

— Reply to this email directly, view it on GitHub https://github.com/nel-lab/mesmerize-core/issues/307#issuecomment-2198212183, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACHXXRDSNJWBSB32TA4UIBDZJ27LLAVCNFSM6AAAAABKCMQUPGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJYGIYTEMJYGM . You are receiving this because you commented.Message ID: @.***>

kushalkolar avatar Jun 29 '24 14:06 kushalkolar

I see.

No, only about 500, but there are a lot of rejected components along with false positive.

CharlotteWenxin avatar Jun 29 '24 15:06 CharlotteWenxin

What does your movie look like, your parameters might be off. You shouldn't have to curate out thousands of components.

On Sat, Jun 29, 2024, 11:06 AM CharlotteWenxin @.***> wrote:

I see.

No, only about 500, but there are a lot of rejected components along with false positive.

— Reply to this email directly, view it on GitHub https://github.com/nel-lab/mesmerize-core/issues/307#issuecomment-2198225062, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACHXXRB6VH3AYY66NKECNDLZJ3EQDAVCNFSM6AAAAABKCMQUPGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJYGIZDKMBWGI . You are receiving this because you commented.Message ID: @.***>

kushalkolar avatar Jun 29 '24 22:06 kushalkolar

It looks like this: image

I applied a mask to exclude the region without neurons and reduce k, then I can use viz_cnmf.show.

CharlotteWenxin avatar Jul 02 '24 14:07 CharlotteWenxin

@CharlotteWenxin did you get an error message like this in the Jupyter log?

thread '<unnamed>' panicked at src/conv.rs:1182:30:
invalid size
stack backtrace:
   0: rust_begin_unwind
...

If so, I think this is due to having contours with 0 points. Will make an issue or PR about it shortly.

ethanbb avatar Jul 11 '24 02:07 ethanbb

I think mesviz might already filter out contours with size = 0

kushalkolar avatar Jul 11 '24 02:07 kushalkolar

any development here?

Agrajag1984 avatar Sep 16 '24 14:09 Agrajag1984

I didn't get an error and adding a mask helped to reduce the number of false positive.

CharlotteWenxin avatar Sep 17 '24 09:09 CharlotteWenxin

D 2024-09-20 16:38:35.397 ServerApp] 200 GET /ipyparallel/clusters?1726843115268 ([email protected]) 11.91ms thread '' panicked at src/conv.rs:1182:30: invalid size stack backtrace: 0: rust_begin_unwind at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panicking.rs:597:5 1: core::panicking::panic_fmt at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/panicking.rs:72:14 2: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold 3: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter 4: wgpuDeviceCreateBindGroup 5: ffi_call_unix64 6: ffi_call_int 7: cdata_call 8: _PyObject_Call at /usr/local/src/conda/python-3.11.10/Objects/call.c:343:19 9: PyObject_Call at /usr/local/src/conda/python-3.11.10/Objects/call.c:355:12 10: do_call_core at /usr/local/src/conda/python-3.11.10/Python/ceval.c:7349:12 11: _PyEval_EvalFrameDefault at /usr/local/src/conda/python-3.11.10/Python/ceval.c:5376:22 12: _PyEval_EvalFrame at /usr/local/src/conda/python-3.11.10/Include/internal/pycore_ceval.h:73:16 13: _PyEval_Vector at /usr/local/src/conda/python-3.11.10/Python/ceval.c:6434:24 14: _PyFunction_Vectorcall at /usr/local/src/conda/python-3.11.10/Objects/call.c:393:16 15: _PyObject_VectorcallTstate at /usr/local/src/conda/python-3.11.10/Include/internal/pycore_call.h:92:11 16: method_vectorcall at /usr/local/src/conda/python-3.11.10/Objects/classobject.c:67:20 17: _PyObject_VectorcallTstate at /usr/local/src/conda/python-3.11.10/Include/internal/pycore_call.h:92:11 18: context_run at /usr/local/src/conda/python-3.11.10/Python/context.c:673 19: cfunction_vectorcall_FASTCALL_KEYWORDS at /usr/local/src/conda/python-3.11.10/Objects/methodobject.c:443:24 20: do_call_core at /usr/local/src/conda/python-3.11.10/Python/ceval.c:7321:9 21: _PyEval_EvalFrameDefault at /usr/local/src/conda/python-3.11.10/Python/ceval.c:5376:22 22: _PyEval_EvalFrame at /usr/local/src/conda/python-3.11.10/Include/internal/pycore_ceval.h:73:16 23: _PyEval_Vector at /usr/local/src/conda/python-3.11.10/Python/ceval.c:6434:24 24: PyEval_EvalCode at /usr/local/src/conda/python-3.11.10/Python/ceval.c:1148:21 25: builtin_exec_impl at /usr/local/src/conda/python-3.11.10/Python/bltinmodule.c:1077:17 26: builtin_exec at /usr/local/src/conda/python-3.11.10/Python/clinic/bltinmodule.c.h:465:20 27: cfunction_vectorcall_FASTCALL_KEYWORDS at /usr/local/src/conda/python-3.11.10/Objects/methodobject.c:443:24 28: _PyObject_VectorcallTstate at /usr/local/src/conda/python-3.11.10/Include/internal/pycore_call.h:92:11 29: PyObject_Vectorcall at /usr/local/src/conda/python-3.11.10/Objects/call.c:299:12 30: _PyEval_EvalFrameDefault at /usr/local/src/conda/python-3.11.10/Python/ceval.c:4769:23 31: _PyEval_EvalFrame at /usr/local/src/conda/python-3.11.10/Include/internal/pycore_ceval.h:73:16 32: _PyEval_Vector at /usr/local/src/conda/python-3.11.10/Python/ceval.c:6434:24 33: _PyFunction_Vectorcall at /usr/local/src/conda/python-3.11.10/Objects/call.c:393:16 34: pymain_run_module at /usr/local/src/conda/python-3.11.10/Modules/main.c:300:14 35: pymain_run_python at /usr/local/src/conda/python-3.11.10/Modules/main.c:599:21 36: Py_RunMain at /usr/local/src/conda/python-3.11.10/Modules/main.c:684:5 37: Py_BytesMain at /usr/local/src/conda/python-3.11.10/Modules/main.c:738:12 [D 2024-09-20 16:38:38.690 ServerApp] Accepting token-authenticated request from 127.0.0.1 is the error I get on a windows and an Arch system

Agrajag1984 avatar Sep 20 '24 14:09 Agrajag1984

@Agrajag1984 this issue is fixed in #309, we're waiting for a new caiman release to merge it but you should be able to use this branch for now: https://github.com/proektlab/mesmerize-core/tree/contour-nan-fix

ethanbb avatar Sep 20 '24 14:09 ethanbb

@Agrajag1984 please post a bug report new issue with all the details.

@ethanbb this appears unrelated to that.

kushalkolar avatar Sep 20 '24 15:09 kushalkolar

Ah yes I agree it's different from Charlotte's issue, but I believe this is caused by removing nans from empty contours (I got the same error with my data and that was the problem). Anyway we can talk more on a different issue thread.

ethanbb avatar Sep 20 '24 15:09 ethanbb