![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Partitioning the mesh for parallel processing has three major goals:
Balancing the partitions (equalizing the number of cells) ensures that each processor has an equal load and that the partitions will be ready to communicate at about the same time. Since communication between partitions can be a relatively time-consuming process, minimizing the number of interfaces can reduce the time associated with this data interchange. Minimizing the number of partition neighbors reduces the chances for network and routing contentions. In addition, minimizing partition neighbors is important on machines where the cost of initiating message passing is expensive compared to the cost of sending longer messages. This is especially true for workstations connected in a network.
The partitioning schemes in ANSYS FLUENT use bisection or METIS algorithms to create the partitions, but unlike other schemes which require the number of partitions to be a factor of two, these schemes have no limitations on the number of partitions. For each available processor, you will create the same number of partitions (i.e., the total number of partitions will be an integral multiple of the number of processors).
Partition Methods
The mesh is partitioned using a bisection or METIS algorithm. The selected algorithm is applied to the parent domain, and then recursively applied to the child subdomains. For example, to divide the mesh into four partitions with a bisection method, the solver will bisect the entire (parent) domain into two child domains, and then repeat the bisection for each of the child domains, yielding four partitions in total. To divide the mesh into three partitions with a bisection method, the solver will "bisect'' the parent domain to create two partitions--one approximately twice as large as the other--and then bisect the larger child domain again to create three partitions in total.
The mesh can be partitioned using one of the algorithms listed below. The most efficient choice is problem-dependent, so you can try different methods until you find the one that is best for your problem. See Section 32.5.4 for recommended partitioning strategies.
|
Note that when using the socket version (
-pnet), the METIS partitioner is not available. In this case, METIS partitioning can be obtained using the partition filter, as described below.
|
|
If you create non-conformal interfaces, and generate virtual polygonal faces, your METIS partition can cross non-conformal interfaces by using the connectivity of the virtual polygonal faces. This improves load balancing for the parallel solver and minimizes communication by decreasing the number of partition interface cells.
|
This is the default bisection method in ANSYS FLUENT.
Optimizations
Additional optimizations can be applied to improve the quality of the mesh partitions. The heuristic of bisecting perpendicular to the direction of longest domain extent is not always the best choice for creating the smallest interface boundary. A "pre-testing'' operation (see Section 32.5.6) can be applied to automatically choose the best direction before partitioning. In addition, the following iterative optimization schemes exist:
In general, the Smooth and Merge schemes are relatively inexpensive optimization tools.
Pretesting
If you choose the Principal Axes or Cartesian Axes method, you can improve the bisection by testing different directions before performing the actual bisection. If you choose not to use pretesting (the default), ANSYS FLUENT will perform the bisection perpendicular to the direction of longest domain extent.
If pretesting is enabled, it will occur automatically when you click the Partition button in the Partitioning and Load Balancing dialog box, or when you read in the mesh if you are using automatic partitioning. The bisection algorithm will test all coordinate directions and choose the one which yields the fewest partition interfaces for the final bisection.
Note that using pretesting will increase the time required for partitioning. For 2D problems partitioning will take 3 times longer than without pretesting, and for 3D problems it will take 4 times longer.
Using the Partition Filter
As noted above, you can use the METIS partitioning method through a filter in addition to within the Auto Partition Mesh and Partitioning and Load Balancing dialog boxes. To perform METIS partitioning on an unpartitioned mesh, use the File/Import/Partition/Metis... menu item.
File
Import
Partition
Metis...
ANSYS FLUENT will use the METIS partitioner to partition the mesh, and then read the partitioned mesh into the solver. The number of partitions will be equal to the number of processes. You can then proceed with the model definition and solution.
|
Direct import to the parallel solver through the partition filter requires that the host machine has enough memory to run the filter for the specified mesh. If not, you will need to run the filter on a machine that does have enough memory. You can either start the parallel solver on the machine with enough memory and repeat the process described above, or run the filter manually on the new machine and then read the partitioned mesh into the parallel solver on the host machine.
|
To manually partition a mesh using the partition filter, enter the following command:
where input_filename is the filename for the mesh to be partitioned, partition_count is the number of partitions desired, and output_filename is the filename for the partitioned mesh. You can then read the partitioned mesh into the solver (using the standard File/Read/Case... menu item) and proceed with the model definition and solution.
When the File/Import/Partition/Metis... menu item is used to import an unpartitioned mesh into the parallel solver, the METIS partitioner partitions the entire mesh. You may also partition each cell zone individually, using the File/Import/Partition/Metis Zone... menu item.
File
Import
Partition
Metis Zone...
This method can be useful for balancing the work load. For example, if a case has a fluid zone and a solid zone, the computation in the fluid zone is more expensive than in the solid zone, so partitioning each zone individually will result in a more balanced work load.