MOZI-AI / annotation-scheme

Human Gene annotation service backend
GNU General Public License v3.0
3 stars 4 forks source link

Remove the current mult-threading #199

Closed Habush closed 4 years ago

Habush commented 4 years ago

This fixes #198 and as @linas noted in #161 par-map introduces its own set of problems including #198 , which I suspect it has to do with the lack of locks in make-atom-set function (but I am only running two threads and one thread doesn't access the atom cache!). Hence getting rid of par-map and replacing it with other threading libraries (like on suggested in #197) maybe a good approach.

linas commented 4 years ago

I don't know what's wrong with par-map I noticed that it misbehaves with the atomspace, many years ago. There's no data corruption, so it "works" -- its just the 2 threads only work 1.5x faster, and 3 threads are the same speed as one thread, and and four threads are slower than one thread. I have not been able to track down what it is, and I think that it's something deep inside of guile itself, and not something in the atomspace.

linas commented 4 years ago

FYI @Habush I thought a bit more about the par-map problem, and the only thing I could think of was that removing most mutexes from the atomspace could help. To that end, I propose https://github.com/opencog/atomspace/issues/2553 as the way to do this. I don't have time to do this myself, but maybe you could get this placed onto someone else's priority list, and they could get it done? I would consult and hold-hands for the task. Its not an easy task, but its also not a hard one.