The Group of Seven leading economies warned on Saturday that the war in Ukraine is stoking a global food and energy crisis that threatens poor countries, and urgent measures are needed to unblock stores of grain that Russia is preventing from leaving Ukraine.