With the wide application of computational fluid dynamics in various fields and the continuous growth of the complexity of the problem and the scale of the computational grid, large-scale parallel computing came into being and became an indispensable means to solve this problem. In the numerical simulation of multi-block grids, the mapping strategy from grid block to processor is an important factor affecting the efficiency of load balancing and communication overhead. The multi-level graph partitioning algorithm is an important algorithm that introduces graph network dynamic programming to solve the load-balancing problem. This paper proposed a firefly-ant compound optimization (FaCO) algorithm for the weighted fusion of two optimization rules of the firefly and ant colony algorithm. For the graph, results after multi-level graph partitioning are transformed into a traveling salesman problem (TSP). This algorithm is used to optimize the load distribution of the solution, and finally, the rough graph segmentation is projected to obtain the most original segmentation optimization results. Although firefly algorithm (FA) and ant colony optimization (ACO), as swarm intelligence algorithms, are widely used to solve TSP problems, for the problems for which swarm intelligence algorithms easily fall into local optimization and low search accuracy, the improvement of the FaCO algorithm adjusts the weight of iterative location selection and updates the location. Experimental results on publicly available datasets such as the Oliver30 dataset and the eil51 dataset demonstrated the effectiveness of the FaCO algorithm. It is also significantly better than the commonly used firefly algorithm and other algorithms in terms of the search results and efficiency and achieves better results in optimizing the load-balancing problem of parallel computing.