polaris.e3sm.init.partitions.partitions_to_build

polaris.e3sm.init.partitions.partitions_to_build(cores, basename, ncells)[source]

The core counts from cores that still need a partition file.

Partitioning a large mesh takes hours – most of a day on the finest unified mesh – so a step that is interrupted has to be able to pick up where it stopped rather than start over.

A file is only taken as finished when it has one line per cell, which is what gpmetis writes. Existence alone is not enough: a job killed at its walltime leaves a partition truncated part-way through, and trusting that would hand E3SM a partition covering some of the mesh. The one-piece partition is the exception, being deliberately empty.

Parameters:
  • cores (iterable of int) – The core counts the step means to partition into.

  • basename (str) – The partition filenames without the .part.<n> suffix.

  • ncells (int) – The number of cells each complete partition file describes.

Returns:

list of int – The core counts still to build, in the order given.