Fix bugs if only one process owns the global data.
Merge pull request #7 from zuoshifan/zuo/distribute

Fix bugs if only one process owns the global data.