First-principles temperature-pressure phase diagram of magnesium.