Metis - Block output

345 views Asked by At

I am working with Metis , a Graph Partitioning API. I have a full grid from nodes and want to partitions this grid. After this partition a cfd-solver will run in parallel on multiple gpu's. The Problem is: I need a block output from metis(same number of nodes in each dimension). I know, that metis just used a Graph in the background.

It is nevertheless possible to get blocks as output?

1

There are 1 answers

1
NoseKnowsAll On BEST ANSWER

This may be too late for you, but perhaps it is not too late for someone else. If you want a blocked output, I am also presuming that you are working with a structured grid.

If so, we can follow along this answer from SciComp. A reasonably good solution to create a block-output from METIS:

  1. Create a new graph that encapsulates the block structure of your original problem. That is, if we originally have a 50^3 cube of vertices connected with cubal elements, we can "recreate" this structure by a smaller 10^3 cube of vertices connected with cubal elements. Except this time, the vertices correspond to blocks of the original problem.
  2. Run METIS on your new graph.
  3. Reinterpret the results as a block-output from METIS for your original problem.

I say this is a "reasonably good" solution in that you have to prescribe the number of nodes in each dimension yourself before running METIS. So perhaps you can optimize this hyper-parameter yourself in some way, but perhaps you just have to make an educated guess and run with the output METIS provides.