  This paper presents an algorithm to automatically design networks with torus
topologies, such as ones widely used in large-scale supercomputers. The
characteristic feature of our approach is that real life equipment prices and
values of technical characteristics are used. As a result, we also have the
opportunity to compare costs of torus and fat-tree networks.
  The algorithm is useful as a part of a bigger design procedure that selects
optimal hardware of cluster supercomputer as a whole.
