Sum of all root lengths in simple Lie algebra Part of one of my calculations involves (the innocent looking) expression 
$\sum_{\alpha\in\Sigma} (\alpha,\alpha)$
for simple Lie algebras.
I have two methods of calculating it -- which don't agree.  I'm pretty sure that the first one is wrong, but I don't know why.  Any help is welcome (which is why I posted here)!
First my starting 'facts' (see e.g. the free book by Cahn or the comprehensive Knapp):
Given a simple Lie algebra $\mathfrak{g}$ and a basis to the Cartan subalgebra $\{h_i\ ,\ i=1\ldots,r\}$,
the components of the roots are defined by 
$$[h_i,e_\alpha] = \alpha_i e_\alpha$$
The Killing form restricted to the Cartan subalgebra is (Knapp Cor (2.24): but with index ridden notation) 
$$ g_{ij}=\mathrm{tr}h_i h_j = \sum_{\alpha\in\Sigma}\alpha_i\alpha_j $$
The inner product on the root space is defined via the Killing form (Knapp eqn (2.28)):
$$(\alpha,\beta) = \alpha^i\beta_i = \alpha_i g^{ij} \beta_j=\mathrm{tr}(h_\alpha h_\beta)\ ,\qquad g^{ij}g_{jk}=\delta^i_k$$
So we get our first (and probably wrong) way of calculating:
$$\sum_{\alpha\in\Sigma} (\alpha,\alpha) = g^{ij}\sum_{\alpha\in\Sigma} \alpha_i\alpha_j
 = g^{ij}g_{ij} = \sum_i \delta^i_i = \mathrm{rnk} \mathfrak{g}
$$
The second method is to just enumerate and sum over all roots.  For a simply laced Lie algebra this is easy, because all roots have the same length $(\alpha,\alpha)=l$:
$$\sum_{\alpha\in\Sigma} (\alpha,\alpha) = l\sum_{\alpha\in\Sigma} 1 
  = l\ (\mathrm{dim}\mathfrak{g}-\mathrm{rnk}\mathfrak{g}) 
$$
These results are not compatible...
 A: The reason for the discrepancy and to that the first calculation is not correct is that indeed the Cartan–Killing metric is a metric on the weight space, but it is not the metric with respect to which the root lengths are defined, (it is up to a scalar multiple).
The root lengths are defined with the Euclidian metric in the weight space, and since the primitive weights are not orthogonal, this metric is not diagonal in the primitive weight basis, but it is different from the Cartan–Killing metric by a scalar multiple.
A properly normalized metric tensor is given in table 7 of the review article Slansky - Group theory for unified model building for all simple Lie algebras.  The normalization convention in this article is taken by fixing the root lengths of simply laced algebras to 2. One can easily check, for example, using the Cartan matrices of table 6 that the squared lengths of the simple roots of An are 2, or the lengths of the roots of B2 are 1, 2 respectively.
A: It turns out that I was wrong and both methods give correct results. In fact using the two results you can reproduce the scaling parameters for the simple Lie algebras given in the Broughton paper linked to by David.
My mistake was in assuming that the length of the roots is always arbitrary.  It's well known that the choice of the invariant bilinear on the algebra is unique up to a scale. The restriction of the bilinear onto the Cartan subalgebra is dualized to give the metric on the root space and thus passes on the choice of scale to the roots.
But I had already chosen the Killing form as my bilinear - a necessary ingredient in the first method I presented.  Thus the length of my roots was fixed. 
Direct construction of a few low rank cases (something that I should have done before posting) confirmed that everything works out ok.
As a quick check and application, we can reproduce the scaling factor given by Broughton for $A_n$.  We have $\mathrm{rnk}(A_n)=n$ and $\mathrm{dim}(A_n)=(n+1)^2-1$, so $l=\frac{\mathrm{rnk}(A_n)}{\mathrm{dim}(A_n)-\mathrm{rnk}(A_n)}=\frac{1}{n+1}$.
