Effects of magnesium deficiency on photosynthesis and carbohydrate partitioning