Let us consider a complete weighted graph, with $NM$ nodes. Our objective is to find, among all possible combinations of $N$ disjoint $M$-cliques (each clique consisting of $M$ nodes), the configuration that maximizes/minimizes the sum of the $N$ $M$-cliques weights. Here the weight of a $M$-clique is the sum of the edge weights between all the $M$ nodes composing the clique.
It sounds like a classical mathematical problem, but I have been spending hours without finding anything. The special case where $M=2$ consists of a maximal weighted matching problem in a complete graph and can be solved using Edmonds Matching Algorithm, but I can't find anything for $M>2$.
Is there an efficient algorithm for this problem?