  We discuss $5d$ and $6d$ supersymmetric gauge theories in the target-space
with compactified directions and with the matter hypermultiplets in fundamental
representations in the framework of integrable systems. In particular, we
consider the prepotentials of these theories and derive explicit formulas for
their perturbative parts.
