is it possible to run calculations only on current thread? I tried setting env variable OMP_NUM_THREADS=1 and use 2+ threads to do some computation, but I am getting EXCEPTION_ACCESS_VIOLATION error. Each thread has its own network. Is there anything else I need to configure?

EXCEPTION_ACCESS_VIOLATION is usually something you only see when the entire JVM crashes. It typically shouldn’t do that under normal conditions.

What exactly are you doing?

Nothing crazy, just trying to fit neural network (it crashes when calling output aswell). Simple code that crashes when OMP_NUM_THREADS=1 (it works with any other number) is here: gist:f7fa5aa0884a2cfeff96e9a1818e4dfa · GitHub.

Complete error + log file is here: gist:0e50cb42c9844b2919f25eaf3501e79b · GitHub

Huh, that looks like it should work. I don’t see any sharing of Tensors in your example.

@agibsonccc You might want to take a look at this too

I’ve successfully reproduced it with beta7 and it doesn’t happen with our latest code version.

I guess the bug, what ever it was, has already been fixed and it should work in the next release (which will happen very soon).

You can try it out with snapshots already, or wait a bit longer for the proper release.

1 Like