jlizier / jidt

JIDT: Java Information Dynamics Toolkit for studying information-theoretic measures of computation in complex systems
http://jlizier.github.io/jidt/
GNU General Public License v3.0
261 stars 72 forks source link

GPU issue when local variable is destroyed #59

Closed nstrodt closed 7 years ago

nstrodt commented 7 years ago

I like jidt very much and I recently started looking into the new GPU feature as my computational demands could profit a lot from it. I am using jidt via jpype to estimate mutual information via the Kraskov algorithm. This works perfectly as long as the context of the data array that is passed to set_observations is not destroyed (this happens for example when saving to a local variable in a loop). At this point the stream is left in the state CUDA_ERROR_CONTEXT_IS_DESTROYED and the jre crashes with a segmentation fault. For USE_GPU = False the code runs without any problems.

It would be nice if you could look into this issue or give me a hint what is going wrong here. Please contact me if you need further information.

pmediano commented 7 years ago

Hi @nstrodt , thanks a bunch for the bug report. Could you provide a minimal example script that reproduces the crash?

nstrodt commented 7 years ago

Thanks for getting back to me so quickly. I seem to have jumped to a conclusion to quickly. As far as I can see this issue arose from interference with another process accessing CUDA in the same python file. Thanks again.