Hi all, I've just noticed that my phrase table code keeps crashing randomly on some computers when run with many threads. This is caused by AlignmentInfoCollection which is used every time an AlignmentInfo object is added to a TargetPhrase (an action that should not require locking from the point of view of the adder, since the TargetPhrase is a small local object).
Funnily, there is also no locking in the AlignmentInfoCollection class itself although is uses a global static collection. But it has a very nice comment: "@todo Check whether this needs locking in threaded environment" :) I'd say "Yes!". I am now wondering how to fix this: Should I use locking before adding alignment information to AlignmentInfoCollection locally in my code? Or Should I add a lock to AlignmentInfoCollection ifself (e.g. to Add(...))? Or Will this also be thread local in the future like the planned phrase cache and I should only add a temporary bugfix (consisting of either of the previous solutions)? Best, Marcin _______________________________________________ Moses-support mailing list Moses-support@mit.edu http://mailman.mit.edu/mailman/listinfo/moses-support