Elastic energy release in great earthquakes and eruptions