Full Gradient only on Master Process
fix illegal free() when G is not initialized
Merge branch 'gradientOnlyOnMaster' into perfectDistribution