  Context: High-mass star formation has been a very active field over the last
decade, however, most studies targeted regions of luminosities between 10^4 and
10^5 L_sun. Methods: We selected the W31 star-forming complex with a total
luminosity of ~6x10^6 L_sun for a multi-wavelength spectral line and continuum
study covering wavelengths from the near- and mid-infrared via (sub)mm
wavelength observations to radio data in the cm regime. Results: While the
overall structure of the multi-wavelength continuum data resembles each other
well, there are several intriguing differences. The 24mum emission stemming
largely from small dust grains follows tightly the spatial structure of the cm
emission tracing the ionized free-free emission. Hence warm dust resides in
regions that are spatially associated with the ionized hot gas (~10^4 K) of the
HII regions. Furthermore, we find several evolutionary stages within the same
complexes, ranging from infrared-observable clusters, via deeply embedded
regions associated with active star formation traced by 24\,$\mu$m and cm
emission, to at least one high-mass gas clump devoid of any such signature. The
13CO(2-1) and C18O(2-1) spectral line observations reveal a large kinematic
breadth in the entire region with a total velocity range of approximately 90
km/s. While the average virial mass ratio for W31 is close to unity, the line
width analysis indicates large-scale evolutionary differences between the
southern and northern sub-regions (G10.2-0.3 and G10.3-0.1) of the whole W31
complex. The clump mass function - tracing cluster scales and not scales of
individual stars - derived from the 875mum continuum data has a slope of
1.5+-0.3, consistent with previous cloud mass functions.
