A new record of graph enumeration enabled by parallel processing

Using three supercomputers, we broke a record set in 2011, in the enumeration of non-isomorphic regular graphs by expanding the sequence of A006820 in Online Encyclopedia of Integer Sequences (OEIS), to achieve the number for 4-regular graphs of order 23 as 429,668,180,677,439, while discovering serval optimal regular graphs with minimum average shortest path lengths (ASPL) that can be used as interconnection networks for parallel computers. The number of 4-regular graphs and the optimal graphs, extremely time-consuming to calculate, result from a method we adapt from GENREG, a classical regular graph generator, to fit for supercomputers' strengths of using thousands of processor cores.


Introduction
Analysis of regular graphs for their properties, including eigen-spectra and automorphisms, is a fertile field for discovering and applications in algebraic graph theory [1]. Yet, there are many unsolved problems, e.g., the Conways 99-graph problem [2] and the 57-regular Moore graph [3]. For analysis of interconnection networks, regularity is essential for its direct and useful relationship to the complexity of network implementation, and as such, many regular graphs including the Peterson graph, hypercube graph, and their extensions [4,5,6,7,8,9] are widely used to construct interconnection networks for parallel computers.
For 3-regular graphs of order n, Robinson and Wormald [10,11] presented all counting results for n ≤ 40, while pointing out that enumeration for unlabeled k-regular graphs with k > 3 is an unsolved problem. Meringer [12] proposed a practical method to construct regular graphs without pairwise isomorphism checking but with a fast test for canonicity. Brankmann [13,14] developed minibaum and snarkhunter for generating 3-regular graphs.
The House of Graphs [15] and the OEIS [16] databased the latest results for numbers of regular graphs. Kimberley [17] contributed many results (A068934) to these databases by a package called GENREG developed by Meringer [12]. In addition to its challenges of pure mathematics, the graph counting problem is the root of topics in reliability, artificial intelligence, reasoning, statistical physics [18], life sciences, chemistry [19] and even the search for the origins of life [20].
GENREG, efficient for small-scale clusters due to its feature of task par-tition, approaches a hard wall of speedup for fine-grained partitioning on large-scale clusters, caused mainly by load imbalance. For obtaining larger graphs, we extend GENREG for distributed clusters by using the message passing interface (MPI) [21]. Using the parallel GENREG we developed, we have obtained the following results: 1) filtered all 3-regular graphs up to order 32 with minimum ASPLs; 2) discovered thousands of 4-regular graphs of order 32 with minimum AS-PLs; 3) generated the exact counts of 4-regular graphs of order 23 by using the three supercomputer clusters located in the US, China, and Ecuador.
Among our results, the first and second have been applied to the interconnection network research [22] for benchmark relationship of the graph ASPLs to network performance latencies. The third expands n from 22 to 23, for the first time, in the sequence A006820 [23] of OEIS, which is the number of connected 4-regular graphs of order n. Kimberley [23] used GENREG to enumerate the 4-regular graphs for up to the order 22 in 2011 [24]. This record for n = 23 remained unchallenged until our enumeration for n = 23, enabled by our parallel computing implementation to advance it a step.

The enumeration function
For enumerating the regular graphs, published packages such as minibaum [13], snarkhunter [14], and GENREG have their own strengths and weaknesses, GENREG is more general in covering the graph degrees than minibaum and snarkhunter that only support 3-regular graphs.
In our parallel computing framework, we designate one node as the master, whose task involves adaptive scheduling and dispatching, and the rest as a team of workers. When our program starts, the workers send a message to the master to request a task, and the workers continue the requests until the list of tasks exhausts. As usual, when the master sends a task to a worker, this task is marked as selected and becomes unavailable. At last, when the task pool empties, the master signals all workers to exit.
Our dynamical scheduling strategy keeps cores in the cluster busy for useful tasks to allow us efficient search for graphs with specified parameters, e.g., diameters or eigenvalues, by inserting external serial programs. In addition to load balance, our parallel program reduces the communication cost to N task × 2, less requirement of bandwidth because the message itself is the message count. If we use a dedicated thread for task scheduling, the scalability and limit the maximum computer system can both shrink. Depending on the communication sub-system, the maximum scalable system our current approach can reach is approximately 3,000 cores, due to communication congestions, eventually. We may improve the scalability of our program by a multi-level scheduling; particularly, for the many-core systems.

Search for a regular graph with minimal ASPL
In the interconnection networks of supercomputers and data centers, regularity is a very significant feature because it is related to the complexity of the network configuration. For the topologies of regular graphs applied to the interconnection networks, it is highly desirable to obtain graphs with minimal ASPLs because they help reduce communication latencies. Let d(i, j) be the distance between vertex i and j, the ASPL is calculated as follows, Cerf [25] calculated and proved lower bound of ASPL, hence the goal of optimal graph is to find graphs with minimum ASPLs. Usually and thus far, random or heuristic methods or intuitions were resorted to searching for graphs with such desired properties for large networks; Graph Golf [26], a competition of searching for graphs with the minimal diameters and ASPLs, generated many graphs that are very commonly, but asymmetrically. However, we still hope to discover graphs with all desired properties including minimum diameters, ASPLs, symmetry, and robustness but with one disadvantage: smaller graphs. However, these graphs can be adopted in smaller clusters or multiple modules of these clusters or system-on-chip.  Figure 1: The optimal graphs used in, for example, a Beowulf cluster [22].
Using this framework, we decomposed the search into 200,000 sub-tasks and completed the exhaustive search of all of 3-regular graphs of order 32 with diameter 4 and minimal ASPL. The program running on the Sunway-Bluelight supercomputer [27] with 80,000 cores for 72 hours and discovered 56 graphs with the minimal ASPLs after exhausting all 18,941,522,184,590 possible graphs predicted by Robinson et al. [10] who only enumerated them without finding the graphs with desired properties including minimum diameters and ASPLs. Deng et al. [22] applied one ( Fig. 1 (a)) of these graphs to construct a Beowulf [28] cluster, and their benchmark results show that the graphs with the minimal ASPL outpeform other classical topologies. Clearly, the tasks of enumerations vary greatly from graph to graph, and our dynamic task scheduling has eliminated substantial waiting time due to load imbalance.

Graph counting for (23,4)-regular graphs
When we search for the minimum-ASPL graphs among all possible 4regular graphs of order 32, there is no enumeration result for this scale when girth ≤ 5. We can still use our software to search for regular graphs with minimum ASPL, as shown in Fig. 1 (b), without confirmation of exhaustiveness. Therefore, we verified the results in Tab. 1 after decomposing the problem into 50,000 sub-tasks and setting the split-level as 12. We manage to increase the n of the sequence A006820 from 22 to 23 and confirmed the number of 4-regular graphs of order 23 as 429,668,180,677,439 by using our parallel GENREG with the same parameters. processors and the IBM Quinde with Power8 processors contributed the rest.
In fact, the result of graph counting for (23,4)-regular graphs was obtained by the strategic and opportunistic use of the fragmented and shared computing resources. In addition to the policy of fair and efficient share for most supercomputers, the Tianhe-1 would terminate tasks that last long for many cores because of maintenance, which prevents us from running long tasks. The external scheduling system we developed helps overcome the limitations of computing resources while facilitating optimal utilization of the occasionally available cores.

Conclusions
Our parallel method adapting the GENREG enables us to complete the research and enumeration on systems of 3000 processor cores. For the first time, using this new approach, we discovered several optimal graphs of order 32 and found the enumeration count for 4-regular graphs of order 23, gaining confidence in the graph theory community that high-performance computing can help solve otherwise intractable problems.