  Breaking of equivalence between the microcanonical ensemble and the canonical
ensemble, describing a large system subject to hard and soft constraints,
respectively, was recently shown to occur in large random graphs. Hard
constraints must be met by every graph, soft constraints must be met only on
average, subject to maximal entropy. In Squartini et al. (2015) it was shown
that ensembles of random graphs are non-equivalent when the degrees of the
nodes are constrained, in the sense of a non-zero limiting specific relative
entropy as the number of nodes diverges. In that paper, the nodes were placed
either on a single layer (uni-partite graphs) or on two layers (bi-partite
graphs). In the present paper we consider an arbitrary number of
intra-connected and inter-connected layers, thus allowing for modular graphs
with a multi-partite, multiplex, block-model or community structure. We give a
full classification of ensemble equivalence, proving that breakdown occurs if
and only if the number of local constraints (i.e., the number of constrained
degrees) is extensive in the number of nodes, irrespective of the layer
structure. In addition, we derive a formula for the specific relative entropy
and provide an interpretation of this formula in terms of Poissonisation of the
degrees.
