{"action":"created","issue":{"url":"https://api.github.com/repos/moses-smt/mosesdecoder/issues/39","labels_url":"https://api.github.com/repos/moses-smt/mosesdecoder/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/moses-smt/mosesdecoder/issues/39/comments","events_url":"https://api.github.com/repos/moses-smt/mosesdecoder/issues/39/events","html_url":"https://github.com/moses-smt/mosesdecoder/issues/39","id":15329907,"number":39,"title":"Multithreading is broken for hierarchical Moses","user":{"login":"mjpost","id":455256,"avatar_url":"https://avatars.githubusercontent.com/u/455256?v=3","gravatar_id":"","url":"https://api.github.com/users/mjpost","html_url":"https://github.com/mjpost","followers_url":"https://api.github.com/users/mjpost/followers","following_url":"https://api.github.com/users/mjpost/following{/other_user}","gists_url":"https://api.github.com/users/mjpost/gists{/gist_id}","starred_url":"https://api.github.com/users/mjpost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjpost/subscriptions","organizations_url":"https://api.github.com/users/mjpost/orgs","repos_url":"https://api.github.com/users/mjpost/repos","events_url":"https://api.github.com/users/mjpost/events{/privacy}","received_events_url":"https://api.github.com/users/mjpost/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":59,"created_at":"2013-06-10T02:30:31Z","updated_at":"2015-09-23T22:37:54Z","closed_at":null,"body":"Hierarchical multithreading appears to be broken (haven't tested with phrase-based). For the big picture, here is a plot of decoding times with Moses for a large German-English grammar (Europarl + Common Crawl) and three large LMs on a 64-core machine:\r\n\r\n![moses 1](https://f.cloud.github.com/assets/455256/629821/6568e4cc-d175-11e2-8f83-1bf28dc3d68f.png)\r\n\r\nThe saturation point is reached pretty quickly --- around 16 threads.\r\n\r\nLooking at the log files, I see that, with 1 thread, the maximum reported sentence-level decoding time (newstest2012) is about 6 seconds, and with 48 threads, it is *over 3,000 seconds*. Also, the logfile with large thread counts does not contain the logging output for all sentences.\r\n\r\nI suspect there is a problem with your locking!"},"comment":{"url":"https://api.github.com/repos/moses-smt/mosesdecoder/issues/comments/142750008","html_url":"https://github.com/moses-smt/mosesdecoder/issues/39#issuecomment-142750008","issue_url":"https://api.github.com/repos/moses-smt/mosesdecoder/issues/39","id":142750008,"user":{"login":"hieuhoang","id":691732,"avatar_url":"https://avatars.githubusercontent.com/u/691732?v=3","gravatar_id":"","url":"https://api.github.com/users/hieuhoang","html_url":"https://github.com/hieuhoang","followers_url":"https://api.github.com/users/hieuhoang/followers","following_url":"https://api.github.com/users/hieuhoang/following{/other_user}","gists_url":"https://api.github.com/users/hieuhoang/gists{/gist_id}","starred_url":"https://api.github.com/users/hieuhoang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hieuhoang/subscriptions","organizations_url":"https://api.github.com/users/hieuhoang/orgs","repos_url":"https://api.github.com/users/hieuhoang/repos","events_url":"https://api.github.com/users/hieuhoang/events{/privacy}","received_events_url":"https://api.github.com/users/hieuhoang/received_events","type":"User","site_admin":false},"created_at":"2015-09-23T22:37:54Z","updated_at":"2015-09-23T22:37:54Z","body":"ya, stringstream is my 1st port of call. FakeOFStream for string would be helpful. I may even use StringPiece if push comes to shove"}}