clij / clicy

GPU-accelerated Image Processing using CLIJ in Icy
https://clij.github.io/clicy
BSD 3-Clause "New" or "Revised" License
2 stars 2 forks source link

Attach CLIJ2_PullSequenceBlock and CLIJ2_ShowSequenceBlock to the same destination #9

Closed marionlouveaux closed 4 years ago

marionlouveaux commented 4 years ago

Hi!

I tried to attach CLIJ2_PullSequenceBlock and CLIJ2_ShowSequenceBlock to the same destination (here a maximum intensity projection), but it produces an error message. Are these two blocks incompatible?

A snapshot of the protocol: maximum_projection_withpullblock_bug2 protocol_screenshot

A snapshot of the bug report: Bug2

Many thanks in advance! Best regards, Marion

haesleinhuepf commented 4 years ago

Hey Marion @marionlouveaux ,

this is unfortunate but kind of intentional. The problem is that me, the block developer, has no influence on execution order (right?). However, the numbers in the protocol screenshot suggest, that the release buffer block on the very bottom (number 6) was executed before the pull sequence block above it (number 8). That means, the memory of the underlying image was released (that's what CLIJ2_ReleaseBuffer does), before you tried to pull it.

In general: when building Clicy protocols, you should ensure that all actions on a ClearCLBuffer are executed, before you release it. In your case you can achieve that by calling pullSequence and showSequence sequencially and not in parallel.

Let me know if this solves the issue!

And thanks again for testing! I promise to write a more detailed Clicy HOWTO page asap.

Cheers, Robert

marionlouveaux commented 4 years ago

Hi Robert,

Yes, indeed, you cannot influence the execution order, only the end-user can (to some extent).

These two solutions work:

1) I call pullSequence and showSequence in parallel but make sure the CLIJ2_ReleaseBuffer blocks are executed after these two blocks maximum_projection_withpullblock_bug2CorrectedMethod1 protocol_screenshot But maybe the CLIJ2_ReleaseBuffer block alone would be enough (?).

2) I call pullSequence and showSequence sequencially maximum_projection_withpullblock_bug2CorrectedMethod2 protocol_screenshot

Thanks for your feedbacks! Cheers, Marion

marionlouveaux commented 4 years ago

PS: by the way, do you receive the bug reports for Clicy generated by the Icy software?

haesleinhuepf commented 4 years ago

PS: by the way, do you receive the bug reports for Clicy generated by the Icy software?

I did so earlier. But I would say in the last month I didn't receive any error anymore. Is that a good or a bad sign ;-)

I'll close this issue for now.

Thanks again for testing and support!