polaris.e3sm.init.partitions.write_graph

polaris.e3sm.init.partitions.write_graph(filename, xadj, adjncy)[source]

Write a graph in the format gpmetis reads.

Parameters:
  • filename (str) – The file to write.

  • xadj (numpy.ndarray) – Where each vertex’s neighbors start in adjncy, with one more entry than there are vertices.

  • adjncy (numpy.ndarray) – Each vertex’s zero-based neighbors, one vertex after another. Every edge appears once from each end.