  Generalized Berwald manifolds are Finsler manifolds admitting linear
connections such that the parallel transports preserve the Finslerian length of
tangent vectors (compatibi\-li\-ty condition). By the fundamental result of the
theory \cite{V5} such a linear connection must be metrical with respect to the
averaged Riemannian metric given by integration of the Riemann-Finsler metric
on the indicatrix hypersurfaces. Therefore the linear connection (preserving
the Finslerian length of tangent vectors) is uniquely determined by its
torsion. If the torsion is zero then we have a classical Berwald manifold.
Otherwise, the torsion is a strange data we need to express in terms of the
intrinsic quantities of the Finsler manifold. In the paper we consider the
extremal compatible linear connection of a generalized Berwald manifold by
minimizing the pointwise length of its torsion tensor. It is a conditional
extremum problem involving functions defined on a local neighbourhood of the
tangent manifold. In case of a given point of the manifold, the reference
element method provides that the number of the Lagrange multipliers equals to
the number of the equations providing the compatibility of the linear
connection to the Finslerian metric. Therefore the solution of the conditional
extremum problem with a reference element can be expressed in terms of the
canonical data. The solution of the conditional extremum problem independently
of the reference elements can be constructed algorithmically at each point of
the manifold. The pointwise solutions constitute a section of the torsion
tensor bundle for testing the compatibility of the corresponding linear
connection to the Finslerian metric. In other words, we have an intrinsic
algorithm to check the existence of compatible linear connections on a Finsler
manifold because it is equivalent to the existence of the extremal compatible
linear connection.
